This commit introduces two new PHP functions: fxBibRangeDispoFromRow, which calculates available bibs in a sequence, and fxBibIsRangeAvailableForAuto, which checks if a sequence is available for automatic assignment. Additionally, the fxSaveBibAutoConfig function is updated to utilize these checks, enhancing error handling for full sequences. SQL scripts are also updated to include localized error messages for cases when a selected sequence is full, improving user feedback in both French and English.
10 lines
1.0 KiB
SQL
10 lines
1.0 KiB
SQL
-- MSIN-4379 — Assignation auto : refus si séquence complète (aucun dossard disponible)
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_ajax_auto_seq_full', 'fr', 'Impossible : une séquence sélectionnée est déjà complète', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_ajax_auto_seq_full' AND info_langue = 'fr' AND info_prg = 'compte.php');
|
|
|
|
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
|
|
SELECT 'bib_v4_ajax_auto_seq_full', 'en', 'Cannot save: a selected sequence is already full', '', 'compte.php', '', 0, 1, '', '', '', NOW()
|
|
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_ajax_auto_seq_full' AND info_langue = 'en' AND info_prg = 'compte.php');
|