mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
add revision preimpresion ot
This commit is contained in:
@ -45,6 +45,9 @@ class OrdenTrabajoEntity extends Entity
|
||||
"portada_path" => null,
|
||||
"is_pedido_espera" => null,
|
||||
"pedido_espera_by" => null,
|
||||
"preimpresion_revisada" => false,
|
||||
"preimpresion_revisada_by" => null,
|
||||
|
||||
];
|
||||
protected $casts = [
|
||||
"pedido_id" => "integer",
|
||||
@ -72,6 +75,7 @@ class OrdenTrabajoEntity extends Entity
|
||||
"enviar_impresion" => "bool",
|
||||
"portada_path" => "string",
|
||||
"is_pedido_espera" => "bool",
|
||||
"preimpresion_revisada" => "bool",
|
||||
];
|
||||
|
||||
|
||||
@ -178,10 +182,23 @@ class OrdenTrabajoEntity extends Entity
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public function preimpresionRevisadaUser(): ?UserEntity
|
||||
{
|
||||
$m = model(UserModel::class);
|
||||
if ($this->attributes['preimpresion_revisada_by']) {
|
||||
return $m->findById($this->attributes['preimpresion_revisada_by']);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
public function getPedidoEsperaBy(): ?UserEntity
|
||||
{
|
||||
return $this->pedidoEsperaBy();
|
||||
}
|
||||
public function getPreimpresionRevisadaBy(): ?UserEntity
|
||||
{
|
||||
return $this->preimpresionRevisadaUser();
|
||||
}
|
||||
public function getFullPath(): ?string
|
||||
{
|
||||
helper('filesystem');
|
||||
|
||||
Reference in New Issue
Block a user