mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
remove success toast for parcours startdate + take empty string values into account for action dates
This commit is contained in:
parent
0ce23230da
commit
ad1e7b576c
@ -28,14 +28,13 @@ export default {
|
|||||||
const date = e.target.previousSibling.value;
|
const date = e.target.previousSibling.value;
|
||||||
|
|
||||||
this.$store.dispatch('updateStartDate', date)
|
this.$store.dispatch('updateStartDate', date)
|
||||||
.then(this.$toast.open({type: 'success', message: this.$t('startdate.update')}))
|
|
||||||
.catch(({name, violations}) => {
|
.catch(({name, violations}) => {
|
||||||
if (name === 'ValidationException' || name === 'AccessException') {
|
if (name === 'ValidationException' || name === 'AccessException') {
|
||||||
violations.forEach((violation) => this.$toast.open({message: violation}));
|
violations.forEach((violation) => this.$toast.open({message: violation}));
|
||||||
} else {
|
} else {
|
||||||
this.$toast.open({message: 'An error occurred'})
|
this.$toast.open({message: 'An error occurred'})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -69,13 +69,14 @@ const store = createStore({
|
|||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
buildPayload(state) {
|
buildPayload(state) {
|
||||||
|
console.log('end date', state.endDate);
|
||||||
return {
|
return {
|
||||||
type: 'accompanying_period_work',
|
type: 'accompanying_period_work',
|
||||||
id: state.work.id,
|
id: state.work.id,
|
||||||
startDate: state.startDate === null ? null : {
|
startDate: state.startDate === null || state.startDate === '' ? null : {
|
||||||
datetime: datetimeToISO(ISOToDate(state.startDate))
|
datetime: datetimeToISO(ISOToDate(state.startDate))
|
||||||
},
|
},
|
||||||
endDate: state.endDate === null ? null : {
|
endDate: state.endDate === null || state.endDate === '' ? null : {
|
||||||
datetime: datetimeToISO(ISOToDate(state.endDate))
|
datetime: datetimeToISO(ISOToDate(state.endDate))
|
||||||
},
|
},
|
||||||
note: state.note,
|
note: state.note,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user