Added My Schedule tab in attendance screen

Allow 1 Day, Whole Week and Date Range swapping
This commit is contained in:
2026-03-22 11:52:25 +08:00
parent ba155885c0
commit 049ab2c794
17 changed files with 2515 additions and 305 deletions
+15
View File
@@ -61,6 +61,21 @@ class AppTime {
/// Renders a [DateTime] in 12hour clock notation with AM/PM suffix.
///
/// Example: **08:30 PM**. Used primarily in workforce-related screens.
/// Creates a [DateTime] in the app timezone (Asia/Manila) from date/time components.
///
/// Use this instead of [DateTime] constructor when building a Manila-aware
/// timestamp from separate year/month/day/hour/minute values so that
/// `.toUtc()` correctly accounts for the +08:00 offset.
static DateTime fromComponents({
required int year,
required int month,
required int day,
int hour = 0,
int minute = 0,
}) {
return tz.TZDateTime(tz.local, year, month, day, hour, minute);
}
static String formatTime(DateTime value) {
final rawHour = value.hour;
final hour = (rawHour % 12 == 0 ? 12 : rawHour % 12).toString().padLeft(