Fixed Leave rejection and approvals

This commit is contained in:
2026-03-11 18:59:28 +08:00
parent 21e6d68910
commit f8c79acbbc
4 changed files with 41 additions and 9 deletions
+7 -1
View File
@@ -513,7 +513,7 @@ class _ScheduleTile extends ConsumerWidget {
if (confirmed != true || !context.mounted) return;
final startDateTime = DateTime(
var startDateTime = DateTime(
selectedDate.year,
selectedDate.month,
selectedDate.day,
@@ -531,6 +531,12 @@ class _ScheduleTile extends ConsumerWidget {
endDateTime = endDateTime.add(const Duration(days: 1));
}
// ensure times are expressed in the app timezone (Asia/Manila) before
// sending to the backend. previously these were raw local DateTimes which
// caused off-by-offset errors when the device timezone differed.
startDateTime = AppTime.toAppTime(startDateTime);
endDateTime = AppTime.toAppTime(endDateTime);
try {
await ref
.read(workforceControllerProvider)