feat: Update proto namespaces and enable product image management

This commit is contained in:
masoodafar-web
2025-12-06 20:57:43 +03:30
parent 88c691c3fb
commit 523754af2c
17 changed files with 345 additions and 252 deletions

View File

@@ -56,18 +56,18 @@
<!-- <Content Remove="Pages\Products\BulkEdit.razor" /> -->
<!-- <Compile Remove="Pages\Products\BulkEdit.razor.cs" /> -->
<!-- GalleryDialog - uses AddProductImageAsync/RemoveProductImageAsync not in proto -->
<Compile Remove="Pages\Products\Components\GalleryDialog.razor" />
<Content Remove="Pages\Products\Components\GalleryDialog.razor" />
<Compile Remove="Pages\Products\Components\GalleryDialog.razor.cs" />
<!-- GalleryDialog - ENABLED (proto added) -->
<!-- <Compile Remove="Pages\Products\Components\GalleryDialog.razor" /> -->
<!-- <Content Remove="Pages\Products\Components\GalleryDialog.razor" /> -->
<!-- <Compile Remove="Pages\Products\Components\GalleryDialog.razor.cs" /> -->
<!-- CreateDialog/UpdateDialog - uses ImageFile/ThumbnailFile/ImageFileModel not in proto -->
<Compile Remove="Pages\Products\Components\CreateDialog.razor" />
<Content Remove="Pages\Products\Components\CreateDialog.razor" />
<Compile Remove="Pages\Products\Components\CreateDialog.razor.cs" />
<Compile Remove="Pages\Products\Components\UpdateDialog.razor" />
<Content Remove="Pages\Products\Components\UpdateDialog.razor" />
<Compile Remove="Pages\Products\Components\UpdateDialog.razor.cs" />
<!-- CreateDialog/UpdateDialog - ENABLED (proto added) -->
<!-- <Compile Remove="Pages\Products\Components\CreateDialog.razor" /> -->
<!-- <Content Remove="Pages\Products\Components\CreateDialog.razor" /> -->
<!-- <Compile Remove="Pages\Products\Components\CreateDialog.razor.cs" /> -->
<!-- <Compile Remove="Pages\Products\Components\UpdateDialog.razor" /> -->
<!-- <Content Remove="Pages\Products\Components\UpdateDialog.razor" /> -->
<!-- <Compile Remove="Pages\Products\Components\UpdateDialog.razor.cs" /> -->
<!-- Category/Product DragDrop pages - ENABLED -->
<!-- <Compile Remove="Pages\Category\CategoryProductsDragDropPage.razor" /> -->
@@ -106,49 +106,83 @@
<ItemGroup>
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="Foursat.BackOffice.BFF.Category.Protobuf" Version="0.0.3" />
<PackageReference Include="Foursat.BackOffice.BFF.Category.Protobuf" Version="0.0.4" />
<PackageReference Include="Foursat.BackOffice.BFF.Otp.Protobuf" Version="0.0.111" />
<PackageReference Include="Foursat.BackOffice.BFF.ClubMembership.Protobuf" Version="0.0.3" />
<PackageReference Include="FourSat.BackOffice.BFF.Package.Protobuf" Version="0.0.111" />
<PackageReference Include="Foursat.BackOffice.BFF.Commission.Protobuf" Version="0.0.3" />
<PackageReference Include="Foursat.BackOffice.BFF.Common.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.Configuration.Protobuf" Version="1.0.3" />
<PackageReference Include="Foursat.BackOffice.BFF.DiscountCategory.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.DiscountOrder.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.DiscountProduct.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.DiscountShoppingCart.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.Health.Protobuf" Version="1.0.4" />
<PackageReference Include="Foursat.BackOffice.BFF.ManualPayment.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.NetworkMembership.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.Otp.Protobuf" Version="0.0.112" />
<PackageReference Include="FourSat.BackOffice.BFF.Package.Protobuf" Version="0.0.112" />
<PackageReference Include="Foursat.BackOffice.BFF.Products.Protobuf" Version="0.0.9" />
<PackageReference Include="Foursat.BackOffice.BFF.ProductTag.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.PublicMessage.Protobuf" Version="0.0.4" />
<!-- Products: Using ProjectReference for latest proto features (ToggleProductStatus, BulkUpdate, CategoryId filter) -->
<!--<PackageReference Include="Foursat.BackOffice.BFF.Products.Protobuf" Version="0.0.8" />-->
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Products.Protobuf/BackOffice.BFF.Products.Protobuf.csproj" />
<PackageReference Include="Foursat.BackOffice.BFF.Role.Protobuf" Version="0.0.111" />
<PackageReference Include="Foursat.BackOffice.BFF.Role.Protobuf" Version="0.0.112" />
<PackageReference Include="Foursat.BackOffice.BFF.Tag.Protobuf" Version="0.0.2" />
<PackageReference Include="Foursat.BackOffice.BFF.User.Protobuf" Version="0.0.111" />
<PackageReference Include="Foursat.BackOffice.BFF.User.Protobuf" Version="0.0.112" />
<PackageReference Include="Foursat.BackOffice.BFF.UserAddress.Protobuf" Version="0.0.111" />
<PackageReference Include="Foursat.BackOffice.BFF.UserRole.Protobuf" Version="0.0.112" />
<PackageReference Include="Foursat.BackOffice.BFF.UserAddress.Protobuf" Version="0.0.112" />
<PackageReference Include="Foursat.BackOffice.BFF.UserOrder.Protobuf" Version="0.0.115" />
<!-- UserOrder: Using ProjectReference for latest proto features (CancelOrder, ApplyDiscount, UpdateOrderStatus) -->
<!--<PackageReference Include="Foursat.BackOffice.BFF.UserOrder.Protobuf" Version="0.0.114" />-->
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.UserOrder.Protobuf/BackOffice.BFF.UserOrder.Protobuf.csproj" />
<PackageReference Include="Foursat.BackOffice.BFF.UserRole.Protobuf" Version="0.0.111" />
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Products.Protobuf/BackOffice.BFF.Products.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.UserOrder.Protobuf/BackOffice.BFF.UserOrder.Protobuf.csproj" />-->
<!--<PackageReference Include="Foursat.BackOffice.BFF.Commission.Protobuf" Version="0.0.2" />-->
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj" />
<!--<PackageReference Include="Foursat.BackOffice.BFF.ClubMembership.Protobuf" Version="0.0.1" />-->
<!--<PackageReference Include="Foursat.BackOffice.BFF.NetworkMembership.Protobuf" Version="0.0.1" />-->
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Health.Protobuf/BackOffice.BFF.Health.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/BackOffice.BFF.PublicMessage.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ManualPayment.Protobuf/BackOffice.BFF.ManualPayment.Protobuf.csproj" />
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Commission.Protobuf/BackOffice.BFF.Commission.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ClubMembership.Protobuf/BackOffice.BFF.ClubMembership.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.NetworkMembership.Protobuf/BackOffice.BFF.NetworkMembership.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Configuration.Protobuf/BackOffice.BFF.Configuration.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Health.Protobuf/BackOffice.BFF.Health.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/BackOffice.BFF.PublicMessage.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ManualPayment.Protobuf/BackOffice.BFF.ManualPayment.Protobuf.csproj" />-->
<!-- Proto projects for Discount Shop and Tag features -->
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj" />
<ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Common.Protobuf/BackOffice.BFF.Common.Protobuf.csproj" />
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj" />-->
<!-- <ProjectReference Include="../../../BackOffice.BFF/src/Protobufs/BackOffice.BFF.Common.Protobuf/BackOffice.BFF.Common.Protobuf.csproj" />-->
<!-- -->
<PackageReference Include="HtmlAgilityPack" Version="1.12.1" />
<PackageReference Include="DateTimeConverterCL" Version="1.0.0" />
<PackageReference Include="Grpc.Core" Version="2.46.6" />

