* Changed css to make grid more responsive

This commit is contained in:
2025-02-19 20:06:26 +01:00
parent 08a6666064
commit c2078d1614
10 changed files with 82 additions and 57 deletions

View File

@@ -38,19 +38,19 @@ builder.Services.AddOpenApiDocument(config =>
config.Version = "v1"; config.Version = "v1";
}); });
builder.Services.AddHangfire(config => config // builder.Services.AddHangfire(config => config
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170) // .SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
.UseSimpleAssemblyNameTypeSerializer() // .UseSimpleAssemblyNameTypeSerializer()
.UseRecommendedSerializerSettings() // .UseRecommendedSerializerSettings()
.UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions // .UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions
{ // {
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5), // CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5), // SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
QueuePollInterval = TimeSpan.Zero, // QueuePollInterval = TimeSpan.Zero,
UseRecommendedIsolationLevel = true, // UseRecommendedIsolationLevel = true,
DisableGlobalLocks = true // DisableGlobalLocks = true
})); // }));
builder.Services.AddHangfireServer(); // builder.Services.AddHangfireServer();
// Configure AutoMapper // Configure AutoMapper
builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile), builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile),
@@ -83,7 +83,7 @@ builder.Services.AddScoped<ICustomerOrderService, CustomerOrderService>();
builder.Services.AddScoped<IEmailService, EmailService>(); builder.Services.AddScoped<IEmailService, EmailService>();
builder.Services.AddScoped<IScheduleJobService, ScheduleJobService>(); builder.Services.AddScoped<IScheduleJobService, ScheduleJobService>();
builder.Services.AddScoped<ITaskSchedulerService, TaskSchedulerService>(); builder.Services.AddScoped<ITaskSchedulerService, TaskSchedulerService>();
builder.Services.AddHostedService<TimedHostedService>(); //builder.Services.AddHostedService<TimedHostedService>();
var app = builder.Build(); var app = builder.Build();
@@ -97,7 +97,7 @@ app.UseAuthorization();
app.MapControllers(); app.MapControllers();
app.UseHangfireDashboard(); //app.UseHangfireDashboard();
// var scopeFactory = app.Services.GetRequiredService<IServiceScopeFactory>(); // var scopeFactory = app.Services.GetRequiredService<IServiceScopeFactory>();
// using (var scope = scopeFactory.CreateScope()) // using (var scope = scopeFactory.CreateScope())

View File

