From eb288000827922ee288b297eca323300a953d311 Mon Sep 17 00:00:00 2001 From: Marliana Lara Date: Wed, 18 Mar 2020 13:17:42 -0400 Subject: [PATCH] Fix nested project schedule breadcrumb --- awx/ui_next/src/screens/Project/Projects.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/awx/ui_next/src/screens/Project/Projects.jsx b/awx/ui_next/src/screens/Project/Projects.jsx index b3c7a06d6c..ced814313f 100644 --- a/awx/ui_next/src/screens/Project/Projects.jsx +++ b/awx/ui_next/src/screens/Project/Projects.jsx @@ -24,13 +24,15 @@ class Projects extends Component { }; } - setBreadcrumbConfig = project => { + setBreadcrumbConfig = (project, nested) => { const { i18n } = this.props; if (!project) { return; } + const projectSchedulesPath = `/projects/${project.id}/schedules`; + const breadcrumbConfig = { '/projects': i18n._(t`Projects`), '/projects/add': i18n._(t`Create New Project`), @@ -40,7 +42,12 @@ class Projects extends Component { [`/projects/${project.id}/access`]: i18n._(t`Access`), [`/projects/${project.id}/notifications`]: i18n._(t`Notifications`), [`/projects/${project.id}/job_templates`]: i18n._(t`Job Templates`), - [`/projects/${project.id}/schedules`]: i18n._(t`Schedules`), + + [`${projectSchedulesPath}`]: i18n._(t`Schedules`), + [`${projectSchedulesPath}/${nested?.id}`]: `${nested?.name}`, + [`${projectSchedulesPath}/${nested?.id}/details`]: i18n._( + t`Edit Details` + ), }; this.setState({ breadcrumbConfig });