mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-30 09:53:58 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development
This commit is contained in:
@@ -17,6 +17,7 @@ class TransactionResource extends JsonResource
|
||||
public function toArray($request)
|
||||
{
|
||||
$booking = (int)$this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
|
||||
$days = Carbon::parse($this->created_at)->addDays($booking->service_id === 1 ? 1 : 2);
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
@@ -41,8 +42,8 @@ class TransactionResource extends JsonResource
|
||||
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:i:s A'),
|
||||
'updated_at' => Carbon::parse($this->updated_at)->format('d-m-Y h:i:s A'),
|
||||
'interval' => [
|
||||
'value' => (Carbon::parse($this->created_at)->addDays(3)->gt(Carbon::now()) ) ? '+' : '-' ,
|
||||
'duration' => Carbon::parse($this->created_at)->addDays(3)->diff(Carbon::now())->format('%d'),
|
||||
'value' => $days->gt(Carbon::now()) ? '+' : '-',
|
||||
'duration' => $days->diff(Carbon::now())->format('%d'),
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
{{item.booking.company.reference}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto" v-if="$store.getters.isAdmin">
|
||||
<div class="font-heading fs-10 muted all-caps">Supplier</div>
|
||||
<div class="font-heading fs-10">
|
||||
{{item.issuer_name}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col" v-if="item.status === 3">
|
||||
<div v-for="file in item.documents.files" v-bind:key="file.id" class="col-auto no-padding m-l-5">
|
||||
<document-file-viewer-component :file="file">
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
{{item.payment_method === 5 || item.payment_method === 4 ? item.updated_at : item.documents.created_at}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col text-right hide">
|
||||
<div class="col text-right">
|
||||
<div class="font-heading fs-10 muted all-caps">timer</div>
|
||||
<div class="font-heading fs-12 bold" :class="[{'text-success': item.interval.value === '+'}, {'text-danger': item.interval.value === '-'}]">
|
||||
{{item.interval.value}}
|
||||
|
||||
Reference in New Issue
Block a user