Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Lesrooster
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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®
Onboarding
AlekSIS-App-Lesrooster
Merge requests
!2
Resolve "Frontend for Models"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Frontend for Models"
1-frontend-for-models
into
master
Overview
87
Commits
329
Pipelines
0
Changes
17
Merged
Julian
requested to merge
1-frontend-for-models
into
master
1 year ago
Overview
1
Commits
329
Pipelines
0
Changes
8
Expand
Closes
#1 (closed)
0
0
Merge request reports
Compare
version 13
version 115
5ea24b6f
1 year ago
version 114
74dbfa6d
1 year ago
version 113
c3456b0f
1 year ago
version 112
096be7bd
1 year ago
version 111
fddbab12
1 year ago
version 110
e90108a1
1 year ago
version 109
e90108a1
1 year ago
version 108
fd3b4a8e
1 year ago
version 107
ae548d4a
1 year ago
version 106
be489369
1 year ago
version 105
18bddcd3
1 year ago
version 104
7ae8de61
1 year ago
version 103
95626deb
1 year ago
version 102
4d6e5409
1 year ago
version 101
4b60a95d
1 year ago
version 100
fcf0d1f6
1 year ago
version 99
2e6214a1
1 year ago
version 98
cd2f1a17
1 year ago
version 97
fed9efbf
1 year ago
version 96
db6fec28
1 year ago
version 95
002ddf80
1 year ago
version 94
0c5dbe30
1 year ago
version 93
e0216942
1 year ago
version 92
2bd67233
1 year ago
version 91
9da359fe
1 year ago
version 90
afe0b809
1 year ago
version 89
6fac11c4
1 year ago
version 88
18e88ce1
1 year ago
version 87
f279a274
1 year ago
version 86
4c37e2e9
1 year ago
version 85
63bdf537
1 year ago
version 84
0f6c8e7f
1 year ago
version 83
3b3cd5df
1 year ago
version 82
2007fe3a
1 year ago
version 81
b4504c28
1 year ago
version 80
d5aa334c
1 year ago
version 79
1201ccc5
1 year ago
version 78
99f31fdb
1 year ago
version 77
cef1a10a
1 year ago
version 76
93bcfeef
1 year ago
version 75
710da9af
1 year ago
version 74
31412365
1 year ago
version 73
8ff71267
1 year ago
version 72
01d118e7
1 year ago
version 71
41523bf2
1 year ago
version 70
18ccbc4d
1 year ago
version 69
ed79366b
1 year ago
version 68
d6dac096
1 year ago
version 67
9c441d3c
1 year ago
version 66
bd6fc8af
1 year ago
version 65
8c46321a
1 year ago
version 64
c2cc1d37
1 year ago
version 63
84afe180
1 year ago
version 62
69c90f27
1 year ago
version 61
ca6b66bd
1 year ago
version 60
1cf1e8cb
1 year ago
version 59
6c148494
1 year ago
version 58
31df1305
1 year ago
version 57
845579e2
1 year ago
version 56
55f970a7
1 year ago
version 55
a3aebccc
1 year ago
version 54
52dc8099
1 year ago
version 53
2811fcf2
1 year ago
version 52
cd8f1124
1 year ago
version 51
3abed361
1 year ago
version 50
b4d78537
1 year ago
version 49
45adf606
1 year ago
version 48
9d2c3465
1 year ago
version 47
66300eda
1 year ago
version 46
0b3e37a6
1 year ago
version 45
3b005de5
1 year ago
version 44
69abcfad
1 year ago
version 43
3dd4b213
1 year ago
version 42
793ef0fb
1 year ago
version 41
c17abf61
1 year ago
version 40
9b8d633c
1 year ago
version 39
b057311d
1 year ago
version 38
0cea0111
1 year ago
version 37
c0c2d19b
1 year ago
version 36
3df2b59c
1 year ago
version 35
1f3e30d8
1 year ago
version 34
1f3e30d8
1 year ago
version 33
23b9c7b2
1 year ago
version 32
84cb91b6
1 year ago
version 31
c225e6cc
1 year ago
version 30
532183a5
1 year ago
version 29
fc26e75c
1 year ago
version 28
c205d3b1
1 year ago
version 27
dd23f7a9
1 year ago
version 26
b48e7202
1 year ago
version 25
fb798b7f
1 year ago
version 24
4faf254a
1 year ago
version 23
02f15185
1 year ago
version 22
8826315a
1 year ago
version 21
46b18d9c
1 year ago
version 20
669a29d5
1 year ago
version 19
96ce1273
1 year ago
version 18
03d69c6a
1 year ago
version 17
43ea5f22
1 year ago
version 16
fbabd1a6
1 year ago
version 15
93450075
1 year ago
version 14
92dd580f
1 year ago
version 13
4056a883
1 year ago
version 12
25cf85da
1 year ago
version 11
4512bfb2
1 year ago
version 10
7b4e682d
1 year ago
version 9
57abc947
1 year ago
version 8
b056c483
1 year ago
version 7
ff7a0fbb
1 year ago
version 6
cc856d47
1 year ago
version 5
fa18fa43
1 year ago
version 4
afd15e48
1 year ago
version 3
c51111e5
1 year ago
version 2
fec104af
1 year ago
version 1
f17d86af
1 year ago
master (base)
and
version 14
latest version
5c2df102
329 commits,
1 year ago
version 115
5ea24b6f
328 commits,
1 year ago
version 114
74dbfa6d
326 commits,
1 year ago
version 113
c3456b0f
325 commits,
1 year ago
version 112
096be7bd
324 commits,
1 year ago
version 111
fddbab12
323 commits,
1 year ago
version 110
e90108a1
321 commits,
1 year ago
version 109
e90108a1
321 commits,
1 year ago
version 108
fd3b4a8e
320 commits,
1 year ago
version 107
ae548d4a
320 commits,
1 year ago
version 106
be489369
319 commits,
1 year ago
version 105
18bddcd3
318 commits,
1 year ago
version 104
7ae8de61
317 commits,
1 year ago
version 103
95626deb
315 commits,
1 year ago
version 102
4d6e5409
313 commits,
1 year ago
version 101
4b60a95d
313 commits,
1 year ago
version 100
fcf0d1f6
310 commits,
1 year ago
version 99
2e6214a1
309 commits,
1 year ago
version 98
cd2f1a17
302 commits,
1 year ago
version 97
fed9efbf
300 commits,
1 year ago
version 96
db6fec28
299 commits,
1 year ago
version 95
002ddf80
296 commits,
1 year ago
version 94
0c5dbe30
288 commits,
1 year ago
version 93
e0216942
287 commits,
1 year ago
version 92
2bd67233
286 commits,
1 year ago
version 91
9da359fe
285 commits,
1 year ago
version 90
afe0b809
284 commits,
1 year ago
version 89
6fac11c4
283 commits,
1 year ago
version 88
18e88ce1
281 commits,
1 year ago
version 87
f279a274
279 commits,
1 year ago
version 86
4c37e2e9
278 commits,
1 year ago
version 85
63bdf537
276 commits,
1 year ago
version 84
0f6c8e7f
275 commits,
1 year ago
version 83
3b3cd5df
273 commits,
1 year ago
version 82
2007fe3a
272 commits,
1 year ago
version 81
b4504c28
271 commits,
1 year ago
version 80
d5aa334c
269 commits,
1 year ago
version 79
1201ccc5
267 commits,
1 year ago
version 78
99f31fdb
262 commits,
1 year ago
version 77
cef1a10a
261 commits,
1 year ago
version 76
93bcfeef
260 commits,
1 year ago
version 75
710da9af
258 commits,
1 year ago
version 74
31412365
257 commits,
1 year ago
version 73
8ff71267
253 commits,
1 year ago
version 72
01d118e7
251 commits,
1 year ago
version 71
41523bf2
249 commits,
1 year ago
version 70
18ccbc4d
247 commits,
1 year ago
version 69
ed79366b
245 commits,
1 year ago
version 68
d6dac096
244 commits,
1 year ago
version 67
9c441d3c
242 commits,
1 year ago
version 66
bd6fc8af
241 commits,
1 year ago
version 65
8c46321a
237 commits,
1 year ago
version 64
c2cc1d37
236 commits,
1 year ago
version 63
84afe180
235 commits,
1 year ago
version 62
69c90f27
230 commits,
1 year ago
version 61
ca6b66bd
228 commits,
1 year ago
version 60
1cf1e8cb
224 commits,
1 year ago
version 59
6c148494
221 commits,
1 year ago
version 58
31df1305
219 commits,
1 year ago
version 57
845579e2
214 commits,
1 year ago
version 56
55f970a7
213 commits,
1 year ago
version 55
a3aebccc
204 commits,
1 year ago
version 54
52dc8099
204 commits,
1 year ago
version 53
2811fcf2
203 commits,
1 year ago
version 52
cd8f1124
202 commits,
1 year ago
version 51
3abed361
201 commits,
1 year ago
version 50
b4d78537
200 commits,
1 year ago
version 49
45adf606
200 commits,
1 year ago
version 48
9d2c3465
199 commits,
1 year ago
version 47
66300eda
198 commits,
1 year ago
version 46
0b3e37a6
197 commits,
1 year ago
version 45
3b005de5
194 commits,
1 year ago
version 44
69abcfad
193 commits,
1 year ago
version 43
3dd4b213
192 commits,
1 year ago
version 42
793ef0fb
192 commits,
1 year ago
version 41
c17abf61
185 commits,
1 year ago
version 40
9b8d633c
183 commits,
1 year ago
version 39
b057311d
177 commits,
1 year ago
version 38
0cea0111
175 commits,
1 year ago
version 37
c0c2d19b
173 commits,
1 year ago
version 36
3df2b59c
172 commits,
1 year ago
version 35
1f3e30d8
147 commits,
1 year ago
version 34
1f3e30d8
147 commits,
1 year ago
version 33
23b9c7b2
145 commits,
1 year ago
version 32
84cb91b6
135 commits,
1 year ago
version 31
c225e6cc
128 commits,
1 year ago
version 30
532183a5
127 commits,
1 year ago
version 29
fc26e75c
124 commits,
1 year ago
version 28
c205d3b1
119 commits,
1 year ago
version 27
dd23f7a9
109 commits,
1 year ago
version 26
b48e7202
103 commits,
1 year ago
version 25
fb798b7f
100 commits,
1 year ago
version 24
4faf254a
93 commits,
1 year ago
version 23
02f15185
90 commits,
1 year ago
version 22
8826315a
84 commits,
1 year ago
version 21
46b18d9c
83 commits,
1 year ago
version 20
669a29d5
82 commits,
1 year ago
version 19
96ce1273
71 commits,
1 year ago
version 18
03d69c6a
67 commits,
1 year ago
version 17
43ea5f22
61 commits,
1 year ago
version 16
fbabd1a6
50 commits,
1 year ago
version 15
93450075
49 commits,
1 year ago
version 14
92dd580f
48 commits,
1 year ago
version 13
4056a883
28 commits,
1 year ago
version 12
25cf85da
25 commits,
1 year ago
version 11
4512bfb2
24 commits,
1 year ago
version 10
7b4e682d
23 commits,
1 year ago
version 9
57abc947
21 commits,
1 year ago
version 8
b056c483
20 commits,
1 year ago
version 7
ff7a0fbb
19 commits,
1 year ago
version 6
cc856d47
16 commits,
1 year ago
version 5
fa18fa43
14 commits,
1 year ago
version 4
afd15e48
13 commits,
1 year ago
version 3
c51111e5
4 commits,
1 year ago
version 2
fec104af
2 commits,
1 year ago
version 1
f17d86af
1 commit,
1 year ago
Show latest version
8 files
+
385
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
8
Search (e.g. *.vue) (Ctrl+P)
aleksis/apps/lesrooster/frontend/components/lesson_raster/LessonRaster.vue
0 → 100644
+
268
−
0
Options
<
template
>
<div
id=
"slot-container"
>
<!--
<v-hover
v-slot=
"
{ hover }">-->
<!--
<v-card
elevation=
"0"
>
-->
<!--
<v-card-title>
-->
<!--
<validity-range-field-->
<!-- solo-->
<!-- hide-details-->
<!-- v-model="internalValidityRange"-->
<!-- :loading="$apollo.queries.currentValidityRange.loading"-->
<!-- />-->
<!--
<v-btn-->
<!-- v-if="canAddDay('A_0')"-->
<!-- v-show="hover"-->
<!-- color="secondary"-->
<!-- fab-->
<!-- dark-->
<!-- small-->
<!-- absolute-->
<!-- right-->
<!-- style="right: calc(-20px - 0.5rem)"-->
<!-- >-->
<!--
<v-icon>
mdi-plus
</v-icon>
-->
<!--
</v-btn>
-->
<!--
</v-card-title>
-->
<!--
</v-card>
-->
<!--
</v-hover>
-->
<v-hover
v-for=
"weekday in weekdays"
:style=
"
{
gridColumn: weekday,
}"
v-slot="{ hover }"
>
<v-card
:loading=
"$apollo.queries.items.loading"
>
<v-card-title
class=
"d-flex flex-wrap justify-space-between align-center fill-height"
>
<span>
{{
$t
(
"
weekdays.
"
+
weekday
)
}}
</span>
<v-tooltip
bottom
>
<template
#activator
="
{ on, attrs }">
<v-btn
disabled
icon
v-bind=
"attrs"
v-on=
"on"
v-show=
"hover"
>
<v-icon>
$deleteContent
</v-icon>
</v-btn>
</
template
>
<span
v-t=
"'actions.delete'"
></span>
</v-tooltip>
<v-menu
offset-y
>
<
template
#activator=
"{ on: menu, attrs }"
>
<v-tooltip
bottom
>
<template
#activator
="
{ on: tooltip }">
<v-btn
icon
v-bind=
"attrs"
v-on=
"
{ ...tooltip, ...menu }"
:loading="loading[weekday]"
v-show="hover"
>
<v-icon>
mdi-application-export
</v-icon>
</v-btn>
</
template
>
<span
v-t=
"'actions.copy_to_day'"
></span>
</v-tooltip>
</template>
<v-list>
<v-list-item
v-for=
"(item, index) in weekdays.filter(day => day !== weekday)"
:key=
"index"
link
>
<v-list-item-title
@
click=
"copyTo(weekday, item)"
>
{{ $t("weekdays." + item) }}
</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<v-btn
v-if=
"canAddDay(left(weekday))"
v-show=
"hover"
color=
"secondary"
fab
dark
small
absolute
left
style=
"left: calc(-20px - 0.5rem)"
@
click=
"add(left(weekday))"
>
<v-icon>
mdi-plus
</v-icon>
</v-btn>
<v-btn
v-if=
"canAddDay(right(weekday))"
v-show=
"hover"
color=
"secondary"
fab
dark
small
absolute
right
style=
"right: calc(-20px - 0.5rem)"
@
click=
"add(right(weekday))"
>
<v-icon>
mdi-plus
</v-icon>
</v-btn>
</v-card-title>
</v-card>
</v-hover>
<
template
v-for=
"slot in slots"
>
<slot-card
:item=
"slot"
:disabled=
"$apollo.queries.items.loading"
/>
</
template
>
</div>
</template>
<
script
>
import
{
createBreakSlot
,
deleteBreakSlots
}
from
"
../break.graphql
"
;
import
{
slots
,
createSlot
,
deleteSlot
,
deleteSlots
,
updateSlots
,
}
from
"
../slot.graphql
"
;
import
{
currentValidityRange
}
from
"
../validityRange.graphql
"
;
import
ValidityRangeField
from
"
../ValidityRangeField.vue
"
;
import
SecondaryActionButton
from
"
aleksis.core/components/generic/buttons/SecondaryActionButton.vue
"
;
import
SlotCard
from
"
./SlotCard.vue
"
;
export
default
{
name
:
"
LessonRaster
"
,
components
:
{
SlotCard
,
SecondaryActionButton
,
ValidityRangeField
},
apollo
:
{
items
:
{
query
:
slots
,
variables
()
{
return
{
filters
:
JSON
.
stringify
({
"
validity_range__id
"
:
this
.
internalValidityRange
.
id
})
}
},
result
(
data
)
{
this
.
weekdays
=
Array
.
from
(
new
Set
(
data
.
data
.
items
.
map
(
slot
=>
slot
.
weekday
)));
},
skip
()
{
return
this
.
internalValidityRange
===
null
;
}
},
currentValidityRange
:
{
query
:
currentValidityRange
,
result
(
data
)
{
this
.
internalValidityRange
=
data
.
data
.
currentValidityRange
;
}
}
},
data
()
{
return
{
weekdays
:
[],
internalValidityRange
:
null
,
loading
:
{}
}
},
computed
:
{
slots
()
{
return
this
.
items
;
},
columns
()
{
return
this
.
weekdays
.
map
(
day
=>
`[
${
day
}
] 1fr`
).
join
(
"
"
);
}
},
methods
:
{
canAddDay
(
weekday
)
{
if
(
!
weekday
)
{
return
false
;
}
return
!
this
.
weekdays
.
includes
(
weekday
);
},
add
(
weekday
)
{
if
(
!
this
.
weekdays
.
includes
(
weekday
))
{
this
.
weekdays
.
push
(
weekday
)
this
.
weekdays
.
sort
();
}
},
right
(
weekday
)
{
return
weekday
===
"
A_6
"
?
null
:
weekday
.
replace
(
/
\d
+$/
,
(
match
)
=>
parseInt
(
match
)
+
1
);
},
left
(
weekday
)
{
return
weekday
===
"
A_0
"
?
null
:
weekday
.
replace
(
/
\d
+$/
,
(
match
)
=>
parseInt
(
match
)
-
1
);
},
async
copyTo
(
src
,
dest
)
{
this
.
loading
[
src
]
=
true
;
const
slotsToDelete
=
this
.
items
.
filter
(
slot
=>
slot
.
weekday
===
dest
&&
slot
.
model
===
"
Slot
"
)
.
map
(
slot
=>
slot
.
id
);
const
breaksToDelete
=
this
.
items
.
filter
(
slot
=>
slot
.
weekday
===
dest
&&
slot
.
model
===
"
Break
"
)
.
map
(
slot
=>
slot
.
id
);
// As there is an error when deleting breaks and normal slots in one action, we delete them separately
await
Promise
.
all
([
this
.
$apollo
.
mutate
({
mutation
:
deleteSlots
,
variables
:
{
ids
:
slotsToDelete
},
}),
this
.
$apollo
.
mutate
({
mutation
:
deleteBreakSlots
,
variables
:
{
ids
:
breaksToDelete
},
}),
]
);
await
Promise
.
all
(
this
.
items
.
filter
(
slot
=>
slot
.
weekday
===
src
)
.
map
(
slot
=>
{
this
.
$apollo
.
mutate
({
mutation
:
slot
.
model
===
"
Slot
"
?
createSlot
:
createBreakSlot
,
variables
:
{
input
:
{
name
:
slot
.
name
,
validityRange
:
slot
.
validityRange
.
id
,
weekday
:
parseInt
(
dest
[
2
]),
period
:
slot
.
period
,
timeStart
:
slot
.
timeStart
,
timeEnd
:
slot
.
timeEnd
,
}
},
})
})
)
await
this
.
$apollo
.
queries
.
items
.
refetch
();
this
.
loading
[
src
]
=
false
;
}
},
}
</
script
>
<
style
scoped
>
#slot-container
{
display
:
grid
;
grid-template-columns
:
v-bind
(
columns
);
grid-auto-rows
:
1
fr
auto
;
gap
:
1rem
;
overflow-x
:
scroll
;
margin
:
-1em
;
padding
:
1em
;
}
</
style
>
\ No newline at end of file
Loading