cat-qw-lib 2.6.86 → 2.6.87

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.
@@ -7141,6 +7141,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImpor
7141
7141
  args: [{ providedIn: "root" }]
7142
7142
  }], ctorParameters: () => [{ type: QueueStore$1 }, { type: i1$1.HttpClient }, { type: AppConfigService }, { type: ListService }] });
7143
7143
 
7144
+ /**
7145
+ * Maps a lowercased valuation/instruction status to its icon and colour configuration.
7146
+ * Keys must be lowercase; lookups normalise the incoming status with `toLowerCase()`.
7147
+ */
7148
+ const VALUATION_STATUS_CONFIG_MAP = {
7149
+ 'received': { icon: 'pi pi-image', iconClass: 'text-green-600', textClass: 'text-green-700 font-medium' },
7150
+ 'not paid': { icon: 'pi pi-times-circle', iconClass: 'text-red-600', textClass: 'text-red-700 font-medium' },
7151
+ 'instructed': { icon: 'pi pi-file', iconClass: 'text-blue-600', textClass: 'text-blue-700 font-medium' },
7152
+ 'outstanding pvq': { icon: 'pi pi-star', iconClass: 'text-purple-600', textClass: 'text-purple-700 font-medium' },
7153
+ 'paid': { icon: 'pi pi-pound', iconClass: 'text-green-500', textClass: 'text-green-600 font-medium' },
7154
+ 'reviewing': { icon: 'pi pi-clock', iconClass: 'text-orange-600', textClass: 'text-orange-700 font-medium' },
7155
+ 'complete': { icon: 'pi pi-check-circle', iconClass: 'text-green-600', textClass: 'text-green-700 font-medium' },
7156
+ 'scheduled': { icon: 'pi pi-calendar', iconClass: 'text-blue-600', textClass: 'text-blue-700 font-medium' },
7157
+ 'requested': { icon: 'pi pi-send', iconClass: 'text-indigo-600', textClass: 'text-indigo-700 font-medium' },
7158
+ 'ready to instruct': { icon: 'pi pi-check', iconClass: 'text-teal-600', textClass: 'text-teal-700 font-medium' },
7159
+ // Quest instruction statuses surfaced via the applications API.
7160
+ 'failed': { icon: 'pi pi-times-circle', iconClass: 'text-red-600', textClass: 'text-red-700 font-medium' },
7161
+ 'cancelled': { icon: 'pi pi-ban', iconClass: 'text-bluegray-600', textClass: 'text-bluegray-700 font-medium' },
7162
+ 'booked': { icon: 'pi pi-calendar', iconClass: 'text-yellow-600', textClass: 'text-yellow-700 font-medium' },
7163
+ 'held': { icon: 'pi pi-pause-circle', iconClass: 'text-orange-600', textClass: 'text-orange-700 font-medium' },
7164
+ 'tried': { icon: 'pi pi-replay', iconClass: 'text-blue-600', textClass: 'text-blue-700 font-medium' },
7165
+ 'allocated': { icon: 'pi pi-user', iconClass: 'text-cyan-600', textClass: 'text-cyan-700 font-medium' }
7166
+ };
7167
+ /** Fallback configuration used when a status is not present in {@link VALUATION_STATUS_CONFIG_MAP}. */
7168
+ const VALUATION_STATUS_DEFAULT_CONFIG = {
7169
+ icon: 'pi pi-info-circle',
7170
+ iconClass: 'text-gray-600',
7171
+ textClass: 'text-gray-700 font-medium'
7172
+ };
7173
+
7144
7174
  const CHIP_VARIANTS = {
7145
7175
  DANGER: 'danger',
7146
7176
  WARNING: 'warning',
@@ -7175,64 +7205,7 @@ class QueueRecordTableBuilderService extends TableBuilder {
7175
7205
  getValuationStatusConfig(status) {
7176
7206
  if (!status)
7177
7207
  return null;
7178
- const statusLower = status.toLowerCase();
7179
- const configMap = {
7180
- 'received': {
7181
- icon: 'pi pi-image',
7182
- iconClass: 'text-green-600',
7183
- textClass: 'text-green-700 font-medium'
7184
- },
7185
- 'not paid': {
7186
- icon: 'pi pi-times-circle',
7187
- iconClass: 'text-red-600',
7188
- textClass: 'text-red-700 font-medium'
7189
- },
7190
- 'instructed': {
7191
- icon: 'pi pi-file',
7192
- iconClass: 'text-blue-600',
7193
- textClass: 'text-blue-700 font-medium'
7194
- },
7195
- 'outstanding pvq': {
7196
- icon: 'pi pi-star',
7197
- iconClass: 'text-purple-600',
7198
- textClass: 'text-purple-700 font-medium'
7199
- },
7200
- 'paid': {
7201
- icon: 'pi pi-pound',
7202
- iconClass: 'text-green-500',
7203
- textClass: 'text-green-600 font-medium'
7204
- },
7205
- 'reviewing': {
7206
- icon: 'pi pi-clock',
7207
- iconClass: 'text-orange-600',
7208
- textClass: 'text-orange-700 font-medium'
7209
- },
7210
- 'complete': {
7211
- icon: 'pi pi-check-circle',
7212
- iconClass: 'text-green-600',
7213
- textClass: 'text-green-700 font-medium'
7214
- },
7215
- 'scheduled': {
7216
- icon: 'pi pi-calendar',
7217
- iconClass: 'text-blue-600',
7218
- textClass: 'text-blue-700 font-medium'
7219
- },
7220
- 'requested': {
7221
- icon: 'pi pi-send',
7222
- iconClass: 'text-indigo-600',
7223
- textClass: 'text-indigo-700 font-medium'
7224
- },
7225
- 'ready to instruct': {
7226
- icon: 'pi pi-check',
7227
- iconClass: 'text-teal-600',
7228
- textClass: 'text-teal-700 font-medium'
7229
- }
7230
- };
7231
- return configMap[statusLower] || {
7232
- icon: 'pi pi-info-circle',
7233
- iconClass: 'text-gray-600',
7234
- textClass: 'text-gray-700 font-medium'
7235
- };
7208
+ return VALUATION_STATUS_CONFIG_MAP[status.toLowerCase()] || VALUATION_STATUS_DEFAULT_CONFIG;
7236
7209
  }
7237
7210
  /**
7238
7211
  * Truncates text to specified length with ellipsis