Update category dialog binding and order details display
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Text.Json;
|
||||
using BackOffice.BFF.Category.Protobuf.Protos.Category;
|
||||
using BackOffice.Common.BaseComponents;
|
||||
using BackOffice.Common.Utilities;
|
||||
@@ -155,7 +156,7 @@ public partial class CategoryMainPage
|
||||
var getResponse = await CategoryContract.GetCategoryAsync(new GetCategoryRequest { Id = model.Id });
|
||||
|
||||
var editModel = getResponse.Adapt<UpdateCategoryRequest>();
|
||||
|
||||
// Console.WriteLine(JsonSerializer.Serialize(editModel));
|
||||
var dialog = await DialogService.ShowAsync<CreateOrUpdateCategoryDialog>(
|
||||
"ویرایش دستهبندی",
|
||||
new DialogParameters<CreateOrUpdateCategoryDialog>
|
||||
@@ -236,4 +237,4 @@ public partial class CategoryMainPage
|
||||
{
|
||||
Navigation.NavigateTo($"{RouteConstance.CategoryProducts}{model.Id}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@
|
||||
Variant="Variant.Outlined"
|
||||
Margin="Margin.Dense" />
|
||||
|
||||
<MudCheckBox T="bool" @bind-Checked="IsActive" Label="فعال" />
|
||||
<MudCheckBox T="bool" @bind-Value="IsActive" Label="فعال" />
|
||||
</MudStack>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
|
||||
@@ -30,6 +30,7 @@ public partial class CreateOrUpdateCategoryDialog
|
||||
Description = EditModel.Description;
|
||||
ParentId = EditModel.ParentId;
|
||||
IsActive = EditModel.IsActive;
|
||||
Console.WriteLine(EditModel.IsActive);
|
||||
SortOrder = EditModel.SortOrder;
|
||||
}
|
||||
else if (Model != null)
|
||||
|
||||
@@ -101,12 +101,16 @@
|
||||
{
|
||||
<MudTable Items="_model.FactorDetails" Dense="true">
|
||||
<HeaderContent>
|
||||
<MudTh>تصویر</MudTh>
|
||||
<MudTh>محصول</MudTh>
|
||||
<MudTh>قیمت واحد</MudTh>
|
||||
<MudTh>تعداد</MudTh>
|
||||
<MudTh>تخفیف واحد</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd>
|
||||
<Image Src="@context.ProductThumbnailPath" Height="50" Width="50" />
|
||||
</MudTd>
|
||||
<MudTd>@context.ProductTitle</MudTd>
|
||||
<MudTd>@context.UnitPrice?.ToString("N0")</MudTd>
|
||||
<MudTd>@context.Count</MudTd>
|
||||
|
||||
Reference in New Issue
Block a user