Skip to content

Commit

Permalink
Update popover paths breadcrumbs display application page
Browse files Browse the repository at this point in the history
Signed-off-by: EstyBiton <esty.b.5673@gmail.com>
  • Loading branch information
EstyBiton committed Nov 4, 2024
1 parent 033323d commit a7fee8b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/src/app/Paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const DevPaths = {
applicationsAnalysisDetails:
"/applications/:applicationId/analysis-details/:taskId",
applicationsTaskDetails: "/applications/:applicationId/tasks/:taskId",
applicationPopoverTasks: "/applications/tasks/:taskId",
applicationsAnalysisDetailsAttachment:
"/applications/:applicationId/analysis-details/:taskId/attachments/:attachmentId",
applicationsAnalysisTab: "/applications/analysis-tab",
Expand Down
5 changes: 5 additions & 0 deletions client/src/app/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ export const devRoutes: IRoute<DevPathValues>[] = [
comp: TaskDetails,
exact: true,
},
{
path: Paths.applicationPopoverTasks,
comp: TaskDetails,
exact: true,
},
{
path: Paths.applicationsAnalysisDetailsAttachment,
comp: AnalysisDetails,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const linkToTasks = (applicationName: string) => {
};

const linkToDetails = (task: TaskDashboard) => {
return formatPath(Paths.taskDetails, {
return formatPath(Paths.applicationPopoverTasks, {
taskId: task.id,
});
};
Expand Down
5 changes: 4 additions & 1 deletion client/src/app/pages/tasks/TaskDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ export const TaskDetails = () => {
useParams<TaskDetailsAttachmentRoute>();
const currentPath = window.location.pathname;
const isFromApplication = currentPath.includes("application") ? true : false;
const isContainApplicationId = currentPath.includes(applicationId)
? true
: false;
const { application } = useFetchApplicationById(applicationId);

const appName: string = application?.name ?? t("terms.unknown");
Expand All @@ -32,7 +35,7 @@ export const TaskDetails = () => {
title: t(isFromApplication ? "terms.applications" : "terms.tasks"),
path: isFromApplication ? Paths.applications : Paths.tasks,
},
isFromApplication
isFromApplication && isContainApplicationId
? {
title: appName,
path: `${Paths.applications}/?activeItem=${applicationId}`,
Expand Down

0 comments on commit a7fee8b

Please sign in to comment.