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>
|
||||
|
||||
Reference in New Issue
Block a user