#134 fix dynamic URL to go to person or thirdparty file

This commit is contained in:
Julie Lenaerts 2021-08-20 11:06:11 +02:00
parent 3e27589cca
commit 55c34c2583
2 changed files with 14 additions and 5 deletions

View File

@ -43,7 +43,8 @@
<template v-slot:footer> <template v-slot:footer>
<button v-if="action === 'show'" <button v-if="action === 'show'"
@click="goToLocation(id)" @click="goToLocation(id, type)"
:title="$t('action.redirect.file')"
class="btn btn-show">{{ $t('onthefly.show.file') }} class="btn btn-show">{{ $t('onthefly.show.file') }}
</button> </button>
<button v-else <button v-else
@ -140,8 +141,12 @@ export default {
} }
this.modal.showModal = false; this.modal.showModal = false;
}, },
goToLocation(id){ goToLocation(id, type){
window.location = `../../person/${id}/general` if(type == 'person'){
window.location = `../../person/${id}/general`
} else if(type == 'thirdparty') {
window.location = `../../thirdparty/thirdparty/${id}/show`
}
} }
} }
} }
@ -151,4 +156,5 @@ export default {
a { a {
cursor: pointer; cursor: pointer;
} }
</style> </style>

View File

@ -41,7 +41,10 @@ const messages = {
close: "Fermer", close: "Fermer",
back: "Retour", back: "Retour",
check_all: "cocher tout", check_all: "cocher tout",
reset: "réinitialiser" reset: "réinitialiser",
redirect: {
file: "Quitter la page et ouvrir le dossier"
}
}, },
nav: { nav: {
next: "Suivant", next: "Suivant",
@ -53,7 +56,7 @@ const messages = {
show: { show: {
person: "Détails de l'usager", person: "Détails de l'usager",
thirdparty: "Détails du tiers", thirdparty: "Détails du tiers",
file: "Aller vers dossier" file: "Ouvrir le dossier",
}, },
edit: { edit: {
person: "Modifier un usager", person: "Modifier un usager",