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:
@@ -0,0 +1,51 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<app-card-data cardTitle="اطلاعات مشتری" [editable]="true" [(editMode)]="editMode">
|
||||
<ng-template #moreActions> </ng-template>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="grid grid-cols-3 gap-4 items-center">
|
||||
<app-key-value label="نام مشتری" [value]="consumer()?.fullname" />
|
||||
<app-key-value label="شماره موبایل" [value]="consumer()?.mobile_number" />
|
||||
<app-key-value label="وضعیت" [value]="consumer()?.status" />
|
||||
@if (licenseStatus() === "EXPIRED") {
|
||||
<app-key-value label="وضعیت لایسنس">
|
||||
<p-button size="small" outlined severity="warn" (onClick)="openLicenseForm()">
|
||||
منقضی شده در <span [jalaliDate]="license()!.expires_at"></span>
|
||||
</p-button>
|
||||
</app-key-value>
|
||||
<!-- <app-key-value label="ارایه شده توسط" [value]="license()?.partner?.name || 'برند نرمافزار'" /> -->
|
||||
} @else if (licenseStatus() === "ACTIVE") {
|
||||
<app-key-value label="وضعیت لایسنس">
|
||||
<p-button size="small" outlined severity="success" (onClick)="openLicenseForm()">
|
||||
تا تاریخ <span [jalaliDate]="license()!.expires_at"></span>
|
||||
</p-button>
|
||||
</app-key-value>
|
||||
<!-- <app-key-value label="ارایه شده توسط" [value]="license()?.partner?.name || 'برند نرمافزار'" /> -->
|
||||
} @else {
|
||||
<app-key-value label="وضعیت لایسنس">
|
||||
<p-button size="small" outlined severity="danger" (onClick)="openLicenseForm()"> ارایه نشده </p-button>
|
||||
</app-key-value>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<partner-consumer-account-list [consumerId]="consumerId()" />
|
||||
<partner-consumer-businessActivities-list [consumerId]="consumerId()" />
|
||||
|
||||
<partner-consumer-form
|
||||
[(visible)]="editMode"
|
||||
[editMode]="true"
|
||||
[consumerId]="consumerId()"
|
||||
[initialValues]="consumer() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
|
||||
<partner-consumer-license-form
|
||||
[(visible)]="visibleLicenseForm"
|
||||
[editMode]="!!license()?.id"
|
||||
[consumerId]="consumerId()"
|
||||
[licenseId]="license()?.id"
|
||||
[initialValues]="license() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
</div>
|
||||
Reference in New Issue
Block a user