Merged PR 1751: #4617 Fix Always Show Modal on Ipad, Fixed Loading Spinner Bug after Modal Close

#4617 Fix Always Show Modal on Ipad, Fixed Loading Spinner Bug after Modal Close
This commit is contained in:
Nino Righi
2024-02-21 17:02:38 +00:00
committed by Lorenz Hilpert
parent fdf50fe11e
commit a6142a5d86
3 changed files with 5 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ export class PrintCompartmentLabelActionHandler extends ActionHandler<OrderItems
if (Array.isArray(printerList)) {
printer = printerList.find((printer) => printer.selected === true);
}
if (!printer && !this._environmentSerivce.matchTablet()) {
if (!printer || this._environmentSerivce.matchTablet()) {
await this.uiModal
.open({
content: PrintModalComponent,

View File

@@ -45,7 +45,7 @@ export class PrintShippingNoteActionHandler extends ActionHandler<OrderItemsCont
if (Array.isArray(printerList)) {
printer = printerList.find((printer) => printer.selected === true);
}
if (!printer && !this._environmentSerivce.matchTablet()) {
if (!printer || this._environmentSerivce.matchTablet()) {
await this.uiModal
.open({
content: PrintModalComponent,

View File

@@ -336,7 +336,8 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
)
.toPromise();
if (!selectedPrinter && !this.isTablet) {
console.log(selectedPrinter);
if (!selectedPrinter || this.isTablet) {
await this.uiModal
.open({
content: PrintModalComponent,
@@ -361,6 +362,7 @@ export class CheckoutSummaryComponent implements OnInit, OnDestroy {
},
})
.afterClosed$.toPromise();
this.isPrinting$.next(false);
} else {
try {
const result = await this.domainPrinterService