cat-qw-lib 2.1.46 → 2.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/cat-qw-lib.mjs
CHANGED
|
@@ -6233,7 +6233,8 @@ class QueueRecordTableBuilderService extends TableBuilder {
|
|
|
6233
6233
|
SHARED.BROKERCOMPANY_NAME
|
|
6234
6234
|
]; // Fields to exclude from table columns
|
|
6235
6235
|
// Get all fields from the first record, excluding specified fields
|
|
6236
|
-
|
|
6236
|
+
let availableFields = Object.keys(firstRecord).filter(field => !excludedFields.includes(field));
|
|
6237
|
+
availableFields = this.reorderBrokerColumn(availableFields);
|
|
6237
6238
|
const columnWidths = QUEUE_RECORD_TABLE_COLUMN_WIDTH_LIST;
|
|
6238
6239
|
table.records = records.map((apiRecord, index) => {
|
|
6239
6240
|
const record = {
|
|
@@ -6393,6 +6394,17 @@ class QueueRecordTableBuilderService extends TableBuilder {
|
|
|
6393
6394
|
table.isSortingAllow = SHARED.TRUE;
|
|
6394
6395
|
return table;
|
|
6395
6396
|
}
|
|
6397
|
+
reorderBrokerColumn(fields) {
|
|
6398
|
+
const companyIdx = fields.indexOf(SHARED.COMPANY_NAME);
|
|
6399
|
+
const applicantsIdx = fields.indexOf(SHARED.APPLICANTS);
|
|
6400
|
+
const brokerIdx = fields.indexOf(SHARED.BROKER_NAME);
|
|
6401
|
+
if (brokerIdx !== -1) {
|
|
6402
|
+
const [brokerField] = fields.splice(brokerIdx, 1);
|
|
6403
|
+
let insertIdx = Math.max(companyIdx, applicantsIdx) + 1;
|
|
6404
|
+
fields.splice(insertIdx, 0, brokerField);
|
|
6405
|
+
}
|
|
6406
|
+
return fields;
|
|
6407
|
+
}
|
|
6396
6408
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueRecordTableBuilderService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
6397
6409
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: QueueRecordTableBuilderService, providedIn: 'root' });
|
|
6398
6410
|
}
|