feat: update invoice components and add correction payment dialog
Production CI / validate-and-build (push) Failing after 1m1s
Production CI / validate-and-build (push) Failing after 1m1s
- Updated return form instructions for clarity. - Refined labels in sale invoice info card for consistency. - Enhanced sale invoice view with a correction payment dialog for increased user interaction. - Improved invoice print preparation utility for better data handling. - Adjusted paginator component for first and last page navigation. - Modified layout styles for better responsiveness and user experience. - Updated environment configurations for different setups.
This commit is contained in:
@@ -4,14 +4,13 @@
|
||||
[modal]="true"
|
||||
[style]="{ width: '500px' }"
|
||||
[closable]="true"
|
||||
(onHide)="close()"
|
||||
>
|
||||
(onHide)="close()">
|
||||
<form [formGroup]="form" (submit)="submit()" class="flex flex-col gap-4">
|
||||
<field-name [control]="form.controls.name" />
|
||||
<field-serial-number [control]="form.controls.serial_number" />
|
||||
<!-- <app-input label="مدل دستگاه" [control]="form.controls.model" name="model" /> -->
|
||||
<field-pos-type [control]="form.controls.pos_type" />
|
||||
@if (form.controls.pos_type.value === "PSP") {
|
||||
<!-- <field-pos-type [control]="form.controls.pos_type" /> -->
|
||||
@if (form.controls.pos_type.value === 'PSP') {
|
||||
<field-device-id [control]="form.controls.device_id" />
|
||||
<field-provider-id [control]="form.controls.provider_id" />
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { AbstractFormDialog } from '@/shared/abstractClasses';
|
||||
import {
|
||||
DeviceIdComponent,
|
||||
NameComponent,
|
||||
PosTypeComponent,
|
||||
ProviderIdComponent,
|
||||
SerialNumberComponent,
|
||||
} from '@/shared/components';
|
||||
@@ -25,7 +24,6 @@ import { AdminPosesService } from '../../services/poses.service';
|
||||
FormFooterActionsComponent,
|
||||
DeviceIdComponent,
|
||||
ProviderIdComponent,
|
||||
PosTypeComponent,
|
||||
SerialNumberComponent,
|
||||
],
|
||||
})
|
||||
@@ -42,7 +40,7 @@ export class ConsumerPosFormComponent extends AbstractFormDialog<IPosRequest, IP
|
||||
name: fieldControl.name(this.initialValues?.name || ''),
|
||||
serial_number: fieldControl.serial_number(this.initialValues?.serial_number || '', true),
|
||||
// model: [this.initialValues?.model || '', [Validators.required]],
|
||||
pos_type: fieldControl.pos_type(this.initialValues?.pos_type || ''),
|
||||
pos_type: fieldControl.pos_type(this.initialValues?.pos_type || 'PSP'),
|
||||
device_id: fieldControl.device_id(this.initialValues?.device?.id || ''),
|
||||
provider_id: fieldControl.provider_id(this.initialValues?.provider?.id || ''),
|
||||
});
|
||||
@@ -54,7 +52,7 @@ export class ConsumerPosFormComponent extends AbstractFormDialog<IPosRequest, IP
|
||||
this.fb.control<string>(this.initialValues?.device?.id ?? '', {
|
||||
nonNullable: true,
|
||||
validators: fieldControl.device_id('', true)[1],
|
||||
}),
|
||||
})
|
||||
);
|
||||
// @ts-ignore
|
||||
form.addControl(
|
||||
@@ -62,7 +60,7 @@ export class ConsumerPosFormComponent extends AbstractFormDialog<IPosRequest, IP
|
||||
this.fb.control<string>(this.initialValues?.provider?.id ?? '', {
|
||||
nonNullable: true,
|
||||
validators: fieldControl.provider_id('', true)[1],
|
||||
}),
|
||||
})
|
||||
);
|
||||
} else {
|
||||
// @ts-ignore
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<app-page-data-list
|
||||
pageTitle="لیست پایانههای فروش"
|
||||
pageTitle="پایانههای فروش"
|
||||
[columns]="columns"
|
||||
emptyPlaceholderTitle="پایانه فروشی یافت نشد."
|
||||
[items]="items()"
|
||||
[loading]="loading()"
|
||||
[showDetails]="true"
|
||||
(onDetails)="toSinglePage($event)"
|
||||
(onRefresh)="refresh()"
|
||||
>
|
||||
(onRefresh)="refresh()">
|
||||
</app-page-data-list>
|
||||
<superAdmin-consumer-pos-form
|
||||
[(visible)]="visibleForm"
|
||||
@@ -17,5 +16,4 @@
|
||||
[complexId]="complexId"
|
||||
[posId]="selectedItemForEdit()?.id || ''"
|
||||
[initialValues]="selectedItemForEdit() || undefined"
|
||||
(onSubmit)="refresh()"
|
||||
/>
|
||||
(onSubmit)="refresh()" />
|
||||
|
||||
+2
-3
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات فعالیت اقتصادی" [(editMode)]="editMode">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
@@ -19,6 +19,5 @@
|
||||
[consumerId]="consumerId()"
|
||||
[businessActivityId]="businessId()"
|
||||
[initialValues]="businessActivity() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات شعبه" [(editMode)]="editMode">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
@@ -18,6 +18,5 @@
|
||||
[businessActivityId]="businessId()"
|
||||
[complexId]="complexId()"
|
||||
[initialValues]="complex() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات پایانه فروش" [(editMode)]="editMode">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
@@ -15,6 +15,5 @@
|
||||
[complexId]="complexId()"
|
||||
[posId]="posId()"
|
||||
[initialValues]="pos() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<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" />
|
||||
@if (consumer()?.type?.value === "LEGAL") {
|
||||
@if (consumer()?.type?.value === 'LEGAL') {
|
||||
<app-key-value label="شناسه ملی" [value]="consumer()?.legal?.registration_code" />
|
||||
} @else {
|
||||
<app-key-value label="شماره موبایل" [value]="consumer()?.individual?.mobile_number" />
|
||||
@@ -28,6 +28,5 @@
|
||||
[editMode]="true"
|
||||
[consumerId]="consumerId()"
|
||||
[initialValues]="consumer() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات صنف" [editable]="true" [(editMode)]="editMode">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
@@ -8,13 +8,13 @@
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-guild-good-categories-list [guildId]="guildId()" [showAllBtn]="true" class="w-full" />
|
||||
</div>
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-guild-goods-list [guildId]="guildId()" [showAllBtn]="true" class="w-full" />
|
||||
</div>
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-guild-stock-keeping-units-list [guildId]="guildId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
@@ -23,6 +23,5 @@
|
||||
[editMode]="true"
|
||||
[guildId]="guildId()"
|
||||
[initialValues]="guild() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات شریک تجاری" [editable]="true" [(editMode)]="editMode">
|
||||
<ng-template #moreActions>
|
||||
<p-button outlined size="small" (onClick)="openChargeAccountDialog()"> شارژ کاربر </p-button>
|
||||
@@ -9,7 +9,7 @@
|
||||
<app-key-value label="عنوان" [value]="partner()?.name" />
|
||||
<app-key-value label="کد" [value]="partner()?.code" />
|
||||
|
||||
<div class="col-span-3 grid grid-cols-3 gap-4 mt-6">
|
||||
<div class="col-span-3 mt-6 grid grid-cols-3 gap-4">
|
||||
<partner-license-info-template
|
||||
title="لایسنسها"
|
||||
[total]="partner()?.licenses_status?.total || 0"
|
||||
@@ -19,8 +19,7 @@
|
||||
(partner()?.licenses_status?.total || 0) -
|
||||
(partner()?.licenses_status?.used || 0) -
|
||||
(partner()?.licenses_status?.expired || 0)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
|
||||
<partner-license-info-template
|
||||
title="شارژ کاربران"
|
||||
@@ -31,8 +30,7 @@
|
||||
(partner()?.account_quota_status?.total || 0) -
|
||||
(partner()?.account_quota_status?.used || 0) -
|
||||
(partner()?.account_quota_status?.expired || 0)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
|
||||
<partner-license-info-template
|
||||
title="تمدید لایسنسها"
|
||||
@@ -43,8 +41,7 @@
|
||||
(partner()?.license_renew_status?.total || 0) -
|
||||
(partner()?.license_renew_status?.used || 0) -
|
||||
(partner()?.license_renew_status?.expired || 0)
|
||||
"
|
||||
/>
|
||||
" />
|
||||
</div>
|
||||
<!--
|
||||
<p-divider align="center" class="col-span-3">اطلاعات لایسنسها</p-divider>
|
||||
@@ -98,19 +95,19 @@
|
||||
</div>
|
||||
</app-card-data>
|
||||
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-partner-licenses [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-partner-chargeLicenseTransaction-list [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<admin-partner-chargeAccount-list [partnerId]="partnerId()" class="w-full"></admin-partner-chargeAccount-list>
|
||||
</div>
|
||||
|
||||
<div class="max-h-125 flex">
|
||||
<div class="flex max-h-125">
|
||||
<superAdmin-partner-account-list [partnerId]="partnerId()" class="w-full" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -120,17 +117,14 @@
|
||||
[editMode]="true"
|
||||
[partnerId]="partnerId()"
|
||||
[initialValues]="partner() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
|
||||
<partner-charge-license-form-dialog
|
||||
[(visible)]="visibleChargeFormDialog"
|
||||
[partnerId]="partnerId()"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
|
||||
<admin-partner-charge-account-form-dialog
|
||||
[(visible)]="visibleChargeAccountFormDialog"
|
||||
[partnerId]="partnerId()"
|
||||
(onSubmit)="getData()"
|
||||
></admin-partner-charge-account-form-dialog>
|
||||
(onSubmit)="getData()"></admin-partner-charge-account-form-dialog>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-6">
|
||||
<div class="flex flex-col gap-4">
|
||||
<app-card-data cardTitle="اطلاعات کاربر" [editable]="true" [(editMode)]="editMode">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="listKeyValue">
|
||||
@@ -15,6 +15,5 @@
|
||||
[editMode]="true"
|
||||
[userId]="userId()"
|
||||
[initialValues]="user() || undefined"
|
||||
(onSubmit)="getData()"
|
||||
/>
|
||||
(onSubmit)="getData()" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user