show order reference on payment verification component

This commit is contained in:
Omair Saleh
2022-09-30 15:48:46 +08:00
parent 1debc8e2d5
commit 2ea62bcfb9
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ class TransactionResource extends JsonResource
return [
'id' => $this->id,
'owner' => ($this->owner instanceof Transaction) ? new TransactionResource($this->owner) : '',
'order' => ($this->owner instanceof Transaction) ? new OrderResource($this->owner->owner) : new OrderResource($this->owner),
'documents' => DocumentResource::collection($this->documents),
'type' => (int) $this->type,
'bill_no' => $this->bill_no,
@@ -40,7 +40,7 @@ class TransactionResource extends JsonResource
'currency_rate' => (double) $this->currency_rate,
'status' => (int) $this->status,
'details' => TransactionDetailResource::collection($this->transactionDetails),
'transactions' => TransactionResource::collection($this->whenLoaded('transactions')),
'transactions' => TransactionResource::collection($this->transactions),
'payment_attempts' => TransactionResource::collection(
$this->transactions()
->payments()->where('status', ApprovalStatus::PENDING_SUBMISSION)
@@ -15,7 +15,7 @@
</div>
<div class="col-auto">
<div class="font-heading fs-10 muted all-caps">Order</div>
<div class="font-heading fs-10"><a :href="route('order.show' , item.owner.owner.reference)" target="_blankshow o">{{item.owner.owner.reference}}</a></div>
<div class="font-heading fs-10"><a :href="route('order.show' , item.order)" target="_blankshow o">{{item.order.reference}}</a></div>
</div>
<div class="col-auto">
<div class="font-heading fs-10 muted all-caps">Marking</div>