feat(consumers): implement consumer and POS stores with breadcrumb management

- Added ConsumerStore and PosStore to manage state and data fetching for consumers and POS entities.
- Implemented breadcrumb functionality in both stores to enhance navigation.
- Created views for consumer accounts, business activities, complexes, and poses with respective components.
- Developed single view components for detailed display and editing of consumer and POS data.
- Introduced charge account management components in the super admin module, including forms and lists for charge transactions.
- Established API routes and services for handling charge account transactions.
This commit is contained in:
2026-04-23 20:59:48 +03:30
parent 57f333f5b8
commit e58bcbef57
119 changed files with 2917 additions and 52 deletions
@@ -1,12 +1,14 @@
<div class="flex flex-col gap-6">
<app-card-data cardTitle="اطلاعات شریک تجاری" [editable]="true" [(editMode)]="editMode">
<ng-template #moreActions>
<p-button outlined size="small" (onClick)="openChargeAccountDialog()"> شارژ کاربر </p-button>
<p-button outlined size="small" (onClick)="openChargeDialog()"> شارژ لایسنس‌ </p-button>
</ng-template>
<div class="flex flex-col gap-4">
<div class="grid grid-cols-3 gap-4 items-center">
<app-key-value label="عنوان شریک تجاری" [value]="partner()?.name" />
<app-key-value label="کد شریک تجاری" [value]="partner()?.code" />
<p-divider align="center" class="col-span-3">اطلاعات لایسنس‌ها</p-divider>
<app-key-value label="تعداد لایسنس‌های خریداری شده" [value]="partner()?.licenses_status?.total" />
<app-key-value label="تعداد لایسنس‌های منقضی شده" [value]="partner()?.licenses_status?.expired" />
<app-key-value label="تعداد لایسنس‌های فروخته شده" [value]="partner()?.licenses_status?.used" />
@@ -18,6 +20,18 @@
(partner()?.licenses_status?.expired || 0)
"
/>
<p-divider align="center" class="col-span-3">اطلاعات شارژ کاربران</p-divider>
<app-key-value label="تعداد کاربران خریداری شده" [value]="partner()?.account_quota_status?.total" />
<app-key-value label="تعداد کاربران منقضی شده" [value]="partner()?.account_quota_status?.expired" />
<app-key-value label="تعداد کاربران فروخته شده" [value]="partner()?.account_quota_status?.used" />
<app-key-value
label="تعداد کاربران باقی‌مانده"
[value]="
(partner()?.account_quota_status?.total || 0) -
(partner()?.account_quota_status?.used || 0) -
(partner()?.account_quota_status?.expired || 0)
"
/>
</div>
</div>
</app-card-data>
@@ -30,6 +44,10 @@
<admin-partner-chargeLicenseTransaction-list [partnerId]="partnerId()" class="w-full" />
</div>
<div class="max-h-125 flex">
<admin-partner-chargeAccount-list [partnerId]="partnerId()" class="w-full"></admin-partner-chargeAccount-list>
</div>
<div class="max-h-125 flex">
<superAdmin-partner-account-list [partnerId]="partnerId()" class="w-full" />
</div>
@@ -48,3 +66,9 @@
[partnerId]="partnerId()"
(onSubmit)="getData()"
/>
<partner-charge-account-form-dialog
[(visible)]="visibleChargeAccountFormDialog"
[partnerId]="partnerId()"
(onSubmit)="getData()"
></partner-charge-account-form-dialog>