feat(offers): complete phase five operational controls in QA

This commit is contained in:
2026-11-14 18:08:46 +02:00
parent e431de8b42
commit 528a2597ed
33 changed files with 2383 additions and 19 deletions
+5 -1
View File
@@ -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];