Improve info panel tables, PDF support, and splash screen
Refactor shipping document info panel tables for better appearance and responsiveness using Bootstrap classes and improved CSS. Add PDF.js and custom PDF viewer scripts to enable PDF rendering in the info panel. Update splash screen handling for better Windows compatibility. Expand allowed Bash commands for development. Ensure UI updates in MgGridBase are properly scheduled with InvokeAsync.
This commit is contained in:
parent
d27f53453f
commit
e8d38f0038
|
|
@ -1,7 +1,9 @@
|
|||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(dir:*)"
|
||||
"Bash(dir:*)",
|
||||
"Bash(dotnet list:*)",
|
||||
"Bash(find:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,15 +24,23 @@
|
|||
<AfterColumnsTemplate Context="dataItem">
|
||||
@if (dataItem is ShippingDocument doc)
|
||||
{
|
||||
<table class="table table-bordered table-striped" style="margin-top: 35px;">
|
||||
<thead>
|
||||
<table class="table table-sm table-bordered table-striped" style="margin-top: 35px;">
|
||||
<colgroup>
|
||||
<col style="width: auto;" />
|
||||
<col style="width: 25%;" />
|
||||
<col style="width: 65px;" />
|
||||
<col style="width: 65px;" />
|
||||
<col style="width: 65px;" />
|
||||
<col style="width: 65px;" />
|
||||
</colgroup>
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>Név a dokumentumon</th>
|
||||
<th style ="padding-left: 10px;">Termék neve</th>
|
||||
<th style="text-align: right; padding-left: 10px;">Rakl.</th>
|
||||
<th style="text-align: right; padding-left: 10px;">Menny.</th>
|
||||
<th style="text-align: right; padding-left: 10px;">Net.súly</th>
|
||||
<th style="text-align: right; padding-left: 10px;">Br.súly</th>
|
||||
<th>Termék neve</th>
|
||||
<th class="text-end">Rakl.</th>
|
||||
<th class="text-end">Menny.</th>
|
||||
<th class="text-end">Net.súly</th>
|
||||
<th class="text-end">Br.súly</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
|
@ -40,22 +48,22 @@
|
|||
{
|
||||
<tr>
|
||||
<td>@shippingItem.NameOnDocument</td>
|
||||
<td style="padding-left: 10px;">@shippingItem.ProductName</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@shippingItem.PalletsOnDocument</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@shippingItem.QuantityOnDocument</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@shippingItem.NetWeightOnDocument</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@shippingItem.GrossWeightOnDocument</td>
|
||||
<td>@shippingItem.ProductName</td>
|
||||
<td class="text-end">@shippingItem.PalletsOnDocument</td>
|
||||
<td class="text-end">@shippingItem.QuantityOnDocument</td>
|
||||
<td class="text-end">@shippingItem.NetWeightOnDocument</td>
|
||||
<td class="text-end">@shippingItem.GrossWeightOnDocument</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr style="font-weight: bold;">
|
||||
<tfoot class="table-light fw-bold">
|
||||
<tr>
|
||||
<td>TOTAL:</td>
|
||||
<td style="padding-left: 10px;"></td>
|
||||
<td style="text-align: right; padding-left: 10px;">@doc.ShippingItems.Sum(x => x.PalletsOnDocument)</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@doc.ShippingItems.Sum(x => x.QuantityOnDocument)</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@double.Round(doc.ShippingItems.Sum(x => x.NetWeightOnDocument), 1)</td>
|
||||
<td style="text-align: right; padding-left: 10px;">@double.Round(doc.ShippingItems.Sum(x => x.GrossWeightOnDocument), 1)</td>
|
||||
<td></td>
|
||||
<td class="text-end">@doc.ShippingItems.Sum(x => x.PalletsOnDocument)</td>
|
||||
<td class="text-end">@doc.ShippingItems.Sum(x => x.QuantityOnDocument)</td>
|
||||
<td class="text-end">@double.Round(doc.ShippingItems.Sum(x => x.NetWeightOnDocument), 1)</td>
|
||||
<td class="text-end">@double.Round(doc.ShippingItems.Sum(x => x.GrossWeightOnDocument), 1)</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@
|
|||
<!-- App Icon -->
|
||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
||||
|
||||
<!-- Splash Screen -->
|
||||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
|
||||
<!-- Splash Screen - use PNG for better Windows compatibility -->
|
||||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" TintColor="#512BD4" />
|
||||
|
||||
<!-- Images -->
|
||||
<MauiImage Include="Resources\Images\*" />
|
||||
|
|
@ -88,6 +88,14 @@
|
|||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Windows-specific assets -->
|
||||
<ItemGroup Condition="$(TargetFramework.Contains('-windows'))">
|
||||
<Content Include="Platforms\Windows\Assets\splashSplashScreen.png">
|
||||
<Link>Assets\splashSplashScreen.png</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Data" Version="25.1.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.ObjectPool" Version="10.0.1" />
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
<link href="_content/DevExpress.Blazor.Themes.Fluent/global.min.css" data-theme-id="fluent-blueLight" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Themes.Fluent/modes/light.min.css" data-theme-id="fluent-blueLight" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor.Themes.Fluent/accents/blue.min.css" data-theme-id="fluent-blueLight" rel="stylesheet" />
|
||||
<link href="_content/DevExpress.Blazor/dx-blazor.css" rel="stylesheet" />
|
||||
<link href="_content/FruitBankHybrid.Shared/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="_content/FruitBankHybrid.Shared/app.css" rel="stylesheet" />
|
||||
<link href="_content/AyCode.Blazor.Components/css/mg-grid-info-panel.css" rel="stylesheet" />
|
||||
|
|
@ -26,6 +25,12 @@
|
|||
<div id="app">Loading...</div>
|
||||
|
||||
<script src="_framework/blazor.webview.js" autostart="false"></script>
|
||||
<script src="_content/AyCode.Blazor.Components/js/mgGridInfoPanel.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
|
||||
<script>
|
||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
|
||||
</script>
|
||||
<script src="_content/FruitBankHybrid.Shared/js/pdfViewer.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue