Merged PR 1484: #3828 Bugfixes Disable Print

#3828 Bugfixes Disable Print
This commit is contained in:
Nino Righi
2023-02-14 11:01:15 +00:00
committed by Lorenz Hilpert
parent dfd273e7bf
commit 78b757c55b
3 changed files with 25 additions and 14 deletions

View File

@@ -6,6 +6,10 @@ cdk-virtual-scroll-viewport {
height: calc(100vh - 445px);
}
.page-price-update-list__print-cta:disabled {
@apply text-inactive-branch;
}
.page-price-update-list__action-wrapper {
@apply grid grid-flow-col gap-4 justify-center my-6 fixed bottom-24 inset-x-0;
}

View File

@@ -1,9 +1,14 @@
<div class="page-price-update-list__header bg-background-liste flex flex-col items-end py-4">
<button (click)="print()" type="button" class="page-price-update-list__print-cta text-lg font-bold text-[#F70400] pr-5 mb-3">
<button
[disabled]="getSelectableItems().length === 0"
(click)="print()"
type="button"
class="page-price-update-list__print-cta text-lg font-bold text-[#F70400] pr-5 mb-3"
>
Drucken
</button>
<div class="flex flex-row items-center justify-end">
<div class="text-[#0556B4] font-bold text-sm mr-5">
<div *ngIf="getSelectableItems().length > 0" class="text-[#0556B4] font-bold text-sm mr-5">
<ng-container *ngIf="selectedItemUids$ | async; let selectedItems">
<button class="page-price-update-list__cta-unselect-all" *ngIf="selectedItems?.length > 0" type="button" (click)="unselectAll()">
Alle entfernen ({{ selectedItems?.length }})

View File

@@ -113,18 +113,20 @@ export class PriceUpdateComponentStore extends ComponentStore<PriceUpdateCompone
print() {
const selectableItems = this.items.filter((item) => this.isSelectable(item));
this._uiModal.open({
content: PrintModalComponent,
data: {
printerType: 'Office',
print: (printer) =>
this._domainPrinterService.printProductListItems({ data: selectableItems, printer, title: 'Preisänderungen' }).toPromise(),
} as PrintModalData,
config: {
panelClass: [],
showScrollbarY: false,
},
});
if (selectableItems?.length > 0) {
this._uiModal.open({
content: PrintModalComponent,
data: {
printerType: 'Office',
print: (printer) =>
this._domainPrinterService.printProductListItems({ data: selectableItems, printer, title: 'Preisänderungen' }).toPromise(),
} as PrintModalData,
config: {
panelClass: [],
showScrollbarY: false,
},
});
}
}
beforeComplete() {