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