mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'dev/pedidos_v1'
Main See merge request jjimenez/safekat!268
This commit is contained in:
@ -50,6 +50,12 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
$this->viewData = ['usingServerSideDataTable' => true]; // JJO
|
||||
|
||||
// Breadcrumbs
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_presupuestos"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => "Listado", 'route' => site_url('presupuestocliente/list'), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->model = new PresupuestoModel();
|
||||
}
|
||||
@ -108,8 +114,9 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$datosPresupuesto->tapa = 'blanda';
|
||||
|
||||
$datosPresupuesto->clienteList = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$presupuestoEntity->estado_id = 1;
|
||||
|
||||
$this->viewData['formAction'] = route_to('crearPresupuestoCliente');
|
||||
$this->viewData['formAction'] = 'add';
|
||||
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
|
||||
@ -124,8 +131,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
public function edit($requestedId = null)
|
||||
{
|
||||
// JJO
|
||||
$session = session();
|
||||
|
||||
if ($requestedId == null) :
|
||||
return $this->redirect2listView();
|
||||
@ -138,8 +143,6 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
return $this->redirect2listView('sweet-error', $message);
|
||||
endif;
|
||||
|
||||
$requestMethod = $this->request->getMethod();
|
||||
|
||||
$datosPresupuesto = (object)array();
|
||||
$datosPresupuesto->POD = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
$datosPresupuesto->paisList = model('App\Models\Configuracion\PaisModel')->getAllForMenu('id, nombre', 'nombre', true);
|
||||
@ -174,7 +177,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$this->generarResumen($presupuestoEntity);
|
||||
}
|
||||
|
||||
$this->viewData['formAction'] = route_to('updateCosidotapablanda', $id);
|
||||
$this->viewData['formAction'] = 'edit';
|
||||
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
|
||||
@ -305,8 +308,8 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
|
||||
return $this->respond(Collection::datatable(
|
||||
$resourceData,
|
||||
$this->model->getListaPresupuestosCliente("", $clienteId)->countAllResults(),
|
||||
$this->model->getListaPresupuestosCliente($search, $clienteId)->countAllResults()
|
||||
$this->model->getListaPresupuestosCliente([], $clienteId)->countAllResults(),
|
||||
$this->model->getListaPresupuestosCliente($searchValues, $clienteId)->countAllResults()
|
||||
));
|
||||
} else {
|
||||
return $this->failUnauthorized('Invalid request', 403);
|
||||
|
||||
@ -7,8 +7,6 @@ use CodeIgniter\Controller;
|
||||
class Intranet extends Controller
|
||||
{
|
||||
|
||||
|
||||
|
||||
function presupuestos($resource_name)
|
||||
{
|
||||
helper('file');
|
||||
|
||||
@ -32,16 +32,14 @@ class PresupuestoModel extends \App\Models\BaseModel
|
||||
|
||||
const SORTABLE_CLIENTE = [
|
||||
0 => "t1.id",
|
||||
1 => "t1.created_at",
|
||||
1 => "t1.updated_at",
|
||||
2 => "t7.codigo",
|
||||
3 => "t2.nombre",
|
||||
4 => "t3.first_name",
|
||||
5 => "t1.titulo",
|
||||
6 => "t5.nombre",
|
||||
8 => "t1.paginas",
|
||||
9 => "t1.tirada",
|
||||
10 => "t1.total_presupuesto",
|
||||
11 => "t6.estado",
|
||||
4 => "t1.titulo",
|
||||
5 => "t1.paginas",
|
||||
6 => "t1.tirada",
|
||||
7 => "t1.total_presupuesto",
|
||||
8 => "t6.id",
|
||||
];
|
||||
|
||||
protected $allowedFields = [
|
||||
|
||||
@ -200,7 +200,7 @@ window.routes_resumen = {
|
||||
duplicarPresupuesto: "<?= route_to('duplicarPresupuesto') ?>",
|
||||
}
|
||||
|
||||
if(<?php echo $presupuestoEntity->estado_id?>==2){
|
||||
<?php if ($presupuestoEntity->estado_id===2): ?>
|
||||
previewEsquemaCubierta(true);
|
||||
|
||||
const previewTemplate = `<div class="dz-preview dz-file-preview">
|
||||
@ -312,5 +312,5 @@ if(<?php echo $presupuestoEntity->estado_id?>==2){
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
<?php endif; ?>
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<div class="col-12 pb-2">
|
||||
<div class="tipo_libro">
|
||||
|
||||
<input hidden readonly id="lomo_cubierta" name="lomo_cubierta" maxLength="12" class="form-control" value="<?= old('lomoCubierta', $presupuestoEntity->lomoCubierta) ?>">
|
||||
|
||||
<input type="hidden" id="lomo_cubierta" value=<?php echo $presupuestoEntity->lomo_cubierta ?>>
|
||||
|
||||
<div class="row row-cols-3 mb-6 d-flex justify-content-center d-flex justify-content-center">
|
||||
|
||||
|
||||
@ -745,7 +745,7 @@ async function calcularPresupuesto() {
|
||||
|
||||
if(!error){
|
||||
|
||||
$('#lomo_cubierta').val(response.lomo_cubierta);
|
||||
$('#lomo_cubierta').val(response.info.lomo_cubierta);
|
||||
|
||||
$('#precios').show();
|
||||
|
||||
@ -770,7 +770,15 @@ async function calcularPresupuesto() {
|
||||
|
||||
$('#divTiradasPrecio').append(html);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($('#resumen-libro').hasClass('active')) {
|
||||
initDirecciones();
|
||||
initTiradasDirecciones();
|
||||
generarResumen();
|
||||
previewEsquemaCubierta(true);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
|
||||
@ -344,7 +344,12 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
var url = $(location).attr('href'); // Obtener URL actual
|
||||
if (url.includes('/edit/')) { // Comprobar si la URL contiene 'edit'
|
||||
validationStepper.to(4);
|
||||
}
|
||||
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
@ -811,6 +811,5 @@ function getObjetoToPreview() {
|
||||
anchoLibro: parseInt(tamanio[0])
|
||||
};
|
||||
}
|
||||
//console.log(pvObj);
|
||||
|
||||
//console.log($('#lomo_cubierta').val());
|
||||
}
|
||||
|
||||
@ -114,19 +114,40 @@ $('#tableOfPresupuestos thead tr:eq(1) th').each(function (i) {
|
||||
$(this).html('<select class="form-control" style="min-width:100px;max-width:120px;font-size:0.8rem !important;"></select>');
|
||||
|
||||
// Agregar opciones al selector
|
||||
var selector = $('select', this);
|
||||
selector.append('<option value="">Todos</option>'); // Opción vacía
|
||||
selector.append('<option value="libroCosidoTapaBlanda"><?= lang('Presupuestos.libroCosidoTapaBlanda') ?></option>');
|
||||
selector.append('<option value="libroCosidoTapaDura"><?= lang('Presupuestos.libroCosidoTapaDura') ?></option>');
|
||||
selector.append('<option value="libroFresadoTapaBlanda"><?= lang('Presupuestos.libroFresadoTapaBlanda') ?></option>');
|
||||
selector.append('<option value="libroFresadoTapaDura"><?= lang('Presupuestos.libroFresadoTapaDura') ?></option>');
|
||||
selector.append('<option value="libroEspiralTapaDura"><?= lang('Presupuestos.libroEspiralTapaDura') ?></option>');
|
||||
selector.append('<option value="libroEspiralTapaBlanda"><?= lang('Presupuestos.libroEspiralTapaBlanda') ?></option>');
|
||||
selector.append('<option value="libroWireoTapaDura"><?= lang('Presupuestos.libroWireoTapaDura') ?></option>');
|
||||
selector.append('<option value="libroWireoTapaBlanda"><?= lang('Presupuestos.libroWireoTapaBlanda') ?></option>');
|
||||
selector.append('<option value="libroGrapado"><?= lang('Presupuestos.libroGrapado') ?></option>');
|
||||
var selectorTipo = $('select', this);
|
||||
selectorTipo.append('<option value="">Todos</option>'); // Opción vacía
|
||||
selectorTipo.append('<option value="libroCosidoTapaBlanda"><?= lang('Presupuestos.libroCosidoTapaBlanda') ?></option>');
|
||||
selectorTipo.append('<option value="libroCosidoTapaDura"><?= lang('Presupuestos.libroCosidoTapaDura') ?></option>');
|
||||
selectorTipo.append('<option value="libroFresadoTapaBlanda"><?= lang('Presupuestos.libroFresadoTapaBlanda') ?></option>');
|
||||
selectorTipo.append('<option value="libroFresadoTapaDura"><?= lang('Presupuestos.libroFresadoTapaDura') ?></option>');
|
||||
selectorTipo.append('<option value="libroEspiralTapaDura"><?= lang('Presupuestos.libroEspiralTapaDura') ?></option>');
|
||||
selectorTipo.append('<option value="libroEspiralTapaBlanda"><?= lang('Presupuestos.libroEspiralTapaBlanda') ?></option>');
|
||||
selectorTipo.append('<option value="libroWireoTapaDura"><?= lang('Presupuestos.libroWireoTapaDura') ?></option>');
|
||||
selectorTipo.append('<option value="libroWireoTapaBlanda"><?= lang('Presupuestos.libroWireoTapaBlanda') ?></option>');
|
||||
selectorTipo.append('<option value="libroGrapado"><?= lang('Presupuestos.libroGrapado') ?></option>');
|
||||
|
||||
selector.on('change', function () {
|
||||
selectorTipo.on('change', function () {
|
||||
var val = $.fn.dataTable.util.escapeRegex(
|
||||
$(this).val()
|
||||
);
|
||||
theTable.column(i).search(val).draw();
|
||||
});
|
||||
}
|
||||
<?php if ($clienteId == 0): ?>
|
||||
else if (i == 8) {
|
||||
<?php else: ?>
|
||||
else if (i == 7) {
|
||||
<?php endif; ?>
|
||||
// Agregar un selector en la tercera columna
|
||||
$(this).html('<select class="form-control" style="min-width:100px;max-width:120px;font-size:0.8rem !important;"></select>');
|
||||
|
||||
// Agregar opciones al selector
|
||||
var selectorEstado = $('select', this);
|
||||
selectorEstado.append('<option value="">Todos</option>'); // Opción vacía
|
||||
selectorEstado.append('<option value="1"><?= lang('Presupuestos.presupuestoEstadoBorrador') ?></option>');
|
||||
selectorEstado.append('<option value="2"><?= lang('Presupuestos.presupuestoEstadoAceptado') ?></option>');
|
||||
|
||||
selectorEstado.on('change', function () {
|
||||
var val = $.fn.dataTable.util.escapeRegex(
|
||||
$(this).val()
|
||||
);
|
||||
@ -190,7 +211,13 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
targets: [lastColNr]
|
||||
}
|
||||
},
|
||||
<?php if (auth()->user()->inGroup('cliente-admin') || auth()->user()->inGroup('cliente-editor')): ?>
|
||||
{
|
||||
target: 3,
|
||||
visible: false
|
||||
}
|
||||
<?php endif; ?>
|
||||
],
|
||||
|
||||
columns : [
|
||||
@ -243,9 +270,9 @@ theTable = $('#tableOfPresupuestos').DataTable({
|
||||
}
|
||||
},
|
||||
},
|
||||
<?php if ($clienteId == 0): ?>
|
||||
{ 'data': 'cliente' },
|
||||
<?php endif; ?>
|
||||
|
||||
{ 'data': 'cliente'},
|
||||
|
||||
{ 'data': 'titulo' },
|
||||
{ 'data': 'paginas' },
|
||||
{ 'data': 'tirada' },
|
||||
|
||||
@ -18,171 +18,220 @@
|
||||
|
||||
<!-- Create Deal Wizard -->
|
||||
<div id="wizard-presupuesto-cliente" class="bs-stepper vertical mt-2 linear">
|
||||
<div class="bs-stepper-header">
|
||||
|
||||
<?php if($presupuestoEntity->estado_id==1): ?>
|
||||
<div class="step active" data-target="#tipo-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Tipo de libro</span>
|
||||
<span class="bs-stepper-subtitle">Cosido, Fresado, ...</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#disenio-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Diseño del libro</span>
|
||||
<span class="bs-stepper-subtitle">Detalles técnicos del libro</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#direcciones-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-map-pins ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Direcciones</span>
|
||||
<span class="bs-stepper-subtitle">Dirección envío, facturación</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="step" data-target="#resumen-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-checkbox ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Resumen del presupuesto</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="errorGeneral" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
||||
<p>Se ha producido un error <br>
|
||||
al calcular el presupuesto. <br>
|
||||
Póngase en contacto con el <br>
|
||||
administrador.</p>
|
||||
</div>
|
||||
|
||||
<div id='divTiradasPrecio'>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bs-stepper-content">
|
||||
<form id="presupuesto-cliente-form" >
|
||||
|
||||
<?php if($presupuestoEntity->estado_id == 1) : ?>
|
||||
|
||||
<div class="bs-stepper-header">
|
||||
|
||||
<!-- Tipo Libro -->
|
||||
<?php if($presupuestoEntity->estado_id==1): ?>
|
||||
<div id="tipo-libro" class="content active dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="step active" data-target="#tipo-libro" >
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Tipo de libro</span>
|
||||
<span class="bs-stepper-subtitle">Cosido, Fresado, ...</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="row g-3">
|
||||
<div class="step" data-target="#disenio-libro" >
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-book ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Diseño del libro</span>
|
||||
<span class="bs-stepper-subtitle">Detalles técnicos del libro</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_tipoLibroItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Volver</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step" data-target="#direcciones-libro" >
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-map-pins ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Direcciones</span>
|
||||
<span class="bs-stepper-subtitle">Dirección envío, facturación</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
|
||||
<div class="step" data-target="#resumen-libro">
|
||||
<button type="button" class="step-trigger" aria-selected="false" disabled="disabled">
|
||||
<span class="bs-stepper-circle"><i class="ti ti-checkbox ti-sm"></i></span>
|
||||
<span class="bs-stepper-label">
|
||||
<span class="bs-stepper-title">Resumen del presupuesto</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Diseño Libro -->
|
||||
<div id="disenio-libro" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_disenioLibroItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="errorGeneral" class="fv-plugins-message-container invalid-feedback" style="display: none;">
|
||||
<p>Se ha producido un error <br>
|
||||
al calcular el presupuesto. <br>
|
||||
Póngase en contacto con el <br>
|
||||
administrador.</p>
|
||||
</div>
|
||||
|
||||
<!-- Direcciones -->
|
||||
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div id='divTiradasPrecio'>
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_direccionesItems") ?>
|
||||
</div>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<button id="toReview" class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Review & Complete -->
|
||||
<div id="resumen-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
<div class="bs-stepper-content">
|
||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_resumenItems") ?>
|
||||
|
||||
<!-- Tipo Libro -->
|
||||
<div id="tipo-libro" class="content active" dstepper-block fv-plugins-bootstrap5 fv-plugins-framework" >
|
||||
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<div class="col-6 d-flex flex-row">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-6 d-flex flex-row-reverse">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button id="btnSave" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Guardar</span>
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_tipoLibroItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Volver</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
<button id="btnConfirm" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Confirmar</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button id="btnBack" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Volver</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button id="btnDuplicar" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Duplicar</span>
|
||||
<i class="ti ti-copy ti-xs"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Diseño Libro -->
|
||||
<div id="disenio-libro" class="content dstepper-block fv-plugins-bootstrap5 fv-plugins-framework" >
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_disenioLibroItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<button class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Direcciones -->
|
||||
<div id="direcciones-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework" >
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_direccionesItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<button id="toReview" class="btn btn-primary btn-next waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Siguiente</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Review & Complete -->
|
||||
<div id="resumen-libro" class="content fv-plugins-bootstrap5 fv-plugins-framework">
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_resumenItems") ?>
|
||||
|
||||
</div>
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<div class="col-6 d-flex flex-row">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-6 d-flex flex-row-reverse">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button id="btnSave" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Guardar</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
<button id="btnConfirm" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Confirmar</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button id="btnBack" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Volver</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button id="btnDuplicar" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Duplicar</span>
|
||||
<i class="ti ti-copy ti-xs"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form id="presupuesto-cliente-form" onsubmit="return false">
|
||||
<div class="row g-3">
|
||||
|
||||
<?= view("themes/vuexy/form/presupuestos/cliente/_resumenItems") ?>
|
||||
|
||||
<div class="col-12 d-flex justify-content-between mt-4">
|
||||
<div class="col-6 d-flex flex-row">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button class="btn btn-primary btn-prev waves-effect waves-light">
|
||||
<i class="ti ti-arrow-left ti-xs me-sm-1 me-0"></i>
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Anterior</span>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col-6 d-flex flex-row-reverse">
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<button id="btnSave" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Guardar</span>
|
||||
<i class="ti ti-arrow-right ti-xs"></i>
|
||||
</button>
|
||||
<button id="btnConfirm" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Confirmar</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button id="btnBack" class="btn btn-success btn-submit btn-next mx-2 waves-effect waves-light">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Volver</span><i class="ti ti-check ti-xs"></i>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
<button id="btnDuplicar" class="btn btn-primary btn-submit waves-effect waves-light ml-2">
|
||||
<span class="align-middle d-sm-inline-block d-none me-sm-1">Duplicar</span>
|
||||
<i class="ti ti-copy ti-xs"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!--//.col -->
|
||||
|
||||
</div><!--//.row -->
|
||||
@ -199,41 +248,43 @@
|
||||
window.datosPresupuesto = <?= json_encode($datosPresupuesto) ?>;
|
||||
window.token_ajax= {<?= csrf_token() ?? "token" ?>: <?= csrf_token() ?>v};
|
||||
|
||||
$('#clienteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
$('#clienteId').select2({
|
||||
allowClear: false,
|
||||
ajax: {
|
||||
url: '<?= route_to("menuItemsOfClientes") ?>',
|
||||
type: 'post',
|
||||
dataType: 'json',
|
||||
|
||||
data: function(params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function(response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
data: function(params) {
|
||||
return {
|
||||
id: 'id',
|
||||
text: 'nombre',
|
||||
searchTerm: params.term,
|
||||
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
|
||||
};
|
||||
},
|
||||
delay: 60,
|
||||
processResults: function(response) {
|
||||
yeniden(response.<?= csrf_token() ?>);
|
||||
return {
|
||||
results: response.menu
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
}
|
||||
});
|
||||
|
||||
if(<?= $presupuestoEntity->estado_id ?>==1){
|
||||
initDisenioLibro();
|
||||
}
|
||||
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/bs-stepper/bs-stepper.css') ?>" />
|
||||
@ -258,7 +309,9 @@ if(<?= $presupuestoEntity->estado_id ?>==1){
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/two/two.js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/translate_js/Presupuestos') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteResumen_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoCliente_js') ?>"></script>
|
||||
<?php if ($presupuestoEntity->estado_id == 1) : ?>
|
||||
<script src="<?= site_url('js_loader/presupuestoCliente_js') ?>"></script>
|
||||
<?php endif; ?>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteTipoLibro_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteDisenioLibro_js') ?>"></script>
|
||||
<script src="<?= site_url('js_loader/presupuestoClienteDirecciones_js') ?>"></script>
|
||||
|
||||
Reference in New Issue
Block a user