mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
New UI to show YD Order Tracking infomation
This commit is contained in:
@@ -18,7 +18,8 @@ class OrderTrackingResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
// 'tracking_no' => $this->tracking_no,
|
||||
'tracking' => $this->tracking_english . ($this->remark_english ? " (" . $this->remark_english . ")" : ''),
|
||||
'tracking' => $this->tracking . ($this->remark ? " (" . $this->remark . ")" : ''),
|
||||
'tracking_english' => $this->tracking_english . ($this->remark_english ? " (" . $this->remark_english . ")" : ''),
|
||||
'tracking_time' => $this->tracking_time,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -10,7 +10,14 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="font-heading all-caps fs-12">{{searchString}}</div>
|
||||
<div class="font-heading all-caps fs-12">
|
||||
<template v-if="isValidOrderNumber">
|
||||
<a :href="route('order.show', searchString)" target="_blank">{{ searchString }}</a>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ searchString }}
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,6 +42,7 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="font-heading fs-12">{{item.tracking}}</div>
|
||||
<div class="font-heading fs-12">{{item.tracking_english}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -52,6 +60,11 @@
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isValidOrderNumber() {
|
||||
return /^\d{9}$/.test(this.searchString);
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user