Merge branch 'kub-stage' into production
Build and Deploy to Production / build-and-deploy (push) Failing after 2m1s
Build and Deploy to Production / build-and-deploy (push) Failing after 2m1s
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
<PackageReference Include="DateTimeConverterCL" Version="1.0.0" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.City.Protobuf" Version="0.0.2" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.ClubMembership.Protobuf" Version="0.0.4" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.4" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.6" />
|
||||
<PackageReference Include="Foursat.FrontOffice.BFF.Configuration.Protobuf" Version="0.0.4" />
|
||||
<!-- <PackageReference Include="Foursat.FrontOffice.BFF.ClubMembership.Protobuf" Version="0.0.3" /> -->
|
||||
<!-- <PackageReference Include="Foursat.FrontOffice.BFF.Commission.Protobuf" Version="0.0.2" /> -->
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
<MudChip T="string" Color="Color.Secondary" Variant="Variant.Filled" Class="mb-2">درباره کارا بازار سلامت</MudChip>
|
||||
<MudStack Spacing="3">
|
||||
<MudText Typo="Typo.h2" Class="mb-3">
|
||||
پلتفرم هوشمند شبکهسازی و مدیریت تیم
|
||||
پلتفرم هوشمند تیمسازی و مدیریت فروش
|
||||
</MudText>
|
||||
<MudText Typo="Typo.body1" Class="mud-text-secondary mb-4">
|
||||
ما با ارائه ابزارهای نوآورانه، به کسبوکارها کمک میکنیم تا شبکههای فروش خود را گسترش دهند و تیمهای خود را به صورت کارآمد مدیریت کنند.
|
||||
ما با ارائه ابزارهای نوآورانه، به کسبوکارها کمک میکنیم تا تیمهای فروش خود را گسترش دهند و به صورت کارآمد مدیریت کنند.
|
||||
</MudText>
|
||||
<MudStack Row="true" Spacing="2">
|
||||
<MudButton Variant="Variant.Filled"
|
||||
@@ -35,7 +35,7 @@
|
||||
<MudItem xs="12" md="6">
|
||||
<MudPaper Class="pa-8 rounded-xl" Style="background: radial-gradient(600px 280px at 120% 0, #daccff 0, transparent 60%), radial-gradient(600px 280px at -10% 100%, #ffe2f2 0, transparent 60%), linear-gradient(180deg, #fff, #fbfaff);">
|
||||
<MudImage Src="images/team-work.jpg"
|
||||
Alt="جلسه تیم فروش و شبکهسازی"
|
||||
Alt="جلسه تیم فروش"
|
||||
ObjectFit="ObjectFit.Cover"
|
||||
ObjectPosition="ObjectPosition.Center"
|
||||
Style="width:100%"
|
||||
@@ -58,7 +58,7 @@
|
||||
<MudIcon Icon="@Icons.Material.Filled.Visibility" Size="Size.Large" Color="Color.Primary" Class="mb-4" />
|
||||
<MudText Typo="Typo.h5" Class="mb-3">چشمانداز</MudText>
|
||||
<MudText Typo="Typo.body1" Class="mud-text-secondary">
|
||||
تبدیل شدن به پیشروترین پلتفرم مدیریت شبکههای فروش در منطقه، با ارائه راهکارهای هوشمند و کاربرپسند برای کسبوکارهای کوچک و بزرگ.
|
||||
تبدیل شدن به پیشروترین پلتفرم مدیریت تیمهای فروش در منطقه، با ارائه راهکارهای هوشمند و کاربرپسند برای کسبوکارهای کوچک و بزرگ.
|
||||
</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
@@ -1,32 +1,33 @@
|
||||
@attribute [Route(RouteConstants.Commission.Dashboard)]
|
||||
@attribute [Route(RouteConstants.Commission.History)]
|
||||
@using FrontOffice.Main.Utilities
|
||||
@using FrontOffice.Main.Shared
|
||||
@using MudBlazor
|
||||
|
||||
<PageTitle>داشبورد کمیسیون</PageTitle>
|
||||
<PageTitle>پاداشهای من</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.h5">داشبورد کمیسیون</MudText>
|
||||
<MudText Typo="Typo.h5">پاداشهای من</MudText>
|
||||
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.ArrowBack" Href="@RouteConstants.Profile.Index">بازگشت</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@if (_isLoading)
|
||||
{
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- فیلترها -->
|
||||
<MudPaper Elevation="2" Class="pa-3 rounded-lg">
|
||||
<MudStack Row="true" Spacing="2" AlignItems="AlignItems.End">
|
||||
<MudNumericField @bind-Value="_filterWeekNumber"
|
||||
Label="شماره هفته"
|
||||
Variant="Variant.Outlined"
|
||||
Min="1"
|
||||
Clearable="true"
|
||||
Style="max-width: 150px;" />
|
||||
<MudSelect T="string" @bind-Value="_filterStatus" Label="وضعیت" Variant="Variant.Outlined" Style="max-width: 200px;">
|
||||
<!-- فیلترها -->
|
||||
<MudPaper Elevation="2" Class="pa-3 rounded-lg">
|
||||
<MudGrid Spacing="2">
|
||||
<MudItem xs="12" sm="6" md="4">
|
||||
<WeekSelector @ref="_weekSelector"
|
||||
@bind-Value="_selectedWeekDefinition"
|
||||
Label="انتخاب هفته"
|
||||
Placeholder="جستجوی هفته..."
|
||||
Variant="Variant.Outlined"
|
||||
Dense="false"
|
||||
Clearable="true"
|
||||
OnlyActive="false" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" md="4">
|
||||
<MudSelect T="string" @bind-Value="_filterStatus" Label="وضعیت" Variant="Variant.Outlined">
|
||||
<MudSelectItem T="string" Value="@string.Empty">همه</MudSelectItem>
|
||||
<MudSelectItem T="string" Value="@("Pending")">در انتظار</MudSelectItem>
|
||||
<MudSelectItem T="string" Value="@("Paid")">پرداخت شده</MudSelectItem>
|
||||
@@ -35,78 +36,114 @@
|
||||
<MudSelectItem T="string" Value="@("PaymentFailed")">شکست خورده</MudSelectItem>
|
||||
<MudSelectItem T="string" Value="@("Cancelled")">لغو شده</MudSelectItem>
|
||||
</MudSelect>
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="ApplyFiltersAsync" StartIcon="@Icons.Material.Filled.FilterList">
|
||||
اعمال فیلتر
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" OnClick="ClearFiltersAsync" StartIcon="@Icons.Material.Filled.Clear">
|
||||
پاک کردن
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="12" md="4">
|
||||
<MudStack Row="true" Spacing="2" Style="height: 100%;" AlignItems="AlignItems.End">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="ApplyFiltersAsync" StartIcon="@Icons.Material.Filled.FilterList" FullWidth="true">
|
||||
اعمال فیلتر
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Outlined" OnClick="ClearFiltersAsync" StartIcon="@Icons.Material.Filled.Clear" FullWidth="true">
|
||||
پاک کردن
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudPaper>
|
||||
|
||||
<!-- لیست کمیسیونها -->
|
||||
@if (_isLoading)
|
||||
{
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- آمار خلاصه -->
|
||||
@if (_payouts.Any())
|
||||
{
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp" Invert="true">
|
||||
<MudTable Items="_payouts" Hover="true" Striped="true" Dense="true">
|
||||
<HeaderContent>
|
||||
<MudTh>هفته</MudTh>
|
||||
<MudTh>تعداد تعادل</MudTh>
|
||||
<MudTh>مبلغ کل</MudTh>
|
||||
<MudTh>وضعیت</MudTh>
|
||||
<MudTh>تاریخ</MudTh>
|
||||
<MudTh>عملیات</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd>
|
||||
<MudChip T="string" Color="Color.Default" Size="Size.Small">@context.WeekDisplayName</MudChip>
|
||||
</MudTd>
|
||||
<MudTd>@context.BalancesEarned</MudTd>
|
||||
<MudTd>
|
||||
<MudText Color="Color.Success"><strong>@context.AmountFormatted</strong></MudText>
|
||||
</MudTd>
|
||||
<MudTd>
|
||||
<MudChip T="string" Color="@GetStatusColor(context.StatusColor)" Size="Size.Small" Variant="Variant.Outlined">
|
||||
@context.StatusText
|
||||
</MudChip>
|
||||
</MudTd>
|
||||
<MudTd>@context.DatePersian</MudTd>
|
||||
<MudTd>
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Text"
|
||||
Color="Color.Info"
|
||||
StartIcon="@Icons.Material.Filled.Info"
|
||||
Href="@($"{RouteConstants.Commission.WeeklyBalance}?week={context.WeekDefinitionId}")">
|
||||
جزئیات
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
<MudGrid Spacing="2">
|
||||
<MudItem xs="6" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-3 rounded-lg text-center">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">کل پاداش</MudText>
|
||||
<MudText Typo="Typo.h6" Color="Color.Success">@GetTotalEarnings()</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="6" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-3 rounded-lg text-center">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">تعداد</MudText>
|
||||
<MudText Typo="Typo.h6" Color="Color.Primary">@_totalCount</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-3 rounded-lg text-center">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">میانگین هفتگی</MudText>
|
||||
<MudText Typo="Typo.h6" Color="Color.Info">@GetAverageWeekly()</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
}
|
||||
|
||||
<!-- لیست پاداشها -->
|
||||
@if (_payouts.Any())
|
||||
{
|
||||
<!-- جدول - دسکتاپ -->
|
||||
<MudHidden Breakpoint="Breakpoint.SmAndDown">
|
||||
<MudPaper Elevation="2" Class="pa-0 rounded-lg">
|
||||
<MudTable Items="_payouts" Hover="true" Striped="true" Dense="true" FixedHeader="true" Height="400px">
|
||||
<HeaderContent>
|
||||
<MudTh>هفته</MudTh>
|
||||
<MudTh>امتیاز</MudTh>
|
||||
<MudTh>مبلغ (تومان)</MudTh>
|
||||
<MudTh>وضعیت</MudTh>
|
||||
<MudTh>تاریخ</MudTh>
|
||||
<MudTh>جزئیات</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="هفته">
|
||||
<MudChip T="string" Color="Color.Primary" Size="Size.Small" Variant="Variant.Outlined">@context.WeekDisplayName</MudChip>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="امتیاز">@context.BalancesEarned</MudTd>
|
||||
<MudTd DataLabel="مبلغ">
|
||||
<MudText Color="Color.Success"><strong>@context.AmountFormatted</strong></MudText>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="وضعیت">
|
||||
<MudChip T="string" Color="@GetStatusColor(context.StatusColor)" Size="Size.Small">@context.StatusText</MudChip>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="تاریخ">@context.DatePersian</MudTd>
|
||||
<MudTd DataLabel="جزئیات">
|
||||
<MudIconButton Size="Size.Small"
|
||||
Icon="@Icons.Material.Filled.Visibility"
|
||||
Color="Color.Info"
|
||||
Href="@($"{RouteConstants.Commission.WeeklyBalance}?week={context.WeekDefinitionId}")" />
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudPaper>
|
||||
</MudHidden>
|
||||
|
||||
<MudHidden Breakpoint="Breakpoint.MdAndUp">
|
||||
<!-- کارتها - موبایل -->
|
||||
<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
|
||||
<MudStack Spacing="2">
|
||||
@foreach (var payout in _payouts)
|
||||
{
|
||||
<MudPaper Class="pa-3 rounded-lg" Outlined="true">
|
||||
<MudStack Spacing="1">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudChip T="string" Color="Color.Default" Size="Size.Small">@payout.WeekDisplayName</MudChip>
|
||||
<MudChip T="string" Color="@GetStatusColor(payout.StatusColor)" Size="Size.Small" Variant="Variant.Outlined">
|
||||
@payout.StatusText
|
||||
</MudChip>
|
||||
<MudChip T="string" Color="Color.Primary" Size="Size.Small" Variant="Variant.Outlined">@payout.WeekDisplayName</MudChip>
|
||||
<MudChip T="string" Color="@GetStatusColor(payout.StatusColor)" Size="Size.Small">@payout.StatusText</MudChip>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.h6" Color="Color.Success">@payout.AmountFormatted</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">امتیاز: @payout.BalancesEarned</MudText>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">@payout.DatePersian</MudText>
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Text"
|
||||
Color="Color.Info"
|
||||
EndIcon="@Icons.Material.Filled.ChevronLeft"
|
||||
Href="@($"{RouteConstants.Commission.WeeklyBalance}?week={payout.WeekDefinitionId}")">
|
||||
جزئیات
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
<MudText Typo="Typo.h6" Color="Color.Success">@payout.AmountFormatted</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">تعداد تعادل: @payout.BalancesEarned</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">@payout.DatePersian</MudText>
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Outlined"
|
||||
Color="Color.Info"
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Filled.Info"
|
||||
Href="@($"{RouteConstants.Commission.WeeklyBalance}?week={payout.WeekDefinitionId}")">
|
||||
مشاهده جزئیات هفته
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
@@ -114,37 +151,27 @@
|
||||
</MudHidden>
|
||||
|
||||
<!-- Pagination -->
|
||||
<MudPaper Elevation="0" Class="pa-3">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.body2">کل: @_totalCount کمیسیون</MudText>
|
||||
<MudPagination Count="@GetTotalPages()" Selected="_pageNumber" SelectedChanged="OnPageChangedAsync" Color="Color.Primary" />
|
||||
<MudPaper Elevation="0" Class="pa-2">
|
||||
<MudStack Row="true" Justify="Justify.Center" AlignItems="AlignItems.Center">
|
||||
<MudPagination Count="@GetTotalPages()" Selected="_pageNumber" SelectedChanged="OnPageChangedAsync" Color="Color.Primary" Size="Size.Small" />
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Outlined">
|
||||
کمیسیونی برای نمایش وجود ندارد.
|
||||
پاداشی برای نمایش وجود ندارد.
|
||||
</MudAlert>
|
||||
}
|
||||
|
||||
<!-- دکمههای بیشتر -->
|
||||
<MudStack Row="true" Spacing="2">
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Secondary"
|
||||
StartIcon="@Icons.Material.Filled.History"
|
||||
Href="@RouteConstants.Commission.History"
|
||||
FullWidth="true">
|
||||
تاریخچه کامل
|
||||
</MudButton>
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Info"
|
||||
StartIcon="@Icons.Material.Filled.BarChart"
|
||||
Href="@RouteConstants.Commission.WeeklyBalance"
|
||||
FullWidth="true">
|
||||
تعادل هفتگی
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
<!-- دکمه گزارش هفتگی -->
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
Color="Color.Info"
|
||||
StartIcon="@Icons.Material.Filled.BarChart"
|
||||
Href="@RouteConstants.Commission.WeeklyBalance"
|
||||
FullWidth="true">
|
||||
مشاهده گزارش هفتگی
|
||||
</MudButton>
|
||||
}
|
||||
</MudStack>
|
||||
</MudContainer>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using FrontOffice.Main.Shared;
|
||||
using FrontOffice.Main.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
@@ -10,11 +11,13 @@ public partial class CommissionDashboardPage : ComponentBase
|
||||
|
||||
private List<CommissionPayoutDto> _payouts = new();
|
||||
private int _totalCount;
|
||||
private long _totalAmount;
|
||||
private int _pageNumber = 1;
|
||||
private int _pageSize = 10;
|
||||
private bool _isLoading = true;
|
||||
|
||||
private int? _filterWeekNumber;
|
||||
private WeekSelector? _weekSelector;
|
||||
private WeekDefinitionDto? _selectedWeekDefinition;
|
||||
private string _filterStatus = string.Empty;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
@@ -27,18 +30,20 @@ public partial class CommissionDashboardPage : ComponentBase
|
||||
try
|
||||
{
|
||||
_isLoading = true;
|
||||
var weekDefinitionId = _selectedWeekDefinition?.Id;
|
||||
var result = await CommissionService.GetMyCommissionPayoutsAsync(
|
||||
_filterWeekNumber,
|
||||
weekDefinitionId,
|
||||
_filterStatus,
|
||||
_pageNumber,
|
||||
_pageSize
|
||||
);
|
||||
_payouts = result.Payouts;
|
||||
_totalCount = result.TotalCount;
|
||||
_totalAmount = _payouts.Sum(p => p.TotalAmount);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Snackbar.Add($"خطا در دریافت کمیسیونها: {ex.Message}", Severity.Error);
|
||||
Snackbar.Add($"خطا در دریافت پاداشها: {ex.Message}", Severity.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -54,7 +59,7 @@ public partial class CommissionDashboardPage : ComponentBase
|
||||
|
||||
private async Task ClearFiltersAsync()
|
||||
{
|
||||
_filterWeekNumber = null;
|
||||
_selectedWeekDefinition = null;
|
||||
_filterStatus = string.Empty;
|
||||
_pageNumber = 1;
|
||||
await LoadPayoutsAsync();
|
||||
@@ -73,6 +78,19 @@ public partial class CommissionDashboardPage : ComponentBase
|
||||
return (int)Math.Ceiling(_totalCount / (double)_pageSize);
|
||||
}
|
||||
|
||||
private string GetTotalEarnings()
|
||||
{
|
||||
return $"{_totalAmount:N0} تومان";
|
||||
}
|
||||
|
||||
private string GetAverageWeekly()
|
||||
{
|
||||
if (_totalCount == 0)
|
||||
return "0 تومان";
|
||||
var avg = _totalAmount / _totalCount;
|
||||
return $"{avg:N0} تومان";
|
||||
}
|
||||
|
||||
private Color GetStatusColor(string statusColor) => statusColor.ToLower() switch
|
||||
{
|
||||
"success" => Color.Success,
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
@attribute [Route(RouteConstants.Commission.History)]
|
||||
@using FrontOffice.Main.Utilities
|
||||
@using MudBlazor
|
||||
|
||||
<PageTitle>تاریخچه کمیسیون</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.h5">تاریخچه کامل کمیسیون</MudText>
|
||||
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.ArrowBack" Href="@RouteConstants.Commission.Dashboard">بازگشت</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@if (_isLoading)
|
||||
{
|
||||
<MudProgressLinear Color="Color.Primary" Indeterminate="true" />
|
||||
}
|
||||
else if (_payouts.Any())
|
||||
{
|
||||
<!-- آمار خلاصه -->
|
||||
<MudGrid Spacing="2">
|
||||
<MudItem xs="12" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">کل کمیسیون دریافتی</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Success">@GetTotalEarnings()</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">تعداد هفتهها</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Primary">@_payouts.Count</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="4">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">میانگین هفتگی</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Info">@GetAverageWeekly()</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
<!-- جدول کامل -->
|
||||
<MudPaper Elevation="2" Class="pa-0 rounded-lg">
|
||||
<MudTable Items="_payouts" Hover="true" Striped="true" Dense="false" FixedHeader="true" Height="600px">
|
||||
<HeaderContent>
|
||||
<MudTh>هفته</MudTh>
|
||||
<MudTh>تعادلها</MudTh>
|
||||
<MudTh>مبلغ (تومان)</MudTh>
|
||||
<MudTh>وضعیت</MudTh>
|
||||
<MudTh>تاریخ</MudTh>
|
||||
<MudTh>جزئیات</MudTh>
|
||||
</HeaderContent>
|
||||
<RowTemplate>
|
||||
<MudTd DataLabel="هفته">
|
||||
<MudChip T="string" Color="Color.Primary" Size="Size.Small" Variant="Variant.Outlined">@context.WeekDisplayName</MudChip>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="تعادلها">
|
||||
<MudText>@context.BalancesEarned</MudText>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="مبلغ">
|
||||
<MudText Color="Color.Success" Typo="Typo.body1"><strong>@context.AmountFormatted</strong></MudText>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="وضعیت">
|
||||
<MudChip T="string" Color="@GetStatusColor(context.StatusColor)" Size="Size.Small">
|
||||
@context.StatusText
|
||||
</MudChip>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="تاریخ">
|
||||
<MudText Typo="Typo.caption">@context.DatePersian</MudText>
|
||||
</MudTd>
|
||||
<MudTd DataLabel="جزئیات">
|
||||
<MudButton Size="Size.Small"
|
||||
Variant="Variant.Text"
|
||||
Color="Color.Info"
|
||||
StartIcon="@Icons.Material.Filled.Visibility"
|
||||
Href="@($"{RouteConstants.Commission.WeeklyBalance}?week={context.WeekDefinitionId}")">
|
||||
مشاهده
|
||||
</MudButton>
|
||||
</MudTd>
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</MudPaper>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Filled">
|
||||
هنوز کمیسیونی دریافت نکردهاید.
|
||||
</MudAlert>
|
||||
}
|
||||
</MudStack>
|
||||
</MudContainer>
|
||||
@@ -1,65 +0,0 @@
|
||||
using FrontOffice.Main.Utilities;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using MudBlazor;
|
||||
|
||||
namespace FrontOffice.Main.Pages.Commission;
|
||||
|
||||
public partial class CommissionHistoryPage : ComponentBase
|
||||
{
|
||||
[Inject] private CommissionService CommissionService { get; set; } = default!;
|
||||
|
||||
private List<CommissionPayoutDto> _payouts = new();
|
||||
private bool _isLoading = true;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await LoadAllPayoutsAsync();
|
||||
}
|
||||
|
||||
private async Task LoadAllPayoutsAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
_isLoading = true;
|
||||
// Load all payouts (large page size to get everything)
|
||||
var result = await CommissionService.GetMyCommissionPayoutsAsync(
|
||||
null,
|
||||
string.Empty,
|
||||
1,
|
||||
1000
|
||||
);
|
||||
_payouts = result.Payouts;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Snackbar.Add($"خطا در دریافت تاریخچه: {ex.Message}", Severity.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
_isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
private string GetTotalEarnings()
|
||||
{
|
||||
var total = _payouts.Sum(p => p.TotalAmount);
|
||||
return $"{total:N0} تومان";
|
||||
}
|
||||
|
||||
private string GetAverageWeekly()
|
||||
{
|
||||
if (!_payouts.Any())
|
||||
return "0 تومان";
|
||||
var avg = _payouts.Average(p => p.TotalAmount);
|
||||
return $"{avg:N0} تومان";
|
||||
}
|
||||
|
||||
private Color GetStatusColor(string statusColor) => statusColor.ToLower() switch
|
||||
{
|
||||
"success" => Color.Success,
|
||||
"warning" => Color.Warning,
|
||||
"error" => Color.Error,
|
||||
"info" => Color.Info,
|
||||
_ => Color.Default
|
||||
};
|
||||
}
|
||||
@@ -3,12 +3,12 @@
|
||||
@using FrontOffice.Main.Shared
|
||||
@using MudBlazor
|
||||
|
||||
<PageTitle>تعادل هفتگی</PageTitle>
|
||||
<PageTitle>گزارش هفتگی</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||
<MudText Typo="Typo.h5">تعادل هفتگی کمیسیون</MudText>
|
||||
<MudText Typo="Typo.h5">گزارش هفتگی پاداش</MudText>
|
||||
<MudButton Variant="Variant.Text" StartIcon="@Icons.Material.Filled.ArrowBack" Href="@RouteConstants.Commission.Dashboard">بازگشت</MudButton>
|
||||
</MudStack>
|
||||
|
||||
@@ -72,19 +72,37 @@
|
||||
</MudGrid>
|
||||
</MudPaper>
|
||||
|
||||
<!-- تعادل چپ و راست - کارتهای بزرگ -->
|
||||
<!-- امتیاز فروش تیم اول و دوم - کارتهای بزرگ -->
|
||||
<MudGrid Spacing="2">
|
||||
|
||||
<MudItem xs="6">
|
||||
<MudPaper Elevation="3" Class="pa-4 rounded-lg text-center" Style="background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);">
|
||||
<MudStack Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.ChevronRight" Color="Color.Success" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Success">تیم دوم</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Success" Style="font-weight: bold;">@_weeklyBalance.RightBalanceFormatted</MudText>
|
||||
<MudProgressLinear Color="Color.Success"
|
||||
Value="@GetRightPercentage()"
|
||||
Size="Size.Medium"
|
||||
Class="rounded-lg mt-2"
|
||||
Style="width: 100%;" />
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">
|
||||
@GetRightPercentage().ToString("F1")% از کل
|
||||
</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="6">
|
||||
<MudPaper Elevation="3" Class="pa-4 rounded-lg text-center" Style="background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);">
|
||||
<MudStack Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.ChevronLeft" Color="Color.Info" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Info">شاخه چپ</MudText>
|
||||
<MudIcon Icon="@Icons.Material.Filled.ChevronLeft" Color="Color.Info" Size="Size.Large"/>
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Info">تیم اول</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Info" Style="font-weight: bold;">@_weeklyBalance.LeftBalanceFormatted</MudText>
|
||||
<MudProgressLinear Color="Color.Info"
|
||||
Value="@GetLeftPercentage()"
|
||||
Size="Size.Medium"
|
||||
Class="rounded-lg mt-2"
|
||||
Style="width: 100%;" />
|
||||
<MudProgressLinear Color="Color.Info"
|
||||
Value="@GetLeftPercentage()"
|
||||
Size="Size.Medium"
|
||||
Class="rounded-lg mt-2"
|
||||
Style="width: 100%;"/>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">
|
||||
@GetLeftPercentage().ToString("F1")% از کل
|
||||
</MudText>
|
||||
@@ -92,51 +110,39 @@
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
<MudItem xs="6">
|
||||
<MudPaper Elevation="3" Class="pa-4 rounded-lg text-center" Style="background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);">
|
||||
<MudStack Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.ChevronRight" Color="Color.Success" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Color="Color.Success">شاخه راست</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Success" Style="font-weight: bold;">@_weeklyBalance.RightBalanceFormatted</MudText>
|
||||
<MudProgressLinear Color="Color.Success"
|
||||
Value="@GetRightPercentage()"
|
||||
Size="Size.Medium"
|
||||
Class="rounded-lg mt-2"
|
||||
Style="width: 100%;" />
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">
|
||||
@GetRightPercentage().ToString("F1")% از کل
|
||||
</MudText>
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
<!-- محاسبات کمیسیون - فشردهتر -->
|
||||
<!-- محاسبات پاداش - فشردهتر -->
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle1" Class="mb-2" Style="font-weight: bold;">محاسبات کمیسیون</MudText>
|
||||
<MudText Typo="Typo.subtitle1" Class="mb-2" Style="font-weight: bold;">محاسبات پاداش</MudText>
|
||||
<MudSimpleTable Dense="true" Hover="true" Style="background: transparent;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">حداقل تعادل (پایه کمیسیون):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Warning"><strong>@_weeklyBalance.MinBalanceFormatted</strong></MudText></td>
|
||||
<td><MudText Typo="Typo.body2">اعضای جدید تیم اول:</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Info"><strong>@_weeklyBalance.LeftNewMembersFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">تعداد تعادل (دفعات):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Secondary"><strong>@_weeklyBalance.BalanceCount</strong></MudText></td>
|
||||
<td><MudText Typo="Typo.body2">اعضای جدید تیم دوم:</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Success"><strong>@_weeklyBalance.RightNewMembersFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr style="background-color: var(--mud-palette-primary-lighten);">
|
||||
<td><MudText Typo="Typo.subtitle1"><strong>کمیسیون محاسبه شده:</strong></MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.h6" Color="Color.Primary"><strong>@_weeklyBalance.CalculatedCommissionFormatted</strong></MudText></td>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">انتقال از هفته قبل (تیم اول):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Info"><strong>@_weeklyBalance.LeftCarryoverFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2">انتقال از هفته قبل (تیم دوم):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Success"><strong>@_weeklyBalance.RightCarryoverFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><MudText Typo="Typo.body2" Color="Color.Error"> امتیاز فروش کل (پایه):</MudText></td>
|
||||
<td class="text-end"><MudText Typo="Typo.body1" Color="Color.Error"><strong>@_weeklyBalance.MinBalanceFormatted</strong></MudText></td>
|
||||
</tr>
|
||||
@* <tr style="background-color: var(--mud-palette-primary-lighten);"> *@
|
||||
@* <td><MudText Typo="Typo.subtitle1"><strong>کمیسیون محاسبه شده:</strong></MudText></td> *@
|
||||
@* <td class="text-end"><MudText Typo="Typo.h6" Color="Color.Primary"><strong>@_weeklyBalance.CalculatedCommissionFormatted</strong></MudText></td> *@
|
||||
@* </tr> *@
|
||||
</tbody>
|
||||
</MudSimpleTable>
|
||||
|
||||
@if (_weeklyBalance.LeftCarryover > 0 || _weeklyBalance.RightCarryover > 0)
|
||||
{
|
||||
<MudAlert Severity="Severity.Info" Variant="Variant.Text" Dense="true" Class="mt-2">
|
||||
<strong>انتقال به هفته بعد:</strong> چپ: @_weeklyBalance.LeftCarryoverFormatted | راست: @_weeklyBalance.RightCarryoverFormatted
|
||||
</MudAlert>
|
||||
}
|
||||
</MudPaper>
|
||||
}
|
||||
else if (_hasError)
|
||||
|
||||
@@ -68,8 +68,8 @@ public partial class WeeklyBalancePage : ComponentBase
|
||||
_selectedWeekDefinition = _weekSelector.GetCurrentWeek();
|
||||
}
|
||||
|
||||
StateHasChanged();
|
||||
await LoadWeeklyBalanceAsync();
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<MudItem xs="12" md="6">
|
||||
<MudPaper Class="pa-8 rounded-xl" Style="background: radial-gradient(600px 280px at 120% 0, #daccff 0, transparent 60%), radial-gradient(600px 280px at -10% 100%, #ffe2f2 0, transparent 60%), linear-gradient(180deg, #fff, #fbfaff);">
|
||||
<MudImage Src="images/team-meeting.jpg"
|
||||
Alt="جلسه تیم فروش و شبکهسازی"
|
||||
Alt="جلسه تیم فروش"
|
||||
ObjectFit="ObjectFit.Cover"
|
||||
ObjectPosition="ObjectPosition.Center"
|
||||
Style="width:100%"
|
||||
@@ -243,7 +243,7 @@
|
||||
<MudItem xs="6">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-xl ">
|
||||
<MudText Typo="Typo.h4" Align="Align.Center" Color="Color.Success">+۵۰٪</MudText>
|
||||
<MudText Typo="Typo.caption" HtmlTag="div" Align="Align.Center" Color="Color.Info">رشد میانگین شبکه</MudText>
|
||||
<MudText Typo="Typo.caption" HtmlTag="div" Align="Align.Center" Color="Color.Info">رشد میانگین تیم</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
<MudItem xs="6">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
@using FrontOffice.Main.Utilities
|
||||
@using MudBlazor
|
||||
|
||||
<PageTitle>آمار شبکه</PageTitle>
|
||||
<PageTitle>آمار تیم</PageTitle>
|
||||
|
||||
<MudContainer MaxWidth="MaxWidth.Large" Class="py-6">
|
||||
<MudStack Spacing="3">
|
||||
@@ -57,7 +57,7 @@
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
|
||||
<!-- تعادل شاخهها -->
|
||||
<!-- آمار فروش تیمها -->
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.h6" Class="mb-3">آمار جمعی فعالیت</MudText>
|
||||
<MudStack Spacing="2">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<MudIcon Icon="@Icons.Material.Filled.CardGiftcard" Size="Size.Large" Color="Color.Primary" Style="font-size: 80px;" />
|
||||
<MudText Typo="Typo.h5">شما هنوز پکیجی خریداری نکردهاید</MudText>
|
||||
<MudText Typo="Typo.body1" Class="mud-text-secondary" Style="max-width: 500px;">
|
||||
با خرید پکیج طلایی، به باشگاه مشتریان بپیوندید و از مزایای ویژه مانند کمیسیون هفتگی و شبکهسازی بهرهمند شوید.
|
||||
با خرید پکیج طلایی، به باشگاه مشتریان بپیوندید و از مزایای ویژه مانند پاداش هفتگی و تیمسازی بهرهمند شوید.
|
||||
</MudText>
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
@@ -108,7 +108,7 @@
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Filled.AccountTree"
|
||||
OnClick="@(() => Navigation.NavigateTo(RouteConstants.Network.Statistics))">
|
||||
مشاهده شبکه
|
||||
مشاهده تیم
|
||||
</MudButton>
|
||||
|
||||
<MudButton Variant="Variant.Outlined"
|
||||
@@ -116,7 +116,7 @@
|
||||
FullWidth="true"
|
||||
StartIcon="@Icons.Material.Filled.Payments"
|
||||
OnClick="@(() => Navigation.NavigateTo(RouteConstants.Commission.Dashboard))">
|
||||
کمیسیونهای من
|
||||
پاداشهای من
|
||||
</MudButton>
|
||||
</MudStack>
|
||||
}
|
||||
@@ -164,7 +164,7 @@
|
||||
<MudItem xs="12" sm="6" md="3">
|
||||
<MudPaper Outlined="true" Class="pa-4 text-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Group" Color="Color.Primary" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">شبکهسازی نامحدود</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">تیمسازی نامحدود</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">دعوت دوستان و ساخت تیم</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
@@ -172,8 +172,8 @@
|
||||
<MudItem xs="12" sm="6" md="3">
|
||||
<MudPaper Outlined="true" Class="pa-4 text-center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Payments" Color="Color.Success" Size="Size.Large" />
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">کمیسیون هفتگی</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">دریافت سهم از فروش شبکه</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mt-2">پاداش هفتگی</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">دریافت سهم از فروش تیم</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
|
||||
@@ -78,11 +78,11 @@
|
||||
</MudStack>
|
||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Check" Size="Size.Small" Color="Color.Primary" />
|
||||
<MudText Typo="Typo.caption">دریافت کمیسیون هفتگی</MudText>
|
||||
<MudText Typo="Typo.caption">دریافت پاداش هفتگی</MudText>
|
||||
</MudStack>
|
||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||
<MudIcon Icon="@Icons.Material.Filled.Check" Size="Size.Small" Color="Color.Primary" />
|
||||
<MudText Typo="Typo.caption">شبکهسازی نامحدود</MudText>
|
||||
<MudText Typo="Typo.caption">تیمسازی نامحدود</MudText>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
</MudStack>
|
||||
@@ -108,8 +108,8 @@
|
||||
<MudStack Spacing="2">
|
||||
<MudText Typo="Typo.h5" Style="color: white;">چرا پکیج طلایی؟</MudText>
|
||||
<MudText Typo="Typo.body1" Style="color: rgba(255,255,255,0.9);">
|
||||
با خرید پکیج طلایی، علاوه بر دسترسی به محصولات ویژه، میتوانید در شبکه فروش شرکت کنید
|
||||
و از کمیسیونهای هفتگی بهرهمند شوید. هر چه شبکه شما گستردهتر، درآمد شما بیشتر!
|
||||
با خرید پکیج طلایی، علاوه بر دسترسی به محصولات ویژه، میتوانید تیم فروش خود را بسازید
|
||||
و از پاداشهای هفتگی بهرهمند شوید. هر چه تیم شما گستردهتر، درآمد شما بیشتر!
|
||||
</MudText>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{
|
||||
<MudButtonGroup Variant="Variant.Outlined" Size="Size.Small" OverrideStyles="false">
|
||||
<MudIconButton Icon="@Icons.Material.Filled.ArrowForward" OnClick="GoBack" Title="بازگشت" Size="Size.Small" Color="Color.Secondary" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Home" OnClick="GoToMyTree" Title="درخت من" Size="Size.Small" Color="Color.Secondary" />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Home" OnClick="GoToMyTree" Title="نمودار من" Size="Size.Small" Color="Color.Secondary" />
|
||||
</MudButtonGroup>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
</div>
|
||||
</MudStack>
|
||||
<MudSpacer/>
|
||||
@* <MudButton Variant="Variant.Filled"
|
||||
Color="Color.Primary"
|
||||
StartIcon="@Icons.Material.Filled.ShoppingCart"
|
||||
OnClick="OpenPurchaseOptions">تامین اعتبار</MudButton> *@
|
||||
|
||||
<MudButton Variant="Variant.Outlined" Href="https://dayadiamond.ir/" >سامانه دایا</MudButton>
|
||||
</MudStack>
|
||||
|
||||
|
||||
@@ -111,7 +109,7 @@
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" md="4">
|
||||
<MudStack>
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی شبکه</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی پاداش تیمی</MudText>
|
||||
<MudText Typo="Typo.h5" Color="Color.Primary">@_walletNetwork</MudText>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
@@ -154,7 +152,7 @@
|
||||
<MudCardContent Class="d-flex flex-column align-center pa-4">
|
||||
<MudIcon Icon="@Icons.Material.Filled.AccountTree" Size="Size.Large" Color="Color.Primary" />
|
||||
<MudText Typo="Typo.subtitle1" Class="mt-2">شجرهنامه</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">ساختار شبکه</MudText>
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">ساختار تیم</MudText>
|
||||
</MudCardContent>
|
||||
</MudCard>
|
||||
</MudLink>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
</MudItem>
|
||||
<MudItem xs="12" sm="6" md="4">
|
||||
<MudPaper Elevation="2" Class="pa-4 rounded-lg">
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی شبکه</MudText>
|
||||
<MudText Typo="Typo.subtitle2" Class="mud-text-secondary">موجودی پاداش تیمی</MudText>
|
||||
<MudText Typo="Typo.h4" Color="Color.Success">@_balances.Network</MudText>
|
||||
</MudPaper>
|
||||
</MudItem>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
Variant="Variant.Outlined"
|
||||
Disabled="_withdrawMethod == WithdrawalMethodClient.Diamond"
|
||||
Placeholder="IRxxxxxxxxxxxx"
|
||||
Adornment="Adornment.Start"
|
||||
Adornment="Adornment.End"
|
||||
AdornmentText="IR" />
|
||||
|
||||
<MudText Typo="Typo.caption" Class="mud-text-secondary">
|
||||
|
||||
@@ -58,7 +58,8 @@ public partial class WithdrawalRequests : ComponentBase
|
||||
try
|
||||
{
|
||||
_isSubmittingWithdrawal = true;
|
||||
await WalletService.RequestWithdrawalAsync(_selectedPayout.Id, _withdrawMethod, _withdrawIban);
|
||||
_withdrawIban=_withdrawIban!.Trim().ToUpper().Replace("IR", "").Replace(" ", "");
|
||||
await WalletService.RequestWithdrawalAsync(_selectedPayout.Id, _withdrawMethod, "IR"+_withdrawIban);
|
||||
Snackbar.Add("درخواست برداشت ثبت شد.", Severity.Success);
|
||||
|
||||
// بروزرسانی لیست
|
||||
|
||||
@@ -245,7 +245,7 @@
|
||||
<p><strong>ماده ۲ - شرایط عضویت</strong></p>
|
||||
<p>۲-۱. کاربر با پرداخت مبلغ ۵۶ میلیون تومان (پکیج پایه)، امکان عضویت در باشگاه مشتریان را خواهد داشت.</p>
|
||||
<p>۲-۲. پس از امضای این قرارداد، لینک دعوت کاربر فعال خواهد شد.</p>
|
||||
<p>۲-۳. کاربر میتواند حداکثر ۲ نفر را مستقیماً دعوت کند (یک نفر در شاخه چپ و یک نفر در شاخه راست).</p>
|
||||
<p>۲-۳. کاربر میتواند حداکثر ۲ نفر را مستقیماً دعوت کند (یک نفر در تیم اول و یک نفر در تیم دوم).</p>
|
||||
|
||||
<p><strong>ماده ۳ - تعهدات کاربر</strong></p>
|
||||
<p>۳-۱. کاربر متعهد است از لینک دعوت فقط برای معرفی افراد واقعی استفاده کند.</p>
|
||||
@@ -253,8 +253,8 @@
|
||||
<p>۳-۳. کاربر حق انتقال یا فروش عضویت خود را ندارد.</p>
|
||||
|
||||
<p><strong>ماده ۴ - حقوق کاربر</strong></p>
|
||||
<p>۴-۱. دریافت پاداش معرفی به ازای هر عضو جدید که از طریق شبکه کاربر عضو شود.</p>
|
||||
<p>۴-۲. دسترسی به داشبورد مدیریت شبکه و مشاهده وضعیت زیرمجموعهها.</p>
|
||||
<p>۴-۱. دریافت پاداش معرفی به ازای هر عضو جدید که از طریق تیم کاربر عضو شود.</p>
|
||||
<p>۴-۲. دسترسی به داشبورد مدیریت تیم و مشاهده وضعیت اعضای تیم.</p>
|
||||
<p>۴-۳. امکان برداشت موجودی کیف پول طبق قوانین سایت.</p>
|
||||
|
||||
<p><strong>ماده ۵ - شرایط فسخ</strong></p>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<MudText Typo="Typo.h5">کارا بازار سلامت</MudText>
|
||||
</div>
|
||||
<MudText Typo="Typo.body2" Class="footer-description">
|
||||
پلتفرم هوشمند ساخت شبکههای فروش با امکانات پیشرفته مدیریت تیم، محاسبه کارمزد و گزارشگیری جامع.
|
||||
پلتفرم هوشمند ساخت تیمهای فروش با امکانات پیشرفته مدیریت تیم، محاسبه کارمزد و گزارشگیری جامع.
|
||||
</MudText>
|
||||
<MudStack Row="true" Spacing="2" Class="social-links">
|
||||
<MudIconButton Icon="@Icons.Custom.Brands.Telegram"
|
||||
|
||||
@@ -63,8 +63,10 @@ public class WeeklyBalanceDto
|
||||
public long MinBalance { get; set; }
|
||||
public int BalanceCount { get; set; }
|
||||
public long CalculatedCommission { get; set; }
|
||||
public long LeftCarryover { get; set; }
|
||||
public long RightCarryover { get; set; }
|
||||
public int LeftCarryover { get; set; }
|
||||
public int RightCarryover { get; set; }
|
||||
public int LeftNewMembers { get; set; }
|
||||
public int RightNewMembers { get; set; }
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
@@ -75,6 +77,8 @@ public class WeeklyBalanceDto
|
||||
public string CalculatedCommissionFormatted => $"{CalculatedCommission:N0} ";
|
||||
public string LeftCarryoverFormatted => $"{LeftCarryover:N0} ";
|
||||
public string RightCarryoverFormatted => $"{RightCarryover:N0} ";
|
||||
public string LeftNewMembersFormatted => $"{LeftNewMembers:N0}";
|
||||
public string RightNewMembersFormatted => $"{RightNewMembers:N0}";
|
||||
public string StartDatePersian => StartDate.MiladiToJalali();
|
||||
public string EndDatePersian => EndDate.MiladiToJalali();
|
||||
}
|
||||
|
||||
@@ -159,6 +159,9 @@ public class CommissionService
|
||||
if (weekDefinitionId.HasValue)
|
||||
{
|
||||
request.WeekDefinitionId = weekDefinitionId.Value;
|
||||
}else
|
||||
{
|
||||
request.WeekDefinitionId=7;
|
||||
}
|
||||
|
||||
var response = await _client.GetMyWeeklyBalancesAsync(request);
|
||||
@@ -175,8 +178,10 @@ public class CommissionService
|
||||
MinBalance = Math.Min(balance.LeftLegBalances, balance.RightLegBalances),
|
||||
BalanceCount = balance.TotalBalances,
|
||||
CalculatedCommission = balance.WeeklyPoolContribution,
|
||||
LeftCarryover = Math.Max(0, balance.LeftLegBalances - balance.RightLegBalances),
|
||||
RightCarryover = Math.Max(0, balance.RightLegBalances - balance.LeftLegBalances),
|
||||
LeftCarryover = balance.LeftLegCarryover,
|
||||
RightCarryover = balance.RightLegCarryover,
|
||||
LeftNewMembers = balance.LeftLegNewMembers,
|
||||
RightNewMembers = balance.RightLegNewMembers,
|
||||
StartDate = balance.CalculatedAt?.ToDateTime().AddDays(-7) ?? DateTime.Now.AddDays(-7),
|
||||
EndDate = balance.CalculatedAt?.ToDateTime() ?? DateTime.Now
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
// "GwUrl": "https://localhost:34781",
|
||||
"GwUrl": "https://frontoffice-bff.foursat.afrino.co",
|
||||
"DownloadUrl": "https://dl.afrino.co",
|
||||
"EncryptionSettings": {
|
||||
|
||||
Reference in New Issue
Block a user