MSIN-4445 — Refactor free assignment logic to allow all solo races (with or without existing sequences) to be assigned without creating new sequences. Update related functions and improve documentation for clarity. Increment version code to 4.72.863.
This commit is contained in:
@ -735,7 +735,7 @@ if ($action == 'batch_global_free_analysis') {
|
||||
$intEnd = (int)($_POST['end_bib'] ?? 0);
|
||||
list($strSort1, $strSort2) = fxBibParseBatchSortFromPost();
|
||||
$eprIds = json_decode($_POST['epr_ids'] ?? '[]', true);
|
||||
$tabEprIds = fxBibParseGlobalBatchGeneratedEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
$tabEprIds = fxBibParseGlobalBatchFreeEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
|
||||
if ($int_eve_id <= 0 || $intStart <= 0 || $intEnd < $intStart) {
|
||||
echo json_encode([
|
||||
@ -785,7 +785,7 @@ if ($action == 'batch_global_free_simulate') {
|
||||
$intEnd = (int)($_POST['end_bib'] ?? 0);
|
||||
list($strSort1, $strSort2) = fxBibParseBatchSortFromPost();
|
||||
$eprIds = json_decode($_POST['epr_ids'] ?? '[]', true);
|
||||
$tabEprIds = fxBibParseGlobalBatchGeneratedEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
$tabEprIds = fxBibParseGlobalBatchFreeEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
|
||||
if ($int_eve_id <= 0 || $intStart <= 0 || $intEnd < $intStart || $strSort1 === '' || empty($tabEprIds)) {
|
||||
echo json_encode([
|
||||
@ -818,7 +818,7 @@ if ($action == 'batch_global_free_plan') {
|
||||
$intEnd = (int)($_POST['end_bib'] ?? 0);
|
||||
list($strSort1, $strSort2) = fxBibParseBatchSortFromPost();
|
||||
$eprIds = json_decode($_POST['epr_ids'] ?? '[]', true);
|
||||
$tabEprIds = fxBibParseGlobalBatchGeneratedEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
$tabEprIds = fxBibParseGlobalBatchFreeEprIds(is_array($eprIds) ? $eprIds : [], $int_eve_id);
|
||||
|
||||
if ($int_eve_id <= 0 || $intStart <= 0 || $intEnd < $intStart || $strSort1 === '' || empty($tabEprIds)) {
|
||||
echo json_encode([
|
||||
@ -1128,7 +1128,7 @@ if ($action == 'batch_apply_free_chunk') {
|
||||
exit;
|
||||
}
|
||||
|
||||
// Même filtre que le panneau : solo sans séquence.
|
||||
// MSIN-4445 — Solo seulement ; une séquence existante n'empêche pas l'assignation libre.
|
||||
$intEveId = (int)($_POST['eve_id'] ?? 0);
|
||||
if ($intEveId > 0) {
|
||||
$checkEpr = fxBibAssertSoloEpreuveForGlobalBatch($epr_id, $intEveId);
|
||||
@ -1136,13 +1136,6 @@ if ($action == 'batch_apply_free_chunk') {
|
||||
echo json_encode($checkEpr);
|
||||
exit;
|
||||
}
|
||||
if (fxBibEpreuveHasAnySequence($epr_id)) {
|
||||
echo json_encode([
|
||||
'success' => false,
|
||||
'message' => fxBibMsg('bib_v4_global_batch_gen_has_seq'),
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$strSessionKey = fxBibBatchExecSessionKey($epr_id) . '_free';
|
||||
|
||||
Reference in New Issue
Block a user