Skip to content

Commit

Permalink
Staff: fix approved absences not updating notificationSent status
Browse files Browse the repository at this point in the history
  • Loading branch information
SKuipers committed Oct 6, 2023
1 parent 4995b66 commit 53ec0a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/Staff/src/CoverageNotificationProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function runNewAbsenceWithCoverageRequest($coverageList)
$recipients[] = $this->organisationHR;

// Add the absent person, if this coverage request was created by someone else
if ($coverage['gibbonPersonID'] != $coverage['gibbonPersonIDStatus'] || $coverage['notificationSent'] == 'N') {
if ($coverage['gibbonPersonID'] != $coverage['gibbonPersonIDStatus']) {
$recipients[] = $coverage['gibbonPersonID'];
}

Expand All @@ -154,7 +154,10 @@ public function runNewAbsenceWithCoverageRequest($coverageList)
foreach ($coverageList as $gibbonStaffCoverageID) {
$this->staffCoverageGateway->update($gibbonStaffCoverageID, $data);
}


$this->staffAbsenceGateway->update($coverage['gibbonStaffAbsenceID'], [
'notificationSent' => 'Y',
]);
}

return $sent;
Expand Down

0 comments on commit 53ec0a9

Please sign in to comment.