From 95f9a526efc6f57eef879ddb108759e6fbc6bce0 Mon Sep 17 00:00:00 2001 From: cretadn22 Date: Fri, 7 Jun 2024 19:37:49 +0700 Subject: [PATCH 1/3] hide amount in submit button if skip confirmtion page --- src/pages/iou/MoneyRequestAmountForm.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/pages/iou/MoneyRequestAmountForm.tsx b/src/pages/iou/MoneyRequestAmountForm.tsx index 5bbc9d22a97f..afea2efd266c 100644 --- a/src/pages/iou/MoneyRequestAmountForm.tsx +++ b/src/pages/iou/MoneyRequestAmountForm.tsx @@ -228,19 +228,7 @@ function MoneyRequestAmountForm( ); const buttonText: string = useMemo(() => { - const currentAmount = moneyRequestAmountInput.current?.getAmount() ?? ''; if (skipConfirmation) { - if (currentAmount !== '') { - const currencyAmount = CurrencyUtils.convertToDisplayString(CurrencyUtils.convertToBackendAmount(Number.parseFloat(currentAmount)), currency) ?? ''; - let text = translate('iou.submitAmount', {amount: currencyAmount}); - if (iouType === CONST.IOU.TYPE.SPLIT) { - text = translate('iou.splitAmount', {amount: currencyAmount}); - } else if (iouType === CONST.IOU.TYPE.TRACK) { - text = translate('iou.trackAmount', {amount: currencyAmount}); - } - return text[0].toUpperCase() + text.slice(1); - } - if (iouType === CONST.IOU.TYPE.SPLIT) { return translate('iou.splitExpense'); } From 1e95d49d6e8e7b536bc725b575a184f4e3011cb0 Mon Sep 17 00:00:00 2001 From: cretadn22 Date: Fri, 7 Jun 2024 21:39:06 +0700 Subject: [PATCH 2/3] remove dependency --- src/pages/iou/MoneyRequestAmountForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/MoneyRequestAmountForm.tsx b/src/pages/iou/MoneyRequestAmountForm.tsx index afea2efd266c..ce1cddc91958 100644 --- a/src/pages/iou/MoneyRequestAmountForm.tsx +++ b/src/pages/iou/MoneyRequestAmountForm.tsx @@ -238,7 +238,7 @@ function MoneyRequestAmountForm( return translate('iou.submitExpense'); } return isEditing ? translate('common.save') : translate('common.next'); - }, [skipConfirmation, iouType, currency, isEditing, translate]); + }, [skipConfirmation, iouType, isEditing, translate]); const canUseTouchScreen = DeviceCapabilities.canUseTouchScreen(); From b5aa81bb2554c786e93a88d5d9543a6c362c4dc3 Mon Sep 17 00:00:00 2001 From: cretadn22 Date: Mon, 10 Jun 2024 20:08:23 +0700 Subject: [PATCH 3/3] remove language translation --- src/languages/en.ts | 1 - src/languages/es.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 468f06f6b702..4382c05c48e9 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -688,7 +688,6 @@ export default { finished: 'Finished', sendInvoice: ({amount}: RequestAmountParams) => `Send ${amount} invoice`, submitAmount: ({amount}: RequestAmountParams) => `submit ${amount}`, - trackAmount: ({amount}: RequestAmountParams) => `track ${amount}`, submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `submitted ${formattedAmount}${comment ? ` for ${comment}` : ''}`, trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `tracking ${formattedAmount}${comment ? ` for ${comment}` : ''}`, splitAmount: ({amount}: SplitAmountParams) => `split ${amount}`, diff --git a/src/languages/es.ts b/src/languages/es.ts index 2d4500b823b7..53a431792ab8 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -682,7 +682,6 @@ export default { finished: 'Finalizado', sendInvoice: ({amount}: RequestAmountParams) => `Enviar factura de ${amount}`, submitAmount: ({amount}: RequestAmountParams) => `solicitar ${amount}`, - trackAmount: ({amount}: RequestAmountParams) => `seguimiento de ${amount}`, submittedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `solicitó ${formattedAmount}${comment ? ` para ${comment}` : ''}`, trackedAmount: ({formattedAmount, comment}: RequestedAmountMessageParams) => `realizó un seguimiento de ${formattedAmount}${comment ? ` para ${comment}` : ''}`, splitAmount: ({amount}: SplitAmountParams) => `dividir ${amount}`,