-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the border bottom doesn't display in the header of completed task report #54985
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,9 +70,9 @@ | |
const {isSmallScreenWidth} = useResponsiveLayout(); | ||
const route = useRoute(); | ||
const [isDeleteTaskConfirmModalVisible, setIsDeleteTaskConfirmModalVisible] = React.useState(false); | ||
const [invoiceReceiverPolicy] = useOnyx(`${ONYXKEYS.COLLECTION.POLICY}${report?.invoiceReceiver && 'policyID' in report.invoiceReceiver ? report.invoiceReceiver.policyID : -1}`); | ||
Check failure on line 73 in src/pages/home/HeaderView.tsx
|
||
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing | ||
const [parentReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID || report?.reportID || '-1'}`); | ||
Check failure on line 75 in src/pages/home/HeaderView.tsx
|
||
const policy = usePolicy(report?.policyID); | ||
const [personalDetails] = useOnyx(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
|
||
|
@@ -100,7 +100,7 @@ | |
const reportDescription = Parser.htmlToText(ReportUtils.getReportDescription(report)); | ||
const policyName = ReportUtils.getPolicyName(report, true); | ||
const policyDescription = ReportUtils.getPolicyDescriptionText(policy); | ||
const isPersonalExpenseChat = isPolicyExpenseChat && ReportUtils.isCurrentUserSubmitter(report?.reportID ?? ''); | ||
Check failure on line 103 in src/pages/home/HeaderView.tsx
|
||
const shouldShowSubtitle = () => { | ||
if (!subtitle) { | ||
return false; | ||
|
@@ -142,7 +142,6 @@ | |
const defaultSubscriptSize = ReportUtils.isExpenseRequest(report) ? CONST.AVATAR_SIZE.SMALL_NORMAL : CONST.AVATAR_SIZE.DEFAULT; | ||
const icons = ReportUtils.getIcons(reportHeaderData, personalDetails, null, '', -1, policy, invoiceReceiverPolicy); | ||
const brickRoadIndicator = ReportUtils.hasReportNameError(report) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : ''; | ||
const shouldShowBorderBottom = !isTaskReport || !shouldUseNarrowLayout; | ||
const shouldDisableDetailPage = ReportUtils.shouldDisableDetailPage(report); | ||
const shouldUseGroupTitle = isGroupChat && (!!report?.reportName || !isMultipleParticipant); | ||
const isLoading = !report?.reportID || !title; | ||
|
@@ -154,7 +153,7 @@ | |
|
||
return ( | ||
<View | ||
style={[shouldShowBorderBottom && styles.borderBottom]} | ||
style={[styles.borderBottom]} | ||
dataSet={{dragArea: true}} | ||
> | ||
<View style={[styles.appContentHeader, !shouldUseNarrowLayout && styles.headerBarDesktopHeight]}> | ||
|
@@ -258,7 +257,7 @@ | |
<PressableWithoutFeedback | ||
onPress={() => { | ||
if (ReportUtils.canEditPolicyDescription(policy)) { | ||
Navigation.navigate(ROUTES.WORKSPACE_PROFILE_DESCRIPTION.getRoute(report.policyID ?? '-1')); | ||
Check failure on line 260 in src/pages/home/HeaderView.tsx
|
||
return; | ||
} | ||
Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(reportID, Navigation.getReportRHPActiveRoute())); | ||
|
@@ -286,7 +285,7 @@ | |
</PressableWithoutFeedback> | ||
<View style={[styles.reportOptions, styles.flexRow, styles.alignItemsCenter]}> | ||
{!shouldUseNarrowLayout && isChatUsedForOnboarding && <FreeTrial pressable />} | ||
{isTaskReport && !shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />} | ||
{!shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && <TaskHeaderActionButton report={report} />} | ||
{!isParentReportLoading && canJoin && !shouldUseNarrowLayout && joinButton} | ||
</View> | ||
{shouldDisplaySearchRouter && <SearchButton style={styles.ml2} />} | ||
|
@@ -315,6 +314,13 @@ | |
addSpacing | ||
/> | ||
)} | ||
{!!report && shouldUseNarrowLayout && ReportUtils.isOpenTaskReport(report, parentReportAction) && ( | ||
<View style={[styles.appBG, styles.pl0]}> | ||
<View style={[styles.ph5, styles.pb3]}> | ||
<TaskHeaderActionButton report={report} /> | ||
</View> | ||
</View> | ||
)} | ||
</View> | ||
); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DylanDylann As I mentioned in my proposal
isOpenTaskReport
function already hasisTaskReport
check then we can remove this here.