Actualizar importar_todo.html
This commit is contained in:
@@ -165,8 +165,11 @@
|
||||
const ref = document.getElementById("f_ref").value;
|
||||
const isUrgent = document.getElementById("f_urgent").value === 'true';
|
||||
|
||||
// Construimos el JSON idéntico a lo que leería el robot
|
||||
// 🛑 CORRECCIÓN: Hacemos el paquete "plano" para que la BD lo trague directo
|
||||
const rawData = {
|
||||
"service_ref": ref,
|
||||
"status": "pending",
|
||||
"is_urgent": isUrgent,
|
||||
"Referencia": ref,
|
||||
"Nombre Cliente": document.getElementById("f_name").value,
|
||||
"Teléfono": document.getElementById("f_phone").value,
|
||||
@@ -181,14 +184,7 @@
|
||||
|
||||
const payload = {
|
||||
provider: "todo",
|
||||
services: [
|
||||
{
|
||||
service_ref: ref,
|
||||
status: "pending",
|
||||
is_urgent: isUrgent,
|
||||
raw_data: rawData
|
||||
}
|
||||
]
|
||||
services: [ rawData ] // Lo mandamos sin envoltorios extra
|
||||
};
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user