Skip to content

Commit

Permalink
feat(intelligence-next): changes router push to real final path
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiantela committed May 29, 2024
1 parent 06847ff commit 78c14e5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,7 @@ export default {
description: this.data.description,
});
this.$router.push({
name: 'intelligence-home',
params: {
intelligenceUuid: data.uuid,
},
});
this.$router.push(`/intelligences/${data.uuid}`);
} else {
const response = await repositoryV2.create({
organization: this.getOrgSelected,
Expand Down
17 changes: 4 additions & 13 deletions src/components/repository/home/HomeRepositoryCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -663,12 +663,7 @@ export default {
(this.type === 'repository' &&
this.repositoryDetail?.repository_type === 'content')
) {
this.$router.push({
name: 'intelligence-home',
params: {
intelligenceUuid: this.repositoryDetail.uuid,
},
});
this.$router.push(`/intelligences/${this.repositoryDetail.uuid}`);
} else if (this.type === 'repository') {
let name;
Expand All @@ -685,13 +680,9 @@ export default {
},
});
} else if (this.type === 'base') {
this.$router.push({
name: 'intelligence-content-base-edit',
params: {
intelligenceUuid: this.$route.params.intelligenceUuid,
contentBaseUuid: this.repositoryDetail.uuid,
},
});
this.$router.push(
`/intelligences/${this.$route.params.intelligenceUuid}/bases/${this.repositoryDetail.uuid}/edit`,
);
}
},
async copyIntelligence() {
Expand Down
9 changes: 3 additions & 6 deletions src/views/repository/content/Bases.vue
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,9 @@
@close="isAddContentBaseOpen = false"
@success="
($event) =>
$router.push({
name: 'intelligence-content-base-edit',
params: {
contentBaseUuid: $event.uuid,
},
})
$router.push(
`/intelligences/${$route.params.intelligenceUuid}/bases/${$event.uuid}/edit`,
)
"
></BaseSettingsForm>
</div>
Expand Down
9 changes: 1 addition & 8 deletions src/views/repository/content/BasesForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
:title="contentBase.title"
:dontShowBack="isRouterView"
:brainIsDeactivated="!routerTunings.brainOn"
@back="
$router.push({
name: 'intelligence-home',
params: {
intelligenceUuid: intelligenceUuid,
},
})
"
@back="$router.push(`/intelligences/${intelligenceUuid}`)"
>
<UnnnicButton
v-if="isRouterView"
Expand Down
9 changes: 3 additions & 6 deletions src/views/repository/content/ContentAdjustments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,9 @@ export default {
}
},
goToSummary() {
this.$router.push({
name: 'intelligence-home',
params: {
intelligenceUuid: this.$route.params.intelligenceUuid,
},
});
this.$router.push(
`/intelligences/${this.$route.params.intelligenceUuid}`,
);
},
},
};
Expand Down
7 changes: 1 addition & 6 deletions src/views/repository/content/Navigation.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
<template>
<UnnnicButton
@click.native="
$router.push({
name: 'intelligence-edit',
params: {
intelligenceUuid: $route.params.intelligenceUuid,
},
})
$router.push(`/intelligences/${$route.params.intelligenceUuid}/edit`)
"
iconCenter="settings"
type="secondary"
Expand Down

0 comments on commit 78c14e5

Please sign in to comment.