Compare commits

30 Commits

Author SHA1 Message Date
masoodafar-web 3eff5b6dfa Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 10m5s
2026-08-09 02:33:49 +03:30
masoodafar-web e63b80fe47 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 24m44s
2026-07-26 00:52:14 +03:30
masoodafar-web 7d892c2f6a Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 20m45s
2026-06-26 19:30:31 +03:30
masoodafar-web 5d83eb4e05 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 5m32s
2026-06-20 23:46:06 +03:30
masoodafar-web 0a2c5f913b Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 6m49s
2026-06-08 02:09:47 +03:30
masoodafar-web 933cdb1094 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Has been cancelled
Deploy blog slug UI fix to production.
2026-06-08 02:06:52 +03:30
masoodafar-web f2316eafe4 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 19m22s
2026-05-18 01:57:57 +03:30
masoodafar-web c4712a00ac Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 8m43s
2026-05-04 23:54:56 +03:30
masoodafar-web 52c8965704 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 5m44s
2026-05-01 00:15:07 +03:30
masoodafar-web 6d8d681046 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 6m29s
2026-04-28 23:30:42 +03:30
masoodafar-web aed6258fb3 fix: update GW_URL in Dockerfile to correct endpoint
Build and Deploy to Production / build-and-deploy (push) Successful in 15m55s
2026-03-15 13:27:48 +03:30
masoodafar-web e6d1d833ec fix: update GW_URL in backoffice deployment to correct endpoint
Build and Deploy to Production / build-and-deploy (push) Successful in 15m40s
2026-03-15 13:04:13 +03:30
masoodafar-web c0c7bb3ac5 fix: resolve MudBlazor v8 breaking changes (MUD0002 warnings)
Build and Deploy to Production / build-and-deploy (push) Successful in 16m3s
- MudListItem: Selected → Class with conditional CSS
- MudTextField: Dense → Margin="Margin.Dense"
- MudSwitch: remove HelperText (merged into Label)
- MudDatePicker: remove T parameter (no longer generic in v8)
2026-03-15 11:58:37 +03:30
masoodafar-web d0fe99492d fix: update proto to 0.0.192 on production (merge conflict chose wrong version) 2026-03-15 05:29:46 +03:30
masoodafar-web d38f50584c fix: resolve version conflict for Foursat.CMSMicroservice.Protobuf package
Build and Deploy to Production / build-and-deploy (push) Failing after 13m13s
2026-03-15 03:21:52 +03:30
masoodafar-web 1c67d7798a Merge branch 'kub-stage' into production 2026-03-15 03:21:44 +03:30
masoodafar-web ea7414dc7f fix: update Foursat.CMSMicroservice.Protobuf package version to 0.0.191
Build and Deploy to Production / build-and-deploy (push) Successful in 8m40s
2026-02-28 05:07:46 +03:30
masoodafar-web a450d9a001 Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 2m41s
2026-02-28 04:46:38 +03:30
masoodafar-web 60c91438ec fix: rename wallet labels — اصلی، اعتباری، پاداش تیمی
Build and Deploy to Production / build-and-deploy (push) Successful in 11m53s
- شبکه → پاداش تیمی (WalletManagement, ManualPayments)
- تخفیف → اعتباری (ManualPayments, OrderDetails, DiscountOrders)
- طلایی → پاداش تیمی (WithdrawalReports)

Files: WalletManagementPage, ManualPayments, ManualPaymentDialog,
       WithdrawalReports, DiscountOrdersMainPage, OrderDetailsDialog
