Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { Maybe } from '@/core';
|
||||
import { NativeBridgeService } from '@/core/services';
|
||||
import { CatalogTaxProviderStatusTagComponent } from '@/shared/catalog';
|
||||
import { AppCardComponent, KeyValueComponent } from '@/shared/components';
|
||||
@@ -46,7 +47,7 @@ export class ConsumerSaleInvoiceSharedComponent {
|
||||
private readonly nativeBridge = inject(NativeBridgeService);
|
||||
|
||||
@Input({ required: true }) loading!: boolean;
|
||||
@Input({ required: true }) invoice!: ISaleInvoiceFullResponse;
|
||||
@Input() invoice!: Maybe<ISaleInvoiceFullResponse>;
|
||||
@Input() variant: TConsumerSaleInvoice = 'full';
|
||||
@Input() backRoute?: UrlTree | string | any[];
|
||||
|
||||
@@ -55,7 +56,7 @@ export class ConsumerSaleInvoiceSharedComponent {
|
||||
@ViewChild('totalAmount', { static: false }) totalAmount!: TemplateRef<any>;
|
||||
|
||||
printInvoice = () => {
|
||||
if (this.nativeBridge.isEnabled()) {
|
||||
if (this.nativeBridge.isEnabled() && this.invoice) {
|
||||
const result = this.nativeBridge.print({
|
||||
title: 'salam',
|
||||
items: [
|
||||
|
||||
Reference in New Issue
Block a user