From 7e20419b17d526ce59c326e272c66fadf00b6c2a Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Fri, 16 May 2025 22:53:12 +0300 Subject: [PATCH 1/9] added policy log copies for category settings --- src/languages/en.ts | 47 ++++++++++++++++++++++++++++++++++ src/languages/es.ts | 47 ++++++++++++++++++++++++++++++++++ src/languages/params.ts | 2 +- src/libs/ReportActionsUtils.ts | 40 +++++++++++++++++++++++++---- 4 files changed, 130 insertions(+), 6 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 735eeb0f33ce6..c65b464815bb7 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5108,6 +5108,53 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `removed the category "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'disabled' : 'enabled'} the category "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`, + updatedPayrollCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `updated the category "${categoryName}" by removing the Payroll Code (previously "${oldValue}")`; + } + + return !oldValue + ? `updated the category "${categoryName}" by adding a Payroll Code of "${newValue}"` + : `updated the category "${categoryName}" by changing the Payroll Code to "${newValue}" (previously "${oldValue}")`; + }, + updatedGlCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `updated the category "${categoryName}" by removing the Gl Code (previously "${oldValue}")`; + } + + return !oldValue + ? `updated the category "${categoryName}" by adding a Gl Code of "${newValue}"` + : `updated the category "${categoryName}" by changing the Gl Code to "${newValue}" (previously "${oldValue}")`; + }, + updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `updated the category "${categoryName}" by removing the Max Amount (previously "${oldValue}")`; + } + + return !oldValue + ? `updated the category "${categoryName}" by adding a Max Amount of "${newValue}"` + : `updated the category "${categoryName}" by changing the Max Amount to "${newValue}" (previously "${oldValue}")`; + }, + updatedMaxAmountNoReceipt: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + const [oldValueText, newValueText] = [oldValue, newValue].map((value) => { + switch (value) { + case 0: + return 'Required'; + case CONST.DISABLED_MAX_EXPENSE_VALUE: + return 'Not Required'; + default: + return 'Default'; + } + }); + return `updated the category "${categoryName}" by changing the receipts to "${newValueText}" (previously "${oldValueText}")`; + }, + updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { + if (newValue) { + return `updated the category "${categoryName}" by changing the description from Not Required to Required`; + } + + return `updated the category "${categoryName}" by changing the description from Required to Not Required`; + }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `added the tag "${tagName}" to the list "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `updated the tag list "${tagListName}" by changing the tag "${oldName}" to "${newName}`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'enabled' : 'disabled'} the tag "${tagName}" on the list "${tagListName}"`, diff --git a/src/languages/es.ts b/src/languages/es.ts index a348dbf381f31..bbefbc7f71f0b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -5159,6 +5159,53 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `eliminó la categoría "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'deshabilitó' : 'habilitó'} la categoría "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renombró la categoría "${oldName}" a "${newName}`, + updatedPayrollCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando el código de nómina (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo un código de nómina "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando el código de nómina a "${newValue}" (anteriormente "${oldValue}")`; + }, + updatedGlCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando el código GL (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo un código GL "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando el código GL a "${newValue}" (anteriormente "${oldValue}")`; + }, + updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando el importe máximo (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo un importe máximo de "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando el importe máximo a "${newValue}" (anteriormente "${oldValue}")`; + }, + updatedMaxAmountNoReceipt: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + const [oldValueText, newValueText] = [oldValue, newValue].map((value) => { + switch (value) { + case 0: + return 'Requerido'; + case CONST.DISABLED_MAX_EXPENSE_VALUE: + return 'No requerido'; + default: + return 'Por defecto'; + } + }); + return `actualizó la categoría "${categoryName}" cambiando los requisitos de recibos a "${newValueText}" (anteriormente "${oldValueText}")`; + }, + updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { + if (newValue) { + return `actualizó la categoría "${categoryName}" cambiando la descripción de No requerida a Requerida`; + } + + return `actualizó la categoría "${categoryName}" cambiando la descripción de Requerida a No requerida`; + }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `añadió la etiqueta "${tagName}" a la lista "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `actualizó la lista de etiquetas "${tagListName}" cambiando la etiqueta "${oldName}" a "${newName}"`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'habilitó' : 'deshabilitó'} la etiqueta "${tagName}" en la lista "${tagListName}"`, diff --git a/src/languages/params.ts b/src/languages/params.ts index 8349a2d136cac..1b0483628bf8e 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -315,7 +315,7 @@ type UpdatedPolicyDescriptionParams = {oldDescription: string; newDescription: s type UpdatedPolicyCurrencyParams = {oldCurrency: string; newCurrency: string}; -type UpdatedPolicyCategoryParams = {categoryName: string; oldValue?: boolean}; +type UpdatedPolicyCategoryParams = {categoryName: string; oldValue?: boolean | string | number; newValue?: boolean | string | number}; type UpdatedPolicyTagParams = {tagListName: string; tagName?: string; enabled?: boolean; count?: string}; diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 4211061e3d91b..79c7a4bbd2c8c 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -1994,7 +1994,8 @@ function getWorkspaceFrequencyUpdateMessage(action: ReportAction): string { } function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { - const {categoryName, oldValue, newName, oldName} = getOriginalMessage(action as ReportAction) ?? {}; + const {categoryName, oldValue, newValue, newName, oldName, updatedField} = + getOriginalMessage(action as ReportAction) ?? {}; if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_CATEGORY && categoryName) { return translateLocal('workspaceActions.addCategory', { @@ -2009,10 +2010,39 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { } if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CATEGORY && categoryName) { - return translateLocal('workspaceActions.updateCategory', { - oldValue: !!oldValue, - categoryName, - }); + switch (updatedField) { + case 'Payroll Code': + return translateLocal('workspaceActions.updatedPayrollCode', { + oldValue, + newValue, + categoryName, + }); + case 'GL Code': + return translateLocal('workspaceActions.updatedGlCode', { + oldValue, + newValue, + categoryName, + }); + case 'areCommentsRequired': + return translateLocal('workspaceActions.updatedAreCommentsRequired', { + newValue, + categoryName, + }); + case 'maxExpenseAmount': + return translateLocal('workspaceActions.updatedMaxExpenseAmount', {oldValue, newValue, categoryName}); + case 'maxAmountNoReceipt': + return translateLocal('workspaceActions.updatedMaxAmountNoReceipt', { + oldValue, + newValue, + categoryName, + }); + + default: + return translateLocal('workspaceActions.updateCategory', { + oldValue: !!oldValue, + categoryName, + }); + } } if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.SET_CATEGORY_NAME && oldName && newName) { From 48193d73b67710046b263c14ef179a0aadf3047f Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Wed, 21 May 2025 20:10:19 +0300 Subject: [PATCH 2/9] added more copies --- src/languages/en.ts | 18 ++++++++++++++++++ src/languages/es.ts | 18 ++++++++++++++++++ src/libs/ReportActionsUtils.ts | 16 ++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/src/languages/en.ts b/src/languages/en.ts index d8d221d1bd23f..fdc10b94ae7ab 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5139,6 +5139,15 @@ const translations = { ? `updated the category "${categoryName}" by adding a Gl Code of "${newValue}"` : `updated the category "${categoryName}" by changing the Gl Code to "${newValue}" (previously "${oldValue}")`; }, + updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `updated the category "${categoryName}" by removing the Description Hint (previously "${oldValue}")`; + } + + return !oldValue + ? `updated the category "${categoryName}" by adding a Description Hint of "${newValue}"` + : `updated the category "${categoryName}" by changing the Description Hint to "${newValue}" (previously "${oldValue}")`; + }, updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { return `updated the category "${categoryName}" by removing the Max Amount (previously "${oldValue}")`; @@ -5161,6 +5170,15 @@ const translations = { }); return `updated the category "${categoryName}" by changing the receipts to "${newValueText}" (previously "${oldValueText}")`; }, + updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `updated the category "${categoryName}" by removing the Limit Type (previously "${oldValue}")`; + } + + return !oldValue + ? `updated the category "${categoryName}" by adding a Limit Type of "${newValue}"` + : `updated the category "${categoryName}" by changing the Limit Type to "${newValue}" (previously "${oldValue}")`; + }, updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { if (newValue) { return `updated the category "${categoryName}" by changing the description from Not Required to Required`; diff --git a/src/languages/es.ts b/src/languages/es.ts index c696a7b71cc4a..8daab9f56f31b 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -5212,6 +5212,15 @@ const translations = { }); return `actualizó la categoría "${categoryName}" cambiando los requisitos de recibos a "${newValueText}" (anteriormente "${oldValueText}")`; }, + updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando la sugerencia de descripción (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo una sugerencia de descripción de "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando la sugerencia de descripción a "${newValue}" (anteriormente "${oldValue}")`; + }, updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { if (newValue) { return `actualizó la categoría "${categoryName}" cambiando la descripción de No requerida a Requerida`; @@ -5219,6 +5228,15 @@ const translations = { return `actualizó la categoría "${categoryName}" cambiando la descripción de Requerida a No requerida`; }, + updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando el tipo de límite (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo un tipo de límite de "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando el tipo de límite a "${newValue}" (anteriormente "${oldValue}")`; + }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `añadió la etiqueta "${tagName}" a la lista "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `actualizó la lista de etiquetas "${tagListName}" cambiando la etiqueta "${oldName}" a "${newName}"`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'habilitó' : 'deshabilitó'} la etiqueta "${tagName}" en la lista "${tagListName}"`, diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 1779766464e43..58c5531e702c3 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2039,11 +2039,27 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { newValue, categoryName, }); + case 'commentHint': + return translateLocal('workspaceActions.updatedDescriptionHint', { + oldValue, + newValue, + categoryName, + }); case 'areCommentsRequired': return translateLocal('workspaceActions.updatedAreCommentsRequired', { newValue, categoryName, }); + case 'expenseLimitType': + return translateLocal('workspaceActions.updatedExpenseLimitType', { + oldValue: Object.values(CONST.POLICY.EXPENSE_LIMIT_TYPES).some((value) => value === oldValue) + ? translateLocal(`workspace.rules.categoryRules.expenseLimitTypes.${oldValue as ValueOf}`) + : oldValue, + newValue: Object.values(CONST.POLICY.EXPENSE_LIMIT_TYPES).some((value) => value === newValue) + ? translateLocal(`workspace.rules.categoryRules.expenseLimitTypes.${newValue as ValueOf}`) + : newValue, + categoryName, + }); case 'maxExpenseAmount': return translateLocal('workspaceActions.updatedMaxExpenseAmount', {oldValue, newValue, categoryName}); case 'maxAmountNoReceipt': From 1ddd63758ef2fb1f48e7289bd66169714f72cebb Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Wed, 21 May 2025 20:20:19 +0300 Subject: [PATCH 3/9] updated the copy order --- src/languages/es.ts | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/src/languages/es.ts b/src/languages/es.ts index 8daab9f56f31b..fb0de63e1ddd4 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -5190,6 +5190,15 @@ const translations = { ? `actualizó la categoría "${categoryName}" añadiendo un código GL "${newValue}"` : `actualizó la categoría "${categoryName}" cambiando el código GL a "${newValue}" (anteriormente "${oldValue}")`; }, + updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + if (!newValue) { + return `actualizó la categoría "${categoryName}" eliminando la sugerencia de descripción (anteriormente "${oldValue}")`; + } + + return !oldValue + ? `actualizó la categoría "${categoryName}" añadiendo una sugerencia de descripción de "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando la sugerencia de descripción a "${newValue}" (anteriormente "${oldValue}")`; + }, updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { return `actualizó la categoría "${categoryName}" eliminando el importe máximo (anteriormente "${oldValue}")`; @@ -5212,14 +5221,15 @@ const translations = { }); return `actualizó la categoría "${categoryName}" cambiando los requisitos de recibos a "${newValueText}" (anteriormente "${oldValueText}")`; }, - updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + + updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando la sugerencia de descripción (anteriormente "${oldValue}")`; + return `actualizó la categoría "${categoryName}" eliminando el tipo de límite (anteriormente "${oldValue}")`; } return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo una sugerencia de descripción de "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando la sugerencia de descripción a "${newValue}" (anteriormente "${oldValue}")`; + ? `actualizó la categoría "${categoryName}" añadiendo un tipo de límite de "${newValue}"` + : `actualizó la categoría "${categoryName}" cambiando el tipo de límite a "${newValue}" (anteriormente "${oldValue}")`; }, updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { if (newValue) { @@ -5228,15 +5238,6 @@ const translations = { return `actualizó la categoría "${categoryName}" cambiando la descripción de Requerida a No requerida`; }, - updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando el tipo de límite (anteriormente "${oldValue}")`; - } - - return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo un tipo de límite de "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando el tipo de límite a "${newValue}" (anteriormente "${oldValue}")`; - }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `añadió la etiqueta "${tagName}" a la lista "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `actualizó la lista de etiquetas "${tagListName}" cambiando la etiqueta "${oldName}" a "${newName}"`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'habilitó' : 'deshabilitó'} la etiqueta "${tagName}" en la lista "${tagListName}"`, From d856fa23f38f9ee152ee62780e55007125c7d26c Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 22 May 2025 00:25:39 +0300 Subject: [PATCH 4/9] removed unnecessary copies --- src/languages/en.ts | 56 -------------------------------- src/languages/es.ts | 39 ----------------------- src/libs/ReportActionsUtils.ts | 58 ++++++---------------------------- 3 files changed, 10 insertions(+), 143 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index fdc10b94ae7ab..7f2f939485ae6 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5121,24 +5121,6 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `removed the category "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'disabled' : 'enabled'} the category "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`, - updatedPayrollCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `updated the category "${categoryName}" by removing the Payroll Code (previously "${oldValue}")`; - } - - return !oldValue - ? `updated the category "${categoryName}" by adding a Payroll Code of "${newValue}"` - : `updated the category "${categoryName}" by changing the Payroll Code to "${newValue}" (previously "${oldValue}")`; - }, - updatedGlCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `updated the category "${categoryName}" by removing the Gl Code (previously "${oldValue}")`; - } - - return !oldValue - ? `updated the category "${categoryName}" by adding a Gl Code of "${newValue}"` - : `updated the category "${categoryName}" by changing the Gl Code to "${newValue}" (previously "${oldValue}")`; - }, updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { return `updated the category "${categoryName}" by removing the Description Hint (previously "${oldValue}")`; @@ -5148,44 +5130,6 @@ const translations = { ? `updated the category "${categoryName}" by adding a Description Hint of "${newValue}"` : `updated the category "${categoryName}" by changing the Description Hint to "${newValue}" (previously "${oldValue}")`; }, - updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `updated the category "${categoryName}" by removing the Max Amount (previously "${oldValue}")`; - } - - return !oldValue - ? `updated the category "${categoryName}" by adding a Max Amount of "${newValue}"` - : `updated the category "${categoryName}" by changing the Max Amount to "${newValue}" (previously "${oldValue}")`; - }, - updatedMaxAmountNoReceipt: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - const [oldValueText, newValueText] = [oldValue, newValue].map((value) => { - switch (value) { - case 0: - return 'Required'; - case CONST.DISABLED_MAX_EXPENSE_VALUE: - return 'Not Required'; - default: - return 'Default'; - } - }); - return `updated the category "${categoryName}" by changing the receipts to "${newValueText}" (previously "${oldValueText}")`; - }, - updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `updated the category "${categoryName}" by removing the Limit Type (previously "${oldValue}")`; - } - - return !oldValue - ? `updated the category "${categoryName}" by adding a Limit Type of "${newValue}"` - : `updated the category "${categoryName}" by changing the Limit Type to "${newValue}" (previously "${oldValue}")`; - }, - updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { - if (newValue) { - return `updated the category "${categoryName}" by changing the description from Not Required to Required`; - } - - return `updated the category "${categoryName}" by changing the description from Required to Not Required`; - }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `added the tag "${tagName}" to the list "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `updated the tag list "${tagListName}" by changing the tag "${oldName}" to "${newName}`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'enabled' : 'disabled'} the tag "${tagName}" on the list "${tagListName}"`, diff --git a/src/languages/es.ts b/src/languages/es.ts index fb0de63e1ddd4..8fa0c15dd8721 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -5199,45 +5199,6 @@ const translations = { ? `actualizó la categoría "${categoryName}" añadiendo una sugerencia de descripción de "${newValue}"` : `actualizó la categoría "${categoryName}" cambiando la sugerencia de descripción a "${newValue}" (anteriormente "${oldValue}")`; }, - updatedMaxExpenseAmount: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando el importe máximo (anteriormente "${oldValue}")`; - } - - return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo un importe máximo de "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando el importe máximo a "${newValue}" (anteriormente "${oldValue}")`; - }, - updatedMaxAmountNoReceipt: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - const [oldValueText, newValueText] = [oldValue, newValue].map((value) => { - switch (value) { - case 0: - return 'Requerido'; - case CONST.DISABLED_MAX_EXPENSE_VALUE: - return 'No requerido'; - default: - return 'Por defecto'; - } - }); - return `actualizó la categoría "${categoryName}" cambiando los requisitos de recibos a "${newValueText}" (anteriormente "${oldValueText}")`; - }, - - updatedExpenseLimitType: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando el tipo de límite (anteriormente "${oldValue}")`; - } - - return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo un tipo de límite de "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando el tipo de límite a "${newValue}" (anteriormente "${oldValue}")`; - }, - updatedAreCommentsRequired: ({categoryName, newValue}: UpdatedPolicyCategoryParams) => { - if (newValue) { - return `actualizó la categoría "${categoryName}" cambiando la descripción de No requerida a Requerida`; - } - - return `actualizó la categoría "${categoryName}" cambiando la descripción de Requerida a No requerida`; - }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `añadió la etiqueta "${tagName}" a la lista "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `actualizó la lista de etiquetas "${tagListName}" cambiando la etiqueta "${oldName}" a "${newName}"`, updateTagEnabled: ({tagListName, tagName, enabled}: UpdatedPolicyTagParams) => `${enabled ? 'habilitó' : 'deshabilitó'} la etiqueta "${tagName}" en la lista "${tagListName}"`, diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 58c5531e702c3..0f2c6959e494c 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2026,55 +2026,17 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { } if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CATEGORY && categoryName) { - switch (updatedField) { - case 'Payroll Code': - return translateLocal('workspaceActions.updatedPayrollCode', { - oldValue, - newValue, - categoryName, - }); - case 'GL Code': - return translateLocal('workspaceActions.updatedGlCode', { - oldValue, - newValue, - categoryName, - }); - case 'commentHint': - return translateLocal('workspaceActions.updatedDescriptionHint', { - oldValue, - newValue, - categoryName, - }); - case 'areCommentsRequired': - return translateLocal('workspaceActions.updatedAreCommentsRequired', { - newValue, - categoryName, - }); - case 'expenseLimitType': - return translateLocal('workspaceActions.updatedExpenseLimitType', { - oldValue: Object.values(CONST.POLICY.EXPENSE_LIMIT_TYPES).some((value) => value === oldValue) - ? translateLocal(`workspace.rules.categoryRules.expenseLimitTypes.${oldValue as ValueOf}`) - : oldValue, - newValue: Object.values(CONST.POLICY.EXPENSE_LIMIT_TYPES).some((value) => value === newValue) - ? translateLocal(`workspace.rules.categoryRules.expenseLimitTypes.${newValue as ValueOf}`) - : newValue, - categoryName, - }); - case 'maxExpenseAmount': - return translateLocal('workspaceActions.updatedMaxExpenseAmount', {oldValue, newValue, categoryName}); - case 'maxAmountNoReceipt': - return translateLocal('workspaceActions.updatedMaxAmountNoReceipt', { - oldValue, - newValue, - categoryName, - }); - - default: - return translateLocal('workspaceActions.updateCategory', { - oldValue: !!oldValue, - categoryName, - }); + if (updatedField === 'commentHint') { + return translateLocal('workspaceActions.updatedDescriptionHint', { + oldValue, + newValue, + categoryName, + }); } + return translateLocal('workspaceActions.updateCategory', { + oldValue: !!oldValue, + categoryName, + }); } if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.SET_CATEGORY_NAME && oldName && newName) { From 064b8d58cba15f448aa9f20d54256ba971d30d91 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Tue, 27 May 2025 17:21:52 +0300 Subject: [PATCH 5/9] updated copy --- src/languages/en.ts | 6 +++--- src/languages/es.ts | 24 +++--------------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index e4757dec7573a..a4a63d9307f72 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5127,12 +5127,12 @@ const translations = { setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`, updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { - return `updated the category "${categoryName}" by removing the Description Hint (previously "${oldValue}")`; + return `removed the description hint "${oldValue}" from the category "${categoryName}"`; } return !oldValue - ? `updated the category "${categoryName}" by adding a Description Hint of "${newValue}"` - : `updated the category "${categoryName}" by changing the Description Hint to "${newValue}" (previously "${oldValue}")`; + ? `added the description hint "${newValue}" to the category "${categoryName}"` + : `changed the "${categoryName}" category description hint to “${newValue}” (previously “${oldValue}”)`; }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `added the tag "${tagName}" to the list "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `updated the tag list "${tagListName}" by changing the tag "${oldName}" to "${newName}`, diff --git a/src/languages/es.ts b/src/languages/es.ts index 30e6e016242ed..67b460142bbfa 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -5176,32 +5176,14 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `eliminó la categoría "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'deshabilitó' : 'habilitó'} la categoría "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renombró la categoría "${oldName}" a "${newName}`, - updatedPayrollCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando el código de nómina (anteriormente "${oldValue}")`; - } - - return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo un código de nómina "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando el código de nómina a "${newValue}" (anteriormente "${oldValue}")`; - }, - updatedGlCode: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { - if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando el código GL (anteriormente "${oldValue}")`; - } - - return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo un código GL "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando el código GL a "${newValue}" (anteriormente "${oldValue}")`; - }, updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { if (!newValue) { - return `actualizó la categoría "${categoryName}" eliminando la sugerencia de descripción (anteriormente "${oldValue}")`; + return `eliminó la sugerencia de descripción "${oldValue}" de la categoría "${categoryName}"`; } return !oldValue - ? `actualizó la categoría "${categoryName}" añadiendo una sugerencia de descripción de "${newValue}"` - : `actualizó la categoría "${categoryName}" cambiando la sugerencia de descripción a "${newValue}" (anteriormente "${oldValue}")`; + ? `añadió la sugerencia de descripción "${newValue}" a la categoría "${categoryName}"` + : `cambió la sugerencia de descripción de la categoría "${categoryName}" a “${newValue}” (anteriormente “${oldValue}”)`; }, addTag: ({tagListName, tagName}: UpdatedPolicyTagParams) => `añadió la etiqueta "${tagName}" a la lista "${tagListName}"`, updateTagName: ({tagListName, newName, oldName}: UpdatedPolicyTagNameParams) => `actualizó la lista de etiquetas "${tagListName}" cambiando la etiqueta "${oldName}" a "${newName}"`, From 9ac6e542b56dbd3f8215283f5e7a6ca8a98c6a8b Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Tue, 27 May 2025 17:28:33 +0300 Subject: [PATCH 6/9] update type --- src/languages/en.ts | 3 ++- src/languages/es.ts | 3 ++- src/languages/params.ts | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index a4a63d9307f72..c760802b1f4a3 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -190,6 +190,7 @@ import type { UnshareParams, UntilTimeParams, UpdatedCustomFieldParams, + UpdatedPolicyCategoryDescriptionHintTypeParams, UpdatedPolicyCategoryNameParams, UpdatedPolicyCategoryParams, UpdatedPolicyCurrencyParams, @@ -5125,7 +5126,7 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `removed the category "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'disabled' : 'enabled'} the category "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renamed the category "${oldName}" to "${newName}"`, - updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryDescriptionHintTypeParams) => { if (!newValue) { return `removed the description hint "${oldValue}" from the category "${categoryName}"`; } diff --git a/src/languages/es.ts b/src/languages/es.ts index 67b460142bbfa..e964731f67062 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -189,6 +189,7 @@ import type { UnshareParams, UntilTimeParams, UpdatedCustomFieldParams, + UpdatedPolicyCategoryDescriptionHintTypeParams, UpdatedPolicyCategoryNameParams, UpdatedPolicyCategoryParams, UpdatedPolicyCurrencyParams, @@ -5176,7 +5177,7 @@ const translations = { deleteCategory: ({categoryName}: UpdatedPolicyCategoryParams) => `eliminó la categoría "${categoryName}"`, updateCategory: ({oldValue, categoryName}: UpdatedPolicyCategoryParams) => `${oldValue ? 'deshabilitó' : 'habilitó'} la categoría "${categoryName}"`, setCategoryName: ({oldName, newName}: UpdatedPolicyCategoryNameParams) => `renombró la categoría "${oldName}" a "${newName}`, - updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryParams) => { + updatedDescriptionHint: ({categoryName, oldValue, newValue}: UpdatedPolicyCategoryDescriptionHintTypeParams) => { if (!newValue) { return `eliminó la sugerencia de descripción "${oldValue}" de la categoría "${categoryName}"`; } diff --git a/src/languages/params.ts b/src/languages/params.ts index 8bd8fdc56bd32..b65ed445c61e1 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -312,6 +312,8 @@ type UpdatedPolicyCurrencyParams = {oldCurrency: string; newCurrency: string}; type UpdatedPolicyCategoryParams = {categoryName: string; oldValue?: boolean | string | number; newValue?: boolean | string | number}; +type UpdatedPolicyCategoryDescriptionHintTypeParams = {categoryName: string; oldValue?: string; newValue?: string}; + type UpdatedPolicyTagParams = {tagListName: string; tagName?: string; enabled?: boolean; count?: string}; type UpdatedPolicyTagNameParams = {oldName: string; newName: string; tagListName: string}; @@ -913,6 +915,7 @@ export type { UpdatedPolicyCurrencyParams, UpdatedPolicyFrequencyParams, UpdatedPolicyCategoryParams, + UpdatedPolicyCategoryDescriptionHintTypeParams, UpdatedPolicyCategoryNameParams, UpdatedPolicyPreventSelfApprovalParams, UpdatedPolicyFieldWithNewAndOldValueParams, From 5e1a2c4dc68f24e0be023bae04548abebed842c8 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Tue, 27 May 2025 17:53:15 +0300 Subject: [PATCH 7/9] fix ts --- src/libs/ReportActionsUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index e7583a3913d11..0b7740e3f4c29 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2002,8 +2002,8 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction): string { if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_CATEGORY && categoryName) { if (updatedField === 'commentHint') { return translateLocal('workspaceActions.updatedDescriptionHint', { - oldValue, - newValue, + oldValue: oldValue as string | undefined, + newValue: newValue as string | undefined, categoryName, }); } From ac7f2156f0277753caea63a0c5800a745aefaa7a Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Wed, 11 Jun 2025 00:51:10 +0300 Subject: [PATCH 8/9] fix spelling --- src/libs/ReportActionsUtils.ts | 8 ++++---- src/libs/SidebarUtils.ts | 8 ++++---- src/pages/home/report/ContextMenu/ContextMenuActions.tsx | 8 ++++---- src/pages/home/report/PureReportActionItem.tsx | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index dded3be938183..64975fa66f537 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2537,7 +2537,7 @@ function getRenamedAction(reportAction: OnyxEntry) { +function getAddedApprovalRuleMessage(reportAction: OnyxEntry) { const {name, approverAccountID, approverEmail, field, approverName} = getOriginalMessage(reportAction as ReportAction) ?? {}; @@ -2553,7 +2553,7 @@ function getAddedApprovaRulelMessage(reportAction: OnyxEntry) { return getReportActionText(reportAction); } -function getDeletedApprovaRulelMessage(reportAction: OnyxEntry) { +function getDeletedApprovalRuleMessage(reportAction: OnyxEntry) { const {name, approverAccountID, approverEmail, field, approverName} = getOriginalMessage(reportAction as ReportAction) ?? {}; @@ -2789,8 +2789,8 @@ export { getNumberOfMoneyRequests, getOneTransactionThreadReportID, getOriginalMessage, - getAddedApprovaRulelMessage, - getDeletedApprovaRulelMessage, + getAddedApprovalRuleMessage, + getDeletedApprovalRuleMessage, getUpdatedApprovalRuleMessage, getRemovedFromApprovalChainMessage, getDemotedFromWorkspaceMessage, diff --git a/src/libs/SidebarUtils.ts b/src/libs/SidebarUtils.ts index a848555936ae7..abf2e6fc07ec8 100644 --- a/src/libs/SidebarUtils.ts +++ b/src/libs/SidebarUtils.ts @@ -24,10 +24,10 @@ import Parser from './Parser'; import Performance from './Performance'; import {getCleanedTagName, getPolicy} from './PolicyUtils'; import { - getAddedApprovaRulelMessage, + getAddedApprovalRuleMessage, getAddedConnectionMessage, getCardIssuedMessage, - getDeletedApprovaRulelMessage, + getDeletedApprovalRuleMessage, getIntegrationSyncFailedMessage, getLastVisibleMessage, getMessageOfOldDotReportAction, @@ -689,9 +689,9 @@ function getOptionData({ } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_AUDIT_RATE) { result.alternateText = getUpdatedAuditRateMessage(lastAction); } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_APPROVER_RULE) { - result.alternateText = getAddedApprovaRulelMessage(lastAction); + result.alternateText = getAddedApprovalRuleMessage(lastAction); } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_APPROVER_RULE) { - result.alternateText = getDeletedApprovaRulelMessage(lastAction); + result.alternateText = getDeletedApprovalRuleMessage(lastAction); } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_APPROVER_RULE) { result.alternateText = getUpdatedApprovalRuleMessage(lastAction); } else if (lastAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_MANUAL_APPROVAL_THRESHOLD) { diff --git a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx index 65d1de66b950f..878954cced957 100644 --- a/src/pages/home/report/ContextMenu/ContextMenuActions.tsx +++ b/src/pages/home/report/ContextMenu/ContextMenuActions.tsx @@ -23,10 +23,10 @@ import {getCleanedTagName} from '@libs/PolicyUtils'; import ReportActionComposeFocusManager from '@libs/ReportActionComposeFocusManager'; import { getActionableMentionWhisperMessage, - getAddedApprovaRulelMessage, + getAddedApprovalRuleMessage, getAddedConnectionMessage, getCardIssuedMessage, - getDeletedApprovaRulelMessage, + getDeletedApprovalRuleMessage, getExportIntegrationMessageHTML, getIntegrationSyncFailedMessage, getIOUReportIDFromReportActionPreview, @@ -647,9 +647,9 @@ const ContextMenuActions: ContextMenuAction[] = [ } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_AUDIT_RATE)) { setClipboardMessage(getUpdatedAuditRateMessage(reportAction)); } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_APPROVER_RULE)) { - setClipboardMessage(getAddedApprovaRulelMessage(reportAction)); + setClipboardMessage(getAddedApprovalRuleMessage(reportAction)); } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_APPROVER_RULE)) { - setClipboardMessage(getDeletedApprovaRulelMessage(reportAction)); + setClipboardMessage(getDeletedApprovalRuleMessage(reportAction)); } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_APPROVER_RULE)) { setClipboardMessage(getUpdatedApprovalRuleMessage(reportAction)); } else if (isActionOfType(reportAction, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_MANUAL_APPROVAL_THRESHOLD)) { diff --git a/src/pages/home/report/PureReportActionItem.tsx b/src/pages/home/report/PureReportActionItem.tsx index 6b9056513e2bb..d08c4f7324547 100644 --- a/src/pages/home/report/PureReportActionItem.tsx +++ b/src/pages/home/report/PureReportActionItem.tsx @@ -58,9 +58,9 @@ import {getDisplayNameOrDefault} from '@libs/PersonalDetailsUtils'; import {getCleanedTagName} from '@libs/PolicyUtils'; import { extractLinksFromMessageHtml, - getAddedApprovaRulelMessage, + getAddedApprovalRuleMessage, getAddedConnectionMessage, - getDeletedApprovaRulelMessage, + getDeletedApprovalRuleMessage, getDemotedFromWorkspaceMessage, getDismissedViolationMessageText, getIntegrationSyncFailedMessage, @@ -1122,9 +1122,9 @@ function PureReportActionItem({ } else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_EMPLOYEE) { children = ; } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.ADD_APPROVER_RULE)) { - children = ; + children = ; } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_APPROVER_RULE)) { - children = ; + children = ; } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.UPDATE_APPROVER_RULE)) { children = ; } else if (isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.REMOVED_FROM_APPROVAL_CHAIN)) { From 70e0592b1827f31a027e26d02fb8ed8f62d31889 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Wed, 11 Jun 2025 15:46:16 +0300 Subject: [PATCH 9/9] suppress deprecation --- src/libs/ReportActionsUtils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/ReportActionsUtils.ts b/src/libs/ReportActionsUtils.ts index 64975fa66f537..0f8dc95d7767d 100644 --- a/src/libs/ReportActionsUtils.ts +++ b/src/libs/ReportActionsUtils.ts @@ -2135,6 +2135,8 @@ function getWorkspaceCategoryUpdateMessage(action: ReportAction, policyID?: stri } if (updatedField === 'maxAmountNoReceipt' && typeof oldValue !== 'boolean' && typeof newValue !== 'boolean') { + // This will be fixed as part of https://github.com/Expensify/Expensify/issues/507850 + // eslint-disable-next-line deprecation/deprecation const policy = getPolicy(policyID); const maxExpenseAmountToDisplay = policy?.maxExpenseAmountNoReceipt === CONST.DISABLED_MAX_EXPENSE_VALUE ? 0 : policy?.maxExpenseAmountNoReceipt;