Attendance
This commit is contained in:
@@ -16,10 +16,11 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import `in`.sminnovations.attendanceapp.screens.history.data.Attendance
|
||||
import `in`.sminnovations.attendanceapp.screens.history.data.AttendanceData
|
||||
|
||||
|
||||
@Composable
|
||||
fun EnhancedAttendanceCard(attendance: Attendance) {
|
||||
fun EnhancedAttendanceCard(attendance: AttendanceData) {
|
||||
var isExpanded by remember { mutableStateOf(false) }
|
||||
|
||||
Card(
|
||||
@@ -46,11 +47,11 @@ fun EnhancedAttendanceCard(attendance: Attendance) {
|
||||
color = MaterialTheme.colorScheme.onPrimaryContainer,
|
||||
modifier = Modifier.weight(1f)
|
||||
)
|
||||
Icon(
|
||||
imageVector = if (attendance.isPresent) Icons.Default.Check else Icons.Default.Close,
|
||||
contentDescription = if (attendance.isPresent) "Present" else "Absent",
|
||||
tint = if (attendance.isPresent) Color(0xFF4CAF50) else Color(0xFFF44336)
|
||||
)
|
||||
// Icon(
|
||||
// imageVector = if (attendance.isPresent) Icons.Default.Check else Icons.Default.Close,
|
||||
// contentDescription = if (attendance.isPresent) "Present" else "Absent",
|
||||
// tint = if (attendance.isPresent) Color(0xFF4CAF50) else Color(0xFFF44336)
|
||||
// )
|
||||
IconButton(
|
||||
onClick = { isExpanded = !isExpanded }
|
||||
) {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
package `in`.sminnovations.attendanceapp.screens.history.data
|
||||
|
||||
data class Attendance(
|
||||
data class AttendanceData(
|
||||
val date: String,
|
||||
val isPresent: Boolean,
|
||||
val checkInTime: String?,
|
||||
val checkOutTime: String?
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user