From 1d1c61f6bb2ab3a45a0255c45fda2402c63e141c Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 5 Sep 2022 10:41:54 +0100 Subject: [PATCH 1/2] Get pending action proptypes from CONST --- src/pages/settings/InitialSettingsPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index df2fbd8afe0b..24e0968b04e3 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -55,7 +55,7 @@ const propTypes = { role: PropTypes.string, /** The current action that is waiting to happen on the policy */ - pendingAction: PropTypes.oneOf(['add', 'update', 'delete']), + pendingAction: PropTypes.oneOf(_.values(CONST.RED_BRICK_ROAD_PENDING_ACTION)), })), /** List of policy members */ From a1e5d386262df4fce294928efe76f00605f23561 Mon Sep 17 00:00:00 2001 From: Puneet Lath Date: Mon, 5 Sep 2022 10:43:46 +0100 Subject: [PATCH 2/2] Remove unnecessary ternary --- src/pages/settings/InitialSettingsPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/settings/InitialSettingsPage.js b/src/pages/settings/InitialSettingsPage.js index 24e0968b04e3..f23f7b1205a6 100755 --- a/src/pages/settings/InitialSettingsPage.js +++ b/src/pages/settings/InitialSettingsPage.js @@ -173,7 +173,7 @@ class InitialSettingsPage extends React.Component { iconFill: themeColors.iconReversed, fallbackIcon: Expensicons.FallbackWorkspaceAvatar, brickRoadIndicator: PolicyUtils.getPolicyBrickRoadIndicatorStatus(policy, this.props.policyMembers), - pendingAction: policy.pendingAction ? policy.pendingAction : null, + pendingAction: policy.pendingAction, isPolicy: true, })) .value();