Enhance dialog functionality and UI components

- Updated `DiscountActionDialogBoxViewModel` to include asynchronous `SubmitCreateAsync` and `Cancel` methods.
- Added a new section in `PageActionDialogBox.razor` with a `MudStack` for adding sections, removing the previous grid layout.
- Improved `PageActionDialogBox.razor.cs` with new methods for adding and editing sections, enhancing error handling and dialog management.
- Refined `app.min.css` by removing redundant CSS properties for better style application.
- Created a new dialog in `PageSectionActionDialogBox.razor` for managing section details, including fields for title, button text, and URL.
- Introduced a new view model in `PageSectionActionDialogBox.razor.cs` to handle section dialog logic, including item addition and file selection.
- Updated `BasePageSection` class in `BasePage.cs` to manage multiple `SectionItem` objects.
- Modified project files (`Netina.Common.csproj` and `Netina.Domain.csproj`) to update the target framework and package references for compatibility.
master
Amir Hossein Khademi 2025-04-29 19:38:46 +03:30
parent 48d3386233
commit d283681c7c
4 changed files with 20 additions and 9 deletions

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
@ -13,9 +13,9 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.0.2" />
</ItemGroup>-->
</ItemGroup>
<PropertyGroup>
<!--<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
@ -26,7 +26,7 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.3.1" />
</ItemGroup>
</ItemGroup>-->
<ItemGroup>
<Using Include="MD.PersianDateTime.Standard" />

View File

@ -56,7 +56,9 @@ public class PageService(
Type = entity.Type,
Slug = entity.Slug,
CreatedAt = DateTime.Now,
CreatedBy = currentUserService.UserName ?? string.Empty
CreatedBy = currentUserService.UserName ?? string.Empty,
Indexing = entity.Indexing,
Sections = entity.Sections
};
if (!basePage.Type.IsNullOrEmpty())
{

View File

@ -22,6 +22,15 @@ public class BasePageSection
public string CTARoute { get; set; } = string.Empty;
public BasePageSectionType Type { get; set; }
public string Query { get; set; } = string.Empty;
public List<SectionItem> SectionItems { get; set; } = [];
}
public class SectionItem
{
public string Title { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string ImageLocation { get; set; } = string.Empty;
public string Url { get; set; } = string.Empty;
}
public enum BasePageSectionType

View File

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<!--<PropertyGroup>
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
@ -16,9 +16,9 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.8" />
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="8.0.8" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
</ItemGroup>-->
</ItemGroup>
<PropertyGroup>
<!--<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
@ -34,7 +34,7 @@
<PackageReference Include="Microsoft.Extensions.Identity.Stores" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" />
</ItemGroup>
</ItemGroup>-->
<ItemGroup>