View File

@@ -9,9 +9,7 @@ using BackOffice.BFF.UserRole.Protobuf.Protos.UserRole;
using BackOffice.BFF.Category.Protobuf.Protos.Category;
using BackOffice.BFF.Commission.Protobuf;
using BackOffice.BFF.NetworkMembership.Protobuf;
using BackOffice.BFF.ClubMembership.Protobuf;
using BackOffice.BFF.Configuration.Protobuf;
using BackOffice.BFF.Health.Protobuf;
// TODO: Create these proto projects - temporarily disabled
// using BackOffice.BFF.DiscountProduct.Protobuf.Protos.DiscountProduct;
// using BackOffice.BFF.DiscountCategory.Protobuf.Protos.DiscountCategory;
@@ -34,6 +32,9 @@ using Microsoft.AspNetCore.Components.Authorization;
using MudBlazor.Services;
using System.Text.Json;
using System.Text.Json.Serialization;
using Foursat.BackOffice.BFF.ClubMembership.Protobuf;
using Foursat.BackOffice.BFF.Configuration.Protobuf;
using Foursat.BackOffice.BFF.Health.Protobuf;
namespace Microsoft.Extensions.DependencyInjection;

View File

@@ -1,9 +1,9 @@
@page "/club/members"
@attribute [Authorize]
@using BackOffice.BFF.ClubMembership.Protobuf
@using Google.Protobuf.WellKnownTypes
@using BackOffice.Pages.Club.Components
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-4">
<MudText Typo="Typo.h4" Class="mb-4">مدیریت اعضای باشگاه</MudText>

