Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Application/Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.7.1" />
<PackageReference Include="Hangfire.Core" Version="1.8.23" />
<PackageReference Include="ZiggyCreatures.FusionCache" Version="2.5.0" />
<PackageReference Include="ActualLab.Fusion" Version="12.1.14" />
<PackageReference Include="ActualLab.Fusion.Blazor" Version="12.1.14" />
<PackageReference Include="ActualLab.Generators" Version="12.1.14">
<PackageReference Include="ActualLab.Fusion" Version="12.1.61" />
<PackageReference Include="ActualLab.Fusion.Blazor" Version="12.1.61" />
<PackageReference Include="ActualLab.Generators" Version="12.1.61">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
4 changes: 2 additions & 2 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.Facebook" Version="10.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="10.0.3" />
<PackageReference Include="QuestPDF" Version="2025.12.4" />
<PackageReference Include="QuestPDF" Version="2026.2.1" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="9.0.3-dev-00155" />
<PackageReference Include="Serilog.Sinks.MSSqlServer" Version="9.0.3" />
<PackageReference Include="Serilog.Sinks.Postgresql.Alternative" Version="4.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="2.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.1.1" />
Expand Down
2 changes: 1 addition & 1 deletion src/Server.UI/Components/Shared/Layout/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

private async Task ApplyUserPreferences()
{
_defaultDarkMode = await _mudThemeProvider.GetSystemPreference();
_defaultDarkMode = await _mudThemeProvider.GetSystemDarkModeAsync();
await LayoutService.ApplyUserPreferences(_defaultDarkMode);
}

