Compare commits

..

2 Commits

Author SHA1 Message Date
masoodafar-web 420201e3b8 feat(landing-settings): add toggle switches for steps and features visibility
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 10m48s
- Introduced toggle switches to enable or disable the display of the "How It Works" and "Platform Features" sections in the landing settings.
- Updated the LandingSettingsModel to include properties for managing the visibility of these sections.
2026-10-04 23:34:16 +03:30
masoodafar-web 902cfbeb89 fix(user-order-details): update discount column to total amount in order details table
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 18m50s
- Changed the 'تخفیف واحد' column to 'جمع کل' and updated the calculation to display the total amount based on unit price and count.
2026-10-01 16:15:55 +03:30
8 changed files with 75 additions and 10 deletions
+46
View File
@@ -0,0 +1,46 @@
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\BackOffice\BackOffice.csproj"
- name: Build
run: dotnet build ".\src\BackOffice\BackOffice.csproj" --configuration Release --no-restore
- name: Test
run: dotnet test ".\src\BackOffice\BackOffice.csproj" --no-restore --verbosity normal
- name: Recycle Apppool
run: |
& "C:\Windows\System32\inetsrv\appcmd.exe" recycle apppool /apppool.name:admin.kbs1.ir
shell: powershell
- name: Stop Website
run: |
& "C:\Windows\System32\inetsrv\appcmd.exe" stop site /site.name:admin.kbs1.ir
shell: powershell
- name: Publish
run: dotnet publish ".\src\BackOffice\BackOffice.csproj" -c Release -o publish
- name: Copy Publish To IIS Directory
run: Get-ChildItem -Path "publish\*" | Copy-Item -Destination "E:\kbs1.ir\admin.kbs1.ir\" -Recurse -Force
- name: Start Website
run: |
& "C:\Windows\System32\inetsrv\appcmd.exe" start site /site.name:admin.kbs1.ir
shell: powershell
+3 -4
View File
@@ -40,7 +40,7 @@ jobs:
done
if ! docker info >/dev/null 2>&1; then
echo "❌ Docker daemon failed to start"
echo "❌ Docker daemon failed to start after 3 minutes"
exit 1
fi
@@ -56,10 +56,9 @@ jobs:
- name: Build Docker Image
run: |
cd src
DOCKER_BUILDKIT=0 docker build --network host -f BackOffice/Dockerfile \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
DOCKER_BUILDKIT=0 docker build --network host -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:prod \
.
-f BackOffice/Dockerfile .
- name: Push to Registry
run: |
+1 -1
View File
@@ -32,7 +32,7 @@ RUN chmod +x /docker-entrypoint.sh
# Default Blazor environment (override via K8s env var BLAZOR_ENVIRONMENT)
ENV BLAZOR_ENVIRONMENT=Staging
# Default gateway URL for gRPC calls (injected into appsettings at startup)
ENV GW_URL=https://cms.kbs2.ir
ENV GW_URL=https://cms.se.kbs1.ir
EXPOSE 80
CMD ["/docker-entrypoint.sh"]
-2
View File
@@ -2,8 +2,6 @@
<configuration>
<packageSources>
<clear />
<!-- Local packages (dev builds) -->
<!-- <add key="Local" value="/home/masoud/Apps/project/FourSat/nupkg" /> -->
<!-- Nexus (hosts FourSat packages + proxies nuget.org) -->
<add key="Nexus" value="http://185.252.31.44:32081/repository/nuget-all/index.json" allowInsecureConnections="true" />
</packageSources>
@@ -56,6 +56,10 @@
@* ── Steps ── *@
<MudExpansionPanel Text="@($"مراحل ({Model.Steps.Count})")" Icon="@Icons.Material.Filled.FormatListNumbered">
<MudStack Spacing="2" Class="pa-2">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
<MudSwitch T="bool" @bind-Value="_stepsEnabled" Color="Color.Primary" />
<MudText Typo="Typo.body2">نمایش بخش «چگونه کار می‌کند؟»</MudText>
</MudStack>
<MudTextField @bind-Value="Model.StepsTitle"
Label="عنوان بخش مراحل"
Placeholder="سه گام تا شروع"
@@ -99,6 +103,10 @@
@* ── Features ── *@
<MudExpansionPanel Text="@($"ویژگی‌ها ({Model.Features.Count})")" Icon="@Icons.Material.Filled.Star">
<MudStack Spacing="2" Class="pa-2">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1">
<MudSwitch T="bool" @bind-Value="_featuresEnabled" Color="Color.Primary" />
<MudText Typo="Typo.body2">نمایش بخش «امکانات پلتفرم»</MudText>
</MudStack>
<MudTextField @bind-Value="Model.FeaturesTitle"
Label="عنوان بخش ویژگی‌ها"
Placeholder="چرا کارا بازار سلامت؟"
@@ -329,4 +337,16 @@
get => Model.FeaturedBlogEnabled ?? true;
set => Model.FeaturedBlogEnabled = value;
}
private bool _stepsEnabled
{
get => Model.StepsEnabled ?? false;
set => Model.StepsEnabled = value;
}
private bool _featuresEnabled
{
get => Model.FeaturesEnabled ?? false;
set => Model.FeaturesEnabled = value;
}
}
@@ -9,8 +9,10 @@ public class LandingSettingsModel
public string? HeroButtonPrimaryText { get; set; }
public string? HeroButtonSecondaryText { get; set; }
public List<TrustBadgeModel> TrustBadges { get; set; } = new();
public bool? StepsEnabled { get; set; }
public string? StepsTitle { get; set; }
public List<StepModel> Steps { get; set; } = new();
public bool? FeaturesEnabled { get; set; }
public string? FeaturesTitle { get; set; }
public List<FeatureModel> Features { get; set; } = new();
public string? StatsTitle { get; set; }
@@ -148,7 +148,7 @@
<MudTh>محصول</MudTh>
<MudTh>قیمت واحد</MudTh>
<MudTh>تعداد</MudTh>
<MudTh>تخفیف واحد</MudTh>
<MudTh>جمع کل</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>
@@ -157,7 +157,7 @@
<MudTd>@context.ProductTitle</MudTd>
<MudTd>@context.UnitPrice?.ToString("N0")</MudTd>
<MudTd>@context.Count</MudTd>
<MudTd>@context.UnitDiscountPrice?.ToString("N0")</MudTd>
<MudTd>@(((context.UnitPrice ?? 0) * (context.Count ?? 0)).ToString("N0"))</MudTd>
</RowTemplate>
</MudTable>
}
@@ -1,5 +1,5 @@
{
"GwUrl": "https://cms.kbs2.ir",
"GwUrl": "https://cms.kbs1.ir",
"Authentication": {
"Authority": "https://ids.afrino.co/",
"ClientId": "client_backoffice_spa"