fix: portal enfermero — agendamiento siempre particular, sin campo seguro
This commit is contained in:
+2
-34
@@ -794,29 +794,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Tipo de cliente y cobros -->
|
||||
<div class="row g-2 mb-2">
|
||||
<div class="col-6">
|
||||
<label class="form-label small">Tipo de cliente</label>
|
||||
<select id="na-tipo-cliente" class="form-select form-select-sm"
|
||||
onchange="agendaNueva.toggleSeguro(this.value)">
|
||||
<option value="particular">👛 Particular</option>
|
||||
<option value="seguro">🛡️ Seguro / EPS</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6" id="na-bloque-seguro" style="display:none">
|
||||
<label class="form-label small">Seguro / EPS</label>
|
||||
<input type="text" id="na-seguro-nombre" class="form-control form-control-sm"
|
||||
placeholder="Ej: Sura, Nueva EPS…">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row g-2 mb-2" id="na-bloque-autorizacion">
|
||||
<div class="col-6">
|
||||
<label class="form-label small">N° de autorización</label>
|
||||
<input type="text" id="na-autorizacion" class="form-control form-control-sm"
|
||||
placeholder="Número de autorización">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Cobros -->
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-6">
|
||||
<label class="form-label small">Valor domicilio</label>
|
||||
@@ -939,12 +917,8 @@ const agendaNueva = {
|
||||
document.getElementById('na-hora').value = '';
|
||||
document.getElementById('na-tipo').value = '';
|
||||
document.getElementById('na-notas').value = '';
|
||||
document.getElementById('na-tipo-cliente').value = 'particular';
|
||||
document.getElementById('na-seguro-nombre').value = '';
|
||||
document.getElementById('na-autorizacion').value = '';
|
||||
document.getElementById('na-valor-dom').value = '';
|
||||
document.getElementById('na-valor-cop').value = '';
|
||||
agendaNueva.toggleSeguro('particular');
|
||||
document.getElementById('na-fecha').value = document.getElementById('portal-fecha').value;
|
||||
document.getElementById('na-sugerencias').classList.add('d-none');
|
||||
document.getElementById('na-paciente-elegido').classList.add('d-none');
|
||||
@@ -956,10 +930,6 @@ const agendaNueva = {
|
||||
this._modal.show();
|
||||
},
|
||||
|
||||
toggleSeguro(val) {
|
||||
document.getElementById('na-bloque-seguro').style.display = val === 'seguro' ? '' : 'none';
|
||||
},
|
||||
|
||||
async _buscarPacientes(q) {
|
||||
if (q.length < 2) {
|
||||
document.getElementById('na-sugerencias').classList.add('d-none');
|
||||
@@ -1044,9 +1014,7 @@ const agendaNueva = {
|
||||
fecha_programada: fecha,
|
||||
hora_programada: document.getElementById('na-hora').value || null,
|
||||
tipo_servicio: document.getElementById('na-tipo').value || null,
|
||||
tipo_cliente: document.getElementById('na-tipo-cliente').value || 'particular',
|
||||
seguro_nombre: document.getElementById('na-seguro-nombre').value.trim() || null,
|
||||
autorizacion: document.getElementById('na-autorizacion').value.trim() || null,
|
||||
tipo_cliente: 'particular',
|
||||
valor_domicilio: parseFloat(document.getElementById('na-valor-dom').value) || null,
|
||||
valor_copago: parseFloat(document.getElementById('na-valor-cop').value) || null,
|
||||
notas_admin: document.getElementById('na-notas').value.trim() || null,
|
||||
|
||||
Reference in New Issue
Block a user