- Added role-based permission checks in NavMenu for dashboard and management links. - Created ManualPaymentDialog for creating and managing manual payments. - Implemented TransactionDetailsDialog for displaying transaction details. - Developed Transactions page for viewing and filtering transactions. - Introduced RolePermissionsDialog for managing role permissions. - Established AuthorizationService to handle permission checks and user roles. - Enhanced UI components with MudBlazor for better user experience.
98 lines
4.0 KiB
Plaintext
98 lines
4.0 KiB
Plaintext
@using BackOffice.BFF.ManualPayment.Protobuf
|
|
@using BackOffice.Pages.Payment.Components
|
|
|
|
<MudDialog>
|
|
<DialogContent>
|
|
@if (Mode == ManualPaymentDialogMode.Create)
|
|
{
|
|
<MudStack Spacing="2">
|
|
<MudText Typo="Typo.h6">ثبت پرداخت دستی جدید</MudText>
|
|
|
|
<MudNumericField T="long"
|
|
Label="شناسه کاربر"
|
|
Variant="Variant.Outlined"
|
|
@bind-Value="_createModel.UserId" />
|
|
|
|
<MudNumericField T="long"
|
|
Label="مبلغ"
|
|
Variant="Variant.Outlined"
|
|
Adornment="Adornment.End"
|
|
AdornmentText="ریال"
|
|
@bind-Value="_createModel.Amount" />
|
|
|
|
<MudTextField T="string"
|
|
Label="نوع / توضیح نوع"
|
|
Variant="Variant.Outlined"
|
|
@bind-Value="_createModel.TypeDisplay" />
|
|
|
|
<MudTextField T="string"
|
|
Label="توضیحات"
|
|
Variant="Variant.Outlined"
|
|
Lines="3"
|
|
@bind-Value="_createModel.Description" />
|
|
|
|
<MudTextField T="string"
|
|
Label="شماره مرجع (اختیاری)"
|
|
Variant="Variant.Outlined"
|
|
@bind-Value="_createModel.ReferenceNumber" />
|
|
</MudStack>
|
|
}
|
|
else if (Model is not null)
|
|
{
|
|
<MudStack Spacing="2">
|
|
<MudText Typo="Typo.h6">جزئیات پرداخت دستی</MudText>
|
|
<MudText Typo="Typo.body2">شناسه: @Model.Id</MudText>
|
|
<MudText Typo="Typo.body2">کاربر: @Model.UserFullName (@Model.UserId)</MudText>
|
|
<MudText Typo="Typo.body2">مبلغ: @Model.Amount.ToString("N0") ریال</MudText>
|
|
<MudText Typo="Typo.body2">نوع: @Model.TypeDisplay</MudText>
|
|
<MudText Typo="Typo.body2">وضعیت: @Model.StatusDisplay</MudText>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.ReferenceNumber))
|
|
{
|
|
<MudText Typo="Typo.body2">شماره مرجع: @Model.ReferenceNumber</MudText>
|
|
}
|
|
|
|
<MudText Typo="Typo.body2">توضیحات: @Model.Description</MudText>
|
|
|
|
@if (!string.IsNullOrWhiteSpace(Model.RejectionReason))
|
|
{
|
|
<MudAlert Severity="Severity.Error">
|
|
دلیل رد: @Model.RejectionReason
|
|
</MudAlert>
|
|
}
|
|
|
|
@if (Model.Status == (int)ManualPaymentDialogStatus.Pending)
|
|
{
|
|
<MudTextField T="string"
|
|
Label="یادداشت تایید / دلیل رد"
|
|
Variant="Variant.Outlined"
|
|
Lines="3"
|
|
@bind-Value="_adminNote" />
|
|
}
|
|
</MudStack>
|
|
}
|
|
</DialogContent>
|
|
<DialogActions>
|
|
<MudButton Variant="Variant.Outlined" Color="Color.Default" OnClick="Close">
|
|
بستن
|
|
</MudButton>
|
|
|
|
@if (Mode == ManualPaymentDialogMode.Create)
|
|
{
|
|
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="CreateAsync">
|
|
ثبت
|
|
</MudButton>
|
|
}
|
|
else if (Model is not null && Model.Status == (int)ManualPaymentDialogStatus.Pending)
|
|
{
|
|
<MudButton Variant="Variant.Filled" Color="Color.Success" OnClick="ApproveAsync">
|
|
تایید
|
|
</MudButton>
|
|
<MudButton Variant="Variant.Filled" Color="Color.Error" OnClick="RejectAsync">
|
|
رد
|
|
</MudButton>
|
|
}
|
|
</DialogActions>
|
|
</MudDialog>
|
|
|