mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
replace all links and buttons involved by OnTheFly component
This commit is contained in:
@@ -4,18 +4,21 @@
|
||||
:class="classAction"
|
||||
:title="$t(titleAction)"
|
||||
@click="openModal">
|
||||
{{ buttonText }}
|
||||
</a>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="modal.showModal = false">
|
||||
|
||||
|
||||
<template v-slot:header>
|
||||
<h3 class="modal-title">{{ $t(modalTitle) }}</h3>
|
||||
<h3 class="modal-title">{{ $t(titleModal) }}</h3>
|
||||
</template>
|
||||
<template v-slot:body>
|
||||
|
||||
{{ action }}
|
||||
{{ type }}
|
||||
{{ id }}
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button class="sc-button bt-save"> <!-- @click.prevent="$emit('..', ..)" -->
|
||||
@@ -36,7 +39,7 @@ export default {
|
||||
components: {
|
||||
Modal
|
||||
},
|
||||
props: ['type', 'id', 'action'],
|
||||
props: ['type', 'id', 'action', 'buttonText'],
|
||||
data() {
|
||||
return {
|
||||
modal: {
|
||||
@@ -50,20 +53,30 @@ export default {
|
||||
switch (this.action) {
|
||||
case 'show':
|
||||
return 'bt-show';
|
||||
case 'create':
|
||||
return 'bt-create';
|
||||
case 'edit':
|
||||
return 'bt-update';
|
||||
case 'create':
|
||||
return 'bt-create';
|
||||
}
|
||||
},
|
||||
titleAction() {
|
||||
switch (this.action) {
|
||||
case 'show':
|
||||
return 'action.show';
|
||||
case 'create':
|
||||
return 'action.create';
|
||||
case 'edit':
|
||||
return 'action.edit';
|
||||
case 'create':
|
||||
return 'action.create';
|
||||
}
|
||||
},
|
||||
titleModal() {
|
||||
switch (this.action) {
|
||||
case 'show':
|
||||
return 'onthefly.show.' + this.type;
|
||||
case 'edit':
|
||||
return 'onthefly.edit.' + this.type;
|
||||
case 'create':
|
||||
return 'onthefly.create.title';
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@@ -46,6 +46,20 @@ const messages = {
|
||||
previous: "Précédent",
|
||||
top: "Haut",
|
||||
bottom: "Bas",
|
||||
},
|
||||
onthefly: {
|
||||
show: {
|
||||
person: "Détails de l'usager",
|
||||
thirdparty: "Détails du tiers"
|
||||
},
|
||||
edit: {
|
||||
person: "Modifier un usager",
|
||||
thirdparty: "Modifier un tiers"
|
||||
},
|
||||
create: {
|
||||
button: "Créer \"{q}\"",
|
||||
title: "Saisir une nouvelle personne à la volée",
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user