From 1dc23b088e0ddd494cb7ad26489be3ccd99b5368 Mon Sep 17 00:00:00 2001 From: omair saleh Date: Wed, 23 Feb 2022 13:48:34 +0800 Subject: [PATCH] fix unclaimed packing lists --- app/Http/Resources/PackageResource.php | 2 +- app/Http/Resources/TransportResource.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Http/Resources/PackageResource.php b/app/Http/Resources/PackageResource.php index e1c5e713..7fc348d6 100644 --- a/app/Http/Resources/PackageResource.php +++ b/app/Http/Resources/PackageResource.php @@ -34,7 +34,7 @@ class PackageResource extends JsonResource 'order' => New OrderResource($originalPackingList->owner) ]), 'container' => new ContainerResource($originalPackingList->containers()->first()), -// 'transport' => new TransportResource($originalPackingList->transports()->first()) + 'transport' => new TransportResource($originalPackingList->transports()->first()) ]; } } diff --git a/app/Http/Resources/TransportResource.php b/app/Http/Resources/TransportResource.php index b931964d..79768074 100644 --- a/app/Http/Resources/TransportResource.php +++ b/app/Http/Resources/TransportResource.php @@ -17,14 +17,14 @@ class TransportResource extends JsonResource { return [ 'id' => $this->id, - 'type' => $this->type, - 'courier' => $this->courier, - 'tracking_number' => $this->tracking_number, - 'dispatch_date' => $this->dispatch_date ? $this->dispatch_date->format('d-m-Y') : $this->dispatch_date, - 'drop_date' => $this->drop_date ? $this->drop_date->format('d-m-Y') : $this->drop_date, - 'status' => $this->status, - 'current_schedule' => new ScheduleResource($this->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()), - 'schedule_history' => ScheduleResource::collection($this->schedules()->where('status', '=', ApprovalStatus::EXPIRED)->get()) +// 'type' => $this->type, +// 'courier' => $this->courier, +// 'tracking_number' => $this->tracking_number, +// 'dispatch_date' => $this->dispatch_date ? $this->dispatch_date->format('d-m-Y') : $this->dispatch_date, +// 'drop_date' => $this->drop_date ? $this->drop_date->format('d-m-Y') : $this->drop_date, +// 'status' => $this->status, +// 'current_schedule' => new ScheduleResource($this->schedules()->where('status', '=', ApprovalStatus::APPROVED)->first()), +// 'schedule_history' => ScheduleResource::collection($this->schedules()->where('status', '=', ApprovalStatus::EXPIRED)->get()) ]; } }