feat(offers): complete phase five operational controls in QA
This commit is contained in:
@@ -154,6 +154,10 @@ final class PrivateOfferPreparation
|
||||
if ($extended) {
|
||||
$payload['resources'] = $resources;
|
||||
}
|
||||
$cycle = $record->workflow_context['offer_operation']['cycle'] ?? 0;
|
||||
if ($cycle > 0) {
|
||||
$payload['operational_cycle'] = $cycle;
|
||||
}
|
||||
$normalize = function (mixed $value) use (&$normalize): mixed {
|
||||
if (is_object($value)) {
|
||||
$value = get_object_vars($value);
|
||||
@@ -169,7 +173,7 @@ final class PrivateOfferPreparation
|
||||
};
|
||||
$payload = $normalize($payload);
|
||||
|
||||
$contract = $extended ? 'private-offer-editorial-v3' : 'private-offer-editorial-v2';
|
||||
$contract = $cycle > 0 ? 'private-offer-editorial-v4' : ($extended ? 'private-offer-editorial-v3' : 'private-offer-editorial-v2');
|
||||
|
||||
return ['payload' => $payload, 'hash' => hash('sha256', json_encode(['contract' => $contract, 'payload' => $payload], JSON_THROW_ON_ERROR)),
|
||||
'record_version' => $record->management_version, 'contract_version' => $contract, 'resources' => $resources];
|
||||
|
||||
Reference in New Issue
Block a user