Compare commits
4 Commits
059920e782
...
kub-stage
| Author | SHA1 | Date | |
|---|---|---|---|
| 420201e3b8 | |||
| 902cfbeb89 | |||
| 6d32957236 | |||
| 7c3ee765d4 |
@@ -73,9 +73,9 @@ jobs:
|
||||
|
||||
# Apply manifests and restart
|
||||
sshpass -e ssh -o StrictHostKeyChecking=no root@${{ env.K8S_SERVER }} "
|
||||
kubectl apply -f /tmp/backoffice-deployment.yaml &&
|
||||
kubectl rollout restart deployment/backoffice &&
|
||||
kubectl rollout status deployment/backoffice --timeout=180s &&
|
||||
kubectl apply -n kbs-stage -f /tmp/backoffice-deployment.yaml &&
|
||||
kubectl -n kbs-stage rollout restart deployment/backoffice &&
|
||||
kubectl -n kbs-stage rollout status deployment/backoffice --timeout=180s &&
|
||||
rm -f /tmp/backoffice-deployment.yaml
|
||||
"
|
||||
echo "✅ Deployed!"
|
||||
|
||||
@@ -4,7 +4,7 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: backoffice
|
||||
namespace: default
|
||||
namespace: kbs-stage
|
||||
labels:
|
||||
app: backoffice
|
||||
spec:
|
||||
@@ -20,7 +20,7 @@ spec:
|
||||
containers:
|
||||
- name: backoffice
|
||||
image: 185.252.31.44:30080/admin/backoffice:latest
|
||||
imagePullPolicy: Always
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
@@ -43,7 +43,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: backoffice-svc
|
||||
namespace: default
|
||||
namespace: kbs-stage
|
||||
spec:
|
||||
selector:
|
||||
app: backoffice
|
||||
@@ -58,7 +58,7 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: backoffice-ingress
|
||||
namespace: default
|
||||
namespace: kbs-stage
|
||||
annotations:
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
|
||||
@@ -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.213" />
|
||||
<PackageReference Include="Foursat.CMSMicroservice.Protobuf" Version="0.0.214" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
@@ -65,6 +65,11 @@
|
||||
SortMode="SortMode.Multiple">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.WeekDisplayName" Title="هفته" />
|
||||
<PropertyColumn Property="x => x.PackageTitle" Title="پکیج">
|
||||
<CellTemplate>
|
||||
@(string.IsNullOrEmpty(context.Item.PackageTitle) ? "—" : context.Item.PackageTitle)
|
||||
</CellTemplate>
|
||||
</PropertyColumn>
|
||||
<PropertyColumn Property="x => x.TotalPoolAmount" Title="مبلغ کل استخر" Format="N0">
|
||||
<CellTemplate>
|
||||
<MudText>@context.Item.TotalPoolAmount.ToString("N0") تومان</MudText>
|
||||
@@ -203,6 +208,8 @@
|
||||
{
|
||||
WeekDefinitionId = x.WeekDefinitionId,
|
||||
WeekDisplayName = x.WeekDisplayName,
|
||||
PackageId = x.PackageId,
|
||||
PackageTitle = x.PackageTitle,
|
||||
TotalPoolAmount = x.TotalPoolAmount,
|
||||
TotalBalances = x.TotalBalances,
|
||||
ValuePerBalance = x.ValuePerBalance,
|
||||
@@ -249,6 +256,8 @@
|
||||
{
|
||||
public long WeekDefinitionId { get; set; }
|
||||
public string WeekDisplayName { get; set; } = "";
|
||||
public long PackageId { get; set; }
|
||||
public string PackageTitle { get; set; } = "";
|
||||
public long TotalPoolAmount { get; set; }
|
||||
public int TotalBalances { get; set; }
|
||||
public long ValuePerBalance { get; set; }
|
||||
|
||||
@@ -18,12 +18,13 @@ public partial class WeeklyReports
|
||||
try
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.AppendLine("هفته,مبلغ کل استخر,مجموع موجودیها,ارزش هر موجودی,وضعیت,تاریخ محاسبه");
|
||||
sb.AppendLine("هفته,پکیج,مبلغ کل استخر,مجموع موجودیها,ارزش هر موجودی,وضعیت,تاریخ محاسبه");
|
||||
|
||||
foreach (var r in _reports)
|
||||
{
|
||||
sb.AppendLine(string.Join(",",
|
||||
EscapeCsv(r.WeekDisplayName),
|
||||
EscapeCsv(r.PackageTitle),
|
||||
r.TotalPoolAmount,
|
||||
r.TotalBalances,
|
||||
r.ValuePerBalance,
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -96,6 +96,16 @@
|
||||
</ToolBarContent>
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="شناسه" />
|
||||
<TemplateColumn Title="کاربر">
|
||||
<CellTemplate>
|
||||
@(context.Item.UserId != null ? context.Item.UserId.ToString() : "—")
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<TemplateColumn Title="نام کاربر">
|
||||
<CellTemplate>
|
||||
@(string.IsNullOrWhiteSpace(context.Item.UserFullName) ? "—" : context.Item.UserFullName)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<TemplateColumn Title="نوع">
|
||||
<CellTemplate>
|
||||
<MudChip T="string" Size="Size.Small" Variant="Variant.Text">
|
||||
@@ -232,13 +242,13 @@
|
||||
Filter = BuildFilter()
|
||||
});
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.AppendLine("Id,Type,Amount,Description,Status,RefId,PaymentDate,Created");
|
||||
sb.AppendLine("Id,UserId,UserFullName,Type,Amount,Description,Status,RefId,PaymentDate,Created");
|
||||
foreach (var r in result.Models)
|
||||
{
|
||||
var type = r.HasType ? ReportLabels.GetTransactionTypeLabel(r.Type) : "";
|
||||
var status = r.HasPaymentStatus ? ReportLabels.GetTransactionPaymentStatusLabel(r.PaymentStatus) : "";
|
||||
var paymentDate = r.PaymentDate != null ? r.PaymentDate.ToDateTime().ToString("yyyy-MM-dd HH:mm") : "";
|
||||
sb.AppendLine($"{r.Id},{type},{r.Amount},\"{r.Description}\",{status},{r.RefId},{paymentDate},{r.Created.ToDateTime():yyyy-MM-dd HH:mm}");
|
||||
sb.AppendLine($"{r.Id},{r.UserId},\"{r.UserFullName}\",{type},{r.Amount},\"{r.Description}\",{status},{r.RefId},{paymentDate},{r.Created.ToDateTime():yyyy-MM-dd HH:mm}");
|
||||
}
|
||||
await jsRuntime.InvokeVoidAsync("jsSaveAsFile", "ledger-transactions.csv", sb.ToString());
|
||||
}
|
||||
|
||||
@@ -82,6 +82,11 @@
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Id" Title="شناسه" />
|
||||
<PropertyColumn Property="x => x.UserId" Title="کاربر" />
|
||||
<TemplateColumn Title="نام کاربر">
|
||||
<CellTemplate>
|
||||
@(string.IsNullOrWhiteSpace(context.Item.UserFullName) ? "—" : context.Item.UserFullName)
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
<PropertyColumn Property="x => x.Mobile" Title="موبایل" />
|
||||
<PropertyColumn Property="x => x.GatewayProvider" Title="درگاه" />
|
||||
<TemplateColumn Title="مبلغ (تومان)">
|
||||
@@ -193,9 +198,9 @@
|
||||
Filter = BuildFilter()
|
||||
});
|
||||
var sb = new System.Text.StringBuilder();
|
||||
sb.AppendLine("Id,UserId,Mobile,Gateway,Amount,Authority,RefId,Status,OrderId,Created");
|
||||
sb.AppendLine("Id,UserId,UserFullName,Mobile,Gateway,Amount,Authority,RefId,Status,OrderId,Created");
|
||||
foreach (var r in result.Models)
|
||||
sb.AppendLine($"{r.Id},{r.UserId},{r.Mobile},{r.GatewayProvider},{r.Amount},{r.Authority},{r.RefId},{r.PaymentStatus},{r.OrderId},{r.CreatedAt.ToDateTime():yyyy-MM-dd HH:mm}");
|
||||
sb.AppendLine($"{r.Id},{r.UserId},\"{r.UserFullName}\",{r.Mobile},{r.GatewayProvider},{r.Amount},{r.Authority},{r.RefId},{r.PaymentStatus},{r.OrderId},{r.CreatedAt.ToDateTime():yyyy-MM-dd HH:mm}");
|
||||
await jsRuntime.InvokeVoidAsync("jsSaveAsFile", "payment-transactions.csv", sb.ToString());
|
||||
}
|
||||
catch (Exception ex) { Snackbar.Add($"خطا در export: {ex.Message}", Severity.Error); }
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user