<eg-progress-dialog #progressDlg
dialogTitle="Deleting Queue..." i18n-dialogTitle></eg-progress-dialog>
+<eg-progress-dialog #progressSelect
+ dialogTitle="Selecting all records..." i18n-dialogTitle></eg-progress-dialog>
+
<ng-container *ngIf="queueSummary && queueSummary.queue">
<eg-confirm-dialog
[disableSelect]="true"
hideFields="language,pagination,price,rec_identifier,eg_tcn_source,eg_identifier,item_barcode,zsource">
+ <eg-grid-toolbar-checkbox i18n-label label="Select All"
+ (onChange)="toggleSelectRows($event)"></eg-grid-toolbar-checkbox>
+
<eg-grid-toolbar-checkbox i18n-label label="Records With Matches"
(onChange)="limitToMatches($event)"></eg-grid-toolbar-checkbox>
@ViewChild('queueGrid', { static: true }) queueGrid: GridComponent;
@ViewChild('confirmDelDlg', { static: false }) confirmDelDlg: ConfirmDialogComponent;
@ViewChild('progressDlg', { static: true }) progressDlg: ProgressDialogComponent;
+ @ViewChild('progressSelect', {static: false}) progressSelect: ProgressDialogComponent;
cellTextGenerator: GridCellTextGenerator;
this.vandelay.importSelection.recordIds.includes(rowId);
}
+ toggleSelectRows(checked: boolean) {
+
+ if (checked) {
+ this.progressSelect.open();
+ this.queueGrid.context.getAllRows().then(_ => {
+ this.queueSource.data.forEach(row => {
+ if (!this.rowIsSelected(row)) {
+ this.rowClicked(row);
+ }
+ });
+ this.progressSelect.close();
+ });
+
+ } else {
+ const selection = this.vandelay.importSelection;
+ if (selection) {
+ selection.recordIds = [];
+ }
+ }
+ }
+
rowClicked(row: any) {
const selection = this.findOrCreateImportSelection();
if (selection.recordIds.includes(row.id)) {