From 0d18ff598f5e0f50125ae631c45f7dd92e6e9cb5 Mon Sep 17 00:00:00 2001 From: krishna2323 Date: Sat, 24 Aug 2024 02:07:20 +0530 Subject: [PATCH] fix: Taxes - Name field is no longer grayed out after editing tax code offline. Signed-off-by: krishna2323 --- src/libs/actions/TaxRate.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/TaxRate.ts b/src/libs/actions/TaxRate.ts index 53f29473d1e3..2cf9c74a571c 100644 --- a/src/libs/actions/TaxRate.ts +++ b/src/libs/actions/TaxRate.ts @@ -498,7 +498,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri [oldTaxCode]: null, [newTaxCode]: { ...originalTaxRate, - pendingFields: {code: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}, + pendingFields: {...originalTaxRate.pendingFields, code: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}, pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE, errorFields: {code: null}, previousTaxCode: oldTaxCode, @@ -520,7 +520,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri [newTaxCode]: { ...originalTaxRate, code: newTaxCode, - pendingFields: {code: null}, + pendingFields: {...originalTaxRate.pendingFields, code: null}, pendingAction: null, errorFields: {code: null}, }, @@ -541,7 +541,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri [oldTaxCode]: { ...originalTaxRate, code: originalTaxRate.code, - pendingFields: {code: null}, + pendingFields: {...originalTaxRate.pendingFields, code: null}, pendingAction: null, errorFields: {code: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('workspace.taxes.error.updateFailureMessage')}, },