Fixed Leave rejection and approvals
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user