Enhance MinIO handling in replication management and update legacy test bootstrap. Add MinIO replication logic, legacy setup cleanup, and include necessary tests for improved MinIO interaction and error tolerance.
This commit is contained in:
@@ -21,6 +21,10 @@ final class workfeed_shift_time_resolver
|
||||
return null;
|
||||
}
|
||||
|
||||
$has_approval = self::hasShiftApproval($record);
|
||||
$update_time = self::parseDateTimeValue($record['updateTime'] ?? null);
|
||||
$can_use_saved_bounds = $has_approval || $update_time !== null;
|
||||
|
||||
$actual_start = self::firstDateTimeFromPaths($record, [
|
||||
'checkIn.time',
|
||||
'checkIn',
|
||||
@@ -30,6 +34,14 @@ final class workfeed_shift_time_resolver
|
||||
'clockInTime',
|
||||
'approval.originalStart',
|
||||
]);
|
||||
if ($actual_start === null && $can_use_saved_bounds) {
|
||||
$actual_start = self::firstDateTimeFromPaths($record, [
|
||||
'start',
|
||||
'startTime',
|
||||
'from',
|
||||
]);
|
||||
}
|
||||
|
||||
$scheduled_end = self::firstDateTimeFromPaths($record, [
|
||||
'approval.originalEnd',
|
||||
'end',
|
||||
@@ -53,6 +65,13 @@ final class workfeed_shift_time_resolver
|
||||
'checkOut',
|
||||
]);
|
||||
$saved_actual_end = $actual_only_end;
|
||||
if ($saved_actual_end === null && $can_use_saved_bounds) {
|
||||
$saved_actual_end = self::firstDateTimeFromPaths($record, [
|
||||
'end',
|
||||
'endTime',
|
||||
'to',
|
||||
]);
|
||||
}
|
||||
|
||||
if ($saved_actual_end === null && $check_in_punch !== null && $check_out_punch === null) {
|
||||
$saved_actual_end = new DateTime();
|
||||
@@ -71,7 +90,7 @@ final class workfeed_shift_time_resolver
|
||||
'actualStart' => $actual_start,
|
||||
'scheduledEnd' => $scheduled_end,
|
||||
'actualEnd' => $actual_end,
|
||||
'hasApproval' => self::hasShiftApproval($record),
|
||||
'hasApproval' => $has_approval,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user