@@ -4,9 +4,8 @@
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="page"> <div class="page h-100">
<main class="container-fluid d-flex flex-column h-100">
<main class="container-fluid">
<div class="bb-top-row px-4 d-flex justify-content-between align-items-center mb-3"> <div class="bb-top-row px-4 d-flex justify-content-between align-items-center mb-3">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
<img src="logo.svg" class="me-2" width="35" height="35" alt="Icon"> <img src="logo.svg" class="me-2" width="35" height="35" alt="Icon">
@@ -14,7 +13,7 @@
</div> </div>
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a> <a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div> </div>
<div class="row gx-1"> <div class="row gx-1 flex-grow-1">
<div class="col-auto custom-menu-width mb-3"> <div class="col-auto custom-menu-width mb-3">
<SfMenu HamburgerMode="true" Title="FA Krosno Manager" Items="@MenuItems" <SfMenu HamburgerMode="true" Title="FA Krosno Manager" Items="@MenuItems"
Orientation="Orientation.Vertical" CssClass="custom-menu"> Orientation="Orientation.Vertical" CssClass="custom-menu">
@@ -22,14 +21,14 @@
<MenuFieldSettings Text="Text" Children="Children"></MenuFieldSettings> <MenuFieldSettings Text="Text" Children="Children"></MenuFieldSettings>
</SfMenu> </SfMenu>
</div> </div>
<article class="content col"> <article class="content col d-flex flex-column">
<div class="py-2">@Body</div> <div class="py-2 flex-grow-1">@Body</div>
</article> </article>
</div> </div>
</main> </main>
</div> </div>
@code { @code {
private List<MenuItem> MenuItems { get; set; } = new(); private List<MenuItem> MenuItems { get; set; } = new();

View File

@@ -8,7 +8,7 @@
@using Syncfusion.Blazor.Cards @using Syncfusion.Blazor.Cards
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<h5>Zamówienie klienta nr @CustomerOrderDto?.CoNum</h5> <h5>Zamówienie klienta nr @CustomerOrderDto?.CoNum</h5>
<SfCard> <SfCard>
<CardContent> <CardContent>

View File

@@ -6,7 +6,7 @@
@using Syncfusion.Blazor.Cards @using Syncfusion.Blazor.Cards
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<h5>Zamówienia Klienta</h5> <h5>Zamówienia Klienta</h5>
<SfGrid AllowFiltering="true" <SfGrid AllowFiltering="true"
AllowPaging="true" AllowPaging="true"

View File

@@ -6,7 +6,7 @@
@using Syncfusion.Blazor.Cards @using Syncfusion.Blazor.Cards
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<h5>Zamówienie klienta nr @EdiCustomerOrderDto?.CustomerOrderNumber</h5> <h5>Zamówienie klienta nr @EdiCustomerOrderDto?.CustomerOrderNumber</h5>
<SfCard> <SfCard>
<CardContent> <CardContent>

View File

@@ -11,7 +11,7 @@
@using SelectionType = Syncfusion.Blazor.Grids.SelectionType @using SelectionType = Syncfusion.Blazor.Grids.SelectionType
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<h5>Zamówienia Klienta EDI</h5> <h5>Zamówienia Klienta EDI</h5>
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">

View File

@@ -4,7 +4,7 @@
@using Syncfusion.Blazor.Lists @using Syncfusion.Blazor.Lists
@inject ScheduleOrderDetailsService ScheduleOrderDetailsService @inject ScheduleOrderDetailsService ScheduleOrderDetailsService
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<h5>Indeksy</h5> <h5>Indeksy</h5>
<SfGrid AllowFiltering="true" <SfGrid AllowFiltering="true"
AllowPaging="true" AllowPaging="true"

View File

@@ -5,13 +5,9 @@
@inject ScheduleOrderService ScheduleOrderService @inject ScheduleOrderService ScheduleOrderService
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<div>
<h5>Zamówienia DELFOR</h5> <h5>Zamówienia DELFOR</h5>
</div> <ScheduleOrdersGrid PageSize="20" PassGridRef="SetGridRef" GridData="_scheduleOrders" />
<div class="container-fluid h-100">
<ScheduleOrdersGrid PageSize="20" PassGridRef="SetGridRef" GridData="_scheduleOrders"></ScheduleOrdersGrid>
</div>
</div> </div>
@code { @code {

View File

@@ -2,7 +2,7 @@
@using Syncfusion.Blazor.Grids @using Syncfusion.Blazor.Grids
@inherits LayoutComponentBase @inherits LayoutComponentBase
<div class="container-fluid h-100"> <div class="h-100 d-flex flex-column">
<SfGrid @ref="_grid" <SfGrid @ref="_grid"
TValue="ScheduleOrderDto" TValue="ScheduleOrderDto"
AllowFiltering="true" AllowFiltering="true"
@@ -12,23 +12,17 @@
DataSource="@_dataSource" DataSource="@_dataSource"
EnableAdaptiveUI="true" EnableAdaptiveUI="true"
EnablePersistence="true" EnablePersistence="true"
AdaptiveUIMode="AdaptiveMode.Both"
AllowRowClick="true" AllowRowClick="true"
SelectionMode="GridSelectionMode.Single" SelectionMode="GridSelectionMode.Single"
QueryCellInfo="OnQueryCellInfo" QueryCellInfo="OnQueryCellInfo"
RowSelected="OnRowSelected"> RowSelected="OnRowSelected">
<GridColumns> <GridColumns>
<GridColumn Field=@nameof(ScheduleOrderDto.PONum) HeaderText="Zamówienie Klienta" <GridColumn Field=@nameof(ScheduleOrderDto.PONum) HeaderText="Zamówienie Klienta" Width="150" AllowFiltering="true"></GridColumn>
Width="150" AllowFiltering="true"></GridColumn> <GridColumn Field=@nameof(ScheduleOrderDto.PurchaserCode) HeaderText="Klient" Width="100" AllowFiltering="true"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDto.PurchaserCode) HeaderText="Klient" <GridColumn Field=@nameof(ScheduleOrderDto.RecipientName) HeaderText="Odbiorca" Width="100" AllowFiltering="true"></GridColumn>
Width="100" AllowFiltering="true"></GridColumn> <GridColumn Field=@nameof(ScheduleOrderDto.LastUpdateDate) HeaderText="Data Utworzenia" Format="d" Type="ColumnType.Date" Width="130" AllowFiltering="true"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDto.RecipientName) HeaderText="Odbiorca" <GridColumn Field=@nameof(ScheduleOrderDto.DocType) HeaderText="Typ Dokumentu" Width="100" AllowFiltering="true"></GridColumn>
Width="100" AllowFiltering="true"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDto.LastUpdateDate) HeaderText="Data Utworzenia"
Format="d" Type="ColumnType.Date" Width="130"
AllowFiltering="true"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDto.DocType) HeaderText="Typ Dokumentu"
Width="100" AllowFiltering="true"></GridColumn>
</GridColumns> </GridColumns>
<GridTemplates> <GridTemplates>
<DetailTemplate> <DetailTemplate>
@@ -41,13 +35,11 @@
TValue="ScheduleOrderDetailDto" TValue="ScheduleOrderDetailDto"
DataSource="@scheduleOrderDetails" DataSource="@scheduleOrderDetails"
EnablePersistence="true" EnablePersistence="true"
EnableAdaptiveUI="true"> EnableAdaptiveUI="true"
AdaptiveUIMode="AdaptiveMode.Both">
<GridColumns> <GridColumns>
<GridColumn Field=@nameof(ScheduleOrderDetailDto.Sc_productCode) HeaderText="Pozycja" <GridColumn Field=@nameof(ScheduleOrderDetailDto.Sc_productCode) HeaderText="Pozycja" Width="100"></GridColumn>
Width="100"></GridColumn> <GridColumn Field=@nameof(ScheduleOrderDetailDto.Sh_productCode) HeaderText="Pozycja Klienta" Width="100"></GridColumn>
<GridColumn Field=@nameof(ScheduleOrderDetailDto.Sh_productCode)
HeaderText="Pozycja Klienta"
Width="100"></GridColumn>
</GridColumns> </GridColumns>
<GridFilterSettings Type="FilterType.Excel"/> <GridFilterSettings Type="FilterType.Excel"/>
<GridPageSettings PageSize="10"/> <GridPageSettings PageSize="10"/>

View File

@@ -63382,3 +63382,41 @@ span.e-table-box.e-rbox-select {
--bs-gutter-x: 5px; --bs-gutter-x: 5px;
} }
} }
html, body {
height: 100%;
margin: 0;
padding: 0;
}
.page.h-100 {
height: 100vh;
overflow: hidden;
}
.custom-menu, .custom-menu-width {
width: 300px;
}
@media (max-width: 767px) {
.custom-menu, .custom-menu-width {
width: 100%;
}
.row.gx-1 {
flex-direction: column;
}
.bb-top-row {
flex-direction: column;
align-items: flex-start;
}
.bb-top-row > div, .bb-top-row > a {
margin-bottom: 10px;
}
.e-grid {
width: 100vw !important;
margin: 0 !important;
}
.e-grid .e-content {
height: calc(100vh - 150px) !important;
}
}