2026-02-23 23:26:59 +03:30
masoodafar-web 1d8f34ae6c chore: prevent appsettings.Production.json from merging — keep ours strategy
Build and Deploy to Production / build-and-deploy (push) Successful in 8m7s
2026-02-23 00:03:28 +03:30
masoodafar-web bdea2e8aef Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 7m46s
2026-02-22 22:23:35 +03:30
masoodafar-web e541aec115 merge: kub-stage → production (discount autocomplete + smart AddStockDialog + site pages admin)
Build and Deploy to Production / build-and-deploy (push) Successful in 8m9s
2026-02-18 01:01:29 +03:30
masoodafar-web 743403e4d4 fix: nginx image path library/nginx:alpine → nginx:alpine on production
Build and Deploy to Production / build-and-deploy (push) Successful in 7m20s
2026-02-17 02:09:03 +03:30
masoodafar-web 44fd5f29d9 merge: kub-stage into production — fix prod workflow + appsettings GwUrl=cms.kbs2.ir
Build and Deploy to Production / build-and-deploy (push) Has been cancelled
2026-02-17 02:00:29 +03:30
masoodafar-web fac3d2c85e Fix production workflow: use SERVER_PASSWORD, add docker login, use set image for deploy
Build and Deploy to Production / build-and-deploy (push) Failing after 6m25s
2026-02-17 01:24:32 +03:30
masoodafar-web 51c20116a7 Remove staging workflow files from production branch to prevent cross-deployment 2026-02-17 01:16:13 +03:30
masoodafar-web 4454b8dd3a Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 6s
Features merged:
- Discount shop management (CRUD, inventory, bulk edit)
- Blog and content management improvements
- Docker build fixes (NuGet package reference)
- UI improvements across multiple components

