mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-09-01 19:04:22 +00:00
show container total cbm
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ContainerTypes;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class ContainerResource extends JsonResource
|
||||
@@ -17,7 +18,7 @@ class ContainerResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'container_reference' => $this->reference,
|
||||
'container_type' => $this->container_type,
|
||||
'container_specification' => ContainerTypes::CONTAINER_SPECIFICATION[$this->container_type],
|
||||
'container_number' => $this->container_number,
|
||||
'seal_reference' => $this->seal_reference,
|
||||
'transport' => new TransportResource($this->transports()->first()),
|
||||
|
||||
@@ -22,6 +22,10 @@
|
||||
<p class="no-margin fs-10 all-caps">ETA</p>
|
||||
<p class="no-margin">{{item.transport ? item.transport.current_schedule.eta : 'n/a'}}</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<p class="no-margin fs-10 all-caps">Loaded CBM</p>
|
||||
<p class="no-margin">{{ (Math.ceil((item.packing_lists.reduce((total, obj) => total + obj.packages.reduce((total, obj) => obj.cbm + total, 0), 0)) * 1000) / 1000).toFixed(3) }}</p>
|
||||
</div>
|
||||
<div class="col">
|
||||
<p class="no-margin fs-10 all-caps">Status</p>
|
||||
<p class="no-margin bold" :class="{'text-success': item.status === 3, 'text-complete': item.status !== 3}">{{item.status === 3 ? 'Un-stuffed' : 'In Progress'}}</p>
|
||||
|
||||
Reference in New Issue
Block a user