mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add new dates
This commit is contained in:
@ -18,6 +18,10 @@ class OrdenTrabajo extends BaseConfig
|
||||
"corte_at" => "corte_user_id",
|
||||
"preparacion_interiores_at" => "preparacion_interior_user_id",
|
||||
"entrada_manipulado_at" => "entrada_manipulado_user_id",
|
||||
"cosido_at" => "cosido_user_id",
|
||||
"grapado_at" => "grapado_user_id",
|
||||
"solapa_at" => "solapa_user_id",
|
||||
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => "pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_at" => "ferro_en_cliente_user_id",
|
||||
@ -45,8 +49,8 @@ class OrdenTrabajo extends BaseConfig
|
||||
"impreso_int" => "#AFDDFF",
|
||||
"impreso_cub" => "#3A59D1",
|
||||
"plastificado" => "#FFD63A",
|
||||
"solapas" => "#4F1C51",
|
||||
"preparado" => "#FF0B55",
|
||||
"solapa" => "#4F1C51",
|
||||
"cosido" => "#FF0B55",
|
||||
"grapado" => "#FEBA17",
|
||||
"encuadernado" => "#FEBA17",
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
use CodeIgniter\Database\RawSql;
|
||||
|
||||
class UpdateDateFieldsOrdenTrabajoDates extends Migration
|
||||
{
|
||||
protected array $DATES = [
|
||||
"cosido_at" => [
|
||||
"type" => "DATE",
|
||||
"null" => true,
|
||||
],
|
||||
"solapa_at" => [
|
||||
"type" => "DATE",
|
||||
"null" => true,
|
||||
],
|
||||
"grapado_at" => [
|
||||
"type" => "DATE",
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
protected array $USERS = [
|
||||
"cosido_user_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"constraint" => 10,
|
||||
"null" => true,
|
||||
],
|
||||
"solapa_user_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"constraint" => 10,
|
||||
"null" => true,
|
||||
],
|
||||
"grapado_user_id" => [
|
||||
"type" => "INT",
|
||||
"unsigned" => true,
|
||||
"constraint" => 10,
|
||||
"null" => true,
|
||||
],
|
||||
];
|
||||
|
||||
public function up()
|
||||
{
|
||||
$this->forge->addColumn("orden_trabajo_dates", $this->DATES);
|
||||
$this->forge->addColumn("orden_trabajo_users", $this->USERS);
|
||||
foreach ($this->USERS as $key => $value) {
|
||||
$this->forge->addForeignKey([$key],"users",["id"]);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->forge->dropColumn("orden_trabajo_dates", array_keys($this->DATES));
|
||||
$this->forge->dropColumn("orden_trabajo_users", array_keys($this->USERS));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,9 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
"corte_at" => null,
|
||||
"preparacion_interiores_at" => null,
|
||||
"entrada_manipulado_at" => null,
|
||||
"cosido_at" => null,
|
||||
"solapa_at" => null,
|
||||
"cosido_at" => null,
|
||||
//FERRO
|
||||
"pendiente_ferro_at" => null,
|
||||
"ferro_en_cliente_at" => null,
|
||||
@ -77,4 +80,16 @@ class OrdenTrabajoDateEntity extends Entity
|
||||
{
|
||||
return $this->attributes['corte_at'] != null;
|
||||
}
|
||||
public function cosidoStatus():bool
|
||||
{
|
||||
return $this->attributes['cosido_at'] != null;
|
||||
}
|
||||
public function grapadoStatus():bool
|
||||
{
|
||||
return $this->attributes['grapado_at'] != null;
|
||||
}
|
||||
public function solapaStatus():bool
|
||||
{
|
||||
return $this->attributes['solapa_at'] != null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,9 @@ class OrdenTrabajoUserEntity extends Entity
|
||||
"corte_user_id" => null,
|
||||
"preparacion_interior_user_id" => null,
|
||||
"entrada_manipulado_user_id" => null,
|
||||
"cosido_user_id"=> null,
|
||||
"solapa_user_id"=> null,
|
||||
"grapado_user_id"=> null,
|
||||
//FERRO
|
||||
"pendiente_ferro_user_id" => null,
|
||||
"ferro_en_cliente_user_id" => null,
|
||||
|
||||
@ -87,6 +87,10 @@ return [
|
||||
"ejemplares" => "Ejemplares",
|
||||
"tipo" => "Tipo",
|
||||
"lomo" => "Lomo",
|
||||
|
||||
"cosido" => "Cosido",
|
||||
"grapado" => "Grapado",
|
||||
"solapa" => "Solapas",
|
||||
//IMPRESION
|
||||
"impresion_bn" => "Impresión BN",
|
||||
"cubierta" => "Cubierta/Portada",
|
||||
@ -96,6 +100,7 @@ return [
|
||||
"pre_solapa" => "Revisión solapa",
|
||||
"pre_codbarras" => "Revisión código barras",
|
||||
"pre_imposicion" => "Revisión imposición",
|
||||
|
||||
|
||||
|
||||
"errors" => [
|
||||
|
||||
@ -28,6 +28,9 @@ class OrdenTrabajoDate extends Model
|
||||
"corte_at",
|
||||
"preparacion_interiores_at",
|
||||
"entrada_manipulado_at",
|
||||
"cosido_at",
|
||||
"solapa_at",
|
||||
"cosido_at",
|
||||
//FERRO
|
||||
"pendiente_ferro_at",
|
||||
"ferro_en_cliente_at",
|
||||
|
||||
@ -29,6 +29,9 @@ class OrdenTrabajoUser extends Model
|
||||
"corte_user_id",
|
||||
"preparacion_interior_user_id",
|
||||
"entrada_manipulado_user_id",
|
||||
"cosido_user_id",
|
||||
"solapa_user_id",
|
||||
"grapado_user_id",
|
||||
//FERRO
|
||||
"pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_user_id",
|
||||
|
||||
@ -1150,7 +1150,9 @@ class ProductionService extends BaseService
|
||||
}
|
||||
protected function otSolapaColor()
|
||||
{
|
||||
|
||||
if ($this->ot->dates()->solapaStatus()) {
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["solapa"];
|
||||
};
|
||||
}
|
||||
protected function otEncuadernadoColor()
|
||||
{
|
||||
@ -1172,9 +1174,15 @@ class ProductionService extends BaseService
|
||||
}
|
||||
protected function otCosidoColor()
|
||||
{
|
||||
if ($this->ot->dates()->cosidoStatus()) {
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["cosido"];
|
||||
};
|
||||
}
|
||||
protected function otGrapadoColor()
|
||||
{
|
||||
if ($this->ot->dates()->grapadoStatus()) {
|
||||
$this->statusColor = $this->ordenTrabajoConfig->OT_COLORS["grapado"];
|
||||
};
|
||||
}
|
||||
protected function updateColor(){
|
||||
$this->otSinImprimirColor();
|
||||
|
||||
@ -97,7 +97,24 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
|
||||
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-prep-cosido" class="form-label"><?= @lang("Produccion.cosido") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="cosido_at" id="ot-prep-cosido">
|
||||
<div class="form-text"><?=$user_dates["cosido_at"]?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-prep-grapado" class="form-label"><?= @lang("Produccion.grapado") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="grapado_at" id="ot-prep-grapado">
|
||||
<div class="form-text"><?=$user_dates["grapado_at"]?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-prep-solapa" class="form-label"><?= @lang("Produccion.solapa") ?></label>
|
||||
<input type="text" class="form-control ot-date" placeholder="DD/MM/YYYY" name="solapa_at" id="ot-prep-solapa">
|
||||
<div class="form-text"><?=$user_dates["solapa_at"]?></div>
|
||||
</div>
|
||||
<!-- Progress -->
|
||||
<div class="col-xs-12 col-md-4 col-lg-4 mb-2 w-100">
|
||||
<label for="ot-prep-guillotina" class="form-label"><?= @lang("Produccion.guillotina") ?></label>
|
||||
|
||||
@ -65,7 +65,8 @@ class OrdenTrabajoDatatable {
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("background-color",data.logo.color)
|
||||
$(row).css("border-left",`10px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`10px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -90,7 +91,9 @@ class OrdenTrabajoDatatable {
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_pendientes',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("background-color",data.logo.color)
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -115,7 +118,8 @@ class OrdenTrabajoDatatable {
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_pendiente',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("background-color",data.logo.color)
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -140,7 +144,8 @@ class OrdenTrabajoDatatable {
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_ok',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("background-color",data.logo.color)
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -77,6 +77,10 @@ class OrdenTrabajo {
|
||||
this.portada = new DatePicker(this.otForm.find("#ot-portada"), option)
|
||||
this.plastificadoMate = new DatePicker(this.otForm.find("#ot-plastificado-mate"), option)
|
||||
this.prepGuillotina = new DatePicker(this.otForm.find("#ot-prep-guillotina"), option)
|
||||
this.prepCosido = new DatePicker(this.otForm.find("#ot-prep-cosido"), option)
|
||||
this.prepGrapado = new DatePicker(this.otForm.find("#ot-prep-grapado"), option)
|
||||
this.prepSolapa = new DatePicker(this.otForm.find("#ot-prep-solapa"), option)
|
||||
|
||||
this.espiral = new DatePicker(this.otForm.find("#ot-espiral"), option)
|
||||
this.embalaje = new DatePicker(this.otForm.find("#ot-embalaje"), option)
|
||||
this.envio = new DatePicker(this.otForm.find("#ot-envio"), option)
|
||||
@ -389,6 +393,10 @@ class OrdenTrabajo {
|
||||
this.portada.setDate(this.summaryData.dates.cubierta_at)
|
||||
this.plastificadoMate.setDate(this.summaryData.dates.plastificado_at)
|
||||
this.prepGuillotina.setDate(this.summaryData.dates.corte_at)
|
||||
this.prepCosido.setDate(this.summaryData.dates.cosido_at)
|
||||
this.prepSolapa.setDate(this.summaryData.dates.solapa_at)
|
||||
this.prepGrapado.setDate(this.summaryData.dates.grapado_at)
|
||||
|
||||
this.espiral.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
this.embalaje.setDate(this.summaryData.dates.embalaje_at)
|
||||
this.envio.setDate(this.summaryData.dates.envio_at)
|
||||
|
||||
Reference in New Issue
Block a user