mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FEATURE [store][component] final adjustments to methods to post time spent
This commit is contained in:
parent
80a88fc00c
commit
a5f4eabc34
@ -55,7 +55,8 @@
|
||||
</label>
|
||||
<div class="col-8 col-sm-4 col-md-8 col-lg-4">
|
||||
<select class="form-control form-control-sm" type="time" v-model="timeSpent">
|
||||
<option v-for="time in timeSpent" :value="new Date(time.value)">
|
||||
<option disabled value="">{{ $t('select_time_spent') }}</option>
|
||||
<option v-for="time in timeSpentChoices" :value="time.value">
|
||||
{{ time.text }}
|
||||
</option>
|
||||
</select>
|
||||
@ -204,6 +205,7 @@ const i18n = {
|
||||
evaluation_add_a_document: "Ajouter un document",
|
||||
evaluation_add: "Ajouter une évaluation",
|
||||
evaluation_time_spent: "Temps de rédaction",
|
||||
select_time_spent: "Indiquez le temps de rédaction",
|
||||
Documents: "Documents",
|
||||
document_add: "Générer ou téléverser un document",
|
||||
document_upload: "Téléverser un document",
|
||||
@ -295,7 +297,7 @@ export default {
|
||||
set(v) { this.$store.commit('setEvaluationWarningInterval', { key: this.evaluation.key, days: v }); }
|
||||
},
|
||||
timeSpent: {
|
||||
get() { return this.timeSpentChoices },
|
||||
get() { return this.evaluation.timeSpent },
|
||||
set(v) { this.$store.commit('setEvaluationTimeSpent', { key: this.evaluation.key, time: v}) }
|
||||
},
|
||||
comment: {
|
||||
|
@ -116,6 +116,7 @@ const store = createStore({
|
||||
endDate: e.endDate === null || e.endDate === '' ? null : { datetime: datetimeToISO(ISOToDate(e.endDate)) },
|
||||
maxDate: e.maxDate === null || e.maxDate === '' ? null : { datetime: datetimeToISO(ISOToDate(e.maxDate)) },
|
||||
warningInterval: intervalDaysToISO(e.warningInterval),
|
||||
timeSpent: e.timeSpent,
|
||||
comment: e.comment,
|
||||
documents: e.documents
|
||||
};
|
||||
@ -138,6 +139,7 @@ const store = createStore({
|
||||
endDate: e.endDate !== null ? dateToISO(new Date(e.endDate.datetime)) : null,
|
||||
maxDate: e.maxDate !== null ? dateToISO(new Date(e.maxDate.datetime)) : null,
|
||||
warningInterval: e.warningInterval !== null ? intervalISOToDays(e.warningInterval) : null,
|
||||
timeSpent: e.timeSpent !== null ? e.timeSpent : null,
|
||||
documents: e.documents.map((d, docIndex) => {
|
||||
return Object.assign(d, {
|
||||
key: docIndex
|
||||
@ -258,6 +260,7 @@ const store = createStore({
|
||||
endDate: null,
|
||||
maxDate: null,
|
||||
warningInterval: null,
|
||||
timeSpent: null,
|
||||
comment: "",
|
||||
editEvaluation: true,
|
||||
workflows_availables: state.work.workflows_availables_evaluation,
|
||||
@ -471,7 +474,7 @@ const store = createStore({
|
||||
;
|
||||
commit('setIsPosting', true);
|
||||
|
||||
console.log('payload', payload);
|
||||
console.log('the social action', payload);
|
||||
|
||||
return makeFetch('PUT', url, payload)
|
||||
.then(data => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user