Skip to content
Closed
7 changes: 7 additions & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,7 @@ const CONST = {
// OldDot Actions render getMessage from Web-Expensify/lib/Report/Action PHP files via getMessageOfOldDotReportAction in ReportActionsUtils.ts
TYPE: {
ACTIONABLE_ADD_PAYMENT_CARD: 'ACTIONABLEADDPAYMENTCARD',
ACTIONABLE_CARD_FRAUD_ALERT: 'ACTIONABLECARDFRAUDALERT',
ACTIONABLE_JOIN_REQUEST: 'ACTIONABLEJOINREQUEST',
ACTIONABLE_MENTION_WHISPER: 'ACTIONABLEMENTIONWHISPER',
ACTIONABLE_MENTION_INVITE_TO_SUBMIT_EXPENSE_CONFIRM_WHISPER: 'ACTIONABLEMENTIONINVITETOSUBMITEXPENSECONFIRMWHISPER',
Expand Down Expand Up @@ -7088,6 +7089,12 @@ const CONST = {
IS_WAITING_FOR_ASSIGNEE_TO_COMPLETE_ACTION: 'isWaitingForAssigneeToCompleteAction',
HAS_CHILD_REPORT_AWAITING_ACTION: 'hasChildReportAwaitingAction',
HAS_MISSING_INVOICE_BANK_ACCOUNT: 'hasMissingInvoiceBankAccount',
HAS_UNRESOLVED_CARD_FRAUD_ALERT: 'hasUnresolvedCardFraudAlert',
},

CARD_FRAUD_ALERT_RESOLUTION: {
RECOGNIZED: 'recognized',
FRAUD: 'fraud',
},

RBR_REASONS: {
Expand Down
20 changes: 20 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,26 @@
validateCardTitle: 'Lassen Sie uns sicherstellen, dass Sie es sind',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Bitte geben Sie den magischen Code ein, der an ${contactMethod} gesendet wurde, um Ihre Kartendetails anzuzeigen. Er sollte in ein bis zwei Minuten ankommen.`,
cardFraudAlert: {
confirmButtonText: 'Ja, das tue ich.',
reportFraudButtonText: 'Nein, das war ich nicht.',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) =>
`die verdächtige Aktivität geklärt und die Karte x${cardLastFour} reaktiviert. Alles bereit, um weiter Ausgaben zu erfassen!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `hat die Karte mit den Endziffern ${cardLastFour} deaktiviert`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `verdächtige Aktivitäten auf der Karte mit der Endung ${cardLastFour} festgestellt. Erkennen Sie diese Abbuchung?

${amount} für ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Ausgaben',
Expand Down Expand Up @@ -7264,4 +7284,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7287 in src/languages/de.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7287 in src/languages/de.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
9 changes: 9 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1992,6 +1992,14 @@ const translations = {
cardDetailsLoadingFailure: 'An error occurred while loading the card details. Please check your internet connection and try again.',
validateCardTitle: "Let's make sure it's you",
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `Please enter the magic code sent to ${contactMethod} to view your card details. It should arrive within a minute or two.`,
cardFraudAlert: {
confirmButtonText: 'Yes, I do',
reportFraudButtonText: "No, it wasn't me",
clearedMessage: ({cardLastFour}: {cardLastFour: string}) => `cleared the suspicious activity and reactivated card x${cardLastFour}. All set to keep expensing!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `deactivated the card ending in ${cardLastFour}`,
alertMessage: ({cardLastFour, amount, merchant, date}: {cardLastFour: string; amount: string; merchant: string; date: string}) =>
`identified suspicious activity on card ending in ${cardLastFour}. Do you recognize this charge?\n\n${amount} for ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Spend',
Expand Down Expand Up @@ -7099,6 +7107,7 @@ const translations = {
isWaitingForAssigneeToCompleteAction: 'Is waiting for assignee to complete action',
hasChildReportAwaitingAction: 'Has child report awaiting action',
hasMissingInvoiceBankAccount: 'Has missing invoice bank account',
hasUnresolvedCardFraudAlert: 'Has unresolved card fraud alert',
},
reasonRBR: {
hasErrors: 'Has errors in report or report actions data',
Expand Down
86 changes: 47 additions & 39 deletions src/languages/es.ts

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,26 @@
validateCardTitle: "Assurons-nous que c'est bien vous",
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Veuillez entrer le code magique envoyé à ${contactMethod} pour voir les détails de votre carte. Il devrait arriver dans une minute ou deux.`,
cardFraudAlert: {
confirmButtonText: 'Oui, je le fais',
reportFraudButtonText: "Non, ce n'était pas moi.",
clearedMessage: ({cardLastFour}: {cardLastFour: string}) =>
`a effacé l'activité suspecte et réactivé la carte x${cardLastFour}. Tout est prêt pour continuer à faire des dépenses !`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `désactivé la carte se terminant par ${cardLastFour}`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `activité suspecte identifiée sur la carte se terminant par ${cardLastFour}. Reconnaissez-vous cette transaction ?

${amount} pour ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Dépenser',
Expand Down Expand Up @@ -7270,4 +7290,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7293 in src/languages/fr.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7293 in src/languages/fr.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
20 changes: 20 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,26 @@
validateCardTitle: 'Verifichiamo che sei tu',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Inserisci il codice magico inviato a ${contactMethod} per visualizzare i dettagli della tua carta. Dovrebbe arrivare entro un minuto o due.`,
cardFraudAlert: {
confirmButtonText: 'Sì, lo faccio',
reportFraudButtonText: 'No, non ero io',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) =>
`abbiamo eliminato l'attività sospetta e riattivato la carta x${cardLastFour}. Tutto pronto per continuare a registrare le spese!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `disattivato la carta che termina con ${cardLastFour}`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `attività sospetta identificata sulla carta che termina con ${cardLastFour}. Riconosci questo addebito?

${amount} per ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Spendere',
Expand Down Expand Up @@ -7271,4 +7291,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7294 in src/languages/it.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7294 in src/languages/it.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
19 changes: 19 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2002,6 +2002,25 @@ const translations = {
cardDetailsLoadingFailure: 'カードの詳細を読み込む際にエラーが発生しました。インターネット接続を確認して、もう一度お試しください。',
validateCardTitle: 'あなたであることを確認しましょう',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `カードの詳細を表示するには、${contactMethod} に送信されたマジックコードを入力してください。1~2分以内に届くはずです。`,
cardFraudAlert: {
confirmButtonText: 'はい、そうです。',
reportFraudButtonText: 'いいえ、それは私ではありませんでした。',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) => `不審な活動をクリアし、カードx${cardLastFour}を再有効化しました。経費精算を続ける準備が整いました!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `${cardLastFour}で終わるカードを無効にしました。`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `カードの末尾が${cardLastFour}のカードで不審な活動が確認されました。この請求を認識していますか?

${date} - ${merchant}に${amount}`,
},
},
workflowsPage: {
workflowTitle: '支出',
Expand Down
20 changes: 20 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,26 @@
validateCardTitle: 'Laten we ervoor zorgen dat jij het bent',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Voer de magische code in die naar ${contactMethod} is gestuurd om uw kaartgegevens te bekijken. Het zou binnen een minuut of twee moeten aankomen.`,
cardFraudAlert: {
confirmButtonText: 'Ja, dat doe ik.',
reportFraudButtonText: 'Nee, dat was ik niet.',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) =>
`verdachte activiteit verwijderd en kaart x${cardLastFour} opnieuw geactiveerd. Alles klaar om door te gaan met declareren!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `deactiveerde de kaart eindigend op ${cardLastFour}`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `verdachte activiteit geïdentificeerd op kaart eindigend op ${cardLastFour}. Herken je deze transactie?

${amount} voor ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Uitgaven',
Expand Down Expand Up @@ -7253,4 +7273,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7276 in src/languages/nl.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7276 in src/languages/nl.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
20 changes: 20 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,26 @@
validateCardTitle: 'Upewnijmy się, że to Ty',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Proszę wprowadzić magiczny kod wysłany na ${contactMethod}, aby zobaczyć szczegóły swojej karty. Powinien dotrzeć w ciągu minuty lub dwóch.`,
cardFraudAlert: {
confirmButtonText: 'Tak, robię',
reportFraudButtonText: 'Nie, to nie byłem ja',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) =>
`usunięto podejrzaną aktywność i ponownie aktywowano kartę x${cardLastFour}. Wszystko gotowe do dalszego rozliczania!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `dezaktywowano kartę kończącą się na ${cardLastFour}`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `zidentyfikowano podejrzaną aktywność na karcie kończącej się na ${cardLastFour}. Czy rozpoznajesz tę opłatę?

${amount} dla ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Wydatki',
Expand Down Expand Up @@ -7241,4 +7261,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7264 in src/languages/pl.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7264 in src/languages/pl.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
19 changes: 19 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,25 @@
validateCardTitle: 'Vamos garantir que é você',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) =>
`Por favor, insira o código mágico enviado para ${contactMethod} para visualizar os detalhes do seu cartão. Ele deve chegar dentro de um ou dois minutos.`,
cardFraudAlert: {
confirmButtonText: 'Sim, eu aceito',
reportFraudButtonText: 'Não, não fui eu',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) => `limpou a atividade suspeita e reativou o cartão x${cardLastFour}. Tudo pronto para continuar gastando!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `desativou o cartão com final ${cardLastFour}`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `atividade suspeita identificada no cartão com final ${cardLastFour}. Você reconhece esta cobrança?

${amount} para ${merchant} - ${date}`,
},
},
workflowsPage: {
workflowTitle: 'Gastar',
Expand Down Expand Up @@ -7254,4 +7273,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7276 in src/languages/pt-BR.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 302 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7276 in src/languages/pt-BR.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 302 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
19 changes: 19 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1981,6 +1981,25 @@
cardDetailsLoadingFailure: '加载卡片详情时发生错误。请检查您的互联网连接并重试。',
validateCardTitle: '让我们确认一下身份',
enterMagicCode: ({contactMethod}: EnterMagicCodeParams) => `请输入发送到${contactMethod}的验证码以查看您的卡详细信息。验证码应在一两分钟内到达。`,
cardFraudAlert: {
confirmButtonText: '是的,我愿意。',
reportFraudButtonText: '不,不是我',
clearedMessage: ({cardLastFour}: {cardLastFour: string}) => `已清除可疑活动并重新激活卡片 x${cardLastFour}。一切准备就绪,可以继续报销了!`,
deactivatedMessage: ({cardLastFour}: {cardLastFour: string}) => `已停用以${cardLastFour}结尾的卡片`,
alertMessage: ({
cardLastFour,
amount,
merchant,
date,
}: {
cardLastFour: string;
amount: string;
merchant: string;
date: string;
}) => `在卡号以${cardLastFour}结尾的卡上发现可疑活动。您是否认可此笔费用?

${merchant}的${amount} - ${date}`,
},
},
workflowsPage: {
workflowTitle: '花费',
Expand Down Expand Up @@ -7102,4 +7121,4 @@
};
// IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
// so if you change it here, please update it there as well.
export default translations satisfies TranslationDeepObject<typeof en>;

Check failure on line 7124 in src/languages/zh-hans.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.

Check failure on line 7124 in src/languages/zh-hans.ts

View workflow job for this annotation

GitHub Actions / typecheck

Type '{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }' does not satisfy the expected type 'TranslationDeepObject<{ common: { count: string; cancel: string; dismiss: string; proceed: string; yes: string; no: string; ok: string; notNow: string; learnMore: string; buttonConfirm: string; name: string; attachment: string; ... 301 more ...; read: string; }; ... 202 more ...; export: { ...; }; }>'.
6 changes: 6 additions & 0 deletions src/libs/API/parameters/ResolveFraudAlertParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type ResolveFraudAlertParams = {
cardID: number;
isFraud: boolean;
};

export default ResolveFraudAlertParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export type {default as PusherPingParams} from './PusherPingParams';
export type {default as ReconnectAppParams} from './ReconnectAppParams';
export type {default as ReferTeachersUniteVolunteerParams} from './ReferTeachersUniteVolunteerParams';
export type {default as ReportVirtualExpensifyCardFraudParams} from './ReportVirtualExpensifyCardFraudParams';
export type {default as ResolveFraudAlertParams} from './ResolveFraudAlertParams';
export type {default as RequestContactMethodValidateCodeParams} from './RequestContactMethodValidateCodeParams';
export type {default as RequestNewValidateCodeParams} from './RequestNewValidateCodeParams';
export type {default as RequestReplacementExpensifyCardParams} from './RequestReplacementExpensifyCardParams';
Expand Down
2 changes: 2 additions & 0 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const WRITE_COMMANDS = {
BANK_ACCOUNT_HANDLE_PLAID_ERROR: 'BankAccount_HandlePlaidError',
REPORT_VIRTUAL_EXPENSIFY_CARD_FRAUD: 'ReportVirtualExpensifyCardFraud',
REQUEST_REPLACEMENT_EXPENSIFY_CARD: 'RequestReplacementExpensifyCard',
RESOLVE_FRAUD_ALERT: 'ResolveFraudAlert',
UPDATE_EXPENSIFY_CARD_LIMIT: 'UpdateExpensifyCardLimit',
UPDATE_EXPENSIFY_CARD_TITLE: 'UpdateExpensifyCardTitle',
UPDATE_EXPENSIFY_CARD_LIMIT_TYPE: 'UpdateExpensifyCardLimitType',
Expand Down Expand Up @@ -534,6 +535,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.BANK_ACCOUNT_HANDLE_PLAID_ERROR]: Parameters.BankAccountHandlePlaidErrorParams;
[WRITE_COMMANDS.REPORT_VIRTUAL_EXPENSIFY_CARD_FRAUD]: Parameters.ReportVirtualExpensifyCardFraudParams;
[WRITE_COMMANDS.REQUEST_REPLACEMENT_EXPENSIFY_CARD]: Parameters.RequestReplacementExpensifyCardParams;
[WRITE_COMMANDS.RESOLVE_FRAUD_ALERT]: Parameters.ResolveFraudAlertParams;
[WRITE_COMMANDS.UPDATE_EXPENSIFY_CARD_LIMIT]: Parameters.UpdateExpensifyCardLimitParams;
[WRITE_COMMANDS.UPDATE_EXPENSIFY_CARD_TITLE]: Parameters.UpdateExpensifyCardTitleParams;
[WRITE_COMMANDS.UPDATE_EXPENSIFY_CARD_LIMIT_TYPE]: Parameters.UpdateExpensifyCardLimitTypeParams;
Expand Down
12 changes: 10 additions & 2 deletions src/libs/ReportActionsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
type MemberChangeMessageElement = MessageTextElement | MemberChangeMessageUserMentionElement | MemberChangeMessageRoomReferenceElement;

let allReportActions: OnyxCollection<ReportActions>;
Onyx.connect({

Check warning on line 58 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 58 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_ACTIONS,
waitForCollectionCallback: true,
callback: (actions) => {
Expand All @@ -67,7 +67,7 @@
});

let allReports: OnyxCollection<Report>;
Onyx.connect({

Check warning on line 70 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 70 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT,
waitForCollectionCallback: true,
callback: (value) => {
Expand All @@ -76,14 +76,14 @@
});

let isNetworkOffline = false;
Onyx.connect({

Check warning on line 79 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 79 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.NETWORK,
callback: (val) => (isNetworkOffline = val?.isOffline ?? false),
});

let currentUserAccountID: number | undefined;
let currentEmail = '';
Onyx.connect({

Check warning on line 86 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 86 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, value is undefined
Expand All @@ -97,7 +97,7 @@
});

let privatePersonalDetails: PrivatePersonalDetails | undefined;
Onyx.connect({

Check warning on line 100 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 100 in src/libs/ReportActionsUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PRIVATE_PERSONAL_DETAILS,
callback: (personalDetails) => {
privatePersonalDetails = personalDetails;
Expand Down Expand Up @@ -148,7 +148,7 @@
}

function isDeletedAction(reportAction: OnyxInputOrEntry<ReportAction | OptimisticIOUReportAction>): boolean {
if (isInviteOrRemovedAction(reportAction) || isActionableMentionWhisper(reportAction)) {
if (isInviteOrRemovedAction(reportAction) || isActionableMentionWhisper(reportAction) || isActionableCardFraudAlert(reportAction)) {
return false;
}

Expand Down Expand Up @@ -883,7 +883,10 @@
}

if (
(isActionableReportMentionWhisper(reportAction) || isActionableJoinRequestPendingReportAction(reportAction) || isActionableMentionWhisper(reportAction)) &&
(isActionableReportMentionWhisper(reportAction) ||
isActionableJoinRequestPendingReportAction(reportAction) ||
isActionableMentionWhisper(reportAction) ||
isActionableCardFraudAlert(reportAction)) &&
!canUserPerformWriteAction
) {
return false;
Expand Down Expand Up @@ -2054,6 +2057,10 @@
return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_ADD_PAYMENT_CARD;
}

function isActionableCardFraudAlert(reportAction: OnyxInputOrEntry<ReportAction>): reportAction is ReportAction<typeof CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_CARD_FRAUD_ALERT> {
return reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.ACTIONABLE_CARD_FRAUD_ALERT;
}

function getExportIntegrationLastMessageText(reportAction: OnyxEntry<ReportAction>): string {
const fragments = getExportIntegrationActionFragments(reportAction);
return fragments.reduce((acc, fragment) => `${acc} ${fragment.text}`, '');
Expand Down Expand Up @@ -3174,6 +3181,7 @@
wasActionTakenByCurrentUser,
isInviteOrRemovedAction,
isActionableAddPaymentCard,
isActionableCardFraudAlert,
getExportIntegrationActionFragments,
getExportIntegrationLastMessageText,
getExportIntegrationMessageHTML,
Expand Down
22 changes: 22 additions & 0 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
getWorkspaceReportFieldUpdateMessage,
getWorkspaceTagUpdateMessage,
getWorkspaceUpdateFieldMessage,
isActionableCardFraudAlert,
isActionableJoinRequest,
isActionableJoinRequestPending,
isActionableTrackExpense,
Expand Down Expand Up @@ -928,7 +929,7 @@
const parsedReportActionMessageCache: Record<string, string> = {};

let conciergeReportID: OnyxEntry<string>;
Onyx.connect({

Check warning on line 932 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 932 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.CONCIERGE_REPORT_ID,
callback: (value) => {
conciergeReportID = value;
Expand All @@ -936,7 +937,7 @@
});

const defaultAvatarBuildingIconTestID = 'SvgDefaultAvatarBuilding Icon';
Onyx.connect({

Check warning on line 940 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 940 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.SESSION,
callback: (value) => {
// When signed out, val is undefined
Expand All @@ -954,7 +955,7 @@
let allPersonalDetails: OnyxEntry<PersonalDetailsList>;
let allPersonalDetailLogins: string[];
let currentUserPersonalDetails: OnyxEntry<PersonalDetails>;
Onyx.connect({

Check warning on line 958 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 958 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
callback: (value) => {
if (currentUserAccountID) {
Expand All @@ -966,14 +967,14 @@
});

let allReportsDraft: OnyxCollection<Report>;
Onyx.connect({

Check warning on line 970 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 970 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.REPORT_DRAFT,
waitForCollectionCallback: true,
callback: (value) => (allReportsDraft = value),
});

let allPolicies: OnyxCollection<Policy>;
Onyx.connect({

Check warning on line 977 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function

Check warning on line 977 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Onyx.connect() is deprecated. Use useOnyx() hook instead and pass the data as parameters to a pure function
key: ONYXKEYS.COLLECTION.POLICY,
waitForCollectionCallback: true,
callback: (value) => (allPolicies = value),
Expand Down Expand Up @@ -3822,6 +3823,18 @@
reportAction?: OnyxEntry<ReportAction>;
};

function getUnresolvedCardFraudAlertAction(reportID: string): OnyxEntry<ReportAction> {
const reportActions = getAllReportActions(reportID);
return Object.values(reportActions).find((action): action is ReportAction => isActionableCardFraudAlert(action) && !getOriginalMessage(action)?.resolution);
}

function hasUnresolvedCardFraudAlert(reportOrOption: OnyxEntry<Report> | OptionData): boolean {
if (!reportOrOption?.reportID) {
return false;
}
return !!getUnresolvedCardFraudAlertAction(reportOrOption.reportID);
}

function getReasonAndReportActionThatRequiresAttention(
optionOrReport: OnyxEntry<Report> | OptionData,
parentReportAction?: OnyxEntry<ReportAction>,
Expand All @@ -3840,6 +3853,13 @@
};
}

if (hasUnresolvedCardFraudAlert(optionOrReport)) {
return {
reason: CONST.REQUIRES_ATTENTION_REASONS.HAS_UNRESOLVED_CARD_FRAUD_ALERT,
reportAction: getUnresolvedCardFraudAlertAction(optionOrReport.reportID),
};
}

if (isReportArchived) {
return null;
}
Expand Down Expand Up @@ -12292,6 +12312,8 @@
excludeParticipantsForDisplay,
getReportName,
doesReportContainRequestsFromMultipleUsers,
hasUnresolvedCardFraudAlert,
getUnresolvedCardFraudAlertAction,
};
export type {
Ancestor,
Expand Down
Loading
Loading