Disabled display of student name when only one student is in the plan

This commit is contained in:
PMKuipers 2024-08-15 14:41:43 +02:00
parent 9c89038baa
commit 65c9537bd3
4 changed files with 11 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -105,6 +105,13 @@ export function init() {
addBrowserButtonEvent(this.navChanged, this.navChanged);
},
computed: {
studentcount() {
let count = 0;
for (const group of app.associatedstudents) {
count += group.users.length;
}
return count;
}
},
methods: {
navChanged() {

View File

@ -94,7 +94,8 @@ print <<<END
</div>
<div class='t-studyplan-container'>
<h2 v-if='displayedstudyplan&& selectedstudent'
>{{selectedstudent.firstname}} {{selectedstudent.lastname}} - {{displayedstudyplan.name}}</h2>
><span v-if="studentcount > 1">{{selectedstudent.firstname}} {{selectedstudent.lastname}} - </span
>{{displayedstudyplan.name}}</h2>
<h2 v-else-if='displayedstudyplan'>{$text->showoverview} - {{displayedstudyplan.name}}</h2>
<template v-if="!loadingstudyplan && displayedstudyplan">
<r-studyplan v-if="selectedstudent"