Fix professional signature row only showing when form schema requires it
Only display the 'Falta firma enfermero' row and button when the assigned consent form actually contains a firma_profesional field in its esquema. get_consentimientos.php now computes requiere_firma_profesional from the JSON schema and recepcion.php gates the row on that flag. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
05c7230eda
commit
2dec300f3a
@@ -1441,9 +1441,9 @@ function renderConsentimientos(lista) {
|
||||
<i class="fab fa-whatsapp"></i> WhatsApp
|
||||
</button>`;
|
||||
|
||||
// Fila de firma del profesional (solo visible si el paciente ya firmó)
|
||||
// Fila de firma del profesional (solo si el formulario la requiere y el paciente ya firmó)
|
||||
let profRow = '';
|
||||
if (c.estado === 'firmado') {
|
||||
if (c.estado === 'firmado' && c.requiere_firma_profesional) {
|
||||
const tienePro = c.tiene_firma_profesional == 1 || c.tiene_firma_profesional === true;
|
||||
if (tienePro) {
|
||||
profRow = `<div class="consent-prof-row">
|
||||
|
||||
Reference in New Issue
Block a user