ui: group display istead of teacher in teacher schedule
This commit is contained in:
@@ -19,7 +19,7 @@ import androidx.compose.ui.platform.LocalContext
|
|||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
internal fun LessonSlot(slotIndex: Int, slot: TimeSlot) {
|
internal fun LessonSlot(slotIndex: Int, slot: TimeSlot, showTeacher: Boolean = true) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
var indexColor = 0
|
var indexColor = 0
|
||||||
Column(Modifier.fillMaxWidth()) {
|
Column(Modifier.fillMaxWidth()) {
|
||||||
@@ -77,7 +77,7 @@ internal fun LessonSlot(slotIndex: Int, slot: TimeSlot) {
|
|||||||
lesson.type.label
|
lesson.type.label
|
||||||
},
|
},
|
||||||
lesson.subgroup,
|
lesson.subgroup,
|
||||||
lesson.teacher,
|
if (showTeacher) lesson.teacher else lesson.group,
|
||||||
lesson.room
|
lesson.room
|
||||||
).filter { it.isNotBlank() }.joinToString(" · ")
|
).filter { it.isNotBlank() }.joinToString(" · ")
|
||||||
|
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ fun TeacherScheduleScreen(viewModel: TeacherScheduleViewModel, onSwitchTeacher:
|
|||||||
contentPadding = PaddingValues(vertical = 8.dp)
|
contentPadding = PaddingValues(vertical = 8.dp)
|
||||||
) {
|
) {
|
||||||
itemsIndexed(pagerDay.intervals) { slotIndex, slot ->
|
itemsIndexed(pagerDay.intervals) { slotIndex, slot ->
|
||||||
LessonSlot(slotIndex = slotIndex, slot = slot)
|
LessonSlot(slotIndex = slotIndex, slot = slot, showTeacher = false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user