mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 04:10:44 -03:30
Put project related tabs in the correct order
This commit is contained in:
parent
b8fe3f648e
commit
f502fbfad6
@ -129,22 +129,29 @@ class Project extends Component {
|
||||
const tabsArray = [
|
||||
{ name: i18n._(t`Details`), link: `${match.url}/details`, id: 0 },
|
||||
{ name: i18n._(t`Access`), link: `${match.url}/access`, id: 1 },
|
||||
{ name: i18n._(t`Schedules`), link: `${match.url}/schedules`, id: 2 },
|
||||
{
|
||||
name: i18n._(t`Job Templates`),
|
||||
link: `${match.url}/job_templates`,
|
||||
id: 3,
|
||||
},
|
||||
];
|
||||
|
||||
if (canSeeNotificationsTab) {
|
||||
tabsArray.push({
|
||||
name: i18n._(t`Notifications`),
|
||||
link: `${match.url}/notifications`,
|
||||
id: 4,
|
||||
id: 2,
|
||||
});
|
||||
}
|
||||
|
||||
tabsArray.push(
|
||||
{
|
||||
name: i18n._(t`Job Templates`),
|
||||
link: '/job_templates',
|
||||
id: canSeeNotificationsTab ? 3 : 2,
|
||||
},
|
||||
{
|
||||
name: i18n._(t`Schedules`),
|
||||
link: '/schedules',
|
||||
id: canSeeNotificationsTab ? 4 : 3,
|
||||
}
|
||||
);
|
||||
|
||||
const CardHeader = styled(PFCardHeader)`
|
||||
--pf-c-card--first-child--PaddingTop: 0;
|
||||
--pf-c-card--child--PaddingLeft: 0;
|
||||
|
||||
@ -45,7 +45,7 @@ describe.only('<Project />', () => {
|
||||
'.pf-c-tabs__item',
|
||||
el => el.length === 5
|
||||
);
|
||||
expect(tabs.last().text()).toEqual('Notifications');
|
||||
expect(tabs.at(2).text()).toEqual('Notifications');
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user