mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fix store ot
This commit is contained in:
@ -9,8 +9,8 @@ use CodeIgniter\Model;
|
||||
class OrdenTrabajoDate extends Model
|
||||
{
|
||||
protected $table = 'orden_trabajo_dates';
|
||||
protected $primaryKey = 'orden_trabajo_id';
|
||||
protected $useAutoIncrement = false;
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = OrdenTrabajoDateEntity::class;
|
||||
protected $useSoftDeletes = true;
|
||||
protected $protectFields = true;
|
||||
@ -62,8 +62,8 @@ class OrdenTrabajoDate extends Model
|
||||
protected $allowCallbacks = true;
|
||||
protected $beforeInsert = [];
|
||||
protected $afterInsert = ["updateOrdenTrabajoUser"];
|
||||
protected $beforeUpdate = ["updateOrdenTrabajoUser"];
|
||||
protected $afterUpdate = [];
|
||||
protected $beforeUpdate = [];
|
||||
protected $afterUpdate = ["updateOrdenTrabajoUser"];
|
||||
protected $beforeFind = [];
|
||||
protected $afterFind = [];
|
||||
protected $beforeDelete = [];
|
||||
@ -106,7 +106,7 @@ class OrdenTrabajoDate extends Model
|
||||
$mapping = [
|
||||
"fecha_encuadernado_at" => "encuadernacion_user_id",
|
||||
// "fecha_externo_at" => "null",
|
||||
"fecha_impresion_at" => "null",
|
||||
"fecha_impresion_at" => null,
|
||||
"pendiente_ferro_at" => "pendiente_ferro_user_id",
|
||||
"ferro_en_cliente_at" => "ferro_en_cliente_user_id",
|
||||
"ferro_ok_at" => "ferro_ok_user_id",
|
||||
@ -124,9 +124,12 @@ class OrdenTrabajoDate extends Model
|
||||
foreach ($data as $key => $value) {
|
||||
if(isset($mapping[$key])){
|
||||
if($value){
|
||||
$otUser->update($data["orden_trabajo_id"],[$mapping[$key] => $auth_user_id]);
|
||||
$otUser->where('orden_trabajo_id',$data['orden_trabajo_id'])
|
||||
->set([$mapping[$key] => $auth_user_id])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,8 +9,8 @@ use CodeIgniter\Model;
|
||||
class OrdenTrabajoUser extends Model
|
||||
{
|
||||
protected $table = 'orden_trabajo_users';
|
||||
protected $primaryKey = 'orden_trabajo_id';
|
||||
protected $useAutoIncrement = false;
|
||||
protected $primaryKey = 'id';
|
||||
protected $useAutoIncrement = true;
|
||||
protected $returnType = OrdenTrabajoUserEntity::class;
|
||||
protected $useSoftDeletes = true;
|
||||
protected $protectFields = true;
|
||||
@ -46,31 +46,7 @@ class OrdenTrabajoUser extends Model
|
||||
protected bool $updateOnlyChanged = true;
|
||||
|
||||
protected array $casts = [
|
||||
"orden_trabajo_id" => "integer",
|
||||
"user_created_id" => "?integer",
|
||||
"user_update_id" => "?integer",
|
||||
"inaplazable_revised_change_user_id" => "?integer",
|
||||
"ferro_disponible_hecho_user_id" => "?integer",
|
||||
"ferro_disponible_ok_user_id" => "?integer",
|
||||
"ferro_entregado_user_id" => "?integer",
|
||||
"pendiente_ferro_user_id" => "?integer",
|
||||
"ferro_en_cliente_user_id" => "?integer",
|
||||
"ferro_ok_user_id" => "?integer",
|
||||
"interior_bn_user_id" => "?integer",
|
||||
"interior_color_user_id" => "?integer",
|
||||
"preparacion_interior_user_id" => "?integer",
|
||||
"cubierta_user_id" => "?integer",
|
||||
"plastificado_user_id" => "?integer",
|
||||
"encuadernacion_user_id" => "?integer",
|
||||
"corte_user_id" => "?integer",
|
||||
"embalaje_user_id" => "?integer",
|
||||
"entrada_manipulado_user_id" => "?integer",
|
||||
"pre_formato_user_id" => "?integer",
|
||||
"pre_lomo_user_id" => "?integer",
|
||||
"pre_solapa_user_id" => "?integer",
|
||||
"pre_codbarras_user_id" => "?integer",
|
||||
"pre_imposicion_user_id" => "?integer",
|
||||
"pre_imprimir_user_id" => "?integer"
|
||||
|
||||
];
|
||||
protected array $castHandlers = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user