feat: Refactor sale invoice store to use new response model and improve state management
fix: Update single component to correctly bind invoice data feat: Enhance partner info model with detailed license status refactor: Simplify account list component by removing unnecessary details fix: Correctly reference username in consumer account form feat: Add POS related fields to consumer account list chore: Update models to include charge account details for partners feat: Implement charge account dialog for partner consumers feat: Create API routes for accounts charge functionality feat: Add charge account service for handling requests feat: Introduce license info template component for dashboard refactor: Update dashboard view to display license information fix: Improve layout component to handle POS information more effectively chore: Clean up unused imports and components in various files feat: Add loading state handling in landing views feat: Implement charge account form dialog for partner consumers
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
|
||||
import { PageLoadingComponent } from '@/shared/components/page-loading.component';
|
||||
import {
|
||||
IColumn,
|
||||
PageDataListComponent,
|
||||
} from '@/shared/components/pageDataList/page-data-list.component';
|
||||
import { PriceMaskDirective } from '@/shared/directives';
|
||||
import { UikitEmptyStateComponent } from '@/uikit';
|
||||
import { getGoodUnitTypeProperties } from '@/utils';
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { Badge } from 'primeng/badge';
|
||||
import { ButtonDirective } from 'primeng/button';
|
||||
import { Divider } from 'primeng/divider';
|
||||
import { TableModule } from 'primeng/table';
|
||||
import { ISaleInvoiceFullResponse } from '../../models';
|
||||
|
||||
export type TConsumerSaleInvoice = 'full' | 'customer' | 'pos';
|
||||
|
||||
@@ -23,15 +28,20 @@ export type TConsumerSaleInvoice = 'full' | 'customer' | 'pos';
|
||||
ButtonDirective,
|
||||
PageDataListComponent,
|
||||
TableModule,
|
||||
PageLoadingComponent,
|
||||
UikitEmptyStateComponent,
|
||||
PriceMaskDirective,
|
||||
],
|
||||
})
|
||||
export class ConsumerSaleInvoiceSharedComponent {
|
||||
@Input({ required: true }) loading!: boolean;
|
||||
@Input({ required: true }) invoice!: any;
|
||||
@Input() invoice?: Maybe<ISaleInvoiceFullResponse>;
|
||||
@Input() variant: TConsumerSaleInvoice = 'full';
|
||||
|
||||
@Output() onRefresh = new EventEmitter<void>();
|
||||
|
||||
@ViewChild('totalAmount', { static: false }) totalAmount!: TemplateRef<any>;
|
||||
|
||||
printInvoice = () => {
|
||||
window.print();
|
||||
};
|
||||
@@ -66,6 +76,7 @@ export class ConsumerSaleInvoiceSharedComponent {
|
||||
field: 'total_amount',
|
||||
header: 'قیمت نهایی',
|
||||
type: 'price',
|
||||
// customDataModel: this.totalAmount,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -76,13 +87,13 @@ export class ConsumerSaleInvoiceSharedComponent {
|
||||
type: 'price',
|
||||
},
|
||||
{
|
||||
field: 'profit',
|
||||
header: 'سود',
|
||||
field: 'wages',
|
||||
header: 'اجرت',
|
||||
type: 'price',
|
||||
},
|
||||
{
|
||||
field: 'wages',
|
||||
header: 'اجرت',
|
||||
field: 'profit',
|
||||
header: 'سود',
|
||||
type: 'price',
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user