Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/screens/compliance-call-queue.screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -97,6 +101,11 @@ export default function ComplianceCallQueueScreen(): JSX.Element {
{translate('screens/compliance', 'Status')}
</th>
)}
{showPhoneCallTimes && (
<th className="px-4 py-3 text-left text-sm font-semibold text-dfxBlue-800">
{translate('screens/compliance', 'Phone Call Times')}
</th>
)}
<th className="px-4 py-3 text-left text-sm font-semibold text-dfxBlue-800">
{translate('screens/compliance', 'Date')}
</th>
Expand Down Expand Up @@ -132,6 +141,9 @@ export default function ComplianceCallQueueScreen(): JSX.Element {
{showStatus && (
<td className="px-4 py-3 text-left text-sm text-dfxBlue-800">{item.phoneCallStatus ?? '-'}</td>
)}
{showPhoneCallTimes && (
<td className="px-4 py-3 text-left text-sm text-dfxBlue-800">{item.phoneCallTimes || '-'}</td>
)}
<td className="px-4 py-3 text-left text-sm text-dfxBlue-800">{formatSwissDate(item.date)}</td>
</tr>
))
Expand Down
1 change: 1 addition & 0 deletions src/translations/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/translations/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/translations/languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
15 changes: 15 additions & 0 deletions typings/dfx-core-call-queue.d.ts
Original file line number Diff line number Diff line change
@@ -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;
}
}