Expand Down
4 changes: 1 addition & 3 deletions src/Server.UI/DependencyInjection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ public static IServiceCollection AddServerUI(this IServiceCollection services, I
services.AddScoped<IdentityRedirectManager>();
services.AddMudServices(config =>
{
MudGlobal.InputDefaults.ShrinkLabel = true;
//MudGlobal.InputDefaults.Variant = Variant.Outlined;
//MudGlobal.ButtonDefaults.Variant = Variant.Outlined;

config.SnackbarConfiguration.PositionClass = Defaults.Classes.Position.BottomCenter;
config.SnackbarConfiguration.NewestOnTop = false;
config.SnackbarConfiguration.ShowCloseIcon = true;
Expand Down
9 changes: 5 additions & 4 deletions src/Server.UI/Pages/Contacts/Contacts.razor
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@
{
<MudMenuItem>
<MudFileUpload T="IBrowserFile" FilesChanged="OnImportData" Accept=".xlsx">
<ActivatorContent>
<CustomContent>
<MudButton Class="pa-0 ma-0" Style="font-weight:400;text-transform:none;"
Variant="Variant.Text"
Disabled="@_uploading">
@ConstantString.Import
</MudButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>
</MudMenuItem>
}
Expand Down Expand Up @@ -189,7 +190,7 @@
_canImport = (await AuthService.AuthorizeAsync(state.User, Permissions.Contacts.Import)).Succeeded;
_canExport = (await AuthService.AuthorizeAsync(state.User, Permissions.Contacts.Export)).Succeeded;
}
private async Task<GridData<ContactDto>> ServerReload(GridState<ContactDto> state)
private async Task<GridData<ContactDto>> ServerReload(GridState<ContactDto> state, CancellationToken cancellationToken)
{
try
{
Expand Down Expand Up @@ -234,7 +235,7 @@
{ x=>x.model,command },
};
var options = new DialogOptions { CloseButton = true, MaxWidth = MaxWidth.Medium, FullWidth = true };
var dialog = DialogService.Show<ContactFormDialog>(title, parameters, options);
var dialog =await DialogService.ShowAsync<ContactFormDialog>(title, parameters, options);
var state = await dialog.Result;

if (state != null && !state.Canceled)
Expand Down
17 changes: 9 additions & 8 deletions src/Server.UI/Pages/Dashboard/Dashboard.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@

<!-- Center: Donut Chart -->
<MudItem xs="12" md="4" Class="d-flex justify-center align-center">
<MudChart ChartType="ChartType.Donut" Width="140px" Height="140px"
InputData="@ChartData" InputLabels="@ChartLabels" LegendPosition="Position.Right" />
<MudChart T="double" ChartType="ChartType.Donut" Width="140px" Height="140px"
ChartLabels="@ChartLabels" ChartSeries="@([ChartData])"
LegendPosition="Position.Right" />
</MudItem>

<!-- Right: Detailed Breakdown -->
Expand Down Expand Up @@ -79,7 +80,7 @@
</MudAvatar>
</div>



<div class="d-flex align-center gap-2 mt-2">
<MudChip T="string" Color="Color.Success" Size="Size.Small" Variant="Variant.Text" Icon="@Icons.Material.Filled.ArrowUpward">+14.2%</MudChip>
Expand All @@ -101,7 +102,7 @@
</MudAvatar>
</div>



<div class="d-flex align-center gap-2 mt-2">
<MudChip T="string" Color="Color.Warning" Size="Size.Small" Variant="Variant.Text" Icon="@Icons.Material.Filled.TrendingUp">+5.4%</MudChip>
Expand All @@ -123,7 +124,7 @@
</MudAvatar>
</div>



<div class="d-flex align-center gap-2 mt-2">
<MudChip T="string" Color="Color.Default" Size="Size.Small" Variant="Variant.Text">Stable</MudChip>
Expand Down Expand Up @@ -206,7 +207,7 @@
<MudTd DataLabel="Position">@context.Position</MudTd>
<MudTd DataLabel="Molar" Style="text-align:right; font-family: monospace;">@context.Molar</MudTd>
</RowTemplate>

</MudTable>
</MudItem>

Expand All @@ -222,9 +223,9 @@
public double[] ChartData = { 68, 21, 11 };
public string[] ChartLabels = { "Paid", "Awaiting", "Overdue" };








// --- TABLE DATA ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@

<MudButton Variant="Variant.Filled" Color="Color.Secondary" StartIcon="@Icons.Material.Filled.Clear" Disabled="@(!_uploadedFiles.Any())" OnClick="Clear">@ConstantString.Clear</MudButton>
<MudFileUpload @ref="@_fileUpload" T="IReadOnlyList<IBrowserFile>" Accept=".jpg, .jpeg, .png, .webp" FilesChanged="LoadFiles">
<ActivatorContent>
<CustomContent>
<MudLoadingButton Loading="@_uploading" Variant="Variant.Filled"
StartIcon="@Icons.Material.Filled.AttachFile"
>
@L["Choose files"]
</MudLoadingButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>

<MudLoadingButton Loading="@_processing" Disabled="@(!_uploadedFiles.Any())" Variant="Variant.Filled" OnClick="Submit">@ConstantString.Submit</MudLoadingButton>
Expand Down
4 changes: 2 additions & 2 deletions src/Server.UI/Pages/Documents/Documents.razor
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<PageTitle>@Title</PageTitle>

<MudDataGrid ServerData="@(new Func<GridState<DocumentDto>, Task<GridData<DocumentDto>>>(ServerReload))"
<MudDataGrid ServerData="@(ServerReload)"
FixedHeader="true"
FixedFooter="false"
Virtualize="false"
Expand Down Expand Up @@ -265,7 +265,7 @@
Client.JobStartedEvent -= _client_JobStarted;
}

private async Task<GridData<DocumentDto>> ServerReload(GridState<DocumentDto> state)
private async Task<GridData<DocumentDto>> ServerReload(GridState<DocumentDto> state, CancellationToken cancellationToken)
{
try
{
Expand Down
7 changes: 4 additions & 3 deletions src/Server.UI/Pages/Identity/Roles/Roles.razor
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,14 @@
{
<MudMenuItem>
<MudFileUpload T="IBrowserFile" FilesChanged="OnImportData" Accept=".xlsx">
<ActivatorContent>
<CustomContent>
<MudButton Class="pa-0 ma-0" Style="font-weight:400;text-transform:none;"
Variant="Variant.Text"
Disabled="@_uploading">
@ConstantString.Import
</MudButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>
</MudMenuItem>
}
Expand Down Expand Up @@ -210,7 +211,7 @@
(_selectedTenantId == " " || (_selectedTenantId != " " && x.TenantId == _selectedTenantId));
}

private async Task<GridData<ApplicationRoleDto>> ServerReload(GridState<ApplicationRoleDto> state)
private async Task<GridData<ApplicationRoleDto>> ServerReload(GridState<ApplicationRoleDto> state, CancellationToken cancellationToken)
{
try
{
Expand Down
7 changes: 5 additions & 2 deletions src/Server.UI/Pages/Identity/Users/Components/UserForm.razor
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@
}
<MudTooltip Text="@L["Click upload a image"]">
<MudFileUpload T="IBrowserFile" Accept=".jpg, .jpeg, .png, .webp" FilesChanged="UploadPhoto" Style="margin-top:-10px;margin-left:-15px">
<ActivatorContent>
<CustomContent>
<MudIconButton Icon="@Icons.Material.Filled.PhotoCamera">
</MudIconButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate/>
</MudFileUpload>
</MudTooltip>

Expand All @@ -48,6 +49,8 @@
<MultiTenantAutocomplete For="@(() => Model.Tenant)"
T="TenantDto"
Label="@L[Model.GetMemberDescription(x=>x.Tenant)]"


Required="true"
ValueChanged="@(x=>TenantChanged(x))"
Value="@Model.Tenant">
Expand Down
5 changes: 3 additions & 2 deletions src/Server.UI/Pages/Identity/Users/Profile.razor
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,11 @@ else

<MudTooltip Text="@L["Click upload a image"]">
<MudFileUpload T="IBrowserFile" Accept=".jpg, .jpeg, .png, .webp" FilesChanged="UploadPhoto" Style="margin-top:-10px;margin-left:-15px">
<ActivatorContent>
<CustomContent>
<MudIconButton Icon="@Icons.Material.Filled.PhotoCamera">
</MudIconButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>
</MudTooltip>

Expand Down
7 changes: 4 additions & 3 deletions src/Server.UI/Pages/Identity/Users/Users.razor
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,14 @@
{
<MudMenuItem>
<MudFileUpload T="IBrowserFile" FilesChanged="OnImportData" Accept=".xlsx">
<ActivatorContent>
<CustomContent>
<MudButton Class="pa-0 ma-0" Style="font-weight:400;text-transform:none;"
Variant="Variant.Text"
Disabled="@_uploading">
@ConstantString.Import
</MudButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>
</MudMenuItem>
}
Expand Down Expand Up @@ -330,7 +331,7 @@
(_searchRole == null || (_searchRole != null && x.UserRoles.Any(x => x.Role.Name == _searchRole))) &&
(_selectedTenantId == " " || (_selectedTenantId != " " && x.TenantId == _selectedTenantId));
}
private async Task<GridData<ApplicationUserDto>> ServerReload(GridState<ApplicationUserDto> state)
private async Task<GridData<ApplicationUserDto>> ServerReload(GridState<ApplicationUserDto> state, CancellationToken cancellationToken)
{
try
{
Expand Down
17 changes: 8 additions & 9 deletions src/Server.UI/Pages/PicklistSets/PicklistSets.razor
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@
{
<MudMenuItem>
<MudFileUpload T="IBrowserFile" FilesChanged="OnImportData" Accept=".xlsx">
<ActivatorContent>
<CustomContent>
<MudButton Class="pa-0 ma-0" Style="font-weight:400;text-transform:none;"
Variant="Variant.Text"
Disabled="@_uploading">
@ConstantString.Import
</MudButton>
</ActivatorContent>
</CustomContent>
<SelectedTemplate />
</MudFileUpload>
</MudMenuItem>
}
Expand All @@ -102,7 +103,7 @@
<Columns>
<PropertyColumn Property="x => x.Name" Title="@L[SelectedItem.GetMemberDescription(x => x.Name)]">
<EditTemplate>
<MudEnumSelect @bind-Value="@context.Item.Name" TEnum="Picklist" OnClose="@(()=>PicklistChanged(context.Item))" Required="true">
<MudEnumSelect @bind-Value="@context.Item.Name" TEnum="Picklist" Required="true">
</MudEnumSelect>
</EditTemplate>
</PropertyColumn>
Expand Down Expand Up @@ -162,7 +163,7 @@
_canExport = (await AuthService.AuthorizeAsync(state.User, Permissions.PicklistSets.Export)).Succeeded;
}

private async Task<GridData<PicklistSetDto>> ServerReload(GridState<PicklistSetDto> state)
private async Task<GridData<PicklistSetDto>> ServerReload(GridState<PicklistSetDto> state, CancellationToken cancellationToken)
{
try
{
Expand Down Expand Up @@ -205,12 +206,9 @@
_searchString = string.Empty;
await _table.ReloadServerData();
}
private void PicklistChanged(PicklistSetDto item)
{
_table.CommittedItemChanges.InvokeAsync(item);
}


private void CommittedItemChanges(PicklistSetDto item)
private Task<DataGridEditFormAction> CommittedItemChanges(PicklistSetDto item)
{
InvokeAsync(async () =>
{
Expand All @@ -223,6 +221,7 @@

StateHasChanged();
});
return Task.FromResult(DataGridEditFormAction.Close);
}

private async Task DeleteItem(PicklistSetDto item)
Expand Down
38 changes: 20 additions & 18 deletions src/Server.UI/Pages/Products/Components/ProductFormDialog.razor
Original file line number Diff line number Diff line change
Expand Up @@ -80,31 +80,33 @@
@ondragleave="@ClearDragClass"
@ondragend="@ClearDragClass"
AppendMultipleFiles>
<ActivatorContent>
<CustomContent>
<MudPaper Class="@_dragClass" Style="width:260px;height:70px;">
<MudLoadingButton Loading="@_uploading" Disabled="@_uploading" Variant="Variant.Text" Class="align-self-center" Style="text-transform:none"
StartIcon="@Icons.Material.Filled.CloudUpload">
@L["choose image or pdf"]
</MudLoadingButton>
</MudPaper>
</ActivatorContent>

</CustomContent>
<SelectedTemplate>
@if (Model.Pictures is not null)
{
<MudSimpleTable Hover Dense Elevation="0">
<tbody>
@foreach (var dto in Model.Pictures)
{
<tr @onclick="() => OnDownloadFile(dto.Url)" style="cursor:pointer">
<td><Thumbnail FileName="@dto.Name" FileUrl="@dto.Url"> </Thumbnail></td>
<td><FileSizeFormatter FileSizeInBytes="@dto.Size"></FileSizeFormatter></td>
<td style="width:50px"><MudIconButton Icon="@Icons.Material.Outlined.Delete" Color="Color.Error" title="@ConstantString.Delete" OnClick="@(() => DeleteImage(dto))"></MudIconButton></td>
</tr>
}
</tbody>
</MudSimpleTable>
}
</SelectedTemplate>
</MudFileUpload>
@if (Model.Pictures is not null)
{
<MudSimpleTable Hover Dense Elevation="0">
<tbody>
@foreach (var dto in Model.Pictures)
{
<tr @onclick="()=>OnDownloadFile(dto.Url)" style="cursor:pointer">
<td><Thumbnail FileName="@dto.Name" FileUrl="@dto.Url"> </Thumbnail></td>
<td><FileSizeFormatter FileSizeInBytes="@dto.Size"></FileSizeFormatter></td>
<td style="width:50px"><MudIconButton Icon="@Icons.Material.Outlined.Delete" Color="Color.Error" title="@ConstantString.Delete" OnClick="@(()=>DeleteImage(dto))"></MudIconButton></td>
</tr>
}
</tbody>
</MudSimpleTable>
}

</MudStack>
</MudItem>
</MudGrid>
Expand Down
Loading
Loading