Skip to content

Commit

Permalink
Merge pull request #51230 from truph01/fix/50693
Browse files Browse the repository at this point in the history
fix: hide Add shipping details if deactivated
  • Loading branch information
jasperhuangg authored Oct 31, 2024
2 parents 144b58e + 11d9889 commit 1f2cc0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ReportActionItem/IssueCardMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ function IssueCardMessage({action, policyID}: IssueCardMessageProps) {

const isAssigneeCurrentUser = !isEmptyObject(session) && session.accountID === assigneeAccountID;

const shouldShowAddMissingDetailsButton = action?.actionName === CONST.REPORT.ACTIONS.TYPE.CARD_MISSING_ADDRESS && missingDetails && isAssigneeCurrentUser;
const cardIssuedActionOriginalMessage = ReportActionsUtils.isActionOfType(
action,
CONST.REPORT.ACTIONS.TYPE.CARD_ISSUED,
Expand All @@ -53,6 +52,7 @@ function IssueCardMessage({action, policyID}: IssueCardMessageProps) {
const cardID = cardIssuedActionOriginalMessage?.cardID ?? -1;
const isPolicyAdmin = PolicyUtils.isPolicyAdmin(PolicyUtils.getPolicy(policyID));
const card = isPolicyAdmin ? cardsList?.[cardID] : cardList[cardID];
const shouldShowAddMissingDetailsButton = !isEmptyObject(card) && action?.actionName === CONST.REPORT.ACTIONS.TYPE.CARD_MISSING_ADDRESS && missingDetails && isAssigneeCurrentUser;

return (
<>
Expand Down

0 comments on commit 1f2cc0f

Please sign in to comment.