Skip to content

Commit

Permalink
add RBR
Browse files Browse the repository at this point in the history
  • Loading branch information
Justice Arthur committed Oct 28, 2022
1 parent 6be3ef2 commit d0408fb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/workspace/WorkspacesListPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import OfflineWithFeedback from '../../components/OfflineWithFeedback';
import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize';
import * as Expensicons from '../../components/Icon/Expensicons';
import themeColors from '../../styles/themes/default';
import * as PolicyUtils from '../../libs/PolicyUtils';
import MenuItem from '../../components/MenuItem';
import * as Policy from '../../libs/actions/Policy';
import policyMemberPropType from '../policyMemberPropType';
import Permissions from '../../libs/Permissions';
import Button from '../../components/Button';
import FixedFooter from '../../components/FixedFooter';
Expand All @@ -43,6 +45,9 @@ const propTypes = {
pendingAction: PropTypes.oneOf(_.values(CONST.RED_BRICK_ROAD_PENDING_ACTION)),
})),

/** List of policy members */
policyMembers: PropTypes.objectOf(policyMemberPropType),

/** The user's wallet account */
userWallet: PropTypes.shape({
/** The user's current wallet balance */
Expand All @@ -57,6 +62,7 @@ const propTypes = {

const defaultProps = {
policies: {},
policyMembers: {},
userWallet: {
currentBalance: 0,
},
Expand Down Expand Up @@ -118,9 +124,9 @@ class WorkspacesListPage extends Component {
iconStyles: policy.avatar ? [] : [styles.popoverMenuIconEmphasized],
iconFill: themeColors.iconReversed,
fallbackIcon: Expensicons.FallbackWorkspaceAvatar,
brickRoadIndicator: PolicyUtils.getPolicyBrickRoadIndicatorStatus(policy, this.props.policyMembers),
pendingAction: policy.pendingAction,
isPolicy: true,
errors: policy.errors,
dismissError: () => dismissWorkspaceError(policy.id, policy.pendingAction),
disabled: policy.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
}))
Expand Down Expand Up @@ -206,6 +212,9 @@ export default compose(
policies: {
key: ONYXKEYS.COLLECTION.POLICY,
},
policyMembers: {
key: ONYXKEYS.COLLECTION.POLICY_MEMBER_LIST,
},
userWallet: {
key: ONYXKEYS.USER_WALLET,
},
Expand Down

0 comments on commit d0408fb

Please sign in to comment.