Add AI process modal to shipping grid with toolbar button
Added an "AI process" toolbar button to the shipping document grid, styled with a new magic/sparkles icon. Clicking the button opens a large modal (DxWindow) containing an iframe-based AI processing form (AiProcessFormTemplate). The modal reloads grid data on close. Also includes related CSS for the icon, minor grid layout logic improvements, and retains commented file upload code for reference.
This commit is contained in:
parent
c468583afd
commit
f95602e82d
|
|
@ -15,6 +15,7 @@ using System.Reflection;
|
|||
using System.Text.Json;
|
||||
using DevExpress.Blazor.Internal;
|
||||
using System.Text.RegularExpressions;
|
||||
using AyCode.Core.Compression;
|
||||
|
||||
namespace AyCode.Blazor.Components.Components.Grids;
|
||||
|
||||
|
|
@ -769,10 +770,13 @@ public abstract class MgGridBase<TSignalRDataSource, TDataItem, TId, TLoggerClie
|
|||
|
||||
private async Task Grid_LayoutAutoLoading(GridPersistentLayoutEventArgs e)
|
||||
{
|
||||
BeginUpdate();
|
||||
|
||||
// Save the default layout before loading any saved layout
|
||||
_defaultLayoutJson ??= JsonSerializer.Serialize(SaveLayout());
|
||||
|
||||
e.Layout = await LoadLayoutFromLocalStorageAsync(AutomaticLayoutStorageKey);
|
||||
EndUpdate();
|
||||
}
|
||||
|
||||
private async Task Grid_LayoutAutoSaving(GridPersistentLayoutEventArgs e)
|
||||
|
|
@ -801,7 +805,10 @@ public abstract class MgGridBase<TSignalRDataSource, TDataItem, TId, TLoggerClie
|
|||
{
|
||||
try
|
||||
{
|
||||
BeginUpdate();
|
||||
var json = JsonSerializer.Serialize(layout);
|
||||
EndUpdate();
|
||||
|
||||
await JSRuntime.InvokeVoidAsync("localStorage.setItem", localStorageKey, json);
|
||||
}
|
||||
catch
|
||||
|
|
|
|||
Loading…
Reference in New Issue