Compare commits
2
Commits
fd8fcb9b4c
...
ea15c0423c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea15c0423c
|
||
|
|
3dc5890a7a
|
@@ -0,0 +1,7 @@
|
||||
.PHONY: android desktop
|
||||
|
||||
android:
|
||||
./gradlew composeApp:assembleDebug
|
||||
|
||||
desktop:
|
||||
./gradlew composeApp:run
|
||||
@@ -19,11 +19,13 @@ package ch.parano.myice.ui.screens
|
||||
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.lazy.items
|
||||
import androidx.compose.material3.Card
|
||||
@@ -150,18 +152,31 @@ fun EventDetailScreen(
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
)
|
||||
}
|
||||
items(detail.convocation.available) { player ->
|
||||
val position = player.position ?: "N/A"
|
||||
val number = player.number ?: "N/A"
|
||||
item {
|
||||
Card(modifier = Modifier.fillMaxWidth()) {
|
||||
Column(
|
||||
modifier = Modifier.padding(16.dp),
|
||||
) {
|
||||
Text("[$position] #$number - ${player.fname} ${player.lname}")
|
||||
Text(
|
||||
text = "DOB: ${player.dob}",
|
||||
style = MaterialTheme.typography.bodySmall,
|
||||
)
|
||||
Column(modifier = Modifier.padding(16.dp)) {
|
||||
detail.convocation.available.forEach { player ->
|
||||
val position = player.position ?: ""
|
||||
val number = player.number ?: ""
|
||||
val muted = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
Text(
|
||||
if (number.isNotEmpty()) "#$number" else "",
|
||||
color = muted,
|
||||
modifier = Modifier.width(40.dp),
|
||||
)
|
||||
Text("${player.fname} ${player.lname}")
|
||||
Spacer(Modifier.weight(1f))
|
||||
if (position.isNotEmpty()) {
|
||||
Text(position, color = muted)
|
||||
}
|
||||
Text("(${player.dob.take(4)})", color = muted)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -174,12 +189,22 @@ fun EventDetailScreen(
|
||||
style = MaterialTheme.typography.titleLarge,
|
||||
)
|
||||
}
|
||||
items(detail.convocation.staff) { staff ->
|
||||
item {
|
||||
Card(modifier = Modifier.fillMaxWidth()) {
|
||||
Text(
|
||||
text = "${staff.role}: ${staff.fname} ${staff.lname}",
|
||||
modifier = Modifier.padding(16.dp),
|
||||
)
|
||||
Column(modifier = Modifier.padding(16.dp)) {
|
||||
detail.convocation.staff.forEach { staff ->
|
||||
val muted = MaterialTheme.colorScheme.onSurfaceVariant
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
horizontalArrangement = Arrangement.spacedBy(6.dp),
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
) {
|
||||
Text("${staff.fname} ${staff.lname}")
|
||||
Spacer(Modifier.weight(1f))
|
||||
Text(staff.role, color = muted)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user