falta procesar el resultado

This commit is contained in:
Jaime Jiménez
2025-09-10 22:44:00 +02:00
parent 030e8af3d3
commit 6a9c197a02
12 changed files with 259 additions and 93 deletions

View File

@ -0,0 +1,29 @@
$(document).on('click', '#maquetacion', function (e) {
e.preventDefault();
$.get("/presupuesto/public/maquetacion/form", function (data) {
$("#maquetacionModalBody").html(data);
$("#maquetacionModal").modal("show");
});
});
$(document).on("submit", "#maquetacionForm", function (e) {
e.preventDefault();
const $form = $(this);
$.ajax({
url: $form.attr("action"),
type: $form.attr("method"),
data: $form.serialize(),
success: function (data) {
// obtener el json devuelto
const json = JSON.parse(data);
},
error: function (xhr, status, error) {
$("#maquetacionModalBody").html(
"<div class='alert alert-danger'>" + xhr.responseText + "</div>"
);
}
});
});

View File

@ -18,7 +18,7 @@ class ServiceOptionCard {
: '';
const $card = $(`
<div class="col-lg-2 col-md-3 col-sm-6 mb-3">
<input type="checkbox" class="service-checkbox data-price=${this.price} btn-check-service" id="${this.id}" name="services[]" value="${this.id}" autocomplete="off" ${this.checked ? 'checked' : ''} />
<input type="checkbox" class="service-checkbox btn-check-service" data-price=${this.price} id="${this.id}" name="services[]" value="${this.id}" autocomplete="off" ${this.checked ? 'checked' : ''} />
<label class="btn btn-service-option w-100 text-center py-3 px-2 d-flex flex-column align-items-center justify-content-center h-100" for="${this.id}">
${ribbonHtml}
<h5 class="service-title mb-1">${this.title}</h5>