privateComment for action (not working yet)

This commit is contained in:
Julie Lenaerts 2022-04-27 11:52:01 +02:00
parent 4dc56db018
commit c56a125a78
3 changed files with 42 additions and 25 deletions

View File

@ -470,6 +470,14 @@ export default {
this.$store.commit('setNote', v);
}
},
privateComment: {
get() {
return this.$store.state.privateComment;
},
set(v) {
this.$store.commit('setPrivateComment', v);
}
},
availableForCheckGoal() {
let pickedIds = this.$store.state.goalsPicked.map(g => g.goal.id);

View File

@ -17,6 +17,7 @@ const store = createStore({
endDate: window.accompanyingCourseWork.endDate !== null ?
ISOToDatetime(window.accompanyingCourseWork.endDate.datetime) : null,
note: window.accompanyingCourseWork.note,
privateComment: window.accompanyingCourseWork.privateComment,
goalsPicked: window.accompanyingCourseWork.goals,
goalsForAction: [],
resultsPicked: window.accompanyingCourseWork.results,
@ -79,6 +80,7 @@ const store = createStore({
datetime: datetimeToISO(state.endDate)
},
note: state.note,
privateComment: state.privateComment,
persons: state.personsPicked.map(p => ({id: p.id, type: p.type})),
handlingThierParty: state.handlingThirdParty === null ? null : {
id: state.handlingThirdParty.id,
@ -296,6 +298,9 @@ const store = createStore({
setNote(state, note) {
state.note = note;
},
setPrivateComment(state, privateComment) {
state.privateComment = privateComment;
},
setHandlingThirdParty(state, thirdParty) {
state.handlingThirdParty = thirdParty;
},
@ -453,6 +458,8 @@ const store = createStore({
;
commit('setIsPosting', true);
console.log('payload', payload);
return makeFetch('PUT', url, payload)
.then(data => {
if (typeof(callback) !== 'undefined') {

View File

@ -223,6 +223,8 @@ components:
- "accompanying_period_work"
note:
type: string
privateComment:
type: string
startDate:
$ref: "#/components/schemas/Date"
endDate: