From a2709553591477199c00ebe30adb3e53e531ee02 Mon Sep 17 00:00:00 2001 From: Blume1977 Date: Wed, 2 Sep 2026 16:44:43 +0200 Subject: [PATCH] feat(compliance): show preferred phone-call time in the call queue The customer's preferred phone-call time was only visible in the call-queue detail view. Compliance staff calling through a phone queue could not see it in the overview and had to open each entry. A new "Anrufzeiten" column is shown at the end of the call-queue list, only in the two queues where a call is scheduled from the customer's own phone details: ManualCheckPhone and ManualCheckIpCountryPhone. The value is the raw, semicolon-separated time slots the customer selected; an empty value shows "-". The value is delivered by the API on CallQueueItem. Until @dfx.swiss/core carries the field (DFXswiss/packages#180), a small typings bridge exposes phoneCallTimes on CallQueueItem so the screen reads it type-safely; the bridge can be removed once core publishes the field. --- src/screens/compliance-call-queue.screen.tsx | 14 +++++++++++++- src/translations/languages/de.json | 1 + src/translations/languages/fr.json | 1 + src/translations/languages/it.json | 1 + typings/dfx-core-call-queue.d.ts | 15 +++++++++++++++ 5 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 typings/dfx-core-call-queue.d.ts diff --git a/src/screens/compliance-call-queue.screen.tsx b/src/screens/compliance-call-queue.screen.tsx index d6adc958a..44a89cea7 100644 --- a/src/screens/compliance-call-queue.screen.tsx +++ b/src/screens/compliance-call-queue.screen.tsx @@ -33,8 +33,12 @@ export default function ComplianceCallQueueScreen(): JSX.Element { const showIp = queue === CallQueue.MANUAL_CHECK_IP_PHONE || queue === CallQueue.MANUAL_CHECK_IP_COUNTRY_PHONE; const showCountry = queue === CallQueue.MANUAL_CHECK_IP_COUNTRY_PHONE || queue === CallQueue.UNAVAILABLE_SUSPICIOUS; const showStatus = queue === CallQueue.UNAVAILABLE_SUSPICIOUS; + // Preferred phone-call time is only relevant where a call is scheduled from the customer's own + // phone details: the plain phone queue and the IP+country phone queue. + const showPhoneCallTimes = + queue === CallQueue.MANUAL_CHECK_PHONE || queue === CallQueue.MANUAL_CHECK_IP_COUNTRY_PHONE; - const columnCount = 5 + [isTxQueue, showIp, showCountry, showStatus].filter(Boolean).length; + const columnCount = 5 + [isTxQueue, showIp, showCountry, showStatus, showPhoneCallTimes].filter(Boolean).length; useEffect(() => { if (!isLoggedIn || !queue) return; @@ -97,6 +101,11 @@ export default function ComplianceCallQueueScreen(): JSX.Element { {translate('screens/compliance', 'Status')} )} + {showPhoneCallTimes && ( + + {translate('screens/compliance', 'Phone Call Times')} + + )} {translate('screens/compliance', 'Date')} @@ -132,6 +141,9 @@ export default function ComplianceCallQueueScreen(): JSX.Element { {showStatus && ( {item.phoneCallStatus ?? '-'} )} + {showPhoneCallTimes && ( + {item.phoneCallTimes || '-'} + )} {formatSwissDate(item.date)} )) diff --git a/src/translations/languages/de.json b/src/translations/languages/de.json index 3f4c5b2dd..4c50a7a3b 100644 --- a/src/translations/languages/de.json +++ b/src/translations/languages/de.json @@ -364,6 +364,7 @@ "No. Onboarding at DFX is only possible through a referral. You need the ref code, ref link, or email address of an existing customer who confirms your registration.": "Nein. Das Onboarding bei DFX ist ausschliesslich über eine Empfehlung möglich. Du benötigst dafür den Ref-Code, Ref-Link oder die E-Mail-Adresse eines Bestandskunden, der Deine Registrierung bestätigt." }, "screens/compliance": { + "Phone Call Times": "Anrufzeiten", "Compliance": "Compliance", "Database search": "Datenbank-Suche", "Matching Entries": "Passende Einträge", diff --git a/src/translations/languages/fr.json b/src/translations/languages/fr.json index 735188177..dcdb290de 100644 --- a/src/translations/languages/fr.json +++ b/src/translations/languages/fr.json @@ -364,6 +364,7 @@ "No. Onboarding at DFX is only possible through a referral. You need the ref code, ref link, or email address of an existing customer who confirms your registration.": "Non. L'inscription chez DFX n'est possible que par parrainage. Vous avez besoin du code de parrainage, du lien de parrainage ou de l'adresse e-mail d'un client existant qui confirme votre inscription." }, "screens/compliance": { + "Phone Call Times": "Heures d'appel", "Compliance": "Compliance", "Database search": "Recherche dans la base de données", "Matching Entries": "Entrées correspondantes", diff --git a/src/translations/languages/it.json b/src/translations/languages/it.json index 509b37f74..71e6758c4 100644 --- a/src/translations/languages/it.json +++ b/src/translations/languages/it.json @@ -364,6 +364,7 @@ "No. Onboarding at DFX is only possible through a referral. You need the ref code, ref link, or email address of an existing customer who confirms your registration.": "No. L'onboarding presso DFX è possibile solo tramite referral. Hai bisogno del codice referral, del link referral o dell'indirizzo e-mail di un cliente esistente che confermi la tua registrazione." }, "screens/compliance": { + "Phone Call Times": "Orari di chiamata", "Compliance": "Compliance", "Database search": "Ricerca nel database", "Matching Entries": "Voci corrispondenti", diff --git a/typings/dfx-core-call-queue.d.ts b/typings/dfx-core-call-queue.d.ts new file mode 100644 index 000000000..95ad2b24a --- /dev/null +++ b/typings/dfx-core-call-queue.d.ts @@ -0,0 +1,15 @@ +// Temporary type bridge for the call-queue "Phone Call Times" column. +// +// The customer's preferred phone-call time is delivered by the API on each CallQueueItem +// (backend: CallQueueItem DTO). The shared client type in @dfx.swiss/core does not carry the +// field yet; until it is added there (DFXswiss/packages#180) this augmentation lets the +// compliance call-queue screen read `item.phoneCallTimes` type-safely. Remove this file once +// @dfx.swiss/core exposes phoneCallTimes on CallQueueItem. +import '@dfx.swiss/core'; + +declare module '@dfx.swiss/core' { + interface CallQueueItem { + /** Customer's preferred phone-call time slots, raw and semicolon-separated (e.g. "H9To10;H10To11"). */ + phoneCallTimes?: string; + } +}