mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Trabajando en los campos del form
This commit is contained in:
@ -17,7 +17,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
protected $format = 'json';
|
||||
|
||||
protected static $singularObjectName = 'Cosido Tapa Blanda';
|
||||
protected static $singularObjectNameCc = 'cosidoTapaBlanda';
|
||||
protected static $singularObjectNameCc = 'Cosidotapablanda';
|
||||
protected static $pluralObjectName = 'Cosidos Tapa Blanda';
|
||||
protected static $pluralObjectNameCc = 'cosidosTapaBlanda';
|
||||
|
||||
@ -32,7 +32,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
|
||||
{
|
||||
|
||||
$this->viewData['pageTitle'] = lang('Presupuestos.moduleTitle');
|
||||
$this->viewData['pageTitle'] = lang('Presupuestos.moduleTitleCosidoTB');
|
||||
$this->viewData['usingSweetAlert'] = true;
|
||||
parent::initController($request, $response, $logger);
|
||||
$this->model = new PresupuestoModel();
|
||||
@ -125,13 +125,20 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
|
||||
$this->viewData['presupuestoEntity'] = isset($sanitizedData) ? new PresupuestoEntity($sanitizedData) : new PresupuestoEntity();
|
||||
$this->viewData['clienteList'] = $this->getClienteListItems($presupuestoEntity->cliente_id ?? null);
|
||||
$this->viewData['incReiList'] = array('incidencia'=>lang('Presupuestos.incidencia'), 'reimpresion'=>lang('Presupuestos.reimpresion'), 'sin_cargo'=>lang('Presupuestos.sinCargo'));
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
$this->viewData['formaPagoList'] = $this->getFormaPagoListItems();
|
||||
$this->viewData['tiposImpresionList'] = $this->getTiposImpresionListItems($presupuestoEntity->tipo_impresion_id ?? null);
|
||||
$this->viewData['tipologiasLibroList'] = $this->getTipologiasLibroListItems($presupuestoEntity->tipologia_id ?? null);
|
||||
$this->viewData['paisList'] = $this->getPaisListItems();
|
||||
|
||||
$this->viewData['ubicacionLibroList'] = $this->getUbicacionLibroListItems($presupuestoEntity->ubicacion_id ?? null);
|
||||
$this->viewData['presupuestoEstadoList'] = $this->getPresupuestoEstadoListItems($presupuestoEntity->estado_id ?? null);
|
||||
$this->viewData['papelFormatoList'] = $this->getPapelFormatoListItems($presupuestoEntity->papel_formato_id ?? null);
|
||||
|
||||
$this->viewData['papelGenericoList'] = $this->getPapelGenericoListItems($presupuestoEntity->paginas_negro_papel_id ?? null);
|
||||
$this->viewData['papelImpresionList'] = $this->getPapelImpresionListItems($presupuestoEntity->paginas_negro_papel_impresion_id ?? null);
|
||||
$this->viewData['maquinaList'] = $this->getMaquinaListItems($presupuestoEntity->paginas_negro_maquina_id ?? null);
|
||||
@ -153,10 +160,10 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
$this->viewData['userList3'] = $this->getUserListItems3($presupuestoEntity->pedido_espera_user_id ?? null);
|
||||
$this->viewData['paginasCubiertaList'] = $this->getPaginasCubiertaOptions();
|
||||
$this->viewData['paginasPortadaList'] = $this->getPaginasPortadaOptions();
|
||||
*/
|
||||
$this->viewData['formAction'] = route_to('createCosidotapablanda');
|
||||
|
||||
$this->viewData['formAction'] = route_to('createPresupuesto');
|
||||
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Presupuestos.moduleTitle') . ' ' . lang('Basic.global.addNewSuffix');
|
||||
$this->viewData['boxTitle'] = lang('Basic.global.addNew') . ' ' . lang('Presupuestos.moduleTitleCosidoTB') . ' ' . lang('Basic.global.addNewSuffix');
|
||||
|
||||
|
||||
return $this->displayForm(__METHOD__);
|
||||
@ -463,6 +470,20 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
}
|
||||
|
||||
|
||||
protected function getClienteListItems($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Clientes.cliente'))])];
|
||||
if (!empty($selId)) :
|
||||
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||
|
||||
$selOption = $clienteModel->where('id', $selId)->findColumn('nombre');
|
||||
if (!empty($selOption)) :
|
||||
$data[$selId] = $selOption[0];
|
||||
endif;
|
||||
endif;
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getPaisListItems()
|
||||
{
|
||||
$paisModel = model('App\Models\Configuracion\PaisModel');
|
||||
@ -472,6 +493,19 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
return $data;
|
||||
}
|
||||
|
||||
protected function getPapelFormatoListItems($selId = null)
|
||||
{
|
||||
$papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel');
|
||||
$data = $papelFormatoModel->getElementsForMenu();
|
||||
array_unshift($data, (object)['id'=>'', 'tamanio' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Presupuestos.papelFormatoId'))])]);
|
||||
return $data;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
protected function getUbicacionLibroListItems($selId = null)
|
||||
{
|
||||
@ -618,19 +652,6 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
}
|
||||
|
||||
|
||||
protected function getPapelFormatoListItems($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('LgPapelFormatoes.papelFormato'))])];
|
||||
if (!empty($selId)) :
|
||||
$papelFormatoModel = model('App\Models\Configuracion\PapelFormatoModel');
|
||||
|
||||
$selOption = $papelFormatoModel->where('id', $selId)->findColumn('id');
|
||||
if (!empty($selOption)) :
|
||||
$data[$selId] = $selOption[0];
|
||||
endif;
|
||||
endif;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
protected function getMaquinaListItems2($selId = null)
|
||||
@ -798,21 +819,7 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
}
|
||||
|
||||
|
||||
protected function getClienteListItems($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Clientes.cliente'))])];
|
||||
if (!empty($selId)) :
|
||||
$clienteModel = model('App\Models\Clientes\ClienteModel');
|
||||
|
||||
$selOption = $clienteModel->where('id', $selId)->findColumn('nombre');
|
||||
if (!empty($selOption)) :
|
||||
$data[$selId] = $selOption[0];
|
||||
endif;
|
||||
endif;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected function getMaquinaListItems4($selId = null)
|
||||
{
|
||||
$data = ['' => lang('Basic.global.pleaseSelectA', [mb_strtolower(lang('Maquinas.maquina'))])];
|
||||
@ -879,4 +886,5 @@ class Cosidotapablanda extends \App\Controllers\GoBaseResourceController
|
||||
];
|
||||
return $paginasPortadaOptions;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user