Actualizar presupuestos.html
This commit is contained in:
@@ -145,6 +145,19 @@
|
||||
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Hora de llegada (Aprox) *</label>
|
||||
<input type="time" id="apptTime" class="w-full bg-slate-50 border border-slate-200 px-4 py-3 rounded-xl text-sm font-bold outline-none focus:border-blue-500 text-blue-600">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Duración Estimada *</label>
|
||||
<select id="apptDuration" class="w-full bg-slate-50 border border-slate-200 px-4 py-3 rounded-xl text-sm font-bold outline-none focus:border-blue-500 text-slate-700">
|
||||
<option value="30">30 minutos</option>
|
||||
<option value="60" selected>1 hora</option>
|
||||
<option value="90">1 hora y media</option>
|
||||
<option value="120">2 horas</option>
|
||||
<option value="180">3 horas</option>
|
||||
<option value="240">4 horas</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button onclick="confirmAppointment()" id="btnConfirmAppt" class="w-full bg-emerald-500 text-white py-4 rounded-xl font-black uppercase tracking-widest shadow-md hover:bg-emerald-600 active:scale-95 transition-transform mt-4 flex items-center justify-center gap-2">
|
||||
<i data-lucide="check-circle" class="w-5 h-5"></i> Confirmar Cita
|
||||
</button>
|
||||
@@ -763,6 +776,7 @@
|
||||
const guild_id = document.getElementById('apptGuild').value;
|
||||
const date = document.getElementById('apptDate').value;
|
||||
const time = document.getElementById('apptTime').value;
|
||||
const duration = document.getElementById('apptDuration').value; // <-- NUEVO
|
||||
|
||||
if (!guild_id || !date || !time) return showToast("⚠️ Gremio, Fecha y Hora son obligatorios.");
|
||||
|
||||
@@ -770,7 +784,14 @@
|
||||
btn.disabled = true;
|
||||
btn.innerHTML = '<i data-lucide="loader-2" class="w-5 h-5 animate-spin"></i> Procesando...';
|
||||
|
||||
const payload = { guild_id: guild_id, date: date, time: time, use_automation: false, assigned_to: 'self' };
|
||||
const payload = {
|
||||
guild_id: guild_id,
|
||||
date: date,
|
||||
time: time,
|
||||
duration_minutes: duration, // <-- NUEVO
|
||||
use_automation: false,
|
||||
assigned_to: 'self'
|
||||
};
|
||||
|
||||
try {
|
||||
const res = await fetch(`${API_URL}/budgets/${id}/convert`, {
|
||||
|
||||
Reference in New Issue
Block a user