Compare commits
7 Commits
kub-stage
...
1ea928118d
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ea928118d | |||
| 8f2d739d1f | |||
| 8e89d5e064 | |||
| 8bd961ade1 | |||
| 750d4c6b97 | |||
| 276a4c20f2 | |||
| 98a68074bc |
@@ -1,46 +0,0 @@
|
||||
|
||||
name: Push nuget and docker image Actions Workflow
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- stage-new
|
||||
jobs:
|
||||
Deploy:
|
||||
runs-on: windows
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://git.afrino.co/actions/checkout@v3
|
||||
- name: Setup dotnet
|
||||
uses: https://git.afrino.co/actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0.x
|
||||
|
||||
- name: Remove Package Source
|
||||
run: dotnet nuget remove source FourSat
|
||||
continue-on-error: true
|
||||
- name: Add Package Source
|
||||
run: dotnet nuget add source --name FourSat --username systemuser --password sZSA7PTiv3pUSQZ https://git.afrino.co/api/packages/FourSat/nuget/index.json --store-password-in-clear-text
|
||||
|
||||
- name: Install dependencies
|
||||
run: dotnet restore ".\src\FrontOffice.Main\FrontOffice.Main.csproj"
|
||||
- name: Build
|
||||
run: dotnet build ".\src\FrontOffice.Main\FrontOffice.Main.csproj" --configuration Release --no-restore
|
||||
- name: Test
|
||||
run: dotnet test ".\src\FrontOffice.Main\FrontOffice.Main.csproj" --no-restore --verbosity normal
|
||||
- name: Recycle Apppool
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" recycle apppool /apppool.name:kbs1.ir
|
||||
shell: powershell
|
||||
- name: Stop Website
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" stop site /site.name:kbs1.ir
|
||||
shell: powershell
|
||||
- name: Publish
|
||||
run: dotnet publish ".\src\FrontOffice.Main\FrontOffice.Main.csproj" -c Release -o publish
|
||||
- name: Copy Publish To IIS Directory
|
||||
run: Get-ChildItem -Path "publish\*" | Copy-Item -Destination "E:\kbs1.ir\kbs1.ir\" -Recurse -Force
|
||||
- name: Start Website
|
||||
run: |
|
||||
& "C:\Windows\System32\inetsrv\appcmd.exe" start site /site.name:kbs1.ir
|
||||
shell: powershell
|
||||
@@ -1,74 +0,0 @@
|
||||
name: Build and Deploy to Kubernetes
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- kub-stage
|
||||
|
||||
env:
|
||||
REGISTRY: 194.5.195.53:30080
|
||||
IMAGE_NAME: admin/frontoffice
|
||||
K8S_SERVER: 194.5.195.53
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: 194.5.195.53:32082/docker-sshpass:latest
|
||||
options: --privileged
|
||||
steps:
|
||||
- name: Start Docker daemon
|
||||
run: |
|
||||
mkdir -p /etc/docker
|
||||
cat > /etc/docker/daemon.json << 'DAEMON'
|
||||
{
|
||||
"insecure-registries": ["194.5.195.53:30080", "194.5.195.53:32500", "194.5.195.53:32082"]
|
||||
}
|
||||
DAEMON
|
||||
echo "🚀 Starting Docker daemon..."
|
||||
dockerd --iptables=false --ip6tables=false --bridge=none --storage-driver=vfs &
|
||||
|
||||
# Wait up to 3 minutes for Docker to be ready
|
||||
for i in $(seq 1 90); do
|
||||
if docker info >/dev/null 2>&1; then
|
||||
echo "✅ Docker daemon is ready (attempt $i)"
|
||||
docker version
|
||||
break
|
||||
else
|
||||
echo "⏳ Waiting for Docker daemon... (attempt $i/90)"
|
||||
sleep 2
|
||||
fi
|
||||
done
|
||||
|
||||
# Final check
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
echo "❌ Docker daemon failed to start after 3 minutes"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
run: |
|
||||
git clone --depth 1 --branch kub-stage http://gitea-svc:3000/admin/FrontOffice.git .
|
||||
|
||||
- name: Login to Docker registries
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login 194.5.195.53:32082 -u admin --password-stdin
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} -u admin --password-stdin
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
cd src
|
||||
DOCKER_BUILDKIT=0 docker build --network host -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest -f FrontOffice.Main/Dockerfile .
|
||||
|
||||
- name: Push to Registry
|
||||
run: |
|
||||
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
|
||||
- name: Deploy to Kubernetes
|
||||
run: |
|
||||
export SSHPASS="${{ secrets.SERVER_PASSWORD }}"
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||
kubectl rollout restart deployment/frontoffice
|
||||
kubectl rollout status deployment/frontoffice --timeout=180s
|
||||
"
|
||||
echo "✅ Deployed!"
|
||||
@@ -8,7 +8,7 @@ on:
|
||||
env:
|
||||
REGISTRY: 194.5.195.53:30080
|
||||
IMAGE_NAME: admin/frontoffice
|
||||
K8S_SERVER: 194.5.195.53
|
||||
K8S_SERVER: 45.149.79.127
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
done
|
||||
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
echo "❌ Docker daemon failed to start after 3 minutes"
|
||||
echo "❌ Docker daemon failed to start"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -56,9 +56,10 @@ jobs:
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
cd src
|
||||
DOCKER_BUILDKIT=0 docker build --network host -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
DOCKER_BUILDKIT=0 docker build --network host -f FrontOffice.Main/Dockerfile \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
|
||||
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:prod \
|
||||
-f FrontOffice.Main/Dockerfile .
|
||||
.
|
||||
|
||||
- name: Push to Registry
|
||||
run: |
|
||||
@@ -69,7 +70,7 @@ jobs:
|
||||
run: |
|
||||
export SSHPASS="${{ secrets.SERVER_PASSWORD }}"
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||
kubectl rollout restart deployment/frontoffice
|
||||
kubectl set image deployment/frontoffice frontoffice=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
|
||||
kubectl rollout status deployment/frontoffice --timeout=300s
|
||||
"
|
||||
echo "✅ Deployed to Production!"
|
||||
|
||||
+6
-6
@@ -10,12 +10,12 @@
|
||||
### ۱. اجبار تخفیف ۱۰۰٪ و حذف اسلایدر
|
||||
|
||||
- **حذف** `MudSlider` و `MudNumericField` از `Checkout.razor` — کاربر دیگه درصد تخفیف انتخاب نمیکنه
|
||||
- **حذف** کامل بخش نمایش موجودی تخفیفی
|
||||
- **حذف** کامل بخش نمایش موجودی اعتباری
|
||||
- بکند همیشه حداکثر تخفیف (`MaxDiscountPercent`) رو اعمال میکنه
|
||||
|
||||
### ۲. رفع متن Badge تخفیف
|
||||
|
||||
- **مشکل:** Badge روی محصولات "۱۰۰٪ تخفیفی" نشون میداد — گمراهکننده
|
||||
- **مشکل:** Badge روی محصولات "۱۰۰٪ اعتباری" نشون میداد — گمراهکننده
|
||||
- **رفع:** نمایش درصد واقعی محصول (مثلاً "۳۰٪ تخفیف")
|
||||
- **فایلها:** `Products.razor`, `Cart.razor`, `ProductDetail.razor`
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
### ۱. درگاه پرداخت زرینپال
|
||||
|
||||
- **یکپارچهسازی ZarinPal** — پرداخت مستقیم بدون PYMS واسط
|
||||
- صفحه checkout فروشگاه تخفیفی: ریدایرکت به ZarinPal → callback → تأیید
|
||||
- صفحه checkout فروشگاه اعتباری: ریدایرکت به ZarinPal → callback → تأیید
|
||||
- صفحه checkout فروشگاه عادی: همان جریان
|
||||
- پشتیبانی از sandbox و production
|
||||
|
||||
@@ -60,13 +60,13 @@
|
||||
|
||||
### ۳. فیکس نمایش وضعیت پرداخت
|
||||
|
||||
- **مشکل:** سفارشات تخفیفی «در انتظار پرداخت» نشان میدادند حتی بعد از پرداخت موفق
|
||||
- **مشکل:** سفارشات اعتباری «در انتظار پرداخت» نشان میدادند حتی بعد از پرداخت موفق
|
||||
- **علت:** Mapster نمیتونست `PaymentStatus` (enum) رو به `payment_completed` (bool) مپ کنه
|
||||
- **رفع:** مپینگ دستی در `DiscountOrderService`
|
||||
|
||||
### ۴. فیکس DeliveryStatus
|
||||
|
||||
- **مشکل:** فروشگاه تخفیفی بعد از پرداخت `InTransit` ست میکرد
|
||||
- **مشکل:** فروشگاه اعتباری بعد از پرداخت `InTransit` ست میکرد
|
||||
- **رفع:** تغییر به `Pending` — ادمین باید وضعیت پست رو مشخص کنه
|
||||
|
||||
### ۵. تغییر به NuGet Package (Docker build fix)
|
||||
@@ -101,7 +101,7 @@
|
||||
| سبد خرید | `/cart`, `/checkout*`, `/orders`, `/order/*`, `/order-tracking/*` |
|
||||
| پکیجها | `/my-packages` |
|
||||
| دروازه | `/my-orders`, `/my-cart` |
|
||||
| فروشگاه تخفیفی | `/discount-store/cart`, `/discount-store/checkout`, `/discount-store/orders`, `/discount-store/order/*` |
|
||||
| فروشگاه اعتباری | `/discount-store/cart`, `/discount-store/checkout`, `/discount-store/orders`, `/discount-store/order/*` |
|
||||
|
||||
**مسیرهای عمومی:**
|
||||
`/`, `/register`, `/about`, `/faq`, `/contact`, `/blog/*`, `/packages`, `/package/*`, `/products`, `/product/*`, `/categories`, `/stores`, `/discount-store`, `/discount-store/product/*`
|
||||
|
||||
@@ -100,7 +100,7 @@ py-16 سکشنی → Index, About, Contact, FAQ
|
||||
| رنگ | استفاده | باید باشد |
|
||||
|---|---|---|
|
||||
| `#10b981` | Gateway (سبز فروشگاه) | `var(--ds-color-store)` |
|
||||
| `#ef4444` | Gateway (قرمز تخفیفی) | `var(--ds-color-discount)` |
|
||||
| `#ef4444` | Gateway (قرمز اعتباری) | `var(--ds-color-discount)` |
|
||||
| `#6366f1`, `#818cf8`, `#a78bfa` | Hero/Banner gradients | `var(--ds-gradient-primary)` |
|
||||
| `rgba(99,102,241,.12)` | Dashboard backgrounds | `var(--ds-primary-soft)` |
|
||||
| `rgba(16,185,129,.06)` | Discount product highlights | `var(--ds-success-soft)` |
|
||||
@@ -215,7 +215,7 @@ Primary = "#0380C0" // آبی ساده
|
||||
|
||||
/* ── Semantic Colors ── */
|
||||
--ds-color-store: #10b981; /* فروشگاه عادی */
|
||||
--ds-color-discount: #ef4444; /* فروشگاه تخفیفی */
|
||||
--ds-color-discount: #ef4444; /* فروشگاه اعتباری */
|
||||
--ds-color-success: #10b981;
|
||||
--ds-color-warning: #f59e0b;
|
||||
--ds-color-error: #ef4444;
|
||||
|
||||
@@ -64,8 +64,8 @@
|
||||
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="2" Class="pa-2">
|
||||
<MudIcon Icon="@Icons.Material.Filled.AccountBalanceWallet" Color="Color.Success" Size="Size.Large" />
|
||||
<MudStack Spacing="0">
|
||||
<MudText Typo="Typo.subtitle1">شارژ کیف پول فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.caption" Color="Color.Default">شارژ ۵۶ میلیون تومان کیف پول فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.subtitle1">شارژ کیف پول فروشگاه اعتباری</MudText>
|
||||
<MudText Typo="Typo.caption" Color="Color.Default">شارژ ۵۶ میلیون تومان کیف پول فروشگاه اعتباری</MudText>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
<MudDivider />
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
@attribute [Route(RouteConstants.DiscountStore.Cart)]
|
||||
|
||||
<PageTitle>سبد خرید تخفیفی</PageTitle>
|
||||
<PageTitle>سبد خرید اعتباری</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<PageHeader Title="سبد خرید تخفیفی" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
<PageHeader Title="سبد خرید اعتباری" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
|
||||
@if (DiscountCart.Items.Count == 0)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info">سبد خرید تخفیفی شما خالی است.</MudAlert>
|
||||
<MudAlert Severity="Severity.Info">سبد خرید اعتباری شما خالی است.</MudAlert>
|
||||
<MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.ArrowBack"
|
||||
OnClick="() => Navigation.NavigateTo(RouteConstants.DiscountStore.Products)">
|
||||
بازگشت به فروشگاه تخفیفی
|
||||
بازگشت به فروشگاه اعتباری
|
||||
</MudButton>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@using CMSMicroservice.Protobuf.Protos.UserAddress
|
||||
@attribute [Route(RouteConstants.DiscountStore.Checkout)]
|
||||
|
||||
<PageTitle>تسویه حساب فروشگاه تخفیفی</PageTitle>
|
||||
<PageTitle>تسویه حساب فروشگاه اعتباری</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<PageHeader Title="تسویه حساب تخفیفی" BackHref="@RouteConstants.DiscountStore.Cart" />
|
||||
<PageHeader Title="تسویه حساب اعتباری" BackHref="@RouteConstants.DiscountStore.Cart" />
|
||||
<MudGrid Spacing="3">
|
||||
<!-- Left Column: Address + Payment Settings -->
|
||||
<MudItem xs="12" md="8">
|
||||
@@ -108,7 +108,7 @@
|
||||
</MudStack>
|
||||
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">تخفیف از کیف تخفیفی:</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">تخفیف از کیف اعتباری:</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">@FormatPrice(DiscountCart.TotalDiscount)- تومان</MudText>
|
||||
</MudStack>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@attribute [Route("/discount-store/order/{Id:long}")]
|
||||
|
||||
<PageTitle>جزئیات سفارش تخفیفی</PageTitle>
|
||||
<PageTitle>جزئیات سفارش اعتباری</PageTitle>
|
||||
|
||||
@if (!string.IsNullOrEmpty(_paymentMessage))
|
||||
{
|
||||
@@ -158,7 +158,7 @@ else
|
||||
@if (_order.DiscountBalanceUsed > 0)
|
||||
{
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween">
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">از کیف تخفیفی:</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">از کیف اعتباری:</MudText>
|
||||
<MudText Typo="Typo.body2" Color="Color.Success">@FormatPrice(_order.DiscountBalanceUsed)-</MudText>
|
||||
</MudStack>
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
@attribute [Route(RouteConstants.DiscountStore.Orders)]
|
||||
|
||||
<PageTitle>سفارشهای فروشگاه تخفیفی</PageTitle>
|
||||
<PageTitle>سفارشهای فروشگاه اعتباری</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<PageHeader Title="سفارشهای تخفیفی" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
<PageHeader Title="سفارشهای اعتباری" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
|
||||
@if (_loading)
|
||||
{
|
||||
@@ -15,7 +15,7 @@
|
||||
<MudAlert Severity="Severity.Info">هنوز سفارشی ثبت نشده است.</MudAlert>
|
||||
<MudButton Variant="Variant.Outlined" StartIcon="@Icons.Material.Filled.Store"
|
||||
Href="@RouteConstants.DiscountStore.Products">
|
||||
مشاهده فروشگاه تخفیفی
|
||||
مشاهده فروشگاه اعتباری
|
||||
</MudButton>
|
||||
}
|
||||
else
|
||||
@@ -28,7 +28,7 @@
|
||||
<MudTh>شماره سفارش</MudTh>
|
||||
<MudTh>تعداد اقلام</MudTh>
|
||||
<MudTh>مبلغ کل</MudTh>
|
||||
<MudTh>از کیف تخفیفی</MudTh>
|
||||
<MudTh>از کیف اعتباری</MudTh>
|
||||
<MudTh>درگاه</MudTh>
|
||||
<MudTh>وضعیت پرداخت</MudTh>
|
||||
<MudTh>وضعیت ارسال</MudTh>
|
||||
@@ -108,7 +108,7 @@
|
||||
@if (order.DiscountBalanceUsed > 0)
|
||||
{
|
||||
<MudText Typo="Typo.caption" Color="Color.Success">
|
||||
از کیف تخفیفی: @FormatPrice(order.DiscountBalanceUsed) تومان
|
||||
از کیف اعتباری: @FormatPrice(order.DiscountBalanceUsed) تومان
|
||||
</MudText>
|
||||
}
|
||||
</MudStack>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@attribute [Route("/discount-store/product/{Id:long}")]
|
||||
|
||||
<PageTitle>@(_product?.Title ?? "محصول تخفیفی")</PageTitle>
|
||||
<PageTitle>@(_product?.Title ?? "محصول اعتباری")</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-4 py-md-6">
|
||||
@if (_loading)
|
||||
@@ -11,13 +11,13 @@
|
||||
{
|
||||
<EmptyState Icon="@Icons.Material.Filled.SearchOff"
|
||||
Title="محصول مورد نظر یافت نشد."
|
||||
ActionText="بازگشت به فروشگاه تخفیفی"
|
||||
ActionText="بازگشت به فروشگاه اعتباری"
|
||||
ActionHref="@RouteConstants.DiscountStore.Products" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- Breadcrumb -->
|
||||
<PageHeader Title="جزئیات محصول تخفیفی" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
<PageHeader Title="جزئیات محصول اعتباری" BackHref="@RouteConstants.DiscountStore.Products" />
|
||||
|
||||
<MudGrid Spacing="4">
|
||||
<!-- Image Gallery -->
|
||||
@@ -74,7 +74,7 @@
|
||||
@if (_product.MaxDiscountPercent > 0)
|
||||
{
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary">تخفیف از کیف تخفیفی:</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary">تخفیف از کیف اعتباری:</MudText>
|
||||
<MudChip T="string" Color="Color.Error" Variant="Variant.Filled" Size="Size.Small">
|
||||
@_product.MaxDiscountPercent% (@($"{_product.Price * _product.MaxDiscountPercent / 100:N0}") تومان)
|
||||
</MudChip>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
@attribute [Route(RouteConstants.DiscountStore.Products)]
|
||||
|
||||
<PageTitle>فروشگاه تخفیفی</PageTitle>
|
||||
<PageTitle>فروشگاه اعتباری</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<!-- Hero -->
|
||||
<MudPaper Class="discount-hero pa-6 pa-md-8 mb-4 rounded-xl" Elevation="0">
|
||||
<MudStack AlignItems="AlignItems.Center" Spacing="2">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Loyalty" Size="Size.Large" Class="dash-hero-name" />
|
||||
<MudText Typo="Typo.h5" Align="Align.Center" Class="dash-hero-name">فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.h5" Align="Align.Center" Class="dash-hero-name">فروشگاه اعتباری</MudText>
|
||||
<MudText Typo="Typo.body2" Align="Align.Center" Class="dash-hero-sub">
|
||||
خرید با استفاده از موجودی کیف پول تخفیفی
|
||||
خرید با استفاده از موجودی کیف پول اعتباری
|
||||
</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<MudAvatar Size="Size.Large" Class="mx-auto mb-3 gateway-avatar-sm-discount">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Loyalty" Size="Size.Large" Class="text-brand-discount" />
|
||||
</MudAvatar>
|
||||
<MudText Typo="Typo.h6" Class="fw-semibold">سبد خرید تخفیفی</MudText>
|
||||
<MudText Typo="Typo.h6" Class="fw-semibold">سبد خرید اعتباری</MudText>
|
||||
@if (_discountCartCount > 0)
|
||||
{
|
||||
<MudChip T="string" Color="Color.Error" Variant="Variant.Filled" Size="Size.Small" Class="mt-2">
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
<MudAvatar Size="Size.Large" Class="mx-auto mb-3 gateway-avatar-sm-discount">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Loyalty" Size="Size.Large" Class="text-brand-discount" />
|
||||
</MudAvatar>
|
||||
<MudText Typo="Typo.h6" Class="fw-semibold">سفارشات فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary mt-1">سفارشات خرید تخفیفی</MudText>
|
||||
<MudText Typo="Typo.h6" Class="fw-semibold">سفارشات فروشگاه اعتباری</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary mt-1">سفارشات خرید اعتباری</MudText>
|
||||
</MudPaper>
|
||||
</MudLink>
|
||||
</MudItem>
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
<MudAvatar Size="Size.Large" Class="mx-auto mb-3 gateway-avatar-discount">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Loyalty" Size="Size.Large" Class="text-brand-discount" />
|
||||
</MudAvatar>
|
||||
<MudText Typo="Typo.h5" Class="fw-bold">فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.h5" Class="fw-bold">فروشگاه اعتباری</MudText>
|
||||
<MudText Typo="Typo.body2" Class="mud-text-secondary mt-2">
|
||||
خرید با استفاده از موجودی کیف تخفیفی + درگاه پرداخت
|
||||
خرید با استفاده از موجودی کیف اعتباری + درگاه پرداخت
|
||||
</MudText>
|
||||
@if (_discountCartCount > 0)
|
||||
{
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
<MudItem xs="12" sm="6" md="3">
|
||||
<MudPaper Outlined="true" Class="pa-4 text-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.ShoppingBag" Color="Color.Secondary" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">فروشگاه اعتباری</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">خرید با تخفیف ویژه</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" md="4">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی تخفیفی</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی اعتباری</MudText>
|
||||
<MudText Typo="Typo.h4" Color="Color.Warning">@_balances.Discount</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
@@ -73,7 +73,7 @@
|
||||
<MudTh>تاریخ</MudTh>
|
||||
<MudTh>عادی (تغییرات / مانده)</MudTh>
|
||||
<MudTh>شبکه (تغییرات / مانده)</MudTh>
|
||||
<MudTh>تخفیفی (تغییرات / مانده)</MudTh>
|
||||
<MudTh>اعتباری (تغییرات / مانده)</MudTh>
|
||||
<MudTh>شناسه ارجاع</MudTh>
|
||||
<MudTh>توضیحات</MudTh>
|
||||
</HeaderContent>
|
||||
@@ -97,7 +97,7 @@
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">@FormatPrice(context.NetworkBalance)</MudText>
|
||||
</MudStack>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="تخفیفی">
|
||||
<MudTd DataLabel="اعتباری">
|
||||
<MudStack Spacing="0">
|
||||
<MudText Color="@(context.DiscountChange > 0 ? Color.Success : context.DiscountChange < 0 ? Color.Error : Color.Default)" Typo="Typo.body2">
|
||||
@(context.DiscountChange != 0 ? (context.DiscountChange > 0 ? "+" : "") + FormatPrice(context.DiscountChange) : "-")
|
||||
@@ -147,10 +147,10 @@
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
|
||||
<!-- کیف پول تخفیفی -->
|
||||
<!-- کیف پول اعتباری -->
|
||||
<MudPaper Class="pa-2 flex-grow-1" Outlined="true">
|
||||
<MudStack Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.caption" Color="Color.Warning">تخفیفی</MudText>
|
||||
<MudText Typo="Typo.caption" Color="Color.Warning">اعتباری</MudText>
|
||||
<MudText Color="@(tx.DiscountChange > 0 ? Color.Success : tx.DiscountChange < 0 ? Color.Error : Color.Default)" Style="font-weight: 600; font-size: 0.75rem;">
|
||||
@(tx.DiscountChange != 0 ? (tx.DiscountChange > 0 ? "+" : "") + FormatPrice(tx.DiscountChange) : "-")
|
||||
</MudText>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
else if (IsInDiscountStore)
|
||||
{
|
||||
<MudChip T="string" Color="Color.Error" Variant="Variant.Filled" Size="Size.Small"
|
||||
Class="d-none d-md-flex" Icon="@Icons.Material.Filled.Loyalty">فروشگاه تخفیفی</MudChip>
|
||||
Class="d-none d-md-flex" Icon="@Icons.Material.Filled.Loyalty">فروشگاه اعتباری</MudChip>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
else if (IsInDiscountStore && _isAuthenticated)
|
||||
{
|
||||
@* ── Discount store nav ── *@
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Products)" Typo="Typo.subtitle1" Class="mud-link">محصولات تخفیفی</MudLink>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Products)" Typo="Typo.subtitle1" Class="mud-link">محصولات اعتباری</MudLink>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Cart)" Typo="Typo.subtitle1" Class="mud-link">سبد خرید</MudLink>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Orders)" Typo="Typo.subtitle1" Class="mud-link">سفارشات من</MudLink>
|
||||
}
|
||||
@@ -159,9 +159,9 @@
|
||||
}
|
||||
else if (IsInDiscountStore)
|
||||
{
|
||||
<MudText Typo="Typo.overline" Style="color:var(--mud-palette-error);">فروشگاه تخفیفی</MudText>
|
||||
<MudText Typo="Typo.overline" Style="color:var(--mud-palette-error);">فروشگاه اعتباری</MudText>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Products)" Typo="Typo.subtitle1"
|
||||
OnClick="() => _drawerOpen=false">محصولات تخفیفی</MudLink>
|
||||
OnClick="() => _drawerOpen=false">محصولات اعتباری</MudLink>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Cart)" Typo="Typo.subtitle1"
|
||||
OnClick="() => _drawerOpen=false">سبد خرید</MudLink>
|
||||
<MudLink Href="@(RouteConstants.DiscountStore.Orders)" Typo="Typo.subtitle1"
|
||||
|
||||
@@ -114,7 +114,7 @@ public class WalletService
|
||||
parts.Add(model.ChangeNerworkValue > 0 ? "دریافت شبکه" : "برداشت شبکه");
|
||||
|
||||
if (model.ChangeDiscountValue != 0)
|
||||
parts.Add(model.ChangeDiscountValue > 0 ? "شارژ تخفیفی" : "خرید تخفیفی");
|
||||
parts.Add(model.ChangeDiscountValue > 0 ? "شارژ اعتباری" : "خرید اعتباری");
|
||||
|
||||
return parts.Count > 0 ? string.Join(" | ", parts) : "تراکنش کیف پول";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user