diff --git a/ci4/app/Database/Migrations/2024-12-16-180000_MaquinaTareasTable.php b/ci4/app/Database/Migrations/2024-12-16-180000_MaquinaTareasTable.php new file mode 100644 index 00000000..d7a6f752 --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-16-180000_MaquinaTareasTable.php @@ -0,0 +1,55 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'name' => [ + 'type' => 'VARCHAR', + 'constraint' => 255, + ], + 'description' => [ + 'type' => 'LONGTEXT', + 'default' => null, + 'null' => true + ] + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->createTable("maquina_tareas"); + } + + public function down() + { + $this->forge->dropTable("maquina_tareas"); + } +} diff --git a/ci4/app/Database/Migrations/2024-12-16-183531_TarifaAcabadoMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183531_TarifaAcabadoMaquinaTable.php new file mode 100644 index 00000000..d5a7d304 --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-16-183531_TarifaAcabadoMaquinaTable.php @@ -0,0 +1,64 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'tarifa_acabado_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_tarea_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ] + + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->addForeignKey('tarifa_acabado_id','lg_tarifa_acabado','id'); + $this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id'); + $this->forge->createTable("tarifa_acabado_maquinas"); + } + + public function down() + { + $this->forge->dropTable("tarifa_acabado_maquinas"); + } +} diff --git a/ci4/app/Database/Migrations/2024-12-16-183550_TarifaManipuladoMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183550_TarifaManipuladoMaquinaTable.php new file mode 100644 index 00000000..5ad3460a --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-16-183550_TarifaManipuladoMaquinaTable.php @@ -0,0 +1,64 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'tarifa_manipulado_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_tarea_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ] + + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->addForeignKey('tarifa_manipulado_id','lg_tarifa_manipulado','id'); + $this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id'); + $this->forge->createTable("tarifa_manipulado_maquinas"); + } + + public function down() + { + $this->forge->dropTable("tarifa_manipulado_maquinas"); + } +} diff --git a/ci4/app/Database/Migrations/2024-12-16-183607_TarifaPreimpresionMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183607_TarifaPreimpresionMaquinaTable.php new file mode 100644 index 00000000..3dacd0ff --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-16-183607_TarifaPreimpresionMaquinaTable.php @@ -0,0 +1,65 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'tarifa_preimpresion_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_tarea_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ] + + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->addForeignKey('tarifa_preimpresion_id','lg_tarifa_preimpresion','id'); + $this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id'); + $this->forge->createTable("tarifa_preimpresion_maquinas"); + } + + public function down() + { + $this->forge->dropTable("tarifa_preimpresion_maquinas"); + } +} diff --git a/ci4/app/Database/Migrations/2024-12-16-183619_TarifaEncuadernacionMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-16-183619_TarifaEncuadernacionMaquinaTable.php new file mode 100644 index 00000000..000eacca --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-16-183619_TarifaEncuadernacionMaquinaTable.php @@ -0,0 +1,65 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'tarifa_encuadernacion_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_tarea_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ] + + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->addForeignKey('tarifa_encuadernacion_id','tarifa_encuadernacion','id'); + $this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id'); + $this->forge->createTable("tarifa_encuadernacion_maquinas"); + } + + public function down() + { + $this->forge->dropTable("tarifa_encuadernacion_maquinas"); + } +} diff --git a/ci4/app/Database/Migrations/2024-12-17-183619_TarifaExtraMaquinaTable.php b/ci4/app/Database/Migrations/2024-12-17-183619_TarifaExtraMaquinaTable.php new file mode 100644 index 00000000..fe58d938 --- /dev/null +++ b/ci4/app/Database/Migrations/2024-12-17-183619_TarifaExtraMaquinaTable.php @@ -0,0 +1,65 @@ + [ + 'type' => 'INT', + 'unsigned' => true, + 'auto_increment' => true, + ], + 'tarifa_extra_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ], + 'maquina_tarea_id' => [ + 'type' => 'INT', + 'unsigned' => true, + 'constraint' => 10, + ] + + ]; + public function up() + { + $this->forge->addField($this->COLUMNS); + $currenttime = new RawSql('CURRENT_TIMESTAMP'); + $this->forge->addField([ + 'created_at' => [ + 'type' => 'TIMESTAMP', + 'default' => $currenttime, + + ], + 'updated_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + 'deleted_at' => [ + 'type' => 'TIMESTAMP', + 'null' => true, + + ], + ]); + $this->forge->addPrimaryKey('id'); + $this->forge->addForeignKey('tarifa_extra_id','tarifa_extra','id'); + $this->forge->addForeignKey('maquina_tarea_id','maquina_tareas','id'); + $this->forge->createTable("tarifa_extra_maquinas"); + } + + public function down() + { + $this->forge->dropTable("tarifa_extra_maquinas"); + } +} diff --git a/ci4/app/Entities/Configuracion/TareaMaquinaEntity.php b/ci4/app/Entities/Configuracion/TareaMaquinaEntity.php new file mode 100644 index 00000000..97b8f8d7 --- /dev/null +++ b/ci4/app/Entities/Configuracion/TareaMaquinaEntity.php @@ -0,0 +1,20 @@ + null, + "name" => null, + "description" => null, + ]; + protected $casts = [ + "id" => "integer", + "name" => "string", + "description" => "?string", + ]; + +} diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaAcabadoMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaAcabadoMaquinaEntity.php new file mode 100644 index 00000000..107370f6 --- /dev/null +++ b/ci4/app/Entities/Tarifas/Maquinas/TarifaAcabadoMaquinaEntity.php @@ -0,0 +1,30 @@ + null, + "tarifa_acabado_id" => null, + "maquina_id" => null, + "maquina_tarea_id" => null, + ]; + protected $casts = [ + "id" => "integer", + "tarifa_acabado_id" => "integer", + "maquina_id" => "integer", + "maquina_tarea_id" => "?integer", + + ]; + + public function tarifa_acabado(): TarifaAcabadoEntity + { + $m = model(TarifaAcabadoModel::class); + return $m->find($this->attributes["tarifa_acabado_id"]); + } +} diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaEncuadernacionMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaEncuadernacionMaquinaEntity.php new file mode 100644 index 00000000..f0d9ee92 --- /dev/null +++ b/ci4/app/Entities/Tarifas/Maquinas/TarifaEncuadernacionMaquinaEntity.php @@ -0,0 +1,34 @@ + null, + "tarifa_encuadernacion_id" => null, + "maquina_id" => null, + "maquina_tarea_id" => null, + + + ]; + protected $casts = [ + "id" => "integer", + "tarifa_encuadernacion_id" => "integer", + "maquina_id" => "integer", + "maquina_tarea_id" => "?integer", + + + ]; + + public function tarifa_encuadernacion(): TarifaEncuadernacionEntity + { + $m = model(TarifaEncuadernacionModel::class); + return $m->find($this->attributes["tarifa_encuadernacion_id"]); + } +} diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaExtraMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaExtraMaquinaEntity.php new file mode 100644 index 00000000..9532f153 --- /dev/null +++ b/ci4/app/Entities/Tarifas/Maquinas/TarifaExtraMaquinaEntity.php @@ -0,0 +1,32 @@ + null, + "tarifa_extra_id" => null, + "maquina_id" => null, + "maquina_tarea_id" => null, + ]; + protected $casts = [ + "id" => "integer", + "tarifa_extra_id" => "integer", + "maquina_id" => "integer", + "maquina_tarea_id" => "?integer", + + ]; + + public function tarifa_extra(): TarifaextraEntity + { + $m = model(TarifaextraModel::class); + return $m->find($this->attributes["tarifa_extra_id"]); + } +} diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaManipuladoMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaManipuladoMaquinaEntity.php new file mode 100644 index 00000000..ed8fb93c --- /dev/null +++ b/ci4/app/Entities/Tarifas/Maquinas/TarifaManipuladoMaquinaEntity.php @@ -0,0 +1,31 @@ + null, + "tarifa_manipulado_id" => null, + "maquina_id" => null, + "maquina_tarea_id" => null, + + ]; + protected $casts = [ + "id" => "integer", + "tarifa_manipulado_id" => "integer", + "maquina_id" => "integer", + "maquina_tarea_id" => "?integer", + + ]; + + public function tarifa_manipulado(): TarifaManipuladoEntity + { + $m = model(TarifaManipuladoModel::class); + return $m->find($this->attributes["tarifa_manipulado_id"]); + } +} diff --git a/ci4/app/Entities/Tarifas/Maquinas/TarifaPreimpresionMaquinaEntity.php b/ci4/app/Entities/Tarifas/Maquinas/TarifaPreimpresionMaquinaEntity.php new file mode 100644 index 00000000..2eb4f991 --- /dev/null +++ b/ci4/app/Entities/Tarifas/Maquinas/TarifaPreimpresionMaquinaEntity.php @@ -0,0 +1,31 @@ + null, + "tarifa_preimpresion_id" => null, + "maquina_id" => null, + "maquina_tarea_id" => null, + + ]; + protected $casts = [ + "id" => "integer", + "tarifa_preimpresion_id" => "integer", + "maquina_id" => "integer", + "maquina_tarea_id" => "?integer", + + ]; + + public function tarifa_acabado(): TarifapreimpresionEntity + { + $m = model(TarifapreimpresionModel::class); + return $m->find($this->attributes["tarifa_preimpresion_id"]); + } +} diff --git a/ci4/app/Models/Configuracion/MaquinaTareaModel.php b/ci4/app/Models/Configuracion/MaquinaTareaModel.php new file mode 100644 index 00000000..70ad47cd --- /dev/null +++ b/ci4/app/Models/Configuracion/MaquinaTareaModel.php @@ -0,0 +1,50 @@ + + \ No newline at end of file diff --git a/ci4/app/Views/themes/vuexy/main/defaultlayout.php b/ci4/app/Views/themes/vuexy/main/defaultlayout.php index c2cccd59..ee716d18 100644 --- a/ci4/app/Views/themes/vuexy/main/defaultlayout.php +++ b/ci4/app/Views/themes/vuexy/main/defaultlayout.php @@ -346,6 +346,7 @@ $picture = "/assets/img/default-user.png"; +