Skip to content
Snippets Groups Projects
Commit 96bfd503 authored by Julian's avatar Julian
Browse files

Add logic hooks to sendToServer

parent 1ae9703d
No related branches found
No related tags found
1 merge request!373Resolve "Suggest creating Kolego absence for the rest of the day when entering absences"
...@@ -28,6 +28,8 @@ export default { ...@@ -28,6 +28,8 @@ export default {
return; return;
} }
this.beforeSendToServer(participations, field, value);
this.mutate( this.mutate(
updateParticipationStatuses, updateParticipationStatuses,
{ {
...@@ -51,9 +53,13 @@ export default { ...@@ -51,9 +53,13 @@ export default {
participationStatus.isOptimistic = newStatus.isOptimistic; participationStatus.isOptimistic = newStatus.isOptimistic;
}); });
this.duringUpdateSendToServer(participations, field, value, incomingStatuses)
return storedDocumentations; return storedDocumentations;
}, },
); );
this.afterSendToServer(participations, field, value)
}, },
addExtraMarks(participations, extraMarkId) { addExtraMarks(participations, extraMarkId) {
// Get all participation statuses without this extra mark and get the respective person ids // Get all participation statuses without this extra mark and get the respective person ids
...@@ -91,5 +97,14 @@ export default { ...@@ -91,5 +97,14 @@ export default {
}, },
); );
}, },
beforeSendToServer(_participations, _field, _value) {
// Noop hook
},
duringUpdateSendToServer(_participations, _field, _value, _incoming) {
// Noop hook
},
afterSendToServer(_participations, _field, _value) {
// Noop hook
},
}, },
}; };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment