cat-qw-lib 2.6.57 → 2.6.61

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.
@@ -198,6 +198,8 @@ class SHARED {
198
198
  static REFERRED = 'referred';
199
199
  static FINANCE = 'finance';
200
200
  static TOTAL_FINANCE_AMOUNT = 'totalFinanceAmount';
201
+ static BASE_PRICE = 'basePrice';
202
+ static MONTHLY_PAYMENT = 'monthlyPayment';
201
203
  static VALUATION_STATUS = 'valuationStatus';
202
204
  static TASKS = 'tasks';
203
205
  static TASK_BROKER_LABEL = 'B';
@@ -497,7 +499,7 @@ const queuePriorityOrder = ["All Applications", "Unassigned", "Assigned To Me"];
497
499
  const QUEUE_RECORD_TABLE_COLUMN_WIDTH_LIST = {
498
500
  brokerName: 'w-3',
499
501
  securityAddress: 'w-3',
500
- applicants: 'w-4',
502
+ applicants: 'w-2',
501
503
  finance: 'w-1',
502
504
  totalFinanceAmount: 'w-2',
503
505
  valuationStatus: 'w-2',
@@ -506,10 +508,10 @@ const QUEUE_RECORD_TABLE_COLUMN_WIDTH_LIST = {
506
508
  appId: 'w-2',
507
509
  age: 'w-1',
508
510
  tasks: 'w-1',
509
- productName: 'w-4',
510
- baseRate: 'w-2',
511
- monthlyPayment: 'w-2',
512
- submittedDate: 'w-3'
511
+ productName: 'w-2',
512
+ basePrice: 'w-3',
513
+ monthlyPayment: 'w-3',
514
+ submittedDate: 'w-4'
513
515
  };
514
516
  const FIELD_DISPLAY_NAMES = {
515
517
  riskRating: 'Risk Rating',
@@ -517,7 +519,7 @@ const FIELD_DISPLAY_NAMES = {
517
519
  applicants: 'Applicant(s)',
518
520
  brokerName: 'Broker',
519
521
  finance: 'Finance',
520
- totalFinanceAmount: 'Total Finance',
522
+ totalFinanceAmount: 'Total Finance Amount',
521
523
  securityAddress: 'Security',
522
524
  valuationStatus: 'Val status',
523
525
  sla: 'SLA',
@@ -526,7 +528,7 @@ const FIELD_DISPLAY_NAMES = {
526
528
  lending: 'Type',
527
529
  tasks: 'Tasks',
528
530
  productName: 'Product',
529
- baseRate: 'Base Rate',
531
+ basePrice: 'Base Price',
530
532
  monthlyPayment: 'Monthly Payment',
531
533
  submittedDate: 'Submitted Date'
532
534
  };
@@ -537,6 +539,7 @@ const QUEUE_RECORD_TABLE_COLUMN_ORDER = [
537
539
  'applicants', // Applicant(s)
538
540
  'brokerName',
539
541
  'finance',
542
+ 'productName', // Product
540
543
  'totalFinanceAmount', // Total Finance
541
544
  'securityAddress',
542
545
  'pending',
@@ -544,8 +547,7 @@ const QUEUE_RECORD_TABLE_COLUMN_ORDER = [
544
547
  'valuationStatus',
545
548
  'lending',
546
549
  'tasks',
547
- 'productName', // Product
548
- 'baseRate', // Base Rate
550
+ 'basePrice', // Base Price
549
551
  'monthlyPayment', // Monthly Payment
550
552
  'submittedDate' // Submitted Date
551
553
  ];
@@ -2372,6 +2374,16 @@ var columnStyles = {
2372
2374
  textNgClass: "text-black font-semibold",
2373
2375
  isShowSortIcon: false
2374
2376
  },
2377
+ basePrice: {
2378
+ containerNgClass: "",
2379
+ textNgClass: "text-black font-semibold",
2380
+ isShowSortIcon: false
2381
+ },
2382
+ monthlyPayment: {
2383
+ containerNgClass: "",
2384
+ textNgClass: "text-black font-semibold",
2385
+ isShowSortIcon: false
2386
+ },
2375
2387
  pending: {
2376
2388
  containerNgClass: "rowData['pending'] && rowData['pending'] !== '' ? 'queue-chip queue-chip--neutral' : ''",
2377
2389
  textNgClass: "text-black font-semibold",
@@ -7279,6 +7291,19 @@ class QueueRecordTableBuilderService extends TableBuilder {
7279
7291
  return '';
7280
7292
  return text.length > maxLength ? `${text.substring(0, maxLength - 3)}...` : text;
7281
7293
  }
7294
+ /**
7295
+ * GBP display for queue currency columns: £ with thousands separator and 2 decimals; null/empty -> '-'.
7296
+ */
7297
+ formatQueueCurrencyValue(value) {
7298
+ if (value == null || value === '' || String(value).toLowerCase() === SHARED.null) {
7299
+ return SHARED.DASH;
7300
+ }
7301
+ const num = Number(value);
7302
+ if (!Number.isFinite(num)) {
7303
+ return SHARED.DASH;
7304
+ }
7305
+ return `£${num.toLocaleString('en-GB', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
7306
+ }
7282
7307
  getColumnOrder(isReferredQueue) {
7283
7308
  if (!isReferredQueue) {
7284
7309
  return QUEUE_RECORD_TABLE_COLUMN_ORDER.filter(field => field !== SHARED.REFERRED_DATE);
@@ -7292,8 +7317,12 @@ class QueueRecordTableBuilderService extends TableBuilder {
7292
7317
  if (records.length === 0) {
7293
7318
  return table;
7294
7319
  }
7320
+ const normalizedRecords = records.map((r) => ({
7321
+ ...r,
7322
+ [SHARED.BASE_PRICE]: r[SHARED.BASE_PRICE] ?? r['baseRate']
7323
+ }));
7295
7324
  // Get the first record to determine available fields
7296
- const firstRecord = records[0];
7325
+ const firstRecord = normalizedRecords[0];
7297
7326
  const excludedFields = [
7298
7327
  SHARED._ID,
7299
7328
  SHARED.COMPANY_NAME,
@@ -7309,7 +7338,7 @@ class QueueRecordTableBuilderService extends TableBuilder {
7309
7338
  let availableFields = columnOrder
7310
7339
  .filter(field => !excludedFields.includes(field) && firstRecord.hasOwnProperty(field));
7311
7340
  const columnWidths = QUEUE_RECORD_TABLE_COLUMN_WIDTH_LIST;
7312
- table.records = records.map((apiRecord, index) => {
7341
+ table.records = normalizedRecords.map((apiRecord) => {
7313
7342
  // Format riskRating: convert "Medium" to "Med" for display
7314
7343
  const formattedRiskRating = apiRecord.riskRating === 'Medium' ? 'Med' : apiRecord.riskRating;
7315
7344
  const record = {
@@ -7418,13 +7447,10 @@ class QueueRecordTableBuilderService extends TableBuilder {
7418
7447
  cellValue = value;
7419
7448
  }
7420
7449
  }
7421
- else if (field === SHARED.TOTAL_FINANCE_AMOUNT) {
7422
- if (value != null && value !== '') {
7423
- cellValue = `£${Number(value).toLocaleString('en-GB', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`;
7424
- }
7425
- else {
7426
- cellValue = SHARED.EMPTY;
7427
- }
7450
+ else if (field === SHARED.TOTAL_FINANCE_AMOUNT ||
7451
+ field === SHARED.BASE_PRICE ||
7452
+ field === SHARED.MONTHLY_PAYMENT) {
7453
+ cellValue = this.formatQueueCurrencyValue(value);
7428
7454
  }
7429
7455
  else if (field === SHARED.SECURITY_ADDRESS && value) {
7430
7456
  const line1 = value.addressLine1 || '';