Production workflow and Dockerfile preserved.
2026-02-17 00:57:14 +03:30
masoodafar-web 2bbb1ba4c7 chore: Update production workflow to use Nexus registry (no proxy needed)
Build and Deploy to Production / build-and-deploy (push) Failing after 0s
- Changed Dockerfile base images to use 194.5.195.53:32082 (Nexus)
- Updated workflow to use docker-sshpass image from Nexus
- Removed HTTP_PROXY/HTTPS_PROXY dependencies
- Changed deploy method to SSH instead of kubeconfig
- Registry: 194.5.195.53:30080 (Gitea internal)
- K8S Server: 45.149.79.127 (Production)
2026-01-29 22:04:31 +03:30
masoodafar-web 978475360c Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Successful in 2m23s
2025-12-29 00:43:04 +03:30
masoodafar-web 230453e491 feat(config): add production configuration for gateway URL and authentication
Build and Deploy to Production / build-and-deploy (push) Successful in 4m5s
2025-12-27 07:46:54 +03:30
9 changed files with 44 additions and 113 deletions
-46
View File
@@ -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\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
+4 -3
View File
@@ -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 BackOffice/Dockerfile \
-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
@@ -11,7 +11,7 @@
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
+1 -1
View File
@@ -143,7 +143,7 @@
<ProjectReference Include="../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj" />
</ItemGroup>
<ItemGroup Condition="!Exists('../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj')">
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.209" />
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.208" />
</ItemGroup>
<!-- ============================================================ -->
+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.se.kbs1.ir
ENV GW_URL=https://cms.kbs2.ir
EXPOSE 80
CMD ["/docker-entrypoint.sh"]
+2
View File
@@ -2,6 +2,8 @@
<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://194.5.195.53:32081/repository/nuget-all/index.json" allowInsecureConnections="true" />
</packageSources>
+2 -17
View File
@@ -28,8 +28,6 @@
<col />
<col />
<col />
<col style="min-width: 180px;" />
<col />
<col style="width: 58px;" />
</ColGroup>
<ToolBarContent>
@@ -48,21 +46,8 @@
</CellTemplate>
</PropertyColumn>
<PropertyColumn Property="x => x.NationalCode" Title="کدملی" />
<TemplateColumn Title="آدرس پیش‌فرض">
<CellTemplate>
<MudText Typo="Typo.caption" Style="max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"
Title="@(context.Item.DefaultAddress ?? "")">
@(string.IsNullOrWhiteSpace(context.Item.DefaultAddress) ? "-" : context.Item.DefaultAddress)
</MudText>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="کدپستی پیش‌فرض">
<CellTemplate>
<MudText Typo="Typo.caption">
@(string.IsNullOrWhiteSpace(context.Item.DefaultPostalCode) ? "-" : context.Item.DefaultPostalCode)
</MudText>
</CellTemplate>
</TemplateColumn>
<TemplateColumn StickyLeft="true" Title="عملیات" CellStyle="text-wrap: nowrap;" HeaderStyle="text-wrap: nowrap;">
<CellTemplate>
+32 -43
View File
@@ -1,10 +1,11 @@
using CMSMicroservice.Protobuf.Protos.User;
using BackOffice.Common.BaseComponents;
using BackOffice.Common.Utilities;
using BackOffice.Pages.User.Components;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MudBlazor;
using System.Text;
using DateTimeConverterCL;
using DataModel = CMSMicroservice.Protobuf.Protos.User.GetAllUserByFilterResponseModel;
namespace BackOffice.Pages.User;
@@ -83,63 +84,51 @@ public partial class UserMainPage
{
try
{
var filter = _request.Filter?.Clone() ?? new();
var all = new List<DataModel>();
const int pageSize = 200;
var page = 1;
while (page <= 500)
var exportRequest = new GetAllUserByFilterRequest
{
var result = await UserContract.GetAllUserByFilterAsync(new GetAllUserByFilterRequest
{
Filter = filter,
PaginationState = new() { PageNumber = page, PageSize = pageSize }
});
Filter = _request.Filter?.Clone() ?? new(),
PaginationState = new() { PageNumber = 1, PageSize = 1000 }
};
var batch = result?.Models?.ToList() ?? new();
if (batch.Count == 0)
break;
var result = await UserContract.GetAllUserByFilterAsync(exportRequest);
all.AddRange(batch);
var hasNext = result?.MetaData?.HasNext == true;
if (!hasNext || batch.Count < pageSize)
break;
page++;
}
if (all.Count == 0)
if (result?.Models == null || !result.Models.Any())
{
Snackbar.Add("داده‌ای برای خروجی وجود ندارد.", Severity.Info);
return;
}
var headers = new[]
{
"شناسه", "موبایل", "نام", "نام خانوادگی", "کدملی",
"آدرس پیش‌فرض", "کدپستی پیش‌فرض"
};
var sb = new StringBuilder();
sb.AppendLine("شناسه,موبایل,نام,نام خانوادگی,کدملی");
var rows = all.Select(u => new object?[]
foreach (var u in result.Models)
{
u.Id,
u.Mobile,
u.FirstName,
u.LastName,
u.NationalCode,
u.DefaultAddress,
u.DefaultPostalCode
});
sb.AppendLine(string.Join(",",
u.Id,
EscapeCsv(u.Mobile),
EscapeCsv(u.FirstName),
EscapeCsv(u.LastName),
EscapeCsv(u.NationalCode)));
}
var filename = $"users-{DateTime.Now:yyyyMMddHHmmss}.xls";
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
CsvExportHelper.ToExcelXmlBase64("کاربران", headers, rows));
Snackbar.Add($"خروجی Excel آماده شد ({all.Count} کاربر).", Severity.Success);
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
var base64 = Convert.ToBase64String(bytes);
var filename = $"users-{DateTime.Now:yyyyMMddHHmmss}.csv";
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
Snackbar.Add("خروجی Excel (CSV) آماده شد.", Severity.Success);
}
catch (Exception ex)
{
Snackbar.Add($"خطا در خروجی Excel: {ex.Message}", Severity.Error);
}
}
private static string EscapeCsv(string value)
{
if (string.IsNullOrEmpty(value)) return "";
if (value.Contains(',') || value.Contains('"') || value.Contains('\n'))
return $"\"{value.Replace("\"", "\"\"")}\"";
return value;
}
}
@@ -1,5 +1,5 @@
{
"GwUrl": "https://cms.kbs1.ir",
"GwUrl": "https://cms.kbs2.ir",
"Authentication": {
"Authority": "https://ids.afrino.co/",
"ClientId": "client_backoffice_spa"