Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
19f30750
Commit
19f30750
authored
9 months ago
by
permcu
Browse files
Options
Downloads
Patches
Plain Diff
Implement mutation in absence-creation-dialog
parent
8b826eff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!356
Add dialog for creation of long-term absences
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/frontend/components/coursebook/absences/AbsenceCreationDialog.vue
+25
-3
25 additions, 3 deletions
.../components/coursebook/absences/AbsenceCreationDialog.vue
with
25 additions
and
3 deletions
aleksis/apps/alsijil/frontend/components/coursebook/absences/AbsenceCreationDialog.vue
+
25
−
3
View file @
19f30750
...
@@ -69,6 +69,7 @@ import AbsenceCreationSummary from "./AbsenceCreationSummary.vue";
...
@@ -69,6 +69,7 @@ import AbsenceCreationSummary from "./AbsenceCreationSummary.vue";
import
CreateButton
from
"
aleksis.core/components/generic/buttons/CreateButton.vue
"
;
import
CreateButton
from
"
aleksis.core/components/generic/buttons/CreateButton.vue
"
;
import
CancelButton
from
"
aleksis.core/components/generic/buttons/CancelButton.vue
"
;
import
CancelButton
from
"
aleksis.core/components/generic/buttons/CancelButton.vue
"
;
import
SaveButton
from
"
aleksis.core/components/generic/buttons/SaveButton.vue
"
;
import
SaveButton
from
"
aleksis.core/components/generic/buttons/SaveButton.vue
"
;
import
{
createAbsences
}
from
"
./absenceCreation.graphql
"
;
export
default
{
export
default
{
name
:
"
AbsenceCreationDialog
"
,
name
:
"
AbsenceCreationDialog
"
,
...
@@ -99,9 +100,30 @@ export default {
...
@@ -99,9 +100,30 @@ export default {
this
.
form
=
true
;
this
.
form
=
true
;
},
},
confirm
()
{
confirm
()
{
// TODO: Send mutation (shown in absence-creation-summary)
this
.
$apollo
.
mutate
(
{
// Clear form fields
mutation
:
createAbsences
,
popup
=
false
;
variables
:
{
persons
:
this
.
persons
.
map
((
p
)
=>
p
.
id
),
start
:
this
.
startDate
,
end
:
this
.
endDate
,
comment
:
this
.
comment
,
reason
:
this
.
absenceReason
,
},
})
.
then
(()
=>
{
this
.
persons
=
[];
this
.
startDate
=
""
;
this
.
endDate
=
""
;
this
.
comment
=
""
;
this
.
absenceReason
=
""
;
this
.
popup
=
false
;
// $toastSuccess("TODO");
})
.
catch
((
error
)
=>
{
popup
=
false
;
this
.
handleError
(
error
);
});
// finally for loading
},
},
},
},
};
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment