set loading in correction and return form

This commit is contained in:
2026-06-17 09:21:20 +03:30
parent b57d6b4e4b
commit e5f53c2265
5 changed files with 6 additions and 2 deletions
@@ -5,6 +5,8 @@
[sendToTspLoading]="sendToTspLoading()" [sendToTspLoading]="sendToTspLoading()"
[inquiryLoading]="inquiryLoading()" [inquiryLoading]="inquiryLoading()"
[resendToTspLoading]="resendToTspLoading()" [resendToTspLoading]="resendToTspLoading()"
[correctionLoading]="correctionLoading()"
[returnFromSaleLoading]="backFromSaleLoading()"
(onSendToTsp)="sendToTsp()" (onSendToTsp)="sendToTsp()"
(onResendToTsp)="resendToTsp()" (onResendToTsp)="resendToTsp()"
(onInquiry)="inquiry()" (onInquiry)="inquiry()"
@@ -43,7 +43,7 @@
<pos-order-price-info-card [info]="totalPriceInfo" /> <pos-order-price-info-card [info]="totalPriceInfo" />
<app-form-footer-actions [loading]="submitLoading()" (onCancel)="close()" /> <app-form-footer-actions [loading]="loading || submitLoading()" (onCancel)="close()" />
</form> </form>
<shared-light-bottomsheet <shared-light-bottomsheet
@@ -42,6 +42,7 @@ export class SharedCorrectionFormComponent extends AbstractForm<
@Input() beforeSubmit?: (payload: CorrectionInvoiceFormValue) => Promise<boolean> | boolean; @Input() beforeSubmit?: (payload: CorrectionInvoiceFormValue) => Promise<boolean> | boolean;
@Input({ required: true }) invoiceDate!: string; @Input({ required: true }) invoiceDate!: string;
@Input() visible = false; @Input() visible = false;
@Input() loading = false;
form = this.fb.group({ form = this.fb.group({
invoice_date: [this.invoiceDate], invoice_date: [this.invoiceDate],
@@ -22,5 +22,5 @@
<pos-order-price-info-card [info]="totalPriceInfo" /> <pos-order-price-info-card [info]="totalPriceInfo" />
<app-form-footer-actions (onCancel)="close()" /> <app-form-footer-actions [loading]="loading || submitLoading()" (onCancel)="close()" />
</form> </form>
@@ -50,6 +50,7 @@
[initialValues]="invoice.items" [initialValues]="invoice.items"
[invoiceDate]="invoice.invoice_date" [invoiceDate]="invoice.invoice_date"
[beforeSubmit]="beforeCorrectionSubmitHandler.bind(this)" [beforeSubmit]="beforeCorrectionSubmitHandler.bind(this)"
[loading]="correctionLoading || false"
(onSubmit)="correctionSubmit($event)" (onSubmit)="correctionSubmit($event)"
(onClose)="cancelCorrection()" /> (onClose)="cancelCorrection()" />
</shared-light-bottomsheet> </shared-light-bottomsheet>