mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-22 14:04:21 +00:00
update replica packages logic and over weight price announcement
This commit is contained in:
@@ -16,9 +16,8 @@ class PackingListResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
|
||||
$exceptionUsers = in_array(Auth()->user()->type, [RoleTypes::SHADOW_ADMIN, RoleTypes::SUPER_ADMIN]) || in_array(Auth()->user()->id, [1914, 1919]);
|
||||
$packages = $this->packingLists()->exists() || $exceptionUsers ? $this->originalPackages : $this->replicatedPackages;
|
||||
$packages = !$this->packingLists()->exists() || $exceptionUsers ? $this->packages : $this->packingLists()->first()->packages;
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
|
||||
Reference in New Issue
Block a user