Compare commits
36 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3eff5b6dfa | |||
| aa97d25302 | |||
| 24ae4ec15c | |||
| c3ee46ff62 | |||
| e9f8328404 | |||
| 6a9d142dc6 | |||
| 1d78633e17 | |||
| e63b80fe47 | |||
| 7d892c2f6a | |||
| 5d83eb4e05 | |||
| 0a2c5f913b | |||
| 933cdb1094 | |||
| f2316eafe4 | |||
| c4712a00ac | |||
| 52c8965704 | |||
| 6d8d681046 | |||
| aed6258fb3 | |||
| e6d1d833ec | |||
| c0c7bb3ac5 | |||
| d0fe99492d | |||
| d38f50584c | |||
| 1c67d7798a | |||
| ea7414dc7f | |||
| a450d9a001 | |||
| 60c91438ec | |||
| 1d8f34ae6c | |||
| bdea2e8aef | |||
| e541aec115 | |||
| 743403e4d4 | |||
| 44fd5f29d9 | |||
| fac3d2c85e | |||
| 51c20116a7 | |||
| 4454b8dd3a | |||
| 2bbb1ba4c7 | |||
| 978475360c | |||
| 230453e491 |
@@ -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
|
|
||||||
@@ -40,7 +40,7 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
if ! docker info >/dev/null 2>&1; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -56,9 +56,10 @@ jobs:
|
|||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
run: |
|
run: |
|
||||||
cd src
|
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 \
|
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:prod \
|
||||||
-f BackOffice/Dockerfile .
|
.
|
||||||
|
|
||||||
- name: Push to Registry
|
- name: Push to Registry
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
# Docs moved to totalDoc
|
# Docs moved to totalDoc
|
||||||
|
|
||||||
See [totalDoc/INDEX.md](../../totalDoc/INDEX.md) for all documentation.
|
See [totalDoc/INDEX.md](../../totalDoc/INDEX.md) for all documentation.
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
<ProjectReference Include="../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj" />
|
<ProjectReference Include="../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Condition="!Exists('../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj')">
|
<ItemGroup Condition="!Exists('../../../CMS/src/CMSMicroservice.Protobuf/CMSMicroservice.Protobuf.csproj')">
|
||||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.206" />
|
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.208" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- ============================================================ -->
|
<!-- ============================================================ -->
|
||||||
|
|||||||
@@ -8,21 +8,46 @@ namespace BackOffice.Common.BaseComponents;
|
|||||||
public partial class DateRangePicker
|
public partial class DateRangePicker
|
||||||
{
|
{
|
||||||
private DateRange _dateRange = new();
|
private DateRange _dateRange = new();
|
||||||
|
private MudDateRangePicker _picker = default!;
|
||||||
|
private DateTime? _lastSyncedFrom;
|
||||||
|
private DateTime? _lastSyncedTo;
|
||||||
|
|
||||||
private MudDateRangePicker _picker;
|
|
||||||
[Parameter] public string Label { get; set; } = "انتخاب بازه زمانی";
|
[Parameter] public string Label { get; set; } = "انتخاب بازه زمانی";
|
||||||
[Parameter] public DateTime? DefaultStart { get; set; }
|
[Parameter] public DateTime? DefaultStart { get; set; }
|
||||||
[Parameter] public DateTime? DefaultEnd { get; set; }
|
[Parameter] public DateTime? DefaultEnd { get; set; }
|
||||||
[Parameter] public EventCallback<DateRange> OnChanged { get; set; }
|
[Parameter] public EventCallback<DateRange> OnChanged { get; set; }
|
||||||
|
|
||||||
|
[Parameter] public DateTime? From { get; set; }
|
||||||
|
[Parameter] public EventCallback<DateTime?> FromChanged { get; set; }
|
||||||
|
[Parameter] public DateTime? To { get; set; }
|
||||||
|
[Parameter] public EventCallback<DateTime?> ToChanged { get; set; }
|
||||||
|
|
||||||
protected override void OnInitialized()
|
protected override void OnInitialized()
|
||||||
{
|
{
|
||||||
base.OnInitialized();
|
base.OnInitialized();
|
||||||
if (DefaultStart.HasValue)
|
var start = From ?? DefaultStart;
|
||||||
_dateRange.Start = DefaultStart.Value.Date;
|
var end = To ?? DefaultEnd;
|
||||||
|
ApplyExternalRange(start, end);
|
||||||
if (DefaultEnd.HasValue)
|
_lastSyncedFrom = From;
|
||||||
_dateRange.End = DefaultEnd.Value.Date;
|
_lastSyncedTo = To;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void OnParametersSet()
|
||||||
|
{
|
||||||
|
// فقط وقتی والد From/To را عوض کرده (مثلاً پاک کردن فیلتر)، نه هنگام انتخاب داخل پیکر
|
||||||
|
if (From == _lastSyncedFrom && To == _lastSyncedTo)
|
||||||
|
return;
|
||||||
|
|
||||||
|
_lastSyncedFrom = From;
|
||||||
|
_lastSyncedTo = To;
|
||||||
|
ApplyExternalRange(From, To);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyExternalRange(DateTime? start, DateTime? end)
|
||||||
|
{
|
||||||
|
_dateRange = new DateRange(start?.Date, end?.Date);
|
||||||
|
}
|
||||||
|
|
||||||
public CultureInfo GetPersianCulture()
|
public CultureInfo GetPersianCulture()
|
||||||
{
|
{
|
||||||
var culture = new CultureInfo("fa-IR");
|
var culture = new CultureInfo("fa-IR");
|
||||||
@@ -53,19 +78,35 @@ public partial class DateRangePicker
|
|||||||
culture.NumberFormat.NumberNegativePattern = 0;
|
culture.NumberFormat.NumberNegativePattern = 0;
|
||||||
return culture;
|
return culture;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnClickOK()
|
private async Task OnClickOK()
|
||||||
{
|
{
|
||||||
if (_picker.DateRange is not null)
|
var range = _picker.DateRange ?? _dateRange;
|
||||||
{
|
_dateRange = range ?? new DateRange();
|
||||||
await OnChanged.InvokeAsync(_picker.DateRange);
|
await NotifyRangeChangedAsync(_dateRange);
|
||||||
}
|
|
||||||
|
|
||||||
await _picker.CloseAsync();
|
await _picker.CloseAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnClickClear()
|
private async Task OnClickClear()
|
||||||
{
|
{
|
||||||
_dateRange = new DateRange();
|
_dateRange = new DateRange();
|
||||||
await OnChanged.InvokeAsync(_dateRange);
|
await NotifyRangeChangedAsync(_dateRange);
|
||||||
await _picker.CloseAsync();
|
await _picker.CloseAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task NotifyRangeChangedAsync(DateRange range)
|
||||||
|
{
|
||||||
|
var start = range.Start?.Date;
|
||||||
|
var end = range.End?.Date;
|
||||||
|
|
||||||
|
_lastSyncedFrom = start;
|
||||||
|
_lastSyncedTo = end;
|
||||||
|
|
||||||
|
if (From != start)
|
||||||
|
await FromChanged.InvokeAsync(start);
|
||||||
|
if (To != end)
|
||||||
|
await ToChanged.InvokeAsync(end);
|
||||||
|
|
||||||
|
await OnChanged.InvokeAsync(range);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,145 @@
|
|||||||
|
using System.Globalization;
|
||||||
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace BackOffice.Common.Utilities;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خروجی سازگار با Excel فارسی:
|
||||||
|
/// - XML Spreadsheet (.xls) برای ستونبندی مطمئن + متن فارسی
|
||||||
|
/// - CSV با جداکننده ; بهعنوان جایگزین سبک
|
||||||
|
/// </summary>
|
||||||
|
public static class CsvExportHelper
|
||||||
|
{
|
||||||
|
/// <summary>جداکننده پیشفرض ویندوز فارسی برای CSV.</summary>
|
||||||
|
public const char Separator = ';';
|
||||||
|
|
||||||
|
public static string Escape(string? value)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(value))
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
// همیشه quote تا Excel فارسی ستون را نشکند
|
||||||
|
return $"\"{value.Replace("\"", "\"\"")}\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Cell(object? value) => value switch
|
||||||
|
{
|
||||||
|
null => Escape(string.Empty),
|
||||||
|
string s => Escape(s),
|
||||||
|
bool b => b ? "1" : "0",
|
||||||
|
byte or sbyte or short or ushort or int or uint or long or ulong or float or double or decimal
|
||||||
|
=> Convert.ToString(value, CultureInfo.InvariantCulture) ?? "0",
|
||||||
|
IFormattable f => Escape(f.ToString(null, CultureInfo.InvariantCulture) ?? string.Empty),
|
||||||
|
_ => Escape(Convert.ToString(value, CultureInfo.InvariantCulture))
|
||||||
|
};
|
||||||
|
|
||||||
|
public static string Row(params object?[] cells) =>
|
||||||
|
string.Join(Separator, cells.Select(Cell));
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// نام نمایشی مشتری؛ اگر خالی باشد موبایل یا شناسه کاربر.
|
||||||
|
/// </summary>
|
||||||
|
public static string CustomerName(string? fullName, string? mobile = null, long? userId = null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(fullName))
|
||||||
|
return fullName.Trim();
|
||||||
|
if (!string.IsNullOrWhiteSpace(mobile))
|
||||||
|
return mobile.Trim();
|
||||||
|
if (userId is > 0)
|
||||||
|
return $"کاربر {userId}";
|
||||||
|
return "—";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ToBase64(StringBuilder body)
|
||||||
|
{
|
||||||
|
// CRLF صریح — Excel روی ویندوز با \n لینوکس گاهی بههم میریزد
|
||||||
|
var text = body.ToString().Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", "\r\n");
|
||||||
|
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(text)).ToArray();
|
||||||
|
return Convert.ToBase64String(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// خروجی SpreadsheetML که Excel بهصورت ستونستون و با UTF-8 درست باز میکند.
|
||||||
|
/// فایل را با پسوند .xls ذخیره کنید.
|
||||||
|
/// </summary>
|
||||||
|
public static string ToExcelXmlBase64(string sheetName, IReadOnlyList<string> headers, IEnumerable<object?[]> rows)
|
||||||
|
{
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.AppendLine(@"<?xml version=""1.0"" encoding=""UTF-8""?>");
|
||||||
|
sb.AppendLine(@"<?mso-application progid=""Excel.Sheet""?>");
|
||||||
|
sb.AppendLine(@"<Workbook xmlns=""urn:schemas-microsoft-com:office:spreadsheet""");
|
||||||
|
sb.AppendLine(@" xmlns:o=""urn:schemas-microsoft-com:office:office""");
|
||||||
|
sb.AppendLine(@" xmlns:x=""urn:schemas-microsoft-com:office:excel""");
|
||||||
|
sb.AppendLine(@" xmlns:ss=""urn:schemas-microsoft-com:office:spreadsheet""");
|
||||||
|
sb.AppendLine(@" xmlns:html=""http://www.w3.org/TR/REC-html40"">");
|
||||||
|
sb.AppendLine(@"<Styles>");
|
||||||
|
sb.AppendLine(@"<Style ss:ID=""Header""><Font ss:Bold=""1""/></Style>");
|
||||||
|
sb.AppendLine(@"<Style ss:ID=""Text""><NumberFormat ss:Format=""@""/></Style>");
|
||||||
|
sb.AppendLine(@"</Styles>");
|
||||||
|
sb.Append("<Worksheet ss:Name=\"").Append(XmlEscape(sheetName)).AppendLine("\">");
|
||||||
|
sb.AppendLine("<Table>");
|
||||||
|
|
||||||
|
sb.AppendLine("<Row>");
|
||||||
|
foreach (var header in headers)
|
||||||
|
{
|
||||||
|
sb.Append("<Cell ss:StyleID=\"Header\"><Data ss:Type=\"String\">")
|
||||||
|
.Append(XmlEscape(header))
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
}
|
||||||
|
sb.AppendLine("</Row>");
|
||||||
|
|
||||||
|
foreach (var row in rows)
|
||||||
|
{
|
||||||
|
sb.AppendLine("<Row>");
|
||||||
|
foreach (var cell in row)
|
||||||
|
AppendExcelCell(sb, cell);
|
||||||
|
sb.AppendLine("</Row>");
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.AppendLine("</Table>");
|
||||||
|
sb.AppendLine("</Worksheet>");
|
||||||
|
sb.AppendLine("</Workbook>");
|
||||||
|
|
||||||
|
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
||||||
|
return Convert.ToBase64String(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AppendExcelCell(StringBuilder sb, object? value)
|
||||||
|
{
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case null:
|
||||||
|
sb.AppendLine(@"<Cell ss:StyleID=""Text""><Data ss:Type=""String""></Data></Cell>");
|
||||||
|
break;
|
||||||
|
case string s:
|
||||||
|
sb.Append(@"<Cell ss:StyleID=""Text""><Data ss:Type=""String"">")
|
||||||
|
.Append(XmlEscape(s))
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
break;
|
||||||
|
case bool b:
|
||||||
|
sb.Append(@"<Cell><Data ss:Type=""Boolean"">")
|
||||||
|
.Append(b ? "1" : "0")
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
break;
|
||||||
|
case byte or sbyte or short or ushort or int or uint or long or ulong:
|
||||||
|
sb.Append(@"<Cell><Data ss:Type=""Number"">")
|
||||||
|
.Append(Convert.ToString(value, CultureInfo.InvariantCulture))
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
break;
|
||||||
|
case float or double or decimal:
|
||||||
|
sb.Append(@"<Cell><Data ss:Type=""Number"">")
|
||||||
|
.Append(Convert.ToString(value, CultureInfo.InvariantCulture))
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sb.Append(@"<Cell ss:StyleID=""Text""><Data ss:Type=""String"">")
|
||||||
|
.Append(XmlEscape(Convert.ToString(value, CultureInfo.InvariantCulture)))
|
||||||
|
.AppendLine("</Data></Cell>");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string XmlEscape(string? value) =>
|
||||||
|
WebUtility.HtmlEncode(value ?? string.Empty);
|
||||||
|
}
|
||||||
@@ -42,8 +42,9 @@ public static class ReportLabels
|
|||||||
|
|
||||||
public static string GetPurchaseMethodLabel(int method) => method switch
|
public static string GetPurchaseMethodLabel(int method) => method switch
|
||||||
{
|
{
|
||||||
1 => "وام دایا",
|
1 => "دایا",
|
||||||
2 => "خرید مستقیم",
|
2 => "درگاه",
|
||||||
|
3 => "دستی",
|
||||||
_ => "نامشخص"
|
_ => "نامشخص"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ RUN chmod +x /docker-entrypoint.sh
|
|||||||
# Default Blazor environment (override via K8s env var BLAZOR_ENVIRONMENT)
|
# Default Blazor environment (override via K8s env var BLAZOR_ENVIRONMENT)
|
||||||
ENV BLAZOR_ENVIRONMENT=Staging
|
ENV BLAZOR_ENVIRONMENT=Staging
|
||||||
# Default gateway URL for gRPC calls (injected into appsettings at startup)
|
# 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
|
EXPOSE 80
|
||||||
CMD ["/docker-entrypoint.sh"]
|
CMD ["/docker-entrypoint.sh"]
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<packageSources>
|
<packageSources>
|
||||||
<clear />
|
<clear />
|
||||||
|
<!-- Local packages (dev builds) -->
|
||||||
|
<!-- <add key="Local" value="/home/masoud/Apps/project/FourSat/nupkg" /> -->
|
||||||
<!-- Nexus (hosts FourSat packages + proxies nuget.org) -->
|
<!-- Nexus (hosts FourSat packages + proxies nuget.org) -->
|
||||||
<add key="Nexus" value="http://194.5.195.53:32081/repository/nuget-all/index.json" allowInsecureConnections="true" />
|
<add key="Nexus" value="http://194.5.195.53:32081/repository/nuget-all/index.json" allowInsecureConnections="true" />
|
||||||
</packageSources>
|
</packageSources>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
@page "/club"
|
@page "/club"
|
||||||
@page "/club/members"
|
@page "/club/members"
|
||||||
@page "/club/purchases"
|
@page "/club/purchases"
|
||||||
|
@page "/club/customer-packages"
|
||||||
@page "/club/cycles"
|
@page "/club/cycles"
|
||||||
@page "/club/history"
|
@page "/club/history"
|
||||||
@page "/club/statistics"
|
@page "/club/statistics"
|
||||||
@@ -18,6 +19,9 @@
|
|||||||
<MudTabPanel Text="گزارش خرید پکیج" Icon="@Icons.Material.Filled.ShoppingBag">
|
<MudTabPanel Text="گزارش خرید پکیج" Icon="@Icons.Material.Filled.ShoppingBag">
|
||||||
<ClubPackagePurchasesReport />
|
<ClubPackagePurchasesReport />
|
||||||
</MudTabPanel>
|
</MudTabPanel>
|
||||||
|
<MudTabPanel Text="گزارش مشتریان پکیج" Icon="@Icons.Material.Filled.PeopleAlt">
|
||||||
|
<CustomerPackagePurchasesReport />
|
||||||
|
</MudTabPanel>
|
||||||
<MudTabPanel Text="گزارش دورهها" Icon="@Icons.Material.Filled.Loop">
|
<MudTabPanel Text="گزارش دورهها" Icon="@Icons.Material.Filled.Loop">
|
||||||
<ClubCyclesReport />
|
<ClubCyclesReport />
|
||||||
</MudTabPanel>
|
</MudTabPanel>
|
||||||
@@ -39,9 +43,10 @@
|
|||||||
_activeTab = uri switch
|
_activeTab = uri switch
|
||||||
{
|
{
|
||||||
"club/purchases" => 1,
|
"club/purchases" => 1,
|
||||||
"club/cycles" => 2,
|
"club/customer-packages" => 2,
|
||||||
"club/history" => 3,
|
"club/cycles" => 3,
|
||||||
"club/statistics" => 4,
|
"club/history" => 4,
|
||||||
|
"club/statistics" => 5,
|
||||||
_ => 0
|
_ => 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,9 @@
|
|||||||
<MudItem xs="12" sm="6" md="3">
|
<MudItem xs="12" sm="6" md="3">
|
||||||
<MudSelect T="int?" Clearable="true" Label="روش خرید" Variant="Variant.Outlined"
|
<MudSelect T="int?" Clearable="true" Label="روش خرید" Variant="Variant.Outlined"
|
||||||
Margin="Margin.Dense" @bind-Value="_purchaseMethod">
|
Margin="Margin.Dense" @bind-Value="_purchaseMethod">
|
||||||
<MudSelectItem T="int?" Value="1">وام دایا</MudSelectItem>
|
<MudSelectItem T="int?" Value="1">دایا</MudSelectItem>
|
||||||
<MudSelectItem T="int?" Value="2">خرید مستقیم</MudSelectItem>
|
<MudSelectItem T="int?" Value="3">دستی</MudSelectItem>
|
||||||
|
<MudSelectItem T="int?" Value="2">درگاه</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
<MudItem xs="12" sm="6" md="4">
|
<MudItem xs="12" sm="6" md="4">
|
||||||
|
|||||||
+105
@@ -0,0 +1,105 @@
|
|||||||
|
@using CMSMicroservice.Protobuf.Protos.UserPackagePurchase
|
||||||
|
@using Google.Protobuf.WellKnownTypes
|
||||||
|
@using DateTimeConverterCL
|
||||||
|
|
||||||
|
@inject UserPackagePurchaseContract.UserPackagePurchaseContractClient PurchaseClient
|
||||||
|
|
||||||
|
<MudDialog>
|
||||||
|
<TitleContent>
|
||||||
|
<MudText Typo="Typo.h6">
|
||||||
|
جزئیات خرید پکیج — @UserName
|
||||||
|
</MudText>
|
||||||
|
</TitleContent>
|
||||||
|
<DialogContent>
|
||||||
|
@if (_loading)
|
||||||
|
{
|
||||||
|
<MudProgressLinear Indeterminate="true" Color="Color.Primary" Class="my-4" />
|
||||||
|
}
|
||||||
|
else if (_items.Count == 0)
|
||||||
|
{
|
||||||
|
<MudAlert Severity="Severity.Info" Dense="true">خریدی برای این کاربر یافت نشد.</MudAlert>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<MudTable Items="_items" Dense="true" Hover="true" Breakpoint="Breakpoint.Sm">
|
||||||
|
<HeaderContent>
|
||||||
|
<MudTh>شناسه</MudTh>
|
||||||
|
<MudTh>پکیج</MudTh>
|
||||||
|
<MudTh>روش</MudTh>
|
||||||
|
<MudTh>مبلغ (ریال)</MudTh>
|
||||||
|
<MudTh>تاریخ خرید</MudTh>
|
||||||
|
</HeaderContent>
|
||||||
|
<RowTemplate>
|
||||||
|
<MudTd DataLabel="شناسه">@context.Id</MudTd>
|
||||||
|
<MudTd DataLabel="پکیج">@context.PackageName</MudTd>
|
||||||
|
<MudTd DataLabel="روش">
|
||||||
|
<MudChip T="string" Size="Size.Small" Variant="Variant.Outlined"
|
||||||
|
Color="@GetMethodColor(context.PurchaseMethod)">
|
||||||
|
@ReportLabels.GetPurchaseMethodLabel(context.PurchaseMethod)
|
||||||
|
</MudChip>
|
||||||
|
</MudTd>
|
||||||
|
<MudTd DataLabel="مبلغ">@context.Amount.ToString("N0")</MudTd>
|
||||||
|
<MudTd DataLabel="تاریخ">
|
||||||
|
@(context.PurchasedAt != null
|
||||||
|
? context.PurchasedAt.ToDateTime().ToLocalTime().MiladiToJalaliWithTime()
|
||||||
|
: "-")
|
||||||
|
</MudTd>
|
||||||
|
</RowTemplate>
|
||||||
|
</MudTable>
|
||||||
|
}
|
||||||
|
</DialogContent>
|
||||||
|
<DialogActions>
|
||||||
|
<MudButton OnClick="Close" Variant="Variant.Text">بستن</MudButton>
|
||||||
|
</DialogActions>
|
||||||
|
</MudDialog>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[CascadingParameter] IMudDialogInstance MudDialog { get; set; } = null!;
|
||||||
|
[Parameter] public long UserId { get; set; }
|
||||||
|
[Parameter] public string UserName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
private bool _loading = true;
|
||||||
|
private List<UserPackagePurchaseModel> _items = new();
|
||||||
|
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = await PurchaseClient.GetAllUserPackagePurchaseByFilterAsync(
|
||||||
|
new GetAllUserPackagePurchaseByFilterRequest
|
||||||
|
{
|
||||||
|
PaginationState = new CMSMicroservice.Protobuf.Protos.PaginationState
|
||||||
|
{
|
||||||
|
PageNumber = 1,
|
||||||
|
PageSize = 500
|
||||||
|
},
|
||||||
|
Filter = new GetAllUserPackagePurchaseByFilterFilter
|
||||||
|
{
|
||||||
|
UserId = UserId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
_items = result?.Models?
|
||||||
|
.OrderBy(x => x.PurchasedAt?.ToDateTime() ?? DateTime.MinValue)
|
||||||
|
.ToList() ?? new();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Snackbar.Add($"خطا در بارگذاری جزئیات: {ex.Message}", Severity.Error);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Color GetMethodColor(int method) => method switch
|
||||||
|
{
|
||||||
|
1 => Color.Info, // دایا
|
||||||
|
2 => Color.Primary, // درگاه
|
||||||
|
3 => Color.Secondary, // دستی
|
||||||
|
_ => Color.Default
|
||||||
|
};
|
||||||
|
|
||||||
|
private void Close() => MudDialog.Close();
|
||||||
|
}
|
||||||
@@ -0,0 +1,282 @@
|
|||||||
|
@using System.Text
|
||||||
|
@using BackOffice.Common.BaseComponents
|
||||||
|
@using BackOffice.Common.Utilities
|
||||||
|
@using BackOffice.Pages.AutoComplete
|
||||||
|
@using BackOffice.Pages.Club.Reports.Components
|
||||||
|
@using CMSMicroservice.Protobuf.Protos.UserPackagePurchase
|
||||||
|
@using Google.Protobuf.WellKnownTypes
|
||||||
|
@using DateTimeConverterCL
|
||||||
|
@using Microsoft.JSInterop
|
||||||
|
|
||||||
|
@inject UserPackagePurchaseContract.UserPackagePurchaseContractClient PurchaseClient
|
||||||
|
@inject IDialogService DialogService
|
||||||
|
@inject IJSRuntime JsRuntime
|
||||||
|
|
||||||
|
<MudAlert Severity="Severity.Info" Variant="Variant.Text" Dense="true" Class="mb-3">
|
||||||
|
گزارش تجمیعی مشتریان — اولین/آخرین پکیج، تفکیک دایا / دستی / درگاه. خروجی Excel مطابق فیلتر فعال است.
|
||||||
|
</MudAlert>
|
||||||
|
|
||||||
|
<BasePageComponent @ref="_basePage" OnSubmitClick="OnFilterSubmit" OnClearFilterClick="OnFilterCleared">
|
||||||
|
<Filters>
|
||||||
|
<MudItem xs="12" sm="6" md="3">
|
||||||
|
<UserAutoComplete Label="کاربر" @bind-SelectedUserId="_userId" />
|
||||||
|
</MudItem>
|
||||||
|
<MudItem xs="12" sm="6" md="3">
|
||||||
|
<MudSelect T="int?" Clearable="true" Label="روش خرید" Variant="Variant.Outlined"
|
||||||
|
Margin="Margin.Dense" @bind-Value="_purchaseMethod">
|
||||||
|
<MudSelectItem T="int?" Value="1">دایا</MudSelectItem>
|
||||||
|
<MudSelectItem T="int?" Value="3">دستی</MudSelectItem>
|
||||||
|
<MudSelectItem T="int?" Value="2">درگاه</MudSelectItem>
|
||||||
|
</MudSelect>
|
||||||
|
</MudItem>
|
||||||
|
<MudItem xs="12" sm="6" md="4">
|
||||||
|
<DateRangePicker @bind-From="_fromDate" @bind-To="_toDate" Label="بازه خرید" />
|
||||||
|
</MudItem>
|
||||||
|
</Filters>
|
||||||
|
<Content>
|
||||||
|
<MudStack Row="true" Justify="Justify.FlexEnd" Class="mb-3">
|
||||||
|
<MudButton Variant="Variant.Outlined" Color="Color.Success"
|
||||||
|
StartIcon="@Icons.Material.Filled.FileDownload"
|
||||||
|
OnClick="ExportToExcel" Disabled="_exporting">
|
||||||
|
خروجی Excel
|
||||||
|
</MudButton>
|
||||||
|
</MudStack>
|
||||||
|
|
||||||
|
<MudDataGrid @ref="_grid" T="CustomerPackagePurchaseRollupModel" ServerData="LoadData" ReadOnly="true"
|
||||||
|
Hover="true" Dense="true" Height="calc(100vh - 420px)">
|
||||||
|
<Columns>
|
||||||
|
<TemplateColumn Title="مشتری">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudStack Spacing="0">
|
||||||
|
<MudText Typo="Typo.body2">@context.Item.UserName</MudText>
|
||||||
|
<MudText Typo="Typo.caption" Color="Color.Secondary">@context.Item.UserMobile</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="اولین پکیج">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudStack Spacing="0">
|
||||||
|
<MudText Typo="Typo.body2">@context.Item.FirstPackageName</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.FirstAmount.ToString("N0") ریال</MudText>
|
||||||
|
<MudText Typo="Typo.caption" Color="Color.Secondary">
|
||||||
|
@(context.Item.FirstPurchasedAt?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-")
|
||||||
|
</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="آخرین پکیج">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudStack Spacing="0">
|
||||||
|
<MudText Typo="Typo.body2">@context.Item.LastPackageName</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.LastAmount.ToString("N0") ریال</MudText>
|
||||||
|
<MudText Typo="Typo.caption" Color="Color.Secondary">
|
||||||
|
@(context.Item.LastPurchasedAt?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-")
|
||||||
|
</MudText>
|
||||||
|
<MudChip T="string" Size="Size.Small" Class="mt-1" Variant="Variant.Filled"
|
||||||
|
Color="@GetMethodColor(context.Item.LastPurchaseMethod)">
|
||||||
|
@ReportLabels.GetPurchaseMethodLabel(context.Item.LastPurchaseMethod)
|
||||||
|
</MudChip>
|
||||||
|
</MudStack>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="تعداد / جمع">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudStack Spacing="0">
|
||||||
|
<MudText>@context.Item.PurchaseCount خرید</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.TotalAmount.ToString("N0") ریال</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="دایا">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.DayaCount عدد</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.DayaAmount.ToString("N0")</MudText>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="دستی">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.ManualCount عدد</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.ManualAmount.ToString("N0")</MudText>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="درگاه">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.GatewayCount عدد</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.Item.GatewayAmount.ToString("N0")</MudText>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
<TemplateColumn Title="عملیات">
|
||||||
|
<CellTemplate>
|
||||||
|
<MudButton Size="Size.Small" Variant="Variant.Outlined" Color="Color.Primary"
|
||||||
|
OnClick="() => OpenDetails(context.Item)">
|
||||||
|
جزئیات
|
||||||
|
</MudButton>
|
||||||
|
</CellTemplate>
|
||||||
|
</TemplateColumn>
|
||||||
|
</Columns>
|
||||||
|
<NoRecordsContent>
|
||||||
|
<MudAlert Severity="Severity.Info" Dense="true" Variant="Variant.Text" Class="my-4">موردی یافت نشد.</MudAlert>
|
||||||
|
</NoRecordsContent>
|
||||||
|
<PagerContent>
|
||||||
|
<MudDataGridPager T="CustomerPackagePurchaseRollupModel" PageSizeOptions="@(new int[] { 20, 50, 100 })"
|
||||||
|
InfoFormat="سطر {first_item} تا {last_item} از {all_items}"
|
||||||
|
RowsPerPageString="تعداد در صفحه" />
|
||||||
|
</PagerContent>
|
||||||
|
</MudDataGrid>
|
||||||
|
</Content>
|
||||||
|
</BasePageComponent>
|
||||||
|
|
||||||
|
@code {
|
||||||
|
private BasePageComponent? _basePage;
|
||||||
|
private MudDataGrid<CustomerPackagePurchaseRollupModel>? _grid;
|
||||||
|
private long? _userId;
|
||||||
|
private int? _purchaseMethod;
|
||||||
|
private DateTime? _fromDate, _toDate;
|
||||||
|
private bool _exporting;
|
||||||
|
|
||||||
|
private GetCustomerPackagePurchaseRollupFilter BuildFilter()
|
||||||
|
{
|
||||||
|
var filter = new GetCustomerPackagePurchaseRollupFilter();
|
||||||
|
if (_userId is > 0)
|
||||||
|
filter.UserId = _userId;
|
||||||
|
if (_purchaseMethod.HasValue)
|
||||||
|
filter.PurchaseMethod = _purchaseMethod.Value;
|
||||||
|
if (_fromDate.HasValue)
|
||||||
|
filter.PurchasedFrom = Timestamp.FromDateTime(DateTime.SpecifyKind(_fromDate.Value.Date, DateTimeKind.Utc));
|
||||||
|
if (_toDate.HasValue)
|
||||||
|
filter.PurchasedTo = Timestamp.FromDateTime(DateTime.SpecifyKind(_toDate.Value.Date.AddDays(1).AddTicks(-1), DateTimeKind.Utc));
|
||||||
|
return filter;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task<GridData<CustomerPackagePurchaseRollupModel>> LoadData(GridState<CustomerPackagePurchaseRollupModel> state)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var result = await PurchaseClient.GetCustomerPackagePurchaseRollupAsync(
|
||||||
|
new GetCustomerPackagePurchaseRollupRequest
|
||||||
|
{
|
||||||
|
PaginationState = new CMSMicroservice.Protobuf.Protos.PaginationState
|
||||||
|
{
|
||||||
|
PageNumber = state.Page + 1,
|
||||||
|
PageSize = state.PageSize
|
||||||
|
},
|
||||||
|
Filter = BuildFilter()
|
||||||
|
});
|
||||||
|
|
||||||
|
return new GridData<CustomerPackagePurchaseRollupModel>
|
||||||
|
{
|
||||||
|
Items = result?.Models?.ToList() ?? new(),
|
||||||
|
TotalItems = (int)(result?.MetaData?.TotalCount ?? 0)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Snackbar.Add($"خطا: {ex.Message}", Severity.Error);
|
||||||
|
return new GridData<CustomerPackagePurchaseRollupModel>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnFilterSubmit()
|
||||||
|
{
|
||||||
|
if (_grid != null) await _grid.ReloadServerData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OnFilterCleared()
|
||||||
|
{
|
||||||
|
_userId = null;
|
||||||
|
_purchaseMethod = null;
|
||||||
|
_fromDate = _toDate = null;
|
||||||
|
if (_grid != null) await _grid.ReloadServerData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task OpenDetails(CustomerPackagePurchaseRollupModel row)
|
||||||
|
{
|
||||||
|
var parameters = new DialogParameters
|
||||||
|
{
|
||||||
|
{ nameof(CustomerPackagePurchaseDetailsDialog.UserId), row.UserId },
|
||||||
|
{ nameof(CustomerPackagePurchaseDetailsDialog.UserName), row.UserName }
|
||||||
|
};
|
||||||
|
var options = new DialogOptions { MaxWidth = MaxWidth.Medium, FullWidth = true, CloseButton = true };
|
||||||
|
await DialogService.ShowAsync<CustomerPackagePurchaseDetailsDialog>("جزئیات خرید پکیج", parameters, options);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task ExportToExcel()
|
||||||
|
{
|
||||||
|
_exporting = true;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// PageSize=0 → همهٔ ردیفهای مطابق فیلتر، مستقل از صفحهبندی گرید
|
||||||
|
var result = await PurchaseClient.GetCustomerPackagePurchaseRollupAsync(
|
||||||
|
new GetCustomerPackagePurchaseRollupRequest
|
||||||
|
{
|
||||||
|
PaginationState = new CMSMicroservice.Protobuf.Protos.PaginationState
|
||||||
|
{
|
||||||
|
PageNumber = 1,
|
||||||
|
PageSize = 0
|
||||||
|
},
|
||||||
|
Filter = BuildFilter()
|
||||||
|
});
|
||||||
|
|
||||||
|
var all = result?.Models?.ToList() ?? new();
|
||||||
|
if (all.Count == 0)
|
||||||
|
{
|
||||||
|
Snackbar.Add("دادهای برای خروجی با فیلتر فعلی وجود ندارد.", Severity.Info);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var headers = new[]
|
||||||
|
{
|
||||||
|
"شناسه کاربر", "نام مشتری", "موبایل",
|
||||||
|
"اولین پکیج", "مبلغ اولین", "تاریخ اولین",
|
||||||
|
"آخرین پکیج", "مبلغ آخرین", "تاریخ آخرین", "روش آخرین",
|
||||||
|
"تعداد خرید", "جمع مبلغ",
|
||||||
|
"تعداد دایا", "مبلغ دایا",
|
||||||
|
"تعداد دستی", "مبلغ دستی",
|
||||||
|
"تعداد درگاه", "مبلغ درگاه"
|
||||||
|
};
|
||||||
|
|
||||||
|
var rows = all.Select(o => new object?[]
|
||||||
|
{
|
||||||
|
o.UserId,
|
||||||
|
o.UserName,
|
||||||
|
o.UserMobile,
|
||||||
|
o.FirstPackageName,
|
||||||
|
o.FirstAmount,
|
||||||
|
o.FirstPurchasedAt?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-",
|
||||||
|
o.LastPackageName,
|
||||||
|
o.LastAmount,
|
||||||
|
o.LastPurchasedAt?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-",
|
||||||
|
ReportLabels.GetPurchaseMethodLabel(o.LastPurchaseMethod),
|
||||||
|
o.PurchaseCount,
|
||||||
|
o.TotalAmount,
|
||||||
|
o.DayaCount,
|
||||||
|
o.DayaAmount,
|
||||||
|
o.ManualCount,
|
||||||
|
o.ManualAmount,
|
||||||
|
o.GatewayCount,
|
||||||
|
o.GatewayAmount
|
||||||
|
});
|
||||||
|
|
||||||
|
var filename = $"customer-packages-{DateTime.Now:yyyyMMddHHmmss}.xls";
|
||||||
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
|
||||||
|
CsvExportHelper.ToExcelXmlBase64("مشتریان پکیج", headers, rows));
|
||||||
|
Snackbar.Add($"خروجی Excel آماده شد ({all.Count} مشتری).", Severity.Success);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Snackbar.Add($"خطا در خروجی Excel: {ex.Message}", Severity.Error);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
_exporting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Color GetMethodColor(int method) => method switch
|
||||||
|
{
|
||||||
|
1 => Color.Info,
|
||||||
|
2 => Color.Primary,
|
||||||
|
3 => Color.Secondary,
|
||||||
|
_ => Color.Default
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
@@ -55,6 +56,15 @@
|
|||||||
</MudItem>
|
</MudItem>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (Model.Status == OrderStatus.ReadyForOfficePickup)
|
||||||
|
{
|
||||||
|
<MudItem xs="12">
|
||||||
|
<MudAlert Severity="Severity.Info">
|
||||||
|
<MudText>سفارش برای تحویل حضوری در دفتر آماده است.</MudText>
|
||||||
|
</MudAlert>
|
||||||
|
</MudItem>
|
||||||
|
}
|
||||||
|
|
||||||
@if (Model.Status == OrderStatus.Shipped)
|
@if (Model.Status == OrderStatus.Shipped)
|
||||||
{
|
{
|
||||||
<MudItem xs="12">
|
<MudItem xs="12">
|
||||||
@@ -126,8 +136,9 @@
|
|||||||
OrderStatus.Processing => Color.Primary,
|
OrderStatus.Processing => Color.Primary,
|
||||||
OrderStatus.Shipped => Color.Secondary,
|
OrderStatus.Shipped => Color.Secondary,
|
||||||
OrderStatus.Delivered => Color.Success,
|
OrderStatus.Delivered => Color.Success,
|
||||||
OrderStatus.Cancelled => Color.Error,
|
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||||
OrderStatus.Returned => Color.Dark,
|
OrderStatus.Cancelled => Color.Dark,
|
||||||
|
OrderStatus.Returned => Color.Error,
|
||||||
_ => Color.Default
|
_ => Color.Default
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -141,6 +152,7 @@
|
|||||||
OrderStatus.Processing => "در حال آمادهسازی",
|
OrderStatus.Processing => "در حال آمادهسازی",
|
||||||
OrderStatus.Shipped => "ارسال شده",
|
OrderStatus.Shipped => "ارسال شده",
|
||||||
OrderStatus.Delivered => "تحویل داده شده",
|
OrderStatus.Delivered => "تحویل داده شده",
|
||||||
|
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||||
OrderStatus.Cancelled => "لغو شده",
|
OrderStatus.Cancelled => "لغو شده",
|
||||||
OrderStatus.Returned => "مرجوع شده",
|
OrderStatus.Returned => "مرجوع شده",
|
||||||
_ => "نامشخص"
|
_ => "نامشخص"
|
||||||
|
|||||||
@@ -91,6 +91,7 @@
|
|||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Processing">در حال آمادهسازی</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
@@ -114,6 +115,12 @@
|
|||||||
توجه: در صورت لغو یا مرجوعی سفارش، موجودی محصولات به انبار بازگردانده میشود.
|
توجه: در صورت لغو یا مرجوعی سفارش، موجودی محصولات به انبار بازگردانده میشود.
|
||||||
</MudAlert>
|
</MudAlert>
|
||||||
}
|
}
|
||||||
|
@if (_newStatus == OrderStatus.ReadyForOfficePickup)
|
||||||
|
{
|
||||||
|
<MudAlert Severity="Severity.Info" Dense="true">
|
||||||
|
سفارش برای تحویل حضوری در دفتر آماده است.
|
||||||
|
</MudAlert>
|
||||||
|
}
|
||||||
@if (_newStatus == OrderStatus.Shipped)
|
@if (_newStatus == OrderStatus.Shipped)
|
||||||
{
|
{
|
||||||
<MudAlert Severity="Severity.Info" Dense="true">
|
<MudAlert Severity="Severity.Info" Dense="true">
|
||||||
|
|||||||
@@ -49,6 +49,8 @@
|
|||||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Delivered">تحویل داده شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||||
|
<MudSelectItem T="OrderStatus?" Value="@OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
</Filters>
|
</Filters>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using BackOffice.Common.BaseComponents;
|
using BackOffice.Common.BaseComponents;
|
||||||
|
using BackOffice.Common.Utilities;
|
||||||
using BackOffice.Services.DiscountOrder;
|
using BackOffice.Services.DiscountOrder;
|
||||||
using BackOffice.Pages.DiscountShop.Components;
|
using BackOffice.Pages.DiscountShop.Components;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
@@ -187,8 +188,9 @@ public partial class DiscountOrdersMainPage
|
|||||||
OrderStatus.Processing => Color.Primary,
|
OrderStatus.Processing => Color.Primary,
|
||||||
OrderStatus.Shipped => Color.Secondary,
|
OrderStatus.Shipped => Color.Secondary,
|
||||||
OrderStatus.Delivered => Color.Success,
|
OrderStatus.Delivered => Color.Success,
|
||||||
OrderStatus.Cancelled => Color.Error,
|
OrderStatus.Cancelled => Color.Dark,
|
||||||
OrderStatus.Returned => Color.Dark,
|
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||||
|
OrderStatus.Returned => Color.Error,
|
||||||
_ => Color.Default
|
_ => Color.Default
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -203,6 +205,7 @@ public partial class DiscountOrdersMainPage
|
|||||||
OrderStatus.Shipped => "ارسال شده",
|
OrderStatus.Shipped => "ارسال شده",
|
||||||
OrderStatus.Delivered => "تحویل داده شده",
|
OrderStatus.Delivered => "تحویل داده شده",
|
||||||
OrderStatus.Cancelled => "لغو شده",
|
OrderStatus.Cancelled => "لغو شده",
|
||||||
|
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||||
OrderStatus.Returned => "مرجوع شده",
|
OrderStatus.Returned => "مرجوع شده",
|
||||||
_ => "نامشخص"
|
_ => "نامشخص"
|
||||||
};
|
};
|
||||||
@@ -242,44 +245,36 @@ public partial class DiscountOrdersMainPage
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var headers = new[]
|
||||||
sb.AppendLine("شناسه,نام کاربر,موبایل,مبلغ کل,کیف پول اعتباری,پرداخت درگاه,تعداد آیتم,وضعیت پرداخت,وضعیت ارسال,تاریخ پرداخت,تاریخ ثبت,آدرس");
|
{
|
||||||
|
"شناسه", "نام مشتری", "موبایل", "مبلغ کل", "کیف پول اعتباری", "پرداخت درگاه",
|
||||||
foreach (var o in _orders)
|
"تعداد آیتم", "وضعیت پرداخت", "وضعیت ارسال", "تاریخ پرداخت", "تاریخ ثبت", "آدرس"
|
||||||
|
};
|
||||||
|
|
||||||
|
var rows = _orders.Select(o => new object?[]
|
||||||
{
|
{
|
||||||
sb.AppendLine(string.Join(",",
|
|
||||||
o.Id,
|
o.Id,
|
||||||
EscapeCsv(o.UserFullName),
|
CsvExportHelper.CustomerName(o.UserFullName, o.UserMobile, o.UserId),
|
||||||
EscapeCsv(o.UserMobile),
|
o.UserMobile ?? "",
|
||||||
o.TotalPrice.ToString("N0"),
|
o.TotalPrice,
|
||||||
o.DiscountBalanceUsed.ToString("N0"),
|
o.DiscountBalanceUsed,
|
||||||
o.GatewayAmount.ToString("N0"),
|
o.GatewayAmount,
|
||||||
o.ItemsCount,
|
o.ItemsCount,
|
||||||
EscapeCsv(GetPaymentStatusText(o.PaymentStatusValue)),
|
GetPaymentStatusText(o.PaymentStatusValue),
|
||||||
EscapeCsv(GetStatusText(o.Status)),
|
GetStatusText(o.Status),
|
||||||
o.PaymentDate?.MiladiToJalaliWithTime() ?? "-",
|
o.PaymentDate?.MiladiToJalaliWithTime() ?? "-",
|
||||||
o.Created?.MiladiToJalaliWithTime() ?? "-",
|
o.Created?.MiladiToJalaliWithTime() ?? "-",
|
||||||
EscapeCsv(o.ShippingAddress ?? "-")));
|
o.ShippingAddress ?? "-"
|
||||||
}
|
});
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var filename = $"discount-orders-{DateTime.Now:yyyyMMddHHmmss}.xls";
|
||||||
var base64 = Convert.ToBase64String(bytes);
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
|
||||||
var filename = $"discount-orders-{DateTime.Now:yyyyMMddHHmmss}.csv";
|
CsvExportHelper.ToExcelXmlBase64("سفارشهای اعتباری", headers, rows));
|
||||||
|
Snackbar.Add("خروجی Excel آماده شد.", Severity.Success);
|
||||||
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
|
||||||
Snackbar.Add("خروجی Excel (CSV) آماده شد.", Severity.Success);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Snackbar.Add($"خطا در خروجی Excel: {ex.Message}", Severity.Error);
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Processing">در حال پردازش</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Processing">در حال پردازش</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Shipped">ارسال شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Delivered">تحویل شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Delivered">تحویل شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.ReadyForOfficePickup">آماده تحویل در دفتر</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Cancelled">لغو شده</MudSelectItem>
|
||||||
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="OrderStatus?" Value="OrderStatus.Returned">مرجوع شده</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
@@ -498,7 +499,8 @@
|
|||||||
OrderStatus.Processing => Color.Info,
|
OrderStatus.Processing => Color.Info,
|
||||||
OrderStatus.Shipped => Color.Info,
|
OrderStatus.Shipped => Color.Info,
|
||||||
OrderStatus.Delivered => Color.Success,
|
OrderStatus.Delivered => Color.Success,
|
||||||
OrderStatus.Cancelled => Color.Error,
|
OrderStatus.ReadyForOfficePickup => Color.Primary,
|
||||||
|
OrderStatus.Cancelled => Color.Dark,
|
||||||
OrderStatus.Returned => Color.Error,
|
OrderStatus.Returned => Color.Error,
|
||||||
_ => Color.Default
|
_ => Color.Default
|
||||||
};
|
};
|
||||||
@@ -513,6 +515,7 @@
|
|||||||
OrderStatus.Processing => "در حال پردازش",
|
OrderStatus.Processing => "در حال پردازش",
|
||||||
OrderStatus.Shipped => "ارسال شده",
|
OrderStatus.Shipped => "ارسال شده",
|
||||||
OrderStatus.Delivered => "تحویل شده",
|
OrderStatus.Delivered => "تحویل شده",
|
||||||
|
OrderStatus.ReadyForOfficePickup => "آماده تحویل در دفتر",
|
||||||
OrderStatus.Cancelled => "لغو شده",
|
OrderStatus.Cancelled => "لغو شده",
|
||||||
OrderStatus.Returned => "مرجوع شده",
|
OrderStatus.Returned => "مرجوع شده",
|
||||||
_ => "نامشخص"
|
_ => "نامشخص"
|
||||||
@@ -527,28 +530,31 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var headers = new[]
|
||||||
sb.AppendLine("شناسه,نام کاربر,موبایل,تاریخ ثبت,تعداد آیتم,مبلغ نهایی,تخفیف,وضعیت");
|
{
|
||||||
|
"شناسه", "نام مشتری", "موبایل", "تاریخ ثبت", "تعداد آیتم", "مبلغ نهایی", "تخفیف", "وضعیت"
|
||||||
foreach (var o in _orders.Where(o => o.Created.HasValue).OrderBy(o => o.Created))
|
};
|
||||||
|
|
||||||
|
var rows = _orders
|
||||||
|
.OrderBy(o => o.Created ?? o.PaymentDate ?? DateTime.MaxValue)
|
||||||
|
.Select(o => new object?[]
|
||||||
{
|
{
|
||||||
sb.AppendLine(string.Join(",",
|
|
||||||
o.Id,
|
o.Id,
|
||||||
EscapeCsv(o.UserFullName),
|
CsvExportHelper.CustomerName(o.UserFullName, o.UserMobile, o.UserId),
|
||||||
EscapeCsv(o.UserMobile),
|
o.UserMobile ?? "",
|
||||||
o.Created?.MiladiToJalaliWithTime() ?? "-",
|
o.Created?.MiladiToJalaliWithTime()
|
||||||
|
?? o.PaymentDate?.MiladiToJalaliWithTime()
|
||||||
|
?? "-",
|
||||||
o.ItemsCount,
|
o.ItemsCount,
|
||||||
o.GatewayAmount,
|
o.GatewayAmount,
|
||||||
o.DiscountBalanceUsed,
|
o.DiscountBalanceUsed,
|
||||||
GetStatusText(o.Status)));
|
GetStatusText(o.Status)
|
||||||
}
|
});
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var filename = $"discount-sales-{DateTime.Now:yyyyMMddHHmmss}.xls";
|
||||||
var base64 = Convert.ToBase64String(bytes);
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
|
||||||
var filename = $"discount-sales-{DateTime.Now:yyyyMMddHHmmss}.csv";
|
CsvExportHelper.ToExcelXmlBase64("گزارش فروش اعتباری", headers, rows));
|
||||||
|
Snackbar.Add("خروجی Excel آماده شد.", Severity.Success);
|
||||||
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
|
||||||
Snackbar.Add("خروجی Excel (CSV) آماده شد.", Severity.Success);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ExportToPdf()
|
private async Task ExportToPdf()
|
||||||
@@ -572,12 +578,12 @@
|
|||||||
sb.AppendLine();
|
sb.AppendLine();
|
||||||
|
|
||||||
sb.AppendLine("جزئیات سفارشها:");
|
sb.AppendLine("جزئیات سفارشها:");
|
||||||
sb.AppendLine("شناسه | نام کاربر | تاریخ | تعداد آیتم | مبلغ نهایی | تخفیف | وضعیت");
|
sb.AppendLine("شناسه | نام مشتری | تاریخ | تعداد آیتم | مبلغ نهایی | تخفیف | وضعیت");
|
||||||
|
|
||||||
foreach (var o in _orders.Where(o => o.Created.HasValue).OrderBy(o => o.Created))
|
foreach (var o in _orders.Where(o => o.Created.HasValue).OrderBy(o => o.Created))
|
||||||
{
|
{
|
||||||
sb.AppendLine(
|
sb.AppendLine(
|
||||||
$"{o.Id} | {o.UserFullName} | {o.Created?.MiladiToJalaliWithTime() ?? "-"} | {o.ItemsCount} | {o.GatewayAmount:N0} | {o.DiscountBalanceUsed:N0} | {GetStatusText(o.Status)}");
|
$"{o.Id} | {CsvExportHelper.CustomerName(o.UserFullName, o.UserMobile, o.UserId)} | {o.Created?.MiladiToJalaliWithTime() ?? "-"} | {o.ItemsCount} | {o.GatewayAmount:N0} | {o.DiscountBalanceUsed:N0} | {GetStatusText(o.Status)}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
||||||
@@ -587,14 +593,4 @@
|
|||||||
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
||||||
Snackbar.Add("خروجی PDF (نسخه متنی) آماده شد.", Severity.Success);
|
Snackbar.Add("خروجی PDF (نسخه متنی) آماده شد.", Severity.Success);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string EscapeCsv(string value)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(value))
|
|
||||||
return "";
|
|
||||||
|
|
||||||
var needsQuotes = value.Contains(',') || value.Contains('"') || value.Contains('\n');
|
|
||||||
var escaped = value.Replace("\"", "\"\"");
|
|
||||||
return needsQuotes ? $"\"{escaped}\"" : escaped;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
||||||
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
||||||
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int" Value="5">لغو شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int" Value="6">آماده تحویل در دفتر</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
|
|
||||||
@@ -56,6 +58,24 @@
|
|||||||
</MudItem>
|
</MudItem>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@if (_newStatus == 5)
|
||||||
|
{
|
||||||
|
<MudItem xs="12">
|
||||||
|
<MudAlert Severity="Severity.Warning">
|
||||||
|
توجه: وضعیت «لغو شده» یعنی ارسال این سفارش متوقف شده است.
|
||||||
|
</MudAlert>
|
||||||
|
</MudItem>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (_newStatus == 6)
|
||||||
|
{
|
||||||
|
<MudItem xs="12">
|
||||||
|
<MudAlert Severity="Severity.Info">
|
||||||
|
سفارش برای تحویل حضوری در دفتر آماده است.
|
||||||
|
</MudAlert>
|
||||||
|
</MudItem>
|
||||||
|
}
|
||||||
|
|
||||||
@if (_newStatus == 2)
|
@if (_newStatus == 2)
|
||||||
{
|
{
|
||||||
<MudItem xs="12">
|
<MudItem xs="12">
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ public partial class ChangeOrderStatusDialog
|
|||||||
2 => "تحویل پست",
|
2 => "تحویل پست",
|
||||||
3 => "تحویل به مشتری",
|
3 => "تحویل به مشتری",
|
||||||
4 => "مرجوع شده",
|
4 => "مرجوع شده",
|
||||||
|
5 => "لغو شده",
|
||||||
|
6 => "آماده تحویل در دفتر",
|
||||||
_ => "بدون ارسال / نامشخص"
|
_ => "بدون ارسال / نامشخص"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -49,6 +51,8 @@ public partial class ChangeOrderStatusDialog
|
|||||||
2 => Color.Info,
|
2 => Color.Info,
|
||||||
3 => Color.Success,
|
3 => Color.Success,
|
||||||
4 => Color.Error,
|
4 => Color.Error,
|
||||||
|
5 => Color.Dark,
|
||||||
|
6 => Color.Primary,
|
||||||
_ => Color.Default
|
_ => Color.Default
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,8 @@
|
|||||||
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
<MudSelectItem T="int" Value="2">تحویل پست</MudSelectItem>
|
||||||
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
<MudSelectItem T="int" Value="3">تحویل به مشتری</MudSelectItem>
|
||||||
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="int" Value="4">مرجوع شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int" Value="5">لغو شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int" Value="6">آماده تحویل در دفتر</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudText>
|
</MudText>
|
||||||
<MudTextField T="string"
|
<MudTextField T="string"
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ public partial class UserOrderDetailsDialog
|
|||||||
2 => Color.Info, // InTransit
|
2 => Color.Info, // InTransit
|
||||||
3 => Color.Success, // Delivered
|
3 => Color.Success, // Delivered
|
||||||
4 => Color.Error, // Returned
|
4 => Color.Error, // Returned
|
||||||
|
5 => Color.Dark, // Cancelled
|
||||||
|
6 => Color.Primary, // ReadyForOfficePickup
|
||||||
_ => Color.Default // None / Unknown
|
_ => Color.Default // None / Unknown
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -71,6 +73,8 @@ public partial class UserOrderDetailsDialog
|
|||||||
2 => "تحویل پست",
|
2 => "تحویل پست",
|
||||||
3 => "تحویل به مشتری",
|
3 => "تحویل به مشتری",
|
||||||
4 => "مرجوع شده",
|
4 => "مرجوع شده",
|
||||||
|
5 => "لغو شده",
|
||||||
|
6 => "آماده تحویل در دفتر",
|
||||||
_ => "بدون ارسال / نامشخص"
|
_ => "بدون ارسال / نامشخص"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
||||||
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
||||||
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int?" Value="@(6)">آماده تحویل در دفتر</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
<MudItem xs="12" sm="6" md="3">
|
<MudItem xs="12" sm="6" md="3">
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
|
using BackOffice.Common.Utilities;
|
||||||
using CMSMicroservice.Protobuf.Protos;
|
using CMSMicroservice.Protobuf.Protos;
|
||||||
using CMSMicroservice.Protobuf.Protos.UserOrder;
|
using CMSMicroservice.Protobuf.Protos.UserOrder;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
@@ -215,7 +216,8 @@ public partial class OrderSalesReports
|
|||||||
2 => Color.Info,
|
2 => Color.Info,
|
||||||
3 => Color.Success,
|
3 => Color.Success,
|
||||||
4 => Color.Error,
|
4 => Color.Error,
|
||||||
5 => Color.Error,
|
5 => Color.Dark,
|
||||||
|
6 => Color.Primary,
|
||||||
_ => Color.Default
|
_ => Color.Default
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -229,6 +231,7 @@ public partial class OrderSalesReports
|
|||||||
3 => "تحویل به مشتری",
|
3 => "تحویل به مشتری",
|
||||||
4 => "مرجوع شده",
|
4 => "مرجوع شده",
|
||||||
5 => "لغو شده",
|
5 => "لغو شده",
|
||||||
|
6 => "آماده تحویل در دفتر",
|
||||||
_ => "بدون ارسال / نامشخص"
|
_ => "بدون ارسال / نامشخص"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -241,27 +244,26 @@ public partial class OrderSalesReports
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var headers = new[]
|
||||||
sb.AppendLine("شناسه,کاربر,نام کاربر,مبلغ,وضعیت پرداخت,وضعیت ارسال,تاریخ پرداخت");
|
{
|
||||||
|
"شناسه", "کاربر", "نام مشتری", "مبلغ", "وضعیت پرداخت", "وضعیت ارسال", "تاریخ پرداخت"
|
||||||
foreach (var o in _orders)
|
};
|
||||||
|
|
||||||
|
var rows = _orders.Select(o => new object?[]
|
||||||
{
|
{
|
||||||
sb.AppendLine(string.Join(",",
|
|
||||||
o.Id,
|
o.Id,
|
||||||
o.UserId,
|
o.UserId,
|
||||||
EscapeCsv(o.UserFullName),
|
CsvExportHelper.CustomerName(o.UserFullName, userId: o.UserId),
|
||||||
o.Amount,
|
o.Amount,
|
||||||
EscapeCsv(o.PaymentStatus == PaymentStatus.Success ? "پرداخت شده" : "پرداخت نشده"),
|
o.PaymentStatus == PaymentStatus.Success ? "پرداخت شده" : "پرداخت نشده",
|
||||||
EscapeCsv(GetDeliveryStatusText(o.DeliveryStatus.GetHashCode())),
|
GetDeliveryStatusText(o.DeliveryStatus.GetHashCode()),
|
||||||
o.PaymentDate != null ? o.PaymentDate.ToDateTime().MiladiToJalaliWithTime() : "-"));
|
o.PaymentDate != null ? o.PaymentDate.ToDateTime().MiladiToJalaliWithTime() : "-"
|
||||||
}
|
});
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var filename = $"store-sales-{DateTime.Now:yyyyMMddHHmmss}.xls";
|
||||||
var base64 = Convert.ToBase64String(bytes);
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
|
||||||
var filename = $"store-sales-{DateTime.Now:yyyyMMddHHmmss}.csv";
|
CsvExportHelper.ToExcelXmlBase64("گزارش فروش", headers, rows));
|
||||||
|
Snackbar.Add("خروجی Excel آماده شد.", Severity.Success);
|
||||||
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
|
||||||
Snackbar.Add("خروجی Excel (CSV) آماده شد.", Severity.Success);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task ExportToPdf()
|
protected async Task ExportToPdf()
|
||||||
@@ -290,7 +292,7 @@ public partial class OrderSalesReports
|
|||||||
foreach (var o in _orders)
|
foreach (var o in _orders)
|
||||||
{
|
{
|
||||||
sb.AppendLine(
|
sb.AppendLine(
|
||||||
$"{o.Id} | {o.UserFullName} | {o.Amount:N0} | {(o.PaymentStatus == PaymentStatus.Success ? "پرداخت شده" : "پرداخت نشده")} | {GetDeliveryStatusText(o.DeliveryStatus.GetHashCode())} | {(o.PaymentDate != null ? o.PaymentDate.ToDateTime().MiladiToJalaliWithTime() : "-")}");
|
$"{o.Id} | {CsvExportHelper.CustomerName(o.UserFullName, userId: o.UserId)} | {o.Amount:N0} | {(o.PaymentStatus == PaymentStatus.Success ? "پرداخت شده" : "پرداخت نشده")} | {GetDeliveryStatusText(o.DeliveryStatus.GetHashCode())} | {(o.PaymentDate != null ? o.PaymentDate.ToDateTime().MiladiToJalaliWithTime() : "-")}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
||||||
@@ -349,12 +351,4 @@ public partial class OrderSalesReports
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string EscapeCsv(string value)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(value)) return "";
|
|
||||||
if (value.Contains(',') || value.Contains('"') || value.Contains('\n'))
|
|
||||||
return $"\"{value.Replace("\"", "\"\"")}\"";
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(3)">تحویل به مشتری</MudSelectItem>
|
||||||
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(4)">مرجوع شده</MudSelectItem>
|
||||||
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
<MudSelectItem T="int?" Value="@(5)">لغو شده</MudSelectItem>
|
||||||
|
<MudSelectItem T="int?" Value="@(6)">آماده تحویل در دفتر</MudSelectItem>
|
||||||
</MudSelect>
|
</MudSelect>
|
||||||
</MudItem>
|
</MudItem>
|
||||||
</Filters>
|
</Filters>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
using System.Text.Json;
|
using System.Text;
|
||||||
using System.Text;
|
using System.Text.Json;
|
||||||
|
using BackOffice.Common.BaseComponents;
|
||||||
|
using BackOffice.Common.Utilities;
|
||||||
using CMSMicroservice.Protobuf.Protos;
|
using CMSMicroservice.Protobuf.Protos;
|
||||||
using CMSMicroservice.Protobuf.Protos.UserOrder;
|
using CMSMicroservice.Protobuf.Protos.UserOrder;
|
||||||
using BackOffice.Common.BaseComponents;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.JSInterop;
|
using Microsoft.JSInterop;
|
||||||
using MudBlazor;
|
using MudBlazor;
|
||||||
@@ -213,6 +214,8 @@ public partial class UserOrderMainPage
|
|||||||
2 => Color.Info, // InTransit
|
2 => Color.Info, // InTransit
|
||||||
3 => Color.Success, // Delivered
|
3 => Color.Success, // Delivered
|
||||||
4 => Color.Error, // Returned
|
4 => Color.Error, // Returned
|
||||||
|
5 => Color.Dark, // Cancelled
|
||||||
|
6 => Color.Primary, // ReadyForOfficePickup
|
||||||
_ => Color.Default // None / Unknown
|
_ => Color.Default // None / Unknown
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -225,6 +228,8 @@ public partial class UserOrderMainPage
|
|||||||
2 => "تحویل پست",
|
2 => "تحویل پست",
|
||||||
3 => "تحویل به مشتری",
|
3 => "تحویل به مشتری",
|
||||||
4 => "مرجوع شده",
|
4 => "مرجوع شده",
|
||||||
|
5 => "لغو شده",
|
||||||
|
6 => "آماده تحویل در دفتر",
|
||||||
_ => "بدون ارسال / نامشخص"
|
_ => "بدون ارسال / نامشخص"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -238,6 +243,15 @@ public partial class UserOrderMainPage
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Domain PaymentStatus: Success=0, Reject=1, Pending=2
|
||||||
|
private static string GetPaymentStatusText(int status) => status switch
|
||||||
|
{
|
||||||
|
0 => "پرداخت شده",
|
||||||
|
1 => "پرداخت ناموفق",
|
||||||
|
2 => "در انتظار پرداخت",
|
||||||
|
_ => "نامشخص"
|
||||||
|
};
|
||||||
|
|
||||||
private async Task OpenChangeStatus(DataModel model)
|
private async Task OpenChangeStatus(DataModel model)
|
||||||
{
|
{
|
||||||
var parameters = new DialogParameters
|
var parameters = new DialogParameters
|
||||||
@@ -315,40 +329,31 @@ public partial class UserOrderMainPage
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var sb = new StringBuilder();
|
var headers = new[]
|
||||||
sb.AppendLine("شناسه,کاربر,نام کاربر,مبلغ,وضعیت پرداخت,وضعیت ارسال,روش پرداخت,تاریخ پرداخت");
|
{
|
||||||
|
"شناسه", "کاربر", "نام مشتری", "مبلغ", "وضعیت پرداخت", "وضعیت ارسال", "روش پرداخت", "تاریخ پرداخت"
|
||||||
foreach (var o in result.Models)
|
};
|
||||||
|
|
||||||
|
var rows = result.Models.Select(o => new object?[]
|
||||||
{
|
{
|
||||||
sb.AppendLine(string.Join(",",
|
|
||||||
o.Id,
|
o.Id,
|
||||||
o.UserId,
|
o.UserId,
|
||||||
EscapeCsv(o.UserFullName),
|
CsvExportHelper.CustomerName(o.UserFullName, userId: o.UserId),
|
||||||
o.Amount,
|
o.Amount,
|
||||||
EscapeCsv(o.PaymentStatus.ToString()),
|
GetPaymentStatusText(o.PaymentStatus.GetHashCode()),
|
||||||
EscapeCsv(GetDeliveryStatusText(o.DeliveryStatus.GetHashCode())),
|
GetDeliveryStatusText(o.DeliveryStatus.GetHashCode()),
|
||||||
EscapeCsv(GetPaymentMethodText(o.PaymentMethod.GetHashCode())),
|
GetPaymentMethodText(o.PaymentMethod.GetHashCode()),
|
||||||
o.PaymentDate?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-"));
|
o.PaymentDate?.ToDateTime().ToLocalTime().MiladiToJalaliWithTime() ?? "-"
|
||||||
}
|
});
|
||||||
|
|
||||||
var bytes = Encoding.UTF8.GetPreamble().Concat(Encoding.UTF8.GetBytes(sb.ToString())).ToArray();
|
var filename = $"user-orders-{DateTime.Now:yyyyMMddHHmmss}.xls";
|
||||||
var base64 = Convert.ToBase64String(bytes);
|
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename,
|
||||||
var filename = $"user-orders-{DateTime.Now:yyyyMMddHHmmss}.csv";
|
CsvExportHelper.ToExcelXmlBase64("سفارشها", headers, rows));
|
||||||
|
Snackbar.Add("خروجی Excel آماده شد.", Severity.Success);
|
||||||
await JsRuntime.InvokeVoidAsync("jsSaveAsFile", filename, base64);
|
|
||||||
Snackbar.Add("خروجی Excel (CSV) آماده شد.", Severity.Success);
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Snackbar.Add($"خطا در خروجی Excel: {ex.Message}", Severity.Error);
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,12 +201,13 @@ public class DiscountOrderService : IDiscountOrderService
|
|||||||
return status switch
|
return status switch
|
||||||
{
|
{
|
||||||
OrderStatus.Pending => ProtoDeliveryStatus.DeliveryPending,
|
OrderStatus.Pending => ProtoDeliveryStatus.DeliveryPending,
|
||||||
OrderStatus.Paid => ProtoDeliveryStatus.DeliveryPending, // Paid but not processed yet
|
OrderStatus.Paid => ProtoDeliveryStatus.DeliveryPending,
|
||||||
OrderStatus.Processing => ProtoDeliveryStatus.DeliveryProcessing,
|
OrderStatus.Processing => ProtoDeliveryStatus.DeliveryProcessing,
|
||||||
OrderStatus.Shipped => ProtoDeliveryStatus.DeliveryShipped,
|
OrderStatus.Shipped => ProtoDeliveryStatus.DeliveryShipped,
|
||||||
OrderStatus.Delivered => ProtoDeliveryStatus.DeliveryDelivered,
|
OrderStatus.Delivered => ProtoDeliveryStatus.DeliveryDelivered,
|
||||||
OrderStatus.Cancelled => ProtoDeliveryStatus.DeliveryCancelled,
|
OrderStatus.Cancelled => ProtoDeliveryStatus.DeliveryCancelled,
|
||||||
OrderStatus.Returned => ProtoDeliveryStatus.DeliveryCancelled, // Treat as cancelled
|
OrderStatus.ReadyForOfficePickup => ProtoDeliveryStatus.DeliveryReadyForOffice,
|
||||||
|
OrderStatus.Returned => ProtoDeliveryStatus.DeliveryReturned,
|
||||||
_ => ProtoDeliveryStatus.DeliveryPending
|
_ => ProtoDeliveryStatus.DeliveryPending
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -222,6 +223,8 @@ public class DiscountOrderService : IDiscountOrderService
|
|||||||
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
||||||
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
||||||
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
||||||
|
ProtoDeliveryStatus.DeliveryReadyForOffice => OrderStatus.ReadyForOfficePickup,
|
||||||
|
ProtoDeliveryStatus.DeliveryReturned => OrderStatus.Returned,
|
||||||
_ => OrderStatus.Pending
|
_ => OrderStatus.Pending
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -236,6 +239,8 @@ public class DiscountOrderService : IDiscountOrderService
|
|||||||
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
ProtoDeliveryStatus.DeliveryShipped => OrderStatus.Shipped,
|
||||||
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
ProtoDeliveryStatus.DeliveryDelivered => OrderStatus.Delivered,
|
||||||
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
ProtoDeliveryStatus.DeliveryCancelled => OrderStatus.Cancelled,
|
||||||
|
ProtoDeliveryStatus.DeliveryReadyForOffice => OrderStatus.ReadyForOfficePickup,
|
||||||
|
ProtoDeliveryStatus.DeliveryReturned => OrderStatus.Returned,
|
||||||
_ => OrderStatus.Pending
|
_ => OrderStatus.Pending
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,8 @@ public enum OrderStatus
|
|||||||
Shipped = 3, // DELIVERY_SHIPPED
|
Shipped = 3, // DELIVERY_SHIPPED
|
||||||
Delivered = 4, // DELIVERY_DELIVERED
|
Delivered = 4, // DELIVERY_DELIVERED
|
||||||
Cancelled = 5, // DELIVERY_CANCELLED
|
Cancelled = 5, // DELIVERY_CANCELLED
|
||||||
Returned = 6 // Not in proto - handle in service
|
Returned = 6, // DELIVERY_RETURNED
|
||||||
|
ReadyForOfficePickup = 7 // DELIVERY_READY_FOR_OFFICE
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DiscountOrderDto
|
public class DiscountOrderDto
|
||||||
|
|||||||
@@ -77,6 +77,11 @@
|
|||||||
Icon="@Icons.Material.Filled.Groups">
|
Icon="@Icons.Material.Filled.Groups">
|
||||||
اعضا و گزارشها
|
اعضا و گزارشها
|
||||||
</MudNavLink>
|
</MudNavLink>
|
||||||
|
<MudNavLink Match="NavLinkMatch.Prefix"
|
||||||
|
Href="/club/customer-packages"
|
||||||
|
Icon="@Icons.Material.Filled.PeopleAlt">
|
||||||
|
گزارش مشتریان پکیج
|
||||||
|
</MudNavLink>
|
||||||
<MudNavLink Match="NavLinkMatch.Prefix"
|
<MudNavLink Match="NavLinkMatch.Prefix"
|
||||||
Href="/club/features"
|
Href="/club/features"
|
||||||
Icon="@Icons.Material.Filled.Star">
|
Icon="@Icons.Material.Filled.Star">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"GwUrl": "https://cms.kbs1.ir",
|
"GwUrl": "https://cms.kbs2.ir",
|
||||||
"Authentication": {
|
"Authentication": {
|
||||||
"Authority": "https://ids.afrino.co/",
|
"Authority": "https://ids.afrino.co/",
|
||||||
"ClientId": "client_backoffice_spa"
|
"ClientId": "client_backoffice_spa"
|
||||||
|
|||||||
Reference in New Issue
Block a user