#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>
<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') }}
</button>
<button v-else
@ -140,8 +141,12 @@ export default {
}
this.modal.showModal = false;
},
goToLocation(id){
window.location = `../../person/${id}/general`
goToLocation(id, type){
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 {
cursor: pointer;
}
</style>

View File

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