Skip to content

Commit

Permalink
closes #42
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiebe committed May 7, 2023
1 parent fcd1ea0 commit 4facc63
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ import androidx.compose.ui.unit.dp
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toInstant
import kotlinx.datetime.toLocalDateTime
import nl.tiebe.otarium.MR
import nl.tiebe.otarium.magister.AgendaItemWithAbsence
import nl.tiebe.otarium.ui.home.timetable.TimetableComponent
import nl.tiebe.otarium.ui.utils.BackButton
import nl.tiebe.otarium.ui.utils.parseHtml
import nl.tiebe.otarium.utils.openUrl
import nl.tiebe.otarium.utils.ui.getLocalizedString

@Composable
internal fun TimetableItemPopup(component: TimetableComponent, agendaItemWithAbsence: AgendaItemWithAbsence) {
Expand Down Expand Up @@ -67,6 +69,18 @@ internal fun TimetableItemPopup(component: TimetableComponent, agendaItemWithAbs

Divider(Modifier.padding(top = 8.dp, bottom = 8.dp))

if (agendaItemWithAbsence.absence != null) {
Text(
getLocalizedString(MR.strings.absence),
style = MaterialTheme.typography.bodySmall
)
Text(
agendaItemWithAbsence.absence.description ?: "",
style = MaterialTheme.typography.bodyMedium
)
Divider(Modifier.padding(top = 8.dp, bottom = 8.dp))
}

val text = (agendaItemWithAbsence.agendaItem.content ?: "").parseHtml()

val onClick: (Int) -> Unit = { offset ->
Expand Down
1 change: 1 addition & 0 deletions shared/src/commonMain/resources/MR/base/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@
<string name="message_bcc_receivers">BCC</string>

<string name="loading">Loading...</string>
<string name="absence">Absence</string>
</resources>
1 change: 1 addition & 0 deletions shared/src/commonMain/resources/MR/nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,5 @@
<string name="message_bcc_receivers">BCC</string>

<string name="loading">Aan het laden...</string>
<string name="absence">Absentie</string>
</resources>

0 comments on commit 4facc63

Please sign in to comment.