Fix jQuery CSS error in complaint name input

- Fix 'can't access property toUpperCase' error when rendering complaint table
- Apply SNOMED styling conditionally only when complaint has concept_id
- Use proper jQuery css() object notation instead of string
This commit is contained in:
DevSoftTech Server 2026-06-06 02:54:00 +05:30
parent d156e26ac1
commit 09c3be0755

View File

@ -4826,17 +4826,18 @@
$tr.append($('<td class="text-center text-muted" style="font-size:.75rem">').text(idx + 1)); $tr.append($('<td class="text-center text-muted" style="font-size:.75rem">').text(idx + 1));
// Complaint name — editable input (SNOMED = blue, local = default) // Complaint name — editable input (SNOMED = blue, local = default)
var nameStyle = isSnomed ? 'color:#0d6efd;font-weight:600;' : '';
var titleText = item.concept_id ? 'SNOMED: ' + item.concept_id : ''; var titleText = item.concept_id ? 'SNOMED: ' + item.concept_id : '';
$tr.append( var $nameInput = $('<input type="text" class="form-control form-control-sm complaint-name-input" autocomplete="off" placeholder="Complaint…">')
$('<td class="p-1">').append( .val(item.term || '')
$('<input type="text" class="form-control form-control-sm complaint-name-input" autocomplete="off" placeholder="Complaint…">') .attr('data-idx', idx)
.val(item.term || '') .attr('title', titleText);
.attr('data-idx', idx)
.attr('title', titleText) // Apply SNOMED styling if applicable
.css(nameStyle) if (isSnomed) {
) $nameInput.css({ color: '#0d6efd', fontWeight: '600' });
); }
$tr.append($('<td class="p-1">').append($nameInput));
// Frequency input // Frequency input
$tr.append( $tr.append(