feat: update ngsw-config.json for app version and build details; refactor invoice components for improved structure and functionality
This commit is contained in:
+1
-1
@@ -13,6 +13,6 @@
|
||||
</ng-template>
|
||||
|
||||
<ng-template #status let-item>
|
||||
<p-badge value="ارسال نشده" severity="danger" />
|
||||
<catalog-tax-provider-status-tag [status]="item.status.value" [translate]="item.status.translate" />
|
||||
</ng-template>
|
||||
</app-page-data-list>
|
||||
|
||||
+12
-2
@@ -1,9 +1,9 @@
|
||||
import { consumerSaleInvoicesNamedRoutes } from '@/domains/consumer/modules/saleInvoices/constants';
|
||||
import { AbstractList } from '@/shared/abstractClasses';
|
||||
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog';
|
||||
import { PageDataListComponent } from '@/shared/components/pageDataList/page-data-list.component';
|
||||
import { Component, inject, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { Router, RouterLink } from '@angular/router';
|
||||
import { Badge } from 'primeng/badge';
|
||||
import { ButtonDirective } from 'primeng/button';
|
||||
import { IStatisticsSaleInvoicesResponse } from '../../../models';
|
||||
import { CustomerStatisticsService } from '../../../services/main.service';
|
||||
@@ -11,7 +11,12 @@ import { CustomerStatisticsService } from '../../../services/main.service';
|
||||
@Component({
|
||||
selector: 'consumer-statistics-latest-Invoices',
|
||||
templateUrl: './latest-Invoices.component.html',
|
||||
imports: [PageDataListComponent, ButtonDirective, RouterLink, Badge],
|
||||
imports: [
|
||||
PageDataListComponent,
|
||||
ButtonDirective,
|
||||
RouterLink,
|
||||
CatalogTaxProviderStatusTagComponent,
|
||||
],
|
||||
})
|
||||
export class ConsumerStatisticsLatestInvoicesComponent extends AbstractList<IStatisticsSaleInvoicesResponse> {
|
||||
@ViewChild('status', { static: true }) status!: TemplateRef<any>;
|
||||
@@ -38,6 +43,11 @@ export class ConsumerStatisticsLatestInvoicesComponent extends AbstractList<ISta
|
||||
type: 'nested',
|
||||
nestedOption: { path: 'consumer_account.account.username' },
|
||||
},
|
||||
{
|
||||
field: 'invoice_date',
|
||||
header: 'تاریخ فاکتور',
|
||||
type: 'dateTime',
|
||||
},
|
||||
{ field: 'status', header: 'وضعیت صدور', customDataModel: this.status },
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,13 +1,23 @@
|
||||
import ISummary from '@/core/models/summary';
|
||||
import { TspProviderResponseStatus } from '@/shared/catalog';
|
||||
|
||||
export interface IStatisticsSaleInvoicesRawResponse {
|
||||
id: string;
|
||||
code: string;
|
||||
created_at: string;
|
||||
created_date?: string;
|
||||
invoice_date: string;
|
||||
invoice_number: number;
|
||||
main_id?: string;
|
||||
total_amount: string;
|
||||
pos: Pos;
|
||||
tax_id?: string;
|
||||
type: string;
|
||||
notes?: string;
|
||||
created_at: string;
|
||||
reference_invoice?: string;
|
||||
consumer_account: ConsumerAccount;
|
||||
pos: Pos;
|
||||
status: Status;
|
||||
customer: Customer;
|
||||
status: IEnumTranslate<TspProviderResponseStatus>;
|
||||
}
|
||||
export interface IStatisticsSaleInvoicesResponse extends IStatisticsSaleInvoicesRawResponse {}
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
<div class="flex gap-10">
|
||||
<div class="h-75 flex w-full">
|
||||
<consumer-statistics-latest-Invoices class="w-full" />
|
||||
</div>
|
||||
<consumer-statistics-latest-Invoices class="w-full" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user