mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
fix up group transactions bulk purchase orders
This commit is contained in:
@@ -33,7 +33,7 @@ class GroupResource extends JsonResource
|
||||
'currency' => new CurrencyResource($this->currency),
|
||||
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y h:i:s A'),
|
||||
'currency_rate' => (float) $this->currency_rate,
|
||||
'transactions' => $this->transactions()->count(),
|
||||
'transactions' => $this->transactions()->get()->pluck('owner.owner.marking'),
|
||||
'complete_transactions' => $this->transactions()->whereHasMorph('owner', [Transaction::class], function($query){
|
||||
return $query->whereHas('booking', function($query){
|
||||
return $query->whereHas('transactions', function($query){
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</button>
|
||||
</template>
|
||||
</document-file-viewer-component>
|
||||
<p class="font-heading fs-12 bold text-success"><span :class="[{'text-danger': item.complete_transactions !== item.transactions}]">{{item.complete_transactions}}</span>/{{item.transactions}}</p>
|
||||
<p class="font-heading fs-12 bold text-success pointer"><span :class="[{'text-danger': item.complete_transactions.length !== item.transactions.length}]">{{item.complete_transactions.length}}</span>/{{item.transactions.length}}</p>
|
||||
<!--<span class="font-heading fs-10" v-for="transaction in item.transactions">-->
|
||||
<!--<a :href="route('booking.details', transaction.booking.marking)">{{transaction.booking.marking}} </a>-->
|
||||
<!--</span>-->
|
||||
@@ -109,6 +109,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row" v-for="transaction in item.transactions">
|
||||
<div class="col">
|
||||
<a :href="route('booking.details', transaction)" target="_blank">
|
||||
<span :class="[{'text-success': item.complete_transactions.includes(transaction)}, {'text-danger': !item.complete_transactions.includes(transaction)}]">{{ transaction }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user