From 164a12ace670205cafafe726f5568d19a9a063e6 Mon Sep 17 00:00:00 2001 From: tienifr Date: Thu, 7 Sep 2023 22:49:51 +0700 Subject: [PATCH 1/3] fix: 26339 Unable to remove error reported WS member --- src/libs/actions/Policy.js | 11 ++++++++--- src/pages/workspace/WorkspaceMembersPage.js | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index 87c77e722a5..b001f592767 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -747,11 +747,16 @@ function clearDeleteMemberError(policyID, accountID) { * @param {Number} accountID */ function clearAddMemberError(policyID, accountID) { - Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, { + Onyx.set(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, { + ...allPersonalDetails, [accountID]: null, }); - Onyx.merge(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, { - [accountID]: null, + + Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, { + [accountID]: { + pendingAction: null, + errors: null, + }, }); } diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index d598f90e432..22c0a2aca2c 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -307,6 +307,7 @@ function WorkspaceMembersPage(props) { result.push({ keyForList: accountID, + accountID: Number(accountID), isSelected: _.contains(selectedEmployees, Number(accountID)), isDisabled: accountID === props.session.accountID || details.login === props.policy.owner || policyMember.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE, text: props.formatPhoneNumber(details.displayName), From 5b8bc0115e6a84ccfce97bad261ef2ef55cea730 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 12 Sep 2023 17:35:48 +0700 Subject: [PATCH 2/3] revert unnecessary change --- src/libs/actions/Policy.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index b001f592767..87c77e722a5 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -747,16 +747,11 @@ function clearDeleteMemberError(policyID, accountID) { * @param {Number} accountID */ function clearAddMemberError(policyID, accountID) { - Onyx.set(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, { - ...allPersonalDetails, + Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, { [accountID]: null, }); - - Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, { - [accountID]: { - pendingAction: null, - errors: null, - }, + Onyx.merge(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, { + [accountID]: null, }); } From 951a9ff64d74074d5164496f19ca8b0116a9b9c3 Mon Sep 17 00:00:00 2001 From: tienifr Date: Tue, 26 Sep 2023 14:58:59 +0700 Subject: [PATCH 3/3] bump react native onyx version 1.0.89 --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 64ee3cf6308..4296a0fb273 100644 --- a/package-lock.json +++ b/package-lock.json @@ -90,7 +90,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.87", + "react-native-onyx": "1.0.89", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0", @@ -41204,9 +41204,9 @@ } }, "node_modules/react-native-onyx": { - "version": "1.0.87", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.87.tgz", - "integrity": "sha512-6mIhobSwpClDDGnJm9XEdjnpEdWfFesJ18J8Ifsb4tL6AVi+uxos5bnlZcOoMbtlUk3UozrgSyTjMfFrkD/aZA==", + "version": "1.0.89", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.89.tgz", + "integrity": "sha512-bSC8YwVbMBJYm6BMtuhuYmZi6zMh13e1t8Kaxp7K5EDLcSoTWsWPkuWX4wBvewlkLfw+HgB1IdgnXpa6+jS+ag==", "dependencies": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", @@ -77269,9 +77269,9 @@ } }, "react-native-onyx": { - "version": "1.0.87", - "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.87.tgz", - "integrity": "sha512-6mIhobSwpClDDGnJm9XEdjnpEdWfFesJ18J8Ifsb4tL6AVi+uxos5bnlZcOoMbtlUk3UozrgSyTjMfFrkD/aZA==", + "version": "1.0.89", + "resolved": "https://registry.npmjs.org/react-native-onyx/-/react-native-onyx-1.0.89.tgz", + "integrity": "sha512-bSC8YwVbMBJYm6BMtuhuYmZi6zMh13e1t8Kaxp7K5EDLcSoTWsWPkuWX4wBvewlkLfw+HgB1IdgnXpa6+jS+ag==", "requires": { "ascii-table": "0.0.9", "fast-equals": "^4.0.3", diff --git a/package.json b/package.json index cd93f718679..8b9560212b8 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "react-native-linear-gradient": "^2.8.1", "react-native-localize": "^2.2.6", "react-native-modal": "^13.0.0", - "react-native-onyx": "1.0.87", + "react-native-onyx": "1.0.89", "react-native-pager-view": "^6.2.0", "react-native-pdf": "^6.7.1", "react-native-performance": "^5.1.0",