This commit is contained in:
2026-04-23 01:22:44 +03:30
parent e027b89173
commit 57f333f5b8
43 changed files with 16222 additions and 2847 deletions
@@ -21,7 +21,7 @@ export class ConsumerBusinessActivityListComponent extends AbstractList<IBusines
@Input() header: IColumn[] = [
{ field: 'id', header: 'شناسه', type: 'id' },
{ field: 'name', header: 'عنوان' },
{ field: 'guild', header: 'صنف', type: 'nested', nestedPath: 'name' },
{ field: 'guild', header: 'صنف', type: 'nested', nestedPath: 'guild.name' },
{
field: 'created_at',
header: 'تاریخ ایجاد',
@@ -1,6 +1,6 @@
<div class="flex flex-col gap-6">
<app-card-data cardTitle="اطلاعات پایانه‌ی فروش" [editable]="true" [(editMode)]="editMode">
<ng-template #moreAction>
<ng-template #moreActions>
<p-button type="button" variant="outlined" (onClick)="toPosLanding()"> ورود به پایانه </p-button>
</ng-template>
<div class="flex flex-col gap-4">
@@ -1,6 +1,6 @@
<div class="flex flex-col gap-6">
<app-card-data cardTitle="اطلاعات فعالیت اقتصادی" [editable]="true" [(editMode)]="editMode">
<ng-template #moreAction> </ng-template>
<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]="business()?.name" />
@@ -1,38 +1 @@
<div class="flex flex-col gap-6">
<app-card-data cardTitle="اطلاعات فاکتور" [editable]="false" [(editMode)]="editMode">
<div class="flex flex-col gap-4">
<div class="grid grid-cols-3 gap-4 items-center">
<app-key-value label="کد رهگیری" [value]="invoice()?.code" />
<app-key-value label="تاریخ فاکتور" [value]="invoice()?.invoice_date" type="dateTime" />
<app-key-value label="تاریخ ایجاد فاکتور" [value]="invoice()?.created_at" type="dateTime" />
<app-key-value label="وضعیت صدور به سامانه‌ی مودیان">
<p-badge value="ارسال نشده" severity="danger" />
</app-key-value>
<div class="col-span-3">
<app-key-value label="توضیحات" [value]="invoice()?.notes" />
</div>
</div>
<p-divider align="center"> اطلاعات پرداخت </p-divider>
<div class="grid grid-cols-3 gap-4 items-center">
<app-key-value label="مجموع قابل پرداخت" [value]="invoice()?.total_amount" type="price" />
@for (payment of invoice()?.payments; track $index) {
<app-key-value
[label]="
`${payment.payment_method === 'SET_OF' ? 'تهاتر' : payment.payment_method === 'TERMINAL' ? 'پایانه' : 'نقدی'}`
"
[value]="payment.amount"
type="price"
/>
}
</div>
<p-divider align="center"> اطلاعات صادر کننده </p-divider>
<div class="grid grid-cols-3 gap-4 items-center">
<app-key-value label="کسب و کار" [value]="invoice()?.pos!.complex.business_activity.name" />
<app-key-value label="مجموعه" [value]="invoice()?.pos!.complex.name" />
<app-key-value label="پایانه‌ی فروش" [value]="invoice()?.pos!.name" />
<app-key-value label="ایجاد کننده" [value]="invoice()?.consumer_account?.account?.username" />
</div>
</div>
</app-card-data>
</div>
<consumer-saleInvoice-shared [loading]="loading()" [invoice]="invoice" variant="customer" />
@@ -1,17 +1,15 @@
import { BreadcrumbService } from '@/core/services';
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
import { ConsumerSaleInvoiceSharedComponent } from '@/domains/consumer/components/invoices/shared-saleInvoice.component';
import pageParamsUtils from '@/utils/page-params.utils';
import { Component, computed, effect, inject, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Badge } from 'primeng/badge';
import { Divider } from 'primeng/divider';
import { ConsumerCustomerStore } from '../../store/customer.store';
import { ConsumerCustomerSaleInvoiceStore } from '../../store/saleInvoice.store';
@Component({
selector: 'consumer-customer-saleInvoice',
templateUrl: './single.component.html',
imports: [AppCardComponent, KeyValueComponent, Divider, Badge],
imports: [ConsumerSaleInvoiceSharedComponent],
})
export class ConsumerCustomerSaleInvoiceComponent {
private readonly route = inject(ActivatedRoute);
@@ -25,6 +23,7 @@ export class ConsumerCustomerSaleInvoiceComponent {
editMode = signal<boolean>(false);
readonly invoice = computed(() => this.store.entity());
readonly loading = computed(() => this.store.loading());
constructor() {
effect(() => {
@@ -1,6 +1,6 @@
<div class="flex flex-col gap-6">
<app-card-data cardTitle="اطلاعات پایانه‌ی فروش" [editable]="true" [(editMode)]="editMode">
<ng-template #moreAction>
<ng-template #moreActions>
<p-button type="button" variant="outlined" (onClick)="toPosLanding()"> ورود به پایانه </p-button>
</ng-template>
<div class="flex flex-col gap-4">
@@ -1,5 +1,5 @@
import { BreadcrumbService } from '@/core/services';
import { ConsumerSaleInvoiceSharedComponent } from '@/domains/consumer/components/invoices/single.component';
import { ConsumerSaleInvoiceSharedComponent } from '@/domains/consumer/components/invoices/shared-saleInvoice.component';
import pageParamsUtils from '@/utils/page-params.utils';
import { Component, computed, effect, inject, signal } from '@angular/core';
import { ActivatedRoute } from '@angular/router';