update
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<button
|
||||
pButton
|
||||
type="button"
|
||||
label="چاپ"
|
||||
label="چاپ کن"
|
||||
icon="pi pi-print"
|
||||
outlined
|
||||
size="small"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { NativeBridgeService } from '@/core/services';
|
||||
import { ToastService } from '@/core/services/toast.service';
|
||||
import { PosInfoStore } from '@/domains/pos/store';
|
||||
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog';
|
||||
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
|
||||
@@ -47,6 +48,7 @@ export type TSaleInvoiceSingleViewVariant = 'full' | 'customer' | 'pos';
|
||||
export class SharedSaleInvoiceSingleViewComponent {
|
||||
private readonly nativeBridge = inject(NativeBridgeService);
|
||||
private readonly posInfoStore = inject(PosInfoStore);
|
||||
private readonly toastService = inject(ToastService);
|
||||
|
||||
@Input({ required: true }) loading!: boolean;
|
||||
@Input() invoice!: Maybe<ISaleInvoiceFullResponse>;
|
||||
@@ -66,6 +68,7 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
});
|
||||
|
||||
printInvoice = () => {
|
||||
try {
|
||||
if (this.invoice) {
|
||||
this.nativeBridge.print([
|
||||
{
|
||||
@@ -143,6 +146,11 @@ export class SharedSaleInvoiceSingleViewComponent {
|
||||
},
|
||||
]);
|
||||
}
|
||||
} catch (error) {
|
||||
return this.toastService.error({
|
||||
text: 'چاپ صورتحساب با خطا مواجه شد. لطفا دوباره تلاش کنید.',
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
columns: IColumn[] = [
|
||||
|
||||
Reference in New Issue
Block a user