F-LAB-28: panel config muestra solo tomas del examen seleccionado

_mpGetGroupsForExam ahora solo incluye los grupos genéricos ('Toma')
cuando el examen no tiene secciones propias condicionadas.
Para Taukit/Heliprobe/etc. aparecen únicamente sus tomas.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-16 21:39:26 -05:00
co-authored by Claude Sonnet 4.6
parent d5e6f9a794
commit c0f45dd47a
+12 -1
View File
@@ -1384,12 +1384,23 @@ function _mpShowCfgPanel(examName, groups) {
}
function _mpGetGroupsForExam(examName) {
// Primero buscar grupos condicionados para este examen
var result = {};
var hasOwn = false;
for (var gk in _mpAllGroups) {
var parts = gk.split('|').filter(Boolean);
var isCond = parts.some(function(p) { return _mpExamOptions.indexOf(p) !== -1; });
if (!isCond || parts.indexOf(examName) !== -1) {
if (isCond && parts.indexOf(examName) !== -1) {
result[gk] = _mpAllGroups[gk];
hasOwn = true;
}
}
// Solo incluir grupos genéricos (sin condición) si el examen no tiene secciones propias
if (!hasOwn) {
for (var gk in _mpAllGroups) {
var parts = gk.split('|').filter(Boolean);
var isCond = parts.some(function(p) { return _mpExamOptions.indexOf(p) !== -1; });
if (!isCond) result[gk] = _mpAllGroups[gk];
}
}
return result;