refactor: update terminology from "مشتری" to "مودی" and "ارایهدهنده" to "PSP" across the application
Production CI / validate-and-build (push) Failing after 1m6s
Production CI / validate-and-build (push) Failing after 1m6s
- Updated column headers and labels in various components and constants to reflect the new terminology. - Changed the titles and placeholders in forms and dialogs to use "مودی" and "PSP". - Adjusted routing titles and menu items to align with the new naming conventions. - Refactored related constants and configurations to ensure consistency throughout the application.
This commit is contained in:
@@ -10,7 +10,7 @@ export const columns: IColumn[] = [
|
||||
{ field: 'device', header: 'دستگاه', type: 'nested', nestedOption: { path: 'device.name' } },
|
||||
{
|
||||
field: 'provider',
|
||||
header: 'ارایهدهنده',
|
||||
header: 'PSP',
|
||||
type: 'nested',
|
||||
nestedOption: { path: 'provider.name' },
|
||||
},
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
<app-key-value label="شماره سریال" [value]="pos()?.serial_number" />
|
||||
<app-key-value label="نوع دستگاه" [value]="pos()?.device?.name" />
|
||||
<app-key-value label="مدل دستگاه" [value]="pos()?.model" />
|
||||
<app-key-value label="ارایهدهنده" [value]="pos()?.provider?.name" />
|
||||
<app-key-value label="PSP" [value]="pos()?.provider?.name" />
|
||||
</div>
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<app-key-value label="شماره سریال" [value]="pos()?.serial_number" />
|
||||
<app-key-value label="نوع دستگاه" [value]="pos()?.device?.name" />
|
||||
<app-key-value label="مدل دستگاه" [value]="pos()?.model" />
|
||||
<app-key-value label="ارایهدهنده" [value]="pos()?.provider?.name" />
|
||||
<app-key-value label="PSP" [value]="pos()?.provider?.name" />
|
||||
</div>
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
@@ -8,7 +8,7 @@ export const PARTNER_MENU_ITEMS = [
|
||||
routerLink: ['/partner'],
|
||||
},
|
||||
{
|
||||
label: 'مشتری',
|
||||
label: 'مودی',
|
||||
icon: 'pi pi-fw pi-users',
|
||||
routerLink: ['/partner/consumers'],
|
||||
},
|
||||
|
||||
+5
-9
@@ -1,11 +1,10 @@
|
||||
<shared-dialog
|
||||
header="افزودن مشتری"
|
||||
header="افزودن مودی"
|
||||
[(visible)]="visible"
|
||||
[modal]="true"
|
||||
[style]="{ width: '640px' }"
|
||||
[closable]="true"
|
||||
(onHide)="close()"
|
||||
>
|
||||
(onHide)="close()">
|
||||
<p-stepper [value]="activeStep()" [linear]="true">
|
||||
<p-step-list>
|
||||
<p-step [value]="1">اطلاعات اولیه</p-step>
|
||||
@@ -24,16 +23,14 @@
|
||||
<partner-consumer-businessActivities-form-content
|
||||
[consumerId]="consumer()?.id || ''"
|
||||
(onSubmit)="onBusinessActivitySubmit($event)"
|
||||
(onClose)="close()"
|
||||
/>
|
||||
(onClose)="close()" />
|
||||
}
|
||||
@case (3) {
|
||||
<partner-consumer-complex-form-content
|
||||
[consumerId]="consumer()?.id || ''"
|
||||
[businessActivityId]="businessActivity()?.id || ''"
|
||||
(onSubmit)="onComplexSubmit($event)"
|
||||
(onClose)="close()"
|
||||
/>
|
||||
(onClose)="close()" />
|
||||
}
|
||||
@case (4) {
|
||||
<partner-consumer-pos-form-content
|
||||
@@ -41,8 +38,7 @@
|
||||
[businessActivityId]="businessActivity()?.id || ''"
|
||||
[complexId]="complex()?.id || ''"
|
||||
(onSubmit)="onPosSubmit($event)"
|
||||
(onClose)="close()"
|
||||
/>
|
||||
(onClose)="close()" />
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export class ConsumerUserFormDialogComponent extends AbstractDialog {
|
||||
@Input() consumerId?: string;
|
||||
|
||||
get preparedTitle() {
|
||||
return `${this.editMode ? 'ویرایش' : 'افزودن'} مشتری`;
|
||||
return `${this.editMode ? 'ویرایش' : 'افزودن'} مودی`;
|
||||
}
|
||||
|
||||
onFormSubmit(response: IPartnerConsumerResponse) {
|
||||
|
||||
@@ -10,7 +10,7 @@ export const partnerConsumersNamedRoutes: NamedRoutes<TConsumersRouteNames> = {
|
||||
path: 'consumers',
|
||||
loadComponent: () => import('../../views/list.component').then((m) => m.ConsumersComponent),
|
||||
meta: {
|
||||
title: 'مشتریها',
|
||||
title: 'مودیان',
|
||||
pagePath: () => '/partner/consumers',
|
||||
},
|
||||
},
|
||||
@@ -18,7 +18,7 @@ export const partnerConsumersNamedRoutes: NamedRoutes<TConsumersRouteNames> = {
|
||||
path: 'consumers/:consumerId',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.ConsumerComponent),
|
||||
meta: {
|
||||
title: 'مشتری',
|
||||
title: 'مودی',
|
||||
pagePath: (guildId: string) => `/partner/consumers/${guildId}`,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<app-page-data-list
|
||||
pageTitle="مشتریها"
|
||||
[addNewCtaLabel]="'افزودن مشتری'"
|
||||
pageTitle="مودیان"
|
||||
[addNewCtaLabel]="'افزودن مودی'"
|
||||
[columns]="columns"
|
||||
[showAdd]="true"
|
||||
emptyPlaceholderTitle="مشتری یافت نشد"
|
||||
emptyPlaceholderDescription="برای افزودن مشتری، روی دکمهٔ بالا کلیک کنید."
|
||||
emptyPlaceholderTitle="مودی یافت نشد"
|
||||
emptyPlaceholderDescription="برای افزودن مودی، روی دکمهٔ بالا کلیک کنید."
|
||||
[items]="items()"
|
||||
[loading]="loading()"
|
||||
[showDetails]="true"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات مشتری" [editable]="true" [(editMode)]="editMode">
|
||||
<app-card-data cardTitle="اطلاعات مودی" [editable]="true" [(editMode)]="editMode">
|
||||
<ng-template #moreActions> </ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
<app-key-value label="نام مشتری" [value]="consumer()?.name" />
|
||||
<app-key-value label="نوع مشتری" [value]="consumer()?.type?.translate" />
|
||||
<app-key-value label="نام" [value]="consumer()?.name" />
|
||||
<app-key-value label="نوع" [value]="consumer()?.type?.translate" />
|
||||
@if (consumer()?.type?.value === 'LEGAL') {
|
||||
<app-key-value label="شناسه ملی" [value]="consumer()?.legal?.registration_code" />
|
||||
} @else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="flex flex-col gap-4 w-full">
|
||||
<uikit-field label="بر اساس نام مشتری" name="search" class="w-full">
|
||||
<div class="flex w-full flex-col gap-4">
|
||||
<uikit-field label="بر اساس نام مودی" name="search" class="w-full">
|
||||
<p-inputgroup class="w-full">
|
||||
<input pInputText [(ngModel)]="search" placeholder="جستجوی نام مشتری" (ngModelChange)="onFilterChange($event)" />
|
||||
<input pInputText [(ngModel)]="search" placeholder="جستجوی نام مودی" (ngModelChange)="onFilterChange($event)" />
|
||||
<p-inputgroup-addon>
|
||||
<p-button icon="pi pi-times" severity="secondary" (onClick)="clearSearch()"></p-button>
|
||||
</p-inputgroup-addon>
|
||||
|
||||
@@ -18,7 +18,7 @@ export class PartnerLicenseListComponent extends AbstractList<ILicenseResponse>
|
||||
// { field: 'id', header: 'شناسه', type: 'id' },
|
||||
{
|
||||
field: 'business_activity',
|
||||
header: 'عنوان مشتری',
|
||||
header: 'مودی',
|
||||
type: 'nested',
|
||||
nestedOption: {
|
||||
path: 'business_activity.consumer.name',
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<app-card-data cardTitle="تغییر رمز عبور" [editable]="false">
|
||||
<form [formGroup]="form" (submit)="submit()" class="mx-auto max-w-lg">
|
||||
<shared-password-input
|
||||
[passwordControl]="form.controls.password"
|
||||
[confirmPasswordControl]="form.controls.confirmPassword" />
|
||||
<button type="submit" pButton [disabled]="form.invalid || loading()" class="mx-auto w-full max-w-xs">
|
||||
تغییر رمز عبور
|
||||
</button>
|
||||
</form>
|
||||
</app-card-data>
|
||||
@@ -1,46 +0,0 @@
|
||||
import { ToastService } from '@/core/services/toast.service';
|
||||
import { MustMatch } from '@/core/validators';
|
||||
import { AppCardComponent, SharedPasswordInputComponent } from '@/shared/components';
|
||||
import { fieldControl } from '@/shared/constants';
|
||||
import { Component, inject, signal } from '@angular/core';
|
||||
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { ButtonDirective } from 'primeng/button';
|
||||
import { finalize } from 'rxjs';
|
||||
import { ProfileService } from '../services/main.service';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-reset-password-card',
|
||||
templateUrl: './reset-password-card.component.html',
|
||||
imports: [ReactiveFormsModule, AppCardComponent, SharedPasswordInputComponent, ButtonDirective],
|
||||
})
|
||||
export class PartnerResetPasswordCardComponent {
|
||||
private readonly service = inject(ProfileService);
|
||||
private readonly fb = inject(FormBuilder);
|
||||
private readonly toastService = inject(ToastService);
|
||||
|
||||
readonly loading = signal(false);
|
||||
|
||||
form = this.fb.group(
|
||||
{
|
||||
password: fieldControl.password(),
|
||||
confirmPassword: fieldControl.confirmPassword(),
|
||||
},
|
||||
{ validators: [MustMatch('password', 'confirmPassword')] }
|
||||
);
|
||||
|
||||
submit() {
|
||||
if (this.form.invalid) {
|
||||
this.form.markAllAsTouched();
|
||||
return;
|
||||
}
|
||||
|
||||
this.loading.set(true);
|
||||
this.service
|
||||
.resetPassword({ password: this.form.value.password as string })
|
||||
.pipe(finalize(() => this.loading.set(false)))
|
||||
.subscribe(() => {
|
||||
this.form.reset();
|
||||
this.toastService.success({ text: 'رمز عبور با موفقیت بهروز شد.' });
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -12,5 +12,6 @@ export interface IProfileRequestPayload {
|
||||
}
|
||||
|
||||
export interface IResetPasswordRequest {
|
||||
currentPassword: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات پروفایل" [editable]="true" [(editMode)]="editing">
|
||||
<ng-template #moreActions>
|
||||
<p-button type="button" variant="outlined" size="small" (onClick)="openResetPasswordDialog()">
|
||||
تغییر گذرواژه
|
||||
</p-button>
|
||||
</ng-template>
|
||||
<div class="listKeyValue">
|
||||
<app-key-value label="تصویر" [value]="profile()?.logo_url" type="thumbnail" />
|
||||
<app-key-value label="عنوان" [value]="profile()?.name" />
|
||||
@@ -7,9 +12,13 @@
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<partner-reset-password-card />
|
||||
|
||||
@if (editing()) {
|
||||
<partner-profile-form [(visible)]="editing" [initialValues]="profile()!" (onSubmit)="onEditSuccess()" />
|
||||
}
|
||||
</div>
|
||||
|
||||
<shared-change-password-form-dialog
|
||||
[(visible)]="resetPasswordDialog"
|
||||
[showCurrentPasswordField]="true"
|
||||
[loading]="resetPasswordLoading()"
|
||||
(onSubmit)="resetPassword($event)" />
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import { ToastService } from '@/core/services/toast.service';
|
||||
import { PartnerStore } from '@/domains/partner/store/main.store';
|
||||
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
|
||||
import {
|
||||
AppCardComponent,
|
||||
ChangePasswordFormDialogComponent,
|
||||
KeyValueComponent,
|
||||
} from '@/shared/components';
|
||||
import { Component, computed, inject, signal } from '@angular/core';
|
||||
import { Button } from 'primeng/button';
|
||||
import { finalize } from 'rxjs';
|
||||
import { PartnerProfileFormComponent } from '../components/form.component';
|
||||
import { PartnerResetPasswordCardComponent } from '../components/reset-password-card.component';
|
||||
import { IResetPasswordRequest } from '../models';
|
||||
import { ProfileService } from '../services/main.service';
|
||||
|
||||
@Component({
|
||||
selector: 'partner-profile',
|
||||
@@ -10,17 +18,22 @@ import { PartnerResetPasswordCardComponent } from '../components/reset-password-
|
||||
imports: [
|
||||
AppCardComponent,
|
||||
KeyValueComponent,
|
||||
PartnerResetPasswordCardComponent,
|
||||
PartnerProfileFormComponent,
|
||||
Button,
|
||||
ChangePasswordFormDialogComponent,
|
||||
],
|
||||
})
|
||||
export class PartnerProfileComponent {
|
||||
private readonly store = inject(PartnerStore);
|
||||
private readonly service = inject(ProfileService);
|
||||
private readonly toastService = inject(ToastService);
|
||||
|
||||
readonly resetPasswordLoading = signal(false);
|
||||
editing = signal(false);
|
||||
resetPasswordDialog = signal(false);
|
||||
|
||||
readonly profile = computed(() => this.store.entity());
|
||||
|
||||
editing = signal(false);
|
||||
|
||||
edit() {
|
||||
this.editing.set(true);
|
||||
}
|
||||
@@ -28,4 +41,21 @@ export class PartnerProfileComponent {
|
||||
onEditSuccess() {
|
||||
this.store.getData();
|
||||
}
|
||||
openResetPasswordDialog() {
|
||||
this.resetPasswordDialog.set(true);
|
||||
}
|
||||
|
||||
resetPassword(payload: IResetPasswordRequest) {
|
||||
this.resetPasswordLoading.set(true);
|
||||
|
||||
this.service
|
||||
.resetPassword(payload)
|
||||
.pipe(finalize(() => this.resetPasswordLoading.set(false)))
|
||||
.subscribe(() => {
|
||||
this.toastService.success({
|
||||
text: 'تغییر رمز عبور با موفقیت انجام شد.',
|
||||
});
|
||||
this.resetPasswordDialog.set(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<app-inner-pages-header [pageTitle]="preparedPageTitle()" [backRoute]="backRoute" />
|
||||
<hr class="mt-0!" />
|
||||
<div class="flex w-full flex-col flex-wrap gap-3 p-4">
|
||||
<shared-good-form [guildId]="guildId()" [createFn]="createFn" (onSubmit)="onSubmit()" (onClose)="onPrev()" />
|
||||
<shared-good-form
|
||||
[guildId]="guildId()"
|
||||
[createFn]="createFn"
|
||||
class="block w-full"
|
||||
(onSubmit)="onSubmit()"
|
||||
(onClose)="onPrev()" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
[initialValues]="item()!"
|
||||
[updateFn]="updateFn"
|
||||
[editMode]="true"
|
||||
class="block w-full"
|
||||
(onSubmit)="onSubmit()"
|
||||
(onClose)="onPrev()" />
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<div class="flex items-center justify-center h-svh w-svw">
|
||||
<span class="text-center"> به پنل ارایهدهنده خوش آمدید </span>
|
||||
<div class="flex h-svh w-svw items-center justify-center">
|
||||
<span class="text-center"> به پنل PSP خوش آمدید </span>
|
||||
</div>
|
||||
|
||||
@@ -8,7 +8,7 @@ export const SUPER_ADMIN_MENU_ITEMS = [
|
||||
routerLink: ['/'],
|
||||
},
|
||||
// {
|
||||
// label: 'مشتری',
|
||||
// label: 'مودی',
|
||||
// icon: 'pi pi-fw pi-id-card',
|
||||
// routerLink: ['/super_admin/consumers'],
|
||||
// },
|
||||
@@ -19,7 +19,7 @@ export const SUPER_ADMIN_MENU_ITEMS = [
|
||||
routerLink: ['/super_admin/partners'],
|
||||
},
|
||||
{
|
||||
label: 'ارایهدهنده',
|
||||
label: 'PSP',
|
||||
icon: 'pi pi-fw pi-building-columns',
|
||||
routerLink: ['/super_admin/providers'],
|
||||
},
|
||||
|
||||
@@ -29,7 +29,7 @@ export class ConsumerUserFormComponent extends AbstractFormDialog<
|
||||
@Input() consumerId?: string;
|
||||
private service = inject(ConsumersService);
|
||||
|
||||
preparedTitle = computed(() => `${this.editMode ? 'ویرایش' : 'افزودن'} مشتری`);
|
||||
preparedTitle = computed(() => `${this.editMode ? 'ویرایش' : 'افزودن'} مودی`);
|
||||
|
||||
initForm = () => {
|
||||
const form = this.fb.group({
|
||||
@@ -63,7 +63,7 @@ export class ConsumerUserFormComponent extends AbstractFormDialog<
|
||||
this.fb.control<string>('', {
|
||||
nonNullable: true,
|
||||
validators: fieldControl.username('')[1],
|
||||
}),
|
||||
})
|
||||
);
|
||||
// @ts-ignore
|
||||
form.addControl(
|
||||
@@ -71,7 +71,7 @@ export class ConsumerUserFormComponent extends AbstractFormDialog<
|
||||
this.fb.control<string>('', {
|
||||
nonNullable: true,
|
||||
validators: [Validators.required],
|
||||
}),
|
||||
})
|
||||
);
|
||||
// @ts-ignore
|
||||
form.addControl(
|
||||
@@ -79,7 +79,7 @@ export class ConsumerUserFormComponent extends AbstractFormDialog<
|
||||
this.fb.control<string>('', {
|
||||
nonNullable: true,
|
||||
validators: [Validators.required],
|
||||
}),
|
||||
})
|
||||
);
|
||||
form.addValidators([MustMatch('password', 'confirmPassword')]);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export class ConsumerPosesComponent extends AbstractList<IPosResponse> {
|
||||
{ field: 'pos_type', header: 'نوع دستگاه' },
|
||||
{
|
||||
field: 'provider',
|
||||
header: 'ارایهدهنده',
|
||||
header: 'PSP',
|
||||
type: 'nested',
|
||||
nestedOption: { path: 'provider.name' },
|
||||
},
|
||||
@@ -58,8 +58,8 @@ export class ConsumerPosesComponent extends AbstractList<IPosResponse> {
|
||||
this.consumerId,
|
||||
this.businessId,
|
||||
this.complexId,
|
||||
item.id,
|
||||
),
|
||||
item.id
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export const superAdminConsumersNamedRoutes: NamedRoutes<TConsumersRouteNames> =
|
||||
path: 'consumers',
|
||||
loadComponent: () => import('../../views/list.component').then((m) => m.ConsumersComponent),
|
||||
meta: {
|
||||
title: 'مشتریها',
|
||||
title: 'مودیان',
|
||||
pagePath: () => '/super_admin/consumers',
|
||||
},
|
||||
},
|
||||
@@ -18,7 +18,7 @@ export const superAdminConsumersNamedRoutes: NamedRoutes<TConsumersRouteNames> =
|
||||
path: 'consumers/:consumerId',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.ConsumerComponent),
|
||||
meta: {
|
||||
title: 'مشتری',
|
||||
title: 'مودی',
|
||||
pagePath: (guildId: string) => `/super_admin/consumers/${guildId}`,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
<app-page-data-list
|
||||
pageTitle="مدیریت مشتریها"
|
||||
pageTitle="مدیریت مودیان"
|
||||
[columns]="columns"
|
||||
emptyPlaceholderTitle="مشتری یافت نشد"
|
||||
emptyPlaceholderTitle="مودی یافت نشد"
|
||||
[items]="items()"
|
||||
[loading]="loading()"
|
||||
[showDetails]="true"
|
||||
(onAdd)="openAddForm()"
|
||||
(onDetails)="toSinglePage($event)"
|
||||
(onEdit)="onEditClick($event)"
|
||||
(onRefresh)="refresh()"
|
||||
/>
|
||||
(onRefresh)="refresh()" />
|
||||
<superAdmin-consumer-form
|
||||
[(visible)]="visibleForm"
|
||||
[editMode]="editMode()"
|
||||
[consumerId]="selectedItemForEdit()?.id"
|
||||
[initialValues]="selectedItemForEdit() || undefined"
|
||||
(onSubmit)="refresh()"
|
||||
/>
|
||||
(onSubmit)="refresh()" />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات مشتری" [(editMode)]="editMode">
|
||||
<app-card-data cardTitle="اطلاعات مودی" [(editMode)]="editMode">
|
||||
<ng-template #moreActions> </ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
<app-key-value label="نام مشتری" [value]="consumer()?.name" />
|
||||
<app-key-value label="نوع مشتری" [value]="consumer()?.type?.translate" />
|
||||
<app-key-value label="نام" [value]="consumer()?.name" />
|
||||
<app-key-value label="نوع" [value]="consumer()?.type?.translate" />
|
||||
@if (consumer()?.type?.value === 'LEGAL') {
|
||||
<app-key-value label="شناسه ملی" [value]="consumer()?.legal?.registration_code" />
|
||||
} @else {
|
||||
|
||||
@@ -20,7 +20,7 @@ export class AdminPartnerLicensesComponent extends AbstractList<IPartnerActivate
|
||||
// { field: 'id', header: 'شناسه', type: 'id' },
|
||||
{
|
||||
field: 'consumer',
|
||||
header: 'مشتری',
|
||||
header: 'مودی',
|
||||
customDataModel(item: IPartnerActivatedLicenseResponse) {
|
||||
return `${item.business_activity.consumer_name} (${item.business_activity.name})`;
|
||||
},
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ProviderFormComponent extends AbstractFormDialog<IProviderRequest,
|
||||
|
||||
form = this.initForm();
|
||||
|
||||
preparedTitle = computed(() => `${this.editMode ? 'ویرایش' : 'افزودن'} ارایهدهنده`);
|
||||
preparedTitle = computed(() => `${this.editMode ? 'ویرایش' : 'افزودن'} PSP`);
|
||||
|
||||
override ngOnChanges() {
|
||||
this.form.patchValue(this.initialValues ?? {});
|
||||
|
||||
@@ -16,7 +16,7 @@ export const providersNamedRoutes: NamedRoutes<TProvidersRouteNames> = {
|
||||
path: 'providers/:providerId',
|
||||
loadComponent: () => import('../../views/single.component').then((m) => m.ProviderComponent),
|
||||
meta: {
|
||||
title: 'ارایهدهنده',
|
||||
title: 'PSP',
|
||||
pagePath: () => '/super_admin/providers/:providerId',
|
||||
},
|
||||
},
|
||||
|
||||
@@ -4,24 +4,22 @@
|
||||
[options]="items()"
|
||||
optionLabel="name"
|
||||
[optionValue]="selectOptionValue"
|
||||
placeholder="انتخاب ارایهدهنده"
|
||||
placeholder="انتخاب PSP"
|
||||
[formControl]="control"
|
||||
[showClear]="showClear"
|
||||
[filter]="true"
|
||||
appendTo="body"
|
||||
>
|
||||
appendTo="body">
|
||||
@if (canInsert) {
|
||||
<ng-template #footer>
|
||||
<div class="p-3">
|
||||
<p-button
|
||||
label="افزودن ارایهدهنده"
|
||||
label="افزودن PSP"
|
||||
fluid
|
||||
severity="secondary"
|
||||
text
|
||||
size="small"
|
||||
icon="pi pi-plus"
|
||||
(onClick)="onOpenForm()"
|
||||
/>
|
||||
(onClick)="onOpenForm()" />
|
||||
</div>
|
||||
</ng-template>
|
||||
}
|
||||
|
||||
@@ -1,21 +1,19 @@
|
||||
<app-page-data-list
|
||||
[pageTitle]="'مدیریت ارایهدهندهگان'"
|
||||
[addNewCtaLabel]="'افزودن ارایهدهنده'"
|
||||
[pageTitle]="'مدیریت PSP'"
|
||||
[addNewCtaLabel]="'افزودن PSP'"
|
||||
[columns]="columns"
|
||||
[showAdd]="true"
|
||||
emptyPlaceholderTitle="ارایهدهندهی یافت نشد"
|
||||
emptyPlaceholderDescription="برای افزودن ارایهدهندهی، روی دکمهٔ بالا کلیک کنید."
|
||||
emptyPlaceholderTitle="PSPی یافت نشد"
|
||||
emptyPlaceholderDescription="برای افزودن PSPی، روی دکمهٔ بالا کلیک کنید."
|
||||
[items]="items()"
|
||||
[loading]="loading()"
|
||||
[showDetails]="true"
|
||||
[showAdd]="true"
|
||||
(onAdd)="openAddForm()"
|
||||
(onRefresh)="refresh()"
|
||||
/>
|
||||
(onRefresh)="refresh()" />
|
||||
<provider-form
|
||||
[(visible)]="visibleForm"
|
||||
[editMode]="editMode()"
|
||||
[providerId]="selectedItemForEdit()?.id"
|
||||
[initialValues]="selectedItemForEdit() || undefined"
|
||||
(onSubmit)="refresh()"
|
||||
/>
|
||||
(onSubmit)="refresh()" />
|
||||
|
||||
@@ -36,7 +36,7 @@ export class AppLayout {
|
||||
constructor(
|
||||
public layoutService: LayoutService,
|
||||
public renderer: Renderer2,
|
||||
public router: Router,
|
||||
public router: Router
|
||||
) {
|
||||
this.layoutService.headerSlot$.subscribe((tpl) => (this.topBarMoreAction = tpl));
|
||||
this.layoutService.topbarStartSlot$.subscribe((tpl) => (this.topBarStartAction = tpl));
|
||||
@@ -105,7 +105,7 @@ export class AppLayout {
|
||||
} else {
|
||||
document.body.className = document.body.className.replace(
|
||||
new RegExp('(^|\\b)' + 'blocked-scroll'.split(' ').join('|') + '(\\b|$)', 'gi'),
|
||||
' ',
|
||||
' '
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -169,6 +169,10 @@ export class AppLayout {
|
||||
}
|
||||
}
|
||||
|
||||
ngOnChanges() {
|
||||
console.log('layout changed');
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
if (this.overlayMenuOpenSubscription) {
|
||||
this.overlayMenuOpenSubscription.unsubscribe();
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
size="large"
|
||||
icon="pi pi-bars"
|
||||
class="layout-menu-button layout-topbar-action"
|
||||
(click)="layoutService.onMenuToggle()"
|
||||
></p-button>
|
||||
(click)="layoutService.onMenuToggle()"></p-button>
|
||||
}
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="/" class="flex items-center gap-2">
|
||||
<img [src]="logo" width="32" />
|
||||
<span class="text-xl">{{ panelTitle() }}</span>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
</ng-template>
|
||||
<ng-template #center>
|
||||
@@ -34,13 +33,12 @@
|
||||
[icon]="`pi ${layoutService.isDarkTheme() ? 'pi-moon' : 'pi-sun'}`"
|
||||
text
|
||||
size="large"
|
||||
(click)="toggleDarkMode()"
|
||||
>
|
||||
(click)="toggleDarkMode()">
|
||||
<i [ngClass]="{}"></i>
|
||||
</p-button>
|
||||
|
||||
<div class="">
|
||||
<p-menu #menu [model]="profileMenuItems()" [popup]="true" />
|
||||
<p-menu #menu appendTo="body" [model]="profileMenuItems()" [popup]="true" />
|
||||
<p-button (click)="menu.toggle($event)" icon="pi pi-user" text severity="contrast" size="large" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ export class CatalogProviderSelectComponent extends AbstractSelectComponent<
|
||||
private readonly service = inject(CatalogsService);
|
||||
|
||||
get preparedLabel() {
|
||||
return this.label || 'انتخاب ارایهدهنده';
|
||||
return this.label || 'انتخاب PSP';
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IListConfig } from './list-config.model';
|
||||
|
||||
export const consumerAccountListConfig: IListConfig = {
|
||||
pageTitle: 'مدیریت حسابهای مشتری',
|
||||
pageTitle: 'مدیریت حسابهای مودی',
|
||||
addNewCtaLabel: 'افزودن حساب',
|
||||
emptyPlaceholderTitle: 'حسابی یافت نشد',
|
||||
emptyPlaceholderDescription: 'برای افزودن حساب، روی دکمهٔ بالا کلیک کنید.',
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { IListConfig } from './list-config.model';
|
||||
|
||||
export const consumerListConfig: IListConfig = {
|
||||
pageTitle: 'مدیریت مشتریها',
|
||||
addNewCtaLabel: 'افزودن مشتری',
|
||||
emptyPlaceholderTitle: 'مشتریای یافت نشد',
|
||||
emptyPlaceholderDescription: 'برای افزودن مشتری، روی دکمهٔ بالا کلیک کنید.',
|
||||
pageTitle: 'مدیریت مودیان',
|
||||
addNewCtaLabel: 'افزودن مودی',
|
||||
emptyPlaceholderTitle: 'مودیای یافت نشد',
|
||||
emptyPlaceholderDescription: 'برای افزودن مودی، روی دکمهٔ بالا کلیک کنید.',
|
||||
columns: [
|
||||
{ field: 'name', header: 'عنوان' },
|
||||
{
|
||||
@@ -16,7 +16,7 @@ export const consumerListConfig: IListConfig = {
|
||||
},
|
||||
{
|
||||
field: 'partner',
|
||||
header: 'ارایهدهنده',
|
||||
header: 'PSP',
|
||||
type: 'nested',
|
||||
nestedOption: { path: 'partner.name' },
|
||||
},
|
||||
|
||||
@@ -8,7 +8,7 @@ export const licenseListConfig: IListConfig = {
|
||||
columns: [
|
||||
{
|
||||
field: 'consumer',
|
||||
header: 'مشتری',
|
||||
header: 'مودی',
|
||||
customDataModel(item: any) {
|
||||
return `${item.consumer.first_name} ${item.consumer.last_name}`;
|
||||
},
|
||||
|
||||
@@ -2,9 +2,9 @@ import { IListConfig } from './list-config.model';
|
||||
|
||||
export const partnerListConfig: IListConfig = {
|
||||
pageTitle: 'مدیریت ارایهدهندگان',
|
||||
addNewCtaLabel: 'افزودن ارایهدهنده',
|
||||
addNewCtaLabel: 'افزودن PSP',
|
||||
emptyPlaceholderTitle: 'ارایهدهندگانای یافت نشد',
|
||||
emptyPlaceholderDescription: 'برای افزودن ارایهدهنده، روی دکمهٔ بالا کلیک کنید.',
|
||||
emptyPlaceholderDescription: 'برای افزودن PSP، روی دکمهٔ بالا کلیک کنید.',
|
||||
columns: [
|
||||
{ field: 'name', header: 'عنوان' },
|
||||
{ field: 'code', header: 'کد' },
|
||||
|
||||
@@ -12,7 +12,7 @@ export const posListConfig: IListConfig = {
|
||||
{ field: 'device', header: 'دستگاه', type: 'nested', nestedOption: { path: 'device.name' } },
|
||||
{
|
||||
field: 'provider',
|
||||
header: 'ارایهدهنده',
|
||||
header: 'PSP',
|
||||
type: 'nested',
|
||||
nestedOption: { path: 'provider.name' },
|
||||
},
|
||||
|
||||
@@ -13,5 +13,5 @@ export const AccountTypeTranslates = {
|
||||
CONSUMER: 'مصرف کننده',
|
||||
SUPER_ADMIN: 'مدیر کل سیستم',
|
||||
ADMIN: 'مدیر',
|
||||
PROVIDER: 'ارایهدهنده',
|
||||
PROVIDER: 'PSP',
|
||||
} as Record<AccountType, string>;
|
||||
|
||||
@@ -9,6 +9,18 @@ body {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
html.application-pos,
|
||||
body.application-pos {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
body.application-pos {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@ export const environment = {
|
||||
production: false,
|
||||
// apiBaseUrl: 'http://194.59.214.243:5002',
|
||||
// apiBaseUrl: 'http://192.168.128.73:5002',
|
||||
// apiBaseUrl: 'http://localhost:5002',
|
||||
apiBaseUrl: 'https://psp-api.shift-am.ir',
|
||||
apiBaseUrl: 'http://localhost:5002',
|
||||
// apiBaseUrl: 'https://psp-api.shift-am.ir',
|
||||
// host: 'http://194.59.214.243',
|
||||
host: 'localhost',
|
||||
port: 5000,
|
||||
|
||||
@@ -17,6 +17,7 @@ if (themeMeta) {
|
||||
}
|
||||
|
||||
if (config.isPosApplication) {
|
||||
document.documentElement.classList.add('application-pos');
|
||||
document.body.classList.add('application-pos');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user