Add checking for rider availability when saving JO. #422

This commit is contained in:
Korina Cordero 2020-06-16 03:58:39 +00:00
parent 86a5c117e3
commit 661e048206

View file

@ -544,6 +544,10 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
if (empty($rider)) {
$error_array['rider'] = 'Invalid rider specified.';
} else {
// check if rider is still available
if (!($rider->isAvailable()))
$error_array['rider'] = 'Selected rider is unavailable.';
}
}
}