SHA256
feat StayExport - Added ExportDetails for StayExports
Store a new field ('ExportDetails') with export details. This is a JSON field in DB that can store information about the export depending on the format provider used.
Changes:
- Updated models and created required migrations.
- Show field in StayExport list.
This commit is contained in:
1 parent
7b8020879b
commit
9ec87d56da
16 files changed
+352
-16
No files matched your search
@@ -52,8 +52,13 @@
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => Localizer.GetEnumValue(x.ExportResult)"
|
||||
Title="@LanguageLocale.dto_StayExportFile_ExportResult" />
|
||||
<PropertyColumn Property="x => x.ExportedPath" Title="@LanguageLocale.dto_StayExportFile_ExportedPath" Hidden />
|
||||
<PropertyColumn Property="x => x.ExportTime" Title="@LanguageLocale.dto_StayExportFile_ExportTime" />
|
||||
<TemplateColumn Title="@LanguageLocale.dto_StayExportFile_ExportDetails">
|
||||
<CellTemplate>
|
||||
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Info"
|
||||
OnClick="() => ShowExportDetails(context.Item)" />
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
|
||||
<TemplateColumn CellClass="d-flex justify-between" Title="Options" StickyRight Hideable="false"
|
||||
ShowColumnOptions="false">
|
||||
@@ -118,7 +123,21 @@
|
||||
{
|
||||
string jsonParams = JsonSerializer.Serialize(dto.ExportParams, options: new() { WriteIndented = true });
|
||||
|
||||
await DialogService.ShowMessageBoxAsync("Details", jsonParams);
|
||||
await DialogService.ShowMessageBoxAsync("Details", (MarkupString)$"<pre>{jsonParams}</pre>");
|
||||
}
|
||||
|
||||
private async Task ShowExportDetails(StayExportFileDTO dto)
|
||||
{
|
||||
if (string.IsNullOrEmpty(dto.ExportDetails))
|
||||
{
|
||||
userMessage.ShowMessage("This ExportFile doesn't have any export details", MessageKind.Info);
|
||||
return;
|
||||
}
|
||||
|
||||
using var jDoc = JsonDocument.Parse(dto.ExportDetails);
|
||||
string jsonDetails = JsonSerializer.Serialize(jDoc, new JsonSerializerOptions { WriteIndented = true });
|
||||
|
||||
await DialogService.ShowMessageBoxAsync("Details", (MarkupString)$"<pre>{jsonDetails}</pre>");
|
||||
}
|
||||
|
||||
private async Task BtnDownloadFile(StayExportFileDTO item)
|
||||
|
||||
Reference in new issue
Block a user