View File

@@ -1,8 +1,8 @@
using BackOffice.BFF.ClubMembership.Protobuf;
using Microsoft.AspNetCore.Components;
using MudBlazor;
using Google.Protobuf.WellKnownTypes;
using BackOffice.Pages.Club.Components;
using Foursat.BackOffice.BFF.ClubMembership.Protobuf;
namespace BackOffice.Pages.Club;

View File

@@ -1,4 +1,4 @@
@using BackOffice.BFF.ClubMembership.Protobuf
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
<MudDialog>
<DialogContent>

View File

@@ -1,4 +1,4 @@
@using BackOffice.BFF.ClubMembership.Protobuf
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
<MudDialog>
<DialogContent>

View File

@@ -1,4 +1,4 @@
@using BackOffice.BFF.ClubMembership.Protobuf
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
<MudDialog>
<DialogContent>

View File

@@ -1,7 +1,7 @@
@page "/club/statistics"
@using MudBlazor
@using BackOffice.BFF.ClubMembership.Protobuf
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-4">
<MudText Typo="Typo.h4" GutterBottom="true">آمار باشگاه</MudText>

View File

@@ -2,8 +2,8 @@
@attribute [Authorize]
@using BackOffice.BFF.Commission.Protobuf
@using BackOffice.BFF.ClubMembership.Protobuf
@using BackOffice.BFF.NetworkMembership.Protobuf
@using Foursat.BackOffice.BFF.ClubMembership.Protobuf
@using Google.Protobuf.WellKnownTypes
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-4">

View File

@@ -1,6 +1,7 @@
@page "/system/configuration"
@attribute [Authorize(Roles = "Administrator")]
@using Foursat.BackOffice.BFF.Configuration.Protobuf
@using MudBlazor
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-4">
@@ -409,7 +410,7 @@
</MudContainer>
@code {
[Inject] public BackOffice.BFF.Configuration.Protobuf.ConfigurationContract.ConfigurationContractClient ConfigurationClient { get; set; }
[Inject] public ConfigurationContract.ConfigurationContractClient ConfigurationClient { get; set; }
private CommissionConfig _commissionConfig = new();
private NetworkConfig _networkConfig = new();
@@ -428,7 +429,7 @@
{
try
{
var request = new BackOffice.BFF.Configuration.Protobuf.GetAllConfigurationsRequest
var request = new GetAllConfigurationsRequest
{
PageIndex = 1,
PageSize = 100
@@ -596,7 +597,7 @@
private async Task SaveConfig(string key, string value, int scope)
{
var request = new BackOffice.BFF.Configuration.Protobuf.CreateOrUpdateConfigurationRequest
var request = new CreateOrUpdateConfigurationRequest
{
Key = key,
Value = value,

View File

@@ -1,8 +1,8 @@
@page "/system/health"
@attribute [Authorize]
@using Foursat.BackOffice.BFF.Health.Protobuf
@using MudBlazor
@using BackOffice.BFF.Health.Protobuf
@inject HealthContract.HealthContractClient HealthClient
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="mt-4">

View File

@@ -1,4 +1,4 @@
using BackOffice.BFF.PublicMessage.Protobuf;
using Foursat.BackOffice.BFF.PublicMessage.Protobuf;
using Google.Protobuf.WellKnownTypes;
namespace BackOffice.Services.PublicMessage;

View File

@@ -1,6 +1,6 @@
{
"GwUrl": "https://bogw.kbs1.ir",
// "GwUrl": "https://localhost:6468",
// "GwUrl": "https://bogw.kbs1.ir",
"GwUrl": "https://localhost:6468",
"Authentication": {
//"Authority": "https://localhost:5001",
"Authority": "https://ids.afrino.co/",