Merge branch '743-fix-for-hub-filter-for-emergency-jo-from-re-assign-hub' into 'master'

Resolve "Fix for hub filter for emergency JO from Re-assign Hub"

Closes #743

See merge request jankstudio/resq!857
This commit is contained in:
Kendrick Chan 2023-03-31 10:29:58 +00:00
commit da03f13f75

View file

@ -2464,6 +2464,7 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
if ($willing_to_wait == WillingToWaitContent::NOT_WILLING_TO_WAIT)
{
// reset distance limit if emergency
//TODO: move to .env the emergency distance limit
$hub_criteria->setLimitDistance(500);
$hub_criteria->setEmergency(true);
}
@ -2793,7 +2794,11 @@ class ResqJobOrderHandler implements JobOrderHandlerInterface
// check if emergency or not
$willing_to_wait = $obj->getWillWait();
if ($willing_to_wait == WillingToWaitContent::NOT_WILLING_TO_WAIT)
{
//TODO: move to .env the emergency distance limit
$hub_criteria->setLimitDistance(500);
$hub_criteria->setEmergency(true);
}
// get JO and customer id for logging purposes
$jo_id = $obj->getID();