mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Primera version del importador de Bubok
This commit is contained in:
@ -6,20 +6,33 @@ use CodeIgniter\Router\RouteCollection;
|
||||
|
||||
/* Rutas para tarifas */
|
||||
$routes->group('importador', ['namespace' => 'App\Controllers\Importadores'], function ($routes) {
|
||||
/* Libros */
|
||||
|
||||
/* Desde Catalogo */
|
||||
$routes->group('catalogo', ['namespace' => 'App\Controllers\Importadores'], function ($routes) {
|
||||
/**======================
|
||||
* Tool
|
||||
*========================**/
|
||||
$routes->get('', 'ImportadorCatalogo::index', ['as' => 'importadorCatalogoTool']);
|
||||
|
||||
|
||||
/**======================
|
||||
* AJAX
|
||||
*========================**/
|
||||
$routes->post('validar-fila', 'ImportadorCatalogo::validarFila');
|
||||
$routes->post('importar-fila', 'ImportadorCatalogo::importarFila');
|
||||
|
||||
});
|
||||
|
||||
/* Desde Cliente Bubok */
|
||||
$routes->group('bubok', ['namespace' => 'App\Controllers\Importadores'], function ($routes) {
|
||||
/**======================
|
||||
* Tool
|
||||
*========================**/
|
||||
$routes->get('', 'ImportadorBubok::index', ['as' => 'importadorBubokTool']);
|
||||
|
||||
/**======================
|
||||
* AJAX
|
||||
*========================**/
|
||||
$routes->post('importar-fila', 'ImportadorBubok::importarFila');
|
||||
|
||||
});
|
||||
});
|
||||
363
ci4/app/Controllers/Importadores/ImportadorBubok.php
Normal file
363
ci4/app/Controllers/Importadores/ImportadorBubok.php
Normal file
@ -0,0 +1,363 @@
|
||||
<?php
|
||||
namespace App\Controllers\Importadores;
|
||||
|
||||
use App\Controllers\BaseResourceController;
|
||||
use App\Controllers\Presupuestos\Presupuestocliente;
|
||||
use App\Services\PresupuestoService;
|
||||
|
||||
class ImportadorBubok extends BaseResourceController
|
||||
{
|
||||
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectName = 'Importador';
|
||||
protected static $singularObjectNameCc = 'ImportadorBubok';
|
||||
protected static $pluralObjectName = 'Importadores';
|
||||
protected static $pluralObjectNameCc = 'importadores';
|
||||
|
||||
protected static $controllerSlug = 'importador';
|
||||
|
||||
protected static $viewPath = 'themes/vuexy/form/importador/bubok/';
|
||||
|
||||
protected $indexRoute = 'ImportadorBubokTool';
|
||||
|
||||
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
$this->viewData['pageTitle'] = lang('Importador.listingPage');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
|
||||
// Breadcrumbs (IMN)
|
||||
$this->viewData['breadcrumb'] = [
|
||||
['title' => lang("App.menu_importadores"), 'route' => "javascript:void(0);", 'active' => false],
|
||||
['title' => lang("App.menu_importadores_bubok"), 'route' => route_to('importadorBubokTool'), 'active' => true]
|
||||
];
|
||||
|
||||
parent::initController($request, $response, $logger);
|
||||
}
|
||||
|
||||
|
||||
public function index()
|
||||
{
|
||||
|
||||
$viewData = [
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Importador.importadorCatalogoTitle')]),
|
||||
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
|
||||
return view(static::$viewPath . 'viewImportadorBubokTool', $viewData);
|
||||
}
|
||||
|
||||
|
||||
public function importarFila()
|
||||
{
|
||||
$json = $this->request->getJSON();
|
||||
|
||||
// Validación mínima de datos comunes
|
||||
$pedido = $json->pedido ?? null;
|
||||
if (!$pedido || !isset($pedido->orderNumber)) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Datos comunes del pedido ausentes o inválidos.'
|
||||
]);
|
||||
}
|
||||
|
||||
// Validación mínima de existencia del producto en la linea
|
||||
if (!$json || !isset($json->producto)) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Producto no proporcionado o inválido.'
|
||||
]);
|
||||
}
|
||||
$producto = $json->producto;
|
||||
|
||||
// 1. Datos básicos:
|
||||
// Referencia del cliente
|
||||
$orderNumber = $pedido->orderNumber ?? null;
|
||||
$productId = $producto->id ?? null;
|
||||
if (is_null($orderNumber) || is_null($productId)) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Número de orden o ID del producto no reconocidos.'
|
||||
]);
|
||||
}
|
||||
$refCliente = "$orderNumber - $productId";
|
||||
|
||||
// Titulo
|
||||
$titulo = $producto->title ?? null;
|
||||
if (is_null($titulo)) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Título del libro no reconocido.'
|
||||
]);
|
||||
}
|
||||
|
||||
// Validación de páginas y tirada
|
||||
$paginas = isset($producto->body->pages) ? (int) $producto->body->pages : 0;
|
||||
$tirada = isset($producto->amount) ? (int) $producto->amount : 0;
|
||||
if ($paginas <= 0 || $tirada <= 0) {
|
||||
$errores = [];
|
||||
if ($paginas <= 0) {
|
||||
$errores[] = 'Número de páginas inválido.';
|
||||
}
|
||||
if ($tirada <= 0) {
|
||||
$errores[] = 'Tirada inválida.';
|
||||
}
|
||||
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => implode(' ', $errores)
|
||||
]);
|
||||
}
|
||||
|
||||
// Ancho y alto
|
||||
$ancho = null;
|
||||
$alto = null;
|
||||
foreach ($producto->size as $key => $val) {
|
||||
if ($val == 1) {
|
||||
// ejemplo: size170x235
|
||||
$size = str_replace('size', '', $key);
|
||||
[$ancho, $alto] = explode('x', $size);
|
||||
$ancho = (int) $ancho;
|
||||
$alto = (int) $alto;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$ancho || !$alto) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Tamaño del libro no reconocido.'
|
||||
]);
|
||||
}
|
||||
|
||||
/*$numGuardaPages = 4;
|
||||
$hasGuarda = !empty($producto->cover->guarda);
|
||||
if ($hasGuarda)
|
||||
$paginas += $numGuardaPages;*/
|
||||
|
||||
// 2. Interior: color o negro
|
||||
// Determinar tipo de impresión interior
|
||||
$interiorTipo = null;
|
||||
if (isset($producto->body->color->CMYK) && $producto->body->color->CMYK == '1') {
|
||||
$interiorTipo = 'color';
|
||||
} elseif (isset($producto->body->color->Monochrome) && $producto->body->color->Monochrome == '1') {
|
||||
$interiorTipo = 'negro';
|
||||
} elseif (isset($producto->body->color->Semicolor) && $producto->body->color->Semicolor == '1') {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Tipo de impresión "Semicolor" no soportado.'
|
||||
]);
|
||||
}
|
||||
|
||||
if (is_null($interiorTipo)) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'No se pudo determinar si el interior es en color o blanco y negro.'
|
||||
]);
|
||||
}
|
||||
|
||||
// Determinar tipo de papel interior
|
||||
$papelInteriorId = null;
|
||||
if (isset($producto->body->paperColor->white) && $producto->body->paperColor->white == '1') {
|
||||
$papelInteriorId = 3; // Offset blanco 'OFF1'
|
||||
} elseif (isset($producto->body->paperColor->cream) && $producto->body->paperColor->cream == '1') {
|
||||
$papelInteriorId = 4; // Offset ahuesado 'OFF2'
|
||||
} else {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Tipo de papel interior no definido.'
|
||||
]);
|
||||
}
|
||||
|
||||
// Determinar el gramaje del papel
|
||||
$gramajePapelInterior = null;
|
||||
foreach ($producto->body->paperWeight as $key => $val) {
|
||||
if ($val == 1) {
|
||||
$gramajePapelInterior = (int) str_replace(['weight', 'gr'], '', $key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$gramajePapelInterior) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Gramaje del papel no válido.'
|
||||
]);
|
||||
}
|
||||
|
||||
// 3. Encuadernación
|
||||
// Tapa dura
|
||||
$tapaDura = isset($producto->cover->type->tapadura) && $producto->cover->type->tapadura == '1';
|
||||
|
||||
// Solapas
|
||||
$solapas = isset($producto->cover->type->consolapas) && $producto->cover->type->consolapas == '1';
|
||||
|
||||
// Doble cara (a veces se activa con tapa dura) una cara => 2; dos caras => 4
|
||||
$doscara = false;
|
||||
|
||||
// Tipo de encuadernado
|
||||
$encuadernadoId = null;
|
||||
|
||||
if (isset($producto->cover->coverType->SoftCover) && $producto->cover->coverType->SoftCover == '1') {
|
||||
if ($tapaDura) {
|
||||
$encuadernadoId = 1; // Libro fresado tapa dura
|
||||
$doscara = true;
|
||||
} else {
|
||||
$encuadernadoId = 2; // Libro fresado tapa blanda
|
||||
}
|
||||
} elseif (isset($producto->cover->coverType->SaddleStitch) && $producto->cover->coverType->SaddleStitch == '1') {
|
||||
if ($tapaDura) {
|
||||
$encuadernadoId = 3; // Libro cosido tapa dura
|
||||
$doscara = true;
|
||||
} else {
|
||||
$encuadernadoId = $solapas ? 20 : 4; // Libro cosido tapa blanda (solapas) : (sin solapas)
|
||||
}
|
||||
} elseif (isset($producto->cover->coverType->CoilBinding) && $producto->cover->coverType->CoilBinding == '1') {
|
||||
if ($tapaDura) {
|
||||
$encuadernadoId = 5; // Libro espiral tapa dura
|
||||
$doscara = true;
|
||||
} else {
|
||||
$encuadernadoId = 6; // Libro espiral tapa blanda
|
||||
}
|
||||
}
|
||||
if (!$encuadernadoId) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Tipo de encuadernación no identificado.'
|
||||
]);
|
||||
}
|
||||
|
||||
// Determinar el acabado de la cubierta
|
||||
$acabadoId = null;
|
||||
if (isset($producto->cover->acabado->brillo) && $producto->cover->acabado->brillo == '1') {
|
||||
$acabadoId = 1; // Plastificado brillo 1/c
|
||||
} elseif (isset($producto->cover->acabado->mate) && $producto->cover->acabado->mate == '1') {
|
||||
$acabadoId = 2; // Plastificado mate 1/c
|
||||
} else {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'Tipo de acabado de cubierta no definido.'
|
||||
]);
|
||||
}
|
||||
|
||||
// 4. ENVÍO: recuperamos la primera dirección del cliente BUBOK (ID 40)
|
||||
$clienteDireccionModel = model('App\Models\Clientes\ClienteDireccionesModel');
|
||||
$direccionCliente = $clienteDireccionModel
|
||||
->where('cliente_id', 40)
|
||||
->orderBy('id', 'asc')
|
||||
->first();
|
||||
|
||||
if (!$direccionCliente) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => 'El cliente Bubok no tiene direcciones asociadas.'
|
||||
]);
|
||||
}
|
||||
|
||||
$direcciones = [
|
||||
[
|
||||
'direccion' => [
|
||||
'id' => (int) $direccionCliente->id,
|
||||
'cliente_id' => (int) $direccionCliente->cliente_id,
|
||||
'cliente_nombre' => $direccionCliente->clienteNombre,
|
||||
'att' => $direccionCliente->persona_contacto ?? '',
|
||||
'alias' => $direccionCliente->alias ?? '',
|
||||
'email' => $direccionCliente->email ?? '',
|
||||
'direccion' => $direccionCliente->direccion,
|
||||
'pais_id' => (int) $direccionCliente->pais_id,
|
||||
'pais' => $direccionCliente->paisNombre,
|
||||
'municipio' => $direccionCliente->municipio,
|
||||
'provincia' => $direccionCliente->provincia,
|
||||
'cp' => $direccionCliente->cp,
|
||||
'telefono' => $direccionCliente->telefono,
|
||||
],
|
||||
'unidades' => $tirada,
|
||||
'entregaPalets' => false
|
||||
]
|
||||
];
|
||||
|
||||
// Generamos el objeto a importar
|
||||
$dataToImport = [
|
||||
'selectedTirada' => $tirada,
|
||||
'datosCabecera' => [
|
||||
'titulo' => $titulo,
|
||||
'autor' => null,
|
||||
'isbn' => null,
|
||||
'coleccion' => null,
|
||||
'referenciaCliente' => $refCliente
|
||||
],
|
||||
'tirada' => [$tirada],
|
||||
'tamanio' => [
|
||||
'ancho' => $ancho,
|
||||
'alto' => $alto
|
||||
],
|
||||
'tipo' => '',
|
||||
'tipo_presupuesto_id' => $encuadernadoId,
|
||||
'clienteId' => 40, // BUBOK ID
|
||||
'isColor' => ($interiorTipo === 'color') ? 1 : 0,
|
||||
'isHq' => 0,
|
||||
'paginas' => $paginas,
|
||||
'paginasColor' => ($interiorTipo === 'color') ? $paginas : 0,
|
||||
'paginasCuadernillo' => 32,
|
||||
'interior' => [
|
||||
'papelInterior' => $papelInteriorId,
|
||||
'gramajeInterior' => $gramajePapelInterior
|
||||
],
|
||||
'cubierta' => [
|
||||
'papelCubierta' => 2, // 'EST2'
|
||||
'carasCubierta' => $doscara ? 2 : 4,
|
||||
'gramajeCubierta' => in_array($encuadernadoId, [1, 3]) ? 150 : 300, // 150 gramos para "fresado tapa dura" y "cosido tapa dura"
|
||||
'solapas' => !empty($producto->cover->type->consolapas) ? 80 : 0,
|
||||
'acabado' => $acabadoId,
|
||||
'cabezada' => 'WHI',
|
||||
'lomoRedondo' => 0
|
||||
],
|
||||
'guardas' => [],
|
||||
'sobrecubierta' => [],
|
||||
'faja' => null,
|
||||
'comentarios_safekat' => 'URL COVER: ' . $producto->cover->file . "\nURL BODY: " . $producto->body->file,
|
||||
|
||||
'direcciones' => $direcciones
|
||||
];
|
||||
|
||||
/*return $this->respond([
|
||||
'status' => 400,
|
||||
'message' => $dataToImport
|
||||
]);*/
|
||||
|
||||
// 5. Guardar
|
||||
try {
|
||||
$presupuestocliente = new Presupuestocliente();
|
||||
$response = $presupuestocliente->guardar($dataToImport);
|
||||
|
||||
if (!isset($response['sk_id'])) {
|
||||
return $this->respond([
|
||||
'status' => 400,
|
||||
'error' => 'Missing sk_id',
|
||||
'message' => 'No se pudo crear el presupuesto.'
|
||||
], 400);
|
||||
}
|
||||
|
||||
return $this->respond([
|
||||
'status' => 200,
|
||||
'data' => [
|
||||
'sk_id' => $response['sk_id'],
|
||||
'sk_url' => $response['sk_url'] ?? null
|
||||
]
|
||||
]);
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
return $this->respond([
|
||||
'status' => 500,
|
||||
'error' => 'Server error',
|
||||
'message' => 'Error inesperado',
|
||||
'debug' => $e->getMessage()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -44,11 +44,8 @@ class ImportadorCatalogo extends BaseResourceController
|
||||
{
|
||||
|
||||
$viewData = [
|
||||
'currentModule' => static::$controllerSlug,
|
||||
'pageSubTitle' => lang('Basic.global.ManageAllRecords', [lang('Importador.importadorCatalogoTitle')]),
|
||||
'catalogoLibrosEntity' => new CatalogoLibroEntity(),
|
||||
'usingServerSideDataTable' => true,
|
||||
|
||||
|
||||
];
|
||||
|
||||
$viewData = array_merge($this->viewData, $viewData); // merge any possible values from the parent controller class
|
||||
@ -244,7 +241,7 @@ class ImportadorCatalogo extends BaseResourceController
|
||||
|
||||
'guardas' => [],
|
||||
'sobrecubierta' => $sobrecubierta,
|
||||
'faja' => [],
|
||||
//'faja' => null,
|
||||
|
||||
'entrega_taller' => 1,
|
||||
];
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
namespace App\Entities\Cliente;
|
||||
namespace App\Entities\Clientes;
|
||||
|
||||
use CodeIgniter\Entity;
|
||||
use App\Models\Clientes\ClienteModel;
|
||||
use App\Models\Configuracion\PaisModel;
|
||||
|
||||
class ClienteDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
{
|
||||
@ -23,4 +25,29 @@ class ClienteDireccionesEntity extends \CodeIgniter\Entity\Entity
|
||||
"pais_id" => "int",
|
||||
"cp" => "int",
|
||||
];
|
||||
|
||||
public function getClienteNombre(): ?string
|
||||
{
|
||||
if (!$this->cliente_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$clienteModel = model(ClienteModel::class);
|
||||
$cliente = $clienteModel->find($this->cliente_id);
|
||||
|
||||
return $cliente ? $cliente->nombre : null;
|
||||
}
|
||||
|
||||
public function getPaisNombre(): ?string
|
||||
{
|
||||
if (!$this->pais_id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$paisModel = model(PaisModel::class);
|
||||
$pais = $paisModel->find($this->pais_id);
|
||||
|
||||
return $pais ? $pais->nombre : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -722,6 +722,7 @@ return [
|
||||
|
||||
"menu_importadores" => "Importadores",
|
||||
"menu_importadores_catalogo" => "Desde catálogo",
|
||||
"menu_importadores_bubok" => "Bubok",
|
||||
|
||||
"menu_catalogo" => "Catálogo",
|
||||
"menu_catalogo_libros" => "Libros",
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
return [
|
||||
'moduleTitle' => 'Importadores',
|
||||
'importadorCatalogoTitle' => 'Importador RA-MA Ediciones S.L.',
|
||||
'importadorBubokTitle' => 'Importador BUBOK Publishing S.L.',
|
||||
'catalogo' => 'catálogo',
|
||||
'input' => 'ISBN',
|
||||
'descripcion' => 'Título',
|
||||
@ -10,7 +11,8 @@ return [
|
||||
'cnt_pedida' => 'Unidades',
|
||||
'precio_compra' => 'Precio Compra',
|
||||
'importar' => 'Importar',
|
||||
'subirArchivo' => 'Cargar Excel proporcionado por RA-MA',
|
||||
'subirArchivoRama' => 'Cargar Excel proporcionado por RA-MA',
|
||||
'subirArchivoBubok' => 'Cargar XML proporcionado por BUBOK',
|
||||
|
||||
'libro' => 'libro',
|
||||
'id' => 'ID',
|
||||
|
||||
@ -70,6 +70,7 @@ return [
|
||||
'catalogoSection' => 'Catálogo',
|
||||
'importadoresSection' => 'Importadores',
|
||||
'catalogoPermission' => 'Desde catálogo',
|
||||
'bubokPermission' => 'Bubok',
|
||||
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,103 @@
|
||||
<?= $this->include('themes/_commonPartialsBs/datatables') ?>
|
||||
<?= $this->include('themes/_commonPartialsBs/sweetalert') ?>
|
||||
<?= $this->extend('themes/vuexy/main/defaultlayout') ?>
|
||||
|
||||
<?= $this->section('content'); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card card-info">
|
||||
<div class="card-header">
|
||||
<h3 class="card-title"><?= lang('Importador.importadorBubokTitle') ?></h3>
|
||||
</div><!--//.card-header -->
|
||||
|
||||
<form id="catalogoLibroForm" class="card-body" method="post" action="#">
|
||||
<?= csrf_field() ?>
|
||||
|
||||
<!-- card-body -->
|
||||
<div class="card-body">
|
||||
|
||||
<?= view('themes/_commonPartialsBs/_alertBoxes'); ?>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="xmlFile"
|
||||
class="form-label"><?= lang('Importador.subirArchivoBubok') ?? 'Subir archivo XML' ?></label>
|
||||
<input type="file" id="xmlFile" accept=".xml" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4 mb-3 d-flex align-items-end">
|
||||
<button type="button" id="importBtn" class="btn btn-success w-100">
|
||||
<i class="fas fa-file-import me-2"></i> <?= lang('Importador.importar') ?? 'Importar' ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 mb-3">
|
||||
|
||||
<table id="xmlTable" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" id="selectAll" /></th>
|
||||
<th>Referencia</th>
|
||||
<th>Título</th>
|
||||
<th>Tamaño</th>
|
||||
<th>Páginas</th>
|
||||
<th>Tirada</th>
|
||||
<th>Interior</th>
|
||||
<th>Notas</th>
|
||||
<th>Acciones</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th></th> <!-- No filtro para checkbox -->
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th> <!-- No filtro para notas -->
|
||||
<th></th> <!-- No filtro para acciones -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div><!--//.card-body -->
|
||||
<div class="card-footer">
|
||||
|
||||
</div><!--//.card-footer -->
|
||||
</div><!--//.card -->
|
||||
</div><!--//.col -->
|
||||
</div><!--//.row -->
|
||||
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
|
||||
<?= $this->section('css') ?>
|
||||
<link rel="stylesheet"
|
||||
href="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.css") ?>">
|
||||
<link rel="stylesheet" href="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.css') ?>" />
|
||||
<?= $this->endSection() ?>
|
||||
|
||||
|
||||
<?= $this->section('additionalExternalJs') ?>
|
||||
<script
|
||||
src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/dataTables.buttons.min.js") ?>"></script>
|
||||
<script
|
||||
src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.bootstrap5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.html5.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/buttons/buttons.print.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/jszip/jszip.min.js") ?>"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/pdfmake.min.js") ?>"
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="<?= site_url("/themes/vuexy/vendor/libs/datatables-sk/plugins/pdfmake/vfs_fonts.js") ?>"></script>
|
||||
<script src="<?= site_url('themes/vuexy/vendor/libs/sweetalert2/sweetalert2.js') ?>"></script>
|
||||
<script type="module" src="<?= site_url("assets/js/safekat/pages/importadores/bubok/bubok_tool.js") ?>"></script>
|
||||
<?= $this->endSection() ?>
|
||||
@ -22,7 +22,7 @@
|
||||
|
||||
<div class="col-md-6 mb-3">
|
||||
<label for="excelFile"
|
||||
class="form-label"><?= lang('Importador.subirArchivo') ?? 'Subir archivo Excel' ?></label>
|
||||
class="form-label"><?= lang('Importador.subirArchivoRama') ?? 'Subir archivo Excel' ?></label>
|
||||
<input type="file" class="form-control" id="excelFile" name="excelFile"
|
||||
accept=".xlsx, .xls">
|
||||
</div>
|
||||
|
||||
@ -20,7 +20,14 @@ if (auth()->user()->can('importadores.menu')) {
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (auth()->user()->can('importadores.bubok')) { ?>
|
||||
<li class="menu-item">
|
||||
<a href="<?= route_to("importadorBubokTool") ?>" class="menu-link">
|
||||
<?= lang("App.menu_importadores_bubok") ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php } ?>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user