Actualizar calendario.html
This commit is contained in:
@@ -180,6 +180,9 @@
|
|||||||
<button onclick="openWhatsApp()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
<button onclick="openWhatsApp()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
||||||
<i data-lucide="message-circle" class="w-4 h-4 text-emerald-500"></i> WhatsApp
|
<i data-lucide="message-circle" class="w-4 h-4 text-emerald-500"></i> WhatsApp
|
||||||
</button>
|
</button>
|
||||||
|
<button onclick="sendInstagramPromo()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
||||||
|
<i data-lucide="instagram" class="w-4 h-4 text-pink-500"></i> Instagram
|
||||||
|
</button>
|
||||||
<button onclick="abrirFichaCliente()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
<button onclick="abrirFichaCliente()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
||||||
<i data-lucide="user-round" class="w-4 h-4 text-primary-dynamic"></i> Ficha del Cliente
|
<i data-lucide="user-round" class="w-4 h-4 text-primary-dynamic"></i> Ficha del Cliente
|
||||||
</button>
|
</button>
|
||||||
@@ -1507,6 +1510,22 @@
|
|||||||
} else { alert("Sin teléfono"); }
|
} else { alert("Sin teléfono"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function sendInstagramPromo() {
|
||||||
|
const id = document.getElementById('detId').value;
|
||||||
|
if (!id) return;
|
||||||
|
try {
|
||||||
|
const res = await fetch(`${API_URL}/services/${id}/send-instagram`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` }
|
||||||
|
});
|
||||||
|
const data = await res.json();
|
||||||
|
if (data.ok) alert("¡Mensaje de Instagram enviado! 📸");
|
||||||
|
else alert(data.error || "No se pudo enviar el mensaje de Instagram.");
|
||||||
|
} catch (e) {
|
||||||
|
alert("Error de conexión al enviar el mensaje de Instagram.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 🧑🔧 Abre la ficha del cliente (historial de servicios + notas del equipo) con los
|
// 🧑🔧 Abre la ficha del cliente (historial de servicios + notas del equipo) con los
|
||||||
// datos que ya tenemos cargados en el modal, para no tener que volver a pedirlos.
|
// datos que ya tenemos cargados en el modal, para no tener que volver a pedirlos.
|
||||||
function abrirFichaCliente() {
|
function abrirFichaCliente() {
|
||||||
|
|||||||
Reference in New Issue
Block a user