mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Fix nested project schedule breadcrumb
This commit is contained in:
parent
e210ee4077
commit
eb28800082
@ -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 });
|
||||
|
Loading…
Reference in New Issue
Block a user