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
Commits
bd0eee36
Commit
bd0eee36
authored
1 year ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Add column for subject
parent
78d36d1e
No related branches found
No related tags found
2 merge requests
!10
Resolve "Add model for planning of courses (dependend on ValidityRange)"
,
!2
Resolve "Frontend for Models"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/lesrooster/frontend/components/TimeboundCourseConfigRaster.vue
+30
-4
30 additions, 4 deletions
...oster/frontend/components/TimeboundCourseConfigRaster.vue
aleksis/apps/lesrooster/frontend/messages/en.json
+2
-1
2 additions, 1 deletion
aleksis/apps/lesrooster/frontend/messages/en.json
with
32 additions
and
5 deletions
aleksis/apps/lesrooster/frontend/components/TimeboundCourseConfigRaster.vue
+
30
−
4
View file @
bd0eee36
...
@@ -36,7 +36,24 @@ import ValidityRangeField from "./ValidityRangeField.vue";</script>
...
@@ -36,7 +36,24 @@ import ValidityRangeField from "./ValidityRangeField.vue";</script>
<save-button
/>
<save-button
/>
</v-toolbar>
</v-toolbar>
</
template
>
</
template
>
<
template
v-for=
"header in headers"
#[tableItemSlotName(header)]=
"{ item, value }"
>
<
template
#item.subject=
"{ item, value }"
>
<v-tooltip
bottom
>
<template
v-slot:activator=
"
{ on, attrs }">
<v-chip
:color=
"value.colourFg"
v-on=
"on"
v-bind=
"attrs"
outlined
>
{{
value
.
shortName
}}
</v-chip>
</
template
>
<span>
{{ value.name }}
</span>
</v-tooltip>
</template>
<
template
v-for=
"header in groupHeaders"
#[tableItemSlotName(header)]=
"{ item, value }"
>
<template
v-for=
"(course, index) in value"
>
<template
v-for=
"(course, index) in value"
>
<v-card
class=
"ma-2"
>
<v-card
class=
"ma-2"
>
<v-card-title>
<v-card-title>
...
@@ -182,13 +199,19 @@ export default {
...
@@ -182,13 +199,19 @@ export default {
subjectGroupCombinations
()
{
subjectGroupCombinations
()
{
return
[].
concat
.
apply
([],
this
.
items
.
map
(
subject
=>
Object
.
keys
(
subject
.
groupCombinations
)));
return
[].
concat
.
apply
([],
this
.
items
.
map
(
subject
=>
Object
.
keys
(
subject
.
groupCombinations
)));
},
},
h
eaders
()
{
groupH
eaders
()
{
return
this
.
groups
.
map
(
group
=>
({
text
:
group
.
shortName
,
value
:
JSON
.
stringify
([
group
.
id
])})).
concat
(
this
.
subjectGroupCombinations
.
map
(
combination
=>
{
return
this
.
groups
.
map
(
group
=>
({
text
:
group
.
shortName
,
value
:
JSON
.
stringify
([
group
.
id
])})).
concat
(
this
.
subjectGroupCombinations
.
map
(
combination
=>
{
let
parsedCombination
=
JSON
.
parse
(
combination
);
let
parsedCombination
=
JSON
.
parse
(
combination
);
return
{
return
{
text
:
parsedCombination
.
map
(
groupID
=>
this
.
groups
.
find
(
group
=>
group
.
id
===
groupID
).
shortName
).
join
(
"
,
"
),
value
:
combination
text
:
parsedCombination
.
map
(
groupID
=>
this
.
groups
.
find
(
group
=>
group
.
id
===
groupID
).
shortName
).
join
(
"
,
"
),
value
:
combination
};
};
})).
filter
((
obj
,
index
,
self
)
=>
index
===
self
.
findIndex
((
o
)
=>
o
.
value
===
obj
.
value
));
})).
filter
((
obj
,
index
,
self
)
=>
index
===
self
.
findIndex
((
o
)
=>
o
.
value
===
obj
.
value
))
},
headers
()
{
return
[{
text
:
this
.
$t
(
"
lesrooster.timebound_course_config.subject
"
),
value
:
"
subject
"
,
}].
concat
(
this
.
groupHeaders
);
},
},
items
()
{
items
()
{
return
this
.
subjects
.
map
(
subject
=>
{
return
this
.
subjects
.
map
(
subject
=>
{
...
@@ -212,7 +235,10 @@ export default {
...
@@ -212,7 +235,10 @@ export default {
});
});
},
},
tableItems
()
{
tableItems
()
{
return
this
.
items
.
map
(
subject
=>
subject
.
groupCombinations
);
return
this
.
items
.
map
(
subject
=>
{
let
{
courses
,
groupCombinations
,
...
reducedSubject
}
=
subject
;
return
{
subject
:
reducedSubject
,
...
subject
.
groupCombinations
};
});
},
},
},
},
apollo
:
{
apollo
:
{
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/lesrooster/frontend/messages/en.json
+
2
−
1
View file @
bd0eee36
...
@@ -47,7 +47,8 @@
...
@@ -47,7 +47,8 @@
"scheduled_slot_count"
:
"Scheduled lesson quota"
,
"scheduled_slot_count"
:
"Scheduled lesson quota"
,
"course"
:
"Course"
,
"course"
:
"Course"
,
"teachers"
:
"Teachers"
,
"teachers"
:
"Teachers"
,
"create_timebound_course_config"
:
"Create timebound course config"
"create_timebound_course_config"
:
"Create timebound course config"
,
"subject"
:
"Subject"
},
},
"lesson_raster"
:
{
"lesson_raster"
:
{
"menu_title"
:
"Lesson Raster"
"menu_title"
:
"Lesson Raster"
...
...
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