tarifa maquinas

This commit is contained in:
amazuecos
2024-12-18 09:30:21 +01:00
parent 43f2daea59
commit 41b4ec5cd3
20 changed files with 864 additions and 0 deletions

View File

@ -0,0 +1,55 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class MaquinaTareasTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,64 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class TarifaAcabadoMaquinaTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,64 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class TarifaManipuladoMaquinaTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class TarifaPreimpresionMaquinaTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class TarifaEncuadernacionMaquinaTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,65 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
use CodeIgniter\Database\RawSql;
class TarifaExtraMaquinaTable extends Migration
{
protected array $COLUMNS = [
'id' => [
'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");
}
}

View File

@ -0,0 +1,20 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use CodeIgniter\Entity\Entity;
class TareaMaquinaEntity extends Entity
{
protected $attributes = [
"id" => null,
"name" => null,
"description" => null,
];
protected $casts = [
"id" => "integer",
"name" => "string",
"description" => "?string",
];
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
use CodeIgniter\Entity\Entity;
class TarifaAcabadoMaquinaEntity extends Entity
{
protected $attributes = [
"id" => 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"]);
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Tarifas\TarifaEncuadernacionEntity;
use App\Models\Tarifas\TarifaEncuadernacionModel;
use CodeIgniter\Entity\Entity;
class TarifaEncuadernacionMaquinaEntity extends Entity
{
protected $attributes = [
"id" => 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"]);
}
}

View File

@ -0,0 +1,32 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Tarifas\Acabados\TarifaAcabadoEntity;
use App\Entities\Tarifas\TarifaextraEntity;
use App\Models\Tarifas\Acabados\TarifaAcabadoModel;
use App\Models\Tarifas\TarifaextraModel;
use CodeIgniter\Entity\Entity;
class TarifaExtraMaquinaEntity extends Entity
{
protected $attributes = [
"id" => 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"]);
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Tarifas\TarifaManipuladoEntity;
use App\Models\Tarifas\TarifaManipuladoModel;
use CodeIgniter\Entity\Entity;
class TarifaManipuladoMaquinaEntity extends Entity
{
protected $attributes = [
"id" => 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"]);
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Entities\Tarifas\Maquinas;
use App\Entities\Tarifas\TarifapreimpresionEntity;
use App\Models\Tarifas\TarifapreimpresionModel;
use CodeIgniter\Entity\Entity;
class TarifaPreimpresionMaquinaEntity extends Entity
{
protected $attributes = [
"id" => 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"]);
}
}

View File

@ -0,0 +1,50 @@
<?php
namespace App\Models;
use App\Entities\Tarifas\Maquinas\TareaMaquinaEntity;
use CodeIgniter\Model;
class MaquinaTareaModel extends Model
{
protected $table = 'maquina_tareas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TareaMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"nombre",
"description",
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Entities\Tarifas\Maquinas\TarifaAcabadoMaquinaEntity;
use CodeIgniter\Model;
class TarifaAcabadoMaquinaModel extends Model
{
protected $table = 'tarifa_acabado_maquinas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TarifaAcabadoMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"tarifa_acabado_id",
"maquina_id",
"maquina_tarea_id"
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Entities\Tarifas\Maquinas\TarifaEncuadernacionMaquinaEntity;
use CodeIgniter\Model;
class TarifaEncuadernacionMaquinaModel extends Model
{
protected $table = 'tarifa_encuadernacion_maquinas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TarifaEncuadernacionMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"tarifa_encuadernacion_id",
"maquina_id",
"maquina_tarea_id"
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -0,0 +1,52 @@
<?php
namespace App\Models;
use App\Database\Migrations\TarifaExtraMaquinaTable;
use App\Entities\Tarifas\Maquinas\TarifaPreimpresionMaquinaEntity;
use CodeIgniter\Model;
class TarifaExtraMaquinaEntity extends Model
{
protected $table = 'tarifa_acabado_maquinas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TarifaExtraMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"tarifa_extra_id",
"maquina_id",
"maquina_tarea_id"
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Entities\Tarifas\Maquinas\TarifaManipuladoMaquinaEntity;
use CodeIgniter\Model;
class TarifaManipuladoMaquinaModel extends Model
{
protected $table = 'tarifa_manipulado_maquinas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TarifaManipuladoMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"tarifa_manipulado_id",
"maquina_id",
"maquina_tarea_id"
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -0,0 +1,51 @@
<?php
namespace App\Models;
use App\Entities\Tarifas\Maquinas\TarifaPreimpresionMaquinaEntity;
use CodeIgniter\Model;
class TarifaPreimpresionMaquinaModel extends Model
{
protected $table = 'tarifa_acabado_maquinas';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = TarifaPreimpresionMaquinaEntity::class;
protected $useSoftDeletes = true;
protected $protectFields = true;
protected $allowedFields = [
"tarifa_preimpresion_id",
"maquina_id",
"maquina_tarea_id"
];
protected bool $allowEmptyInserts = false;
protected bool $updateOnlyChanged = true;
protected array $casts = [];
protected array $castHandlers = [];
// Dates
protected $useTimestamps = true;
protected $dateFormat = 'datetime';
protected $createdField = 'created_at';
protected $updatedField = 'updated_at';
protected $deletedField = 'deleted_at';
// Validation
protected $validationRules = [];
protected $validationMessages = [];
protected $skipValidation = false;
protected $cleanValidationRules = true;
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = [];
protected $afterInsert = [];
protected $beforeUpdate = [];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
}

View File

@ -74,5 +74,6 @@
</div><!--//.mb-3 -->
</div><!--//.col -->
</div><!-- //.row -->

View File

@ -346,6 +346,7 @@ $picture = "/assets/img/default-user.png";
<script src="<?= site_url('themes/vuexy/vendor/libs/perfect-scrollbar/perfect-scrollbar.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/libs/hammer/hammer.js') ?>"></script>
<script src="<?= site_url('themes/vuexy/vendor/js/menu.js') ?>"></script>
<script type="module" src="<?= site_url('assets/js/safekat/pages/chatNotification.js') ?>"></script>
<!-- endbuild -->