Refactor code structure for improved readability and maintainability

This commit is contained in:
2026-05-07 23:28:12 +03:30
parent b2a1eb8e5b
commit ce40bd8c75
54 changed files with 260 additions and 183 deletions
@@ -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: [