mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Temporary fix some yd integration api not showing reported by Zhy Mei
This commit is contained in:
@@ -9,6 +9,8 @@ use Illuminate\Http\Request;
|
||||
|
||||
class FetchOrderPackagesV2Controller
|
||||
{
|
||||
//cief todo: 150 - fetchOriginWarehouse
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param FetchOrderPackagesReceivedV2Logic $logic
|
||||
@@ -19,6 +21,7 @@ class FetchOrderPackagesV2Controller
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param FetchOrderPackagesV2Logic $logic
|
||||
|
||||
@@ -17,7 +17,7 @@ class OrderPackagesReceivedResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
$received_packages = $this->packingLists()->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('packages')->get();
|
||||
|
||||
$origin_warehouse_packages = $this->originWarehousePackages()->get(); //cief todo: 150
|
||||
return [
|
||||
'id' => $this->id,
|
||||
// 'reference' => $this->reference,
|
||||
@@ -25,6 +25,7 @@ class OrderPackagesReceivedResource extends JsonResource
|
||||
'type' => (int) $this->type,
|
||||
'status' => (int) $this->status,
|
||||
'received_packages' => PackingListForPackagesReceivedResource::collection($received_packages),
|
||||
'origin_warehouse_packages' => PackingListForPackagesReceivedResource::collection($origin_warehouse_packages),
|
||||
'created_at' => $this->created_at->format('d-m-Y')
|
||||
];
|
||||
}
|
||||
|
||||
@@ -54,19 +54,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<!-- cief todo: 150 -->
|
||||
<loading-component style="height: 200px; top: 0;" v-if="isLoading"></loading-component>
|
||||
<div class="row" v-if="!isLoading && order">
|
||||
<div class="col">
|
||||
<div class="row" v-if="order.received_packages.flatMap(packing_list => packing_list.packages).length">
|
||||
<div class="row" v-if="order.origin_warehouse_packages.flatMap(packing_list => packing_list.packages).length">
|
||||
<div class="col">
|
||||
<div class="row" v-for="group in Math.ceil(order.received_packages.flatMap(packing_list => packing_list.packages).length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.received_packages.flatMap(packing_list => packing_list.packages).slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<div class="row" v-for="group in Math.ceil(order.origin_warehouse_packages.flatMap(packing_list => packing_list.packages).length / 3)">
|
||||
<div class="col-12" :class="'col-md-'+(12/3)" v-for="item in order.origin_warehouse_packages.flatMap(packing_list => packing_list.packages).slice((group - 1) * 3, group * 3)" v-bind:key="item.id" :data="item">
|
||||
<package-v2-component :section="section" :data="item" status="Shipping"></package-v2-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.received_packages.length">
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!order.origin_warehouse_packages.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img :src="asset('images/not-found-illustration.png')" class="w-100 hint-text"/></div>
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-25" v-if="item.container">
|
||||
<!-- <div class="row m-t-25" v-if="item.container">
|
||||
<div class="col"></div>
|
||||
<div class="col b-t b-primary" style="border-top-width: 5px;"></div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user