Merge branch 'ameliorations_composants_vue' into 'improve_ux'

Ameliorations composants vue

See merge request Chill-Projet/chill-bundles!134
This commit is contained in:
2021-08-20 16:09:22 +00:00
8 changed files with 149 additions and 79 deletions

View File

@@ -43,8 +43,9 @@
<template v-slot:footer>
<button v-if="action === 'show'"
@click="changeActionTo('edit')"
class="btn btn-update">
@click="goToLocation(id, type)"
:title="$t(titleMessage)"
class="btn btn-show">{{ $t(buttonMessage) }}
</button>
<button v-else
class="btn btn-save"
@@ -115,6 +116,22 @@ export default {
case 'create':
return 'onthefly.create.title';
}
},
titleMessage() {
switch (this.type){
case 'person':
return 'action.redirect.' + this.type;
case 'thirdparty':
return 'action.redirect.' + this.type;
}
},
buttonMessage(){
switch (this.type){
case 'person':
return 'onthefly.show.file_' + this.type;
case 'thirdparty':
return 'onthefly.show.file_' + this.type;
}
}
},
methods: {
@@ -139,6 +156,13 @@ export default {
this.$refs.castNew.castByType();
}
this.modal.showModal = false;
},
goToLocation(id, type){
if(type == 'person'){
window.location = `../../person/${id}/general`
} else if(type == 'thirdparty') {
window.location = `../../thirdparty/thirdparty/${id}/show`
}
}
}
}
@@ -148,4 +172,5 @@ export default {
a {
cursor: pointer;
}
</style>

View File

@@ -41,7 +41,11 @@ const messages = {
close: "Fermer",
back: "Retour",
check_all: "cocher tout",
reset: "réinitialiser"
reset: "réinitialiser",
redirect: {
person: "Quitter la page et ouvrir le dossier",
thirdparty: "Quitter la page et voir le tiers",
}
},
nav: {
next: "Suivant",
@@ -52,7 +56,9 @@ const messages = {
onthefly: {
show: {
person: "Détails de l'usager",
thirdparty: "Détails du tiers"
thirdparty: "Détails du tiers",
file_person: "Ouvrir le dossier",
file_thirdparty: "Voir le Tiers",
},
edit: {
person: "Modifier un usager",
@@ -71,7 +77,7 @@ const messages = {
man: "Né le",
woman: "Née le"
} ,
no_information: "Pas d'information",
no_data: "Aucune information renseignée",
type: {
thirdparty: "Tiers",
person: "Usager"