admin front doleance groupes d'intérets done

This commit is contained in:
2025-02-13 12:43:05 +01:00
parent d324c0436e
commit b3c6f3bb9c
3 changed files with 81 additions and 19 deletions

View File

@@ -50,27 +50,42 @@ export default {
},
created () {
console.log('DateEditable created');
if (this.mode && this.mode === 'range') {
this.date = [this.value, this.end_value]
}else{
this.date = this.value;
}
this.initDateValues();
},
// updated() {
// console.log('DateEditable updated');
// this.initDateValues();
// },
mounted () {
},
beforeUnmount() {
},
watch: {
date (n, o) {
console.log(`datEditable watch date n, o`, n, o);
value (n, o) {
console.log(`dateEditable watch value n, o`, n, o);
if(n !== o){
this.save();
this.initDateValues();
}
},
},
methods: {
...mapActions(ConcernementsStore, ['reloadConcernements']),
initDateValues(){
if (this.value) {
if (this.mode && this.mode === 'range') {
this.date = [this.value, this.end_value]
}else{
this.date = this.value;
}
} else {
this.date = null;
}
},
onDateSelected(modeldata){
console.log('onDateSelected, modeldata', modeldata);
this.save();
},
save(){
console.log('save csrf_token', this.csrf_token);
console.log('save this.data', this.data);
@@ -129,6 +144,8 @@ export default {
format="dd-MM-yyyy"
:enable-time-picker="false"
:clearable="false"
@update:model-value="onDateSelected"
:placeholder="placeholder"
v-bind="attrs"/>
<span v-else class="date">{{ value }}</span>