Skip to content
Snippets Groups Projects
Verified Commit f25e699b authored by permcu's avatar permcu Committed by Jonathan Weth
Browse files

Implement groups-field

parent 6e75338a
No related branches found
No related tags found
Loading
...@@ -11,7 +11,18 @@ import CRUDList from "aleksis.core/components/generic/CRUDList.vue"; ...@@ -11,7 +11,18 @@ import CRUDList from "aleksis.core/components/generic/CRUDList.vue";
:show-select="false" :show-select="false"
:enable-create="false" :enable-create="false"
:enable-edit="false" :enable-edit="false"
/> >
<template #groups="{ item: { oldGroups, newGroups } }">
<span v-if="newGroups.length > 0">
<strike v-for="g in oldGroups"> {{ g.shortName }} </strike>
<span> &nbsp;&nbsp </span>
<b v-for="g in newGroups"> {{ g.shortName }} </b>
</span>
<span
v-else
v-for="g in oldGroups"
> {{ g.shortName }} </span>
</template>
</c-r-u-d-list> </c-r-u-d-list>
</template> </template>
...@@ -65,17 +76,7 @@ export default { ...@@ -65,17 +76,7 @@ export default {
prepareList(data) { prepareList(data) {
this.affectedTeachers = data.affectedTeachers; this.affectedTeachers = data.affectedTeachers;
this.affectedGroups = data.affectedGroups; this.affectedGroups = data.affectedGroups;
return data.substitutions;
return data.substitutions.map((sub) => {
return {
groups: sub.oldGroups[0].shortName,
time: sub.startTime,
teachers: sub.oldTeachers[0].shortName,
subject: sub.oldSubject,
room: sub.oldRooms[0].shortName,
notes: sub.comment,
};
});
}, },
}, },
}; };
......
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