Skip to content

Commit 07686b8

Browse files
committed
fix: order cards
1 parent 0b882f6 commit 07686b8

File tree

1 file changed

+40
-41
lines changed

1 file changed

+40
-41
lines changed

resources/views/frontend/pages/purchasesItems/purchases.blade.php

+40-41
Original file line numberDiff line numberDiff line change
@@ -9,59 +9,58 @@
99
<h4 class="mt-5 mb-3 text-center" style="font-size:28px; font-weight:600;">Purchase Items
1010
</h4>
1111

12-
<div class="d-flex justify-content-center align-items-center gap-4 mb-3">
12+
<div
13+
class="grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 items-center justify-center gap-4 mb-3">
1314
@forelse ($purchaseItem as $item)
14-
<div class="h-100" style="width: max-content;">
15-
<div class="w-100 h-100 rounded-2 h-100" style="overflow: hidden;">
16-
<div class="align-items-center border p-3 h-100">
17-
<div class="row gap-4 align-items-center justify-content-center mb-3">
15+
<div class="w-100 h-100 rounded-2" style="overflow: hidden;">
16+
<div class="align-items-center border p-3">
17+
<div class="row gap-4 align-items-center justify-content-center mb-3">
18+
<div
19+
class="d-flex {{ $item->due >= 1 ? 'justify-content-between gap-2' : 'justify-content-center' }} align-items-center">
1820
<div
19-
class="d-flex {{ $item->due >= 1 ? 'justify-content-between gap-2' : 'justify-content-center' }} align-items-center">
20-
<div
21-
class="py-2 fw-bold text-center {{ $item->approved == 1 ? 'text-success' : 'text-danger' }}">
22-
{{ $item->approved == 1 ? 'Approved' : ($item->due >= 1 ? 'Waiting for Payment' : 'Waiting for Approval') }}
23-
</div>
24-
@if ($item->due >= 1)
25-
<a href="{{ route('payment.create', ['model' => $item->purchasable_type, 'id' => $item->purchasable_id, 'purchase_id' => encrypt($item->id)]) }}"
26-
class="btn btn-primary text-white" style="font-weight: 500;">Pay
27-
Now</a>
28-
@endif
29-
21+
class="py-2 fw-bold text-center {{ $item->approved == 1 ? 'text-success' : 'text-danger' }}">
22+
{{ $item->approved == 1 ? 'Approved' : ($item->due >= 1 ? 'Waiting for Payment' : 'Waiting for Approval') }}
3023
</div>
24+
@if ($item->due >= 1)
25+
<a href="{{ route('payment.create', ['model' => $item->purchasable_type, 'id' => $item->purchasable_id, 'purchase_id' => encrypt($item->id)]) }}"
26+
class="btn btn-primary text-white" style="font-weight: 500;">Pay
27+
Now</a>
28+
@endif
29+
3130
</div>
32-
<div class="text-muted text-start">
33-
Purchase Type: <b>{{ $item->purchasable_type }}</b>
34-
</div>
35-
<div class="text-muted text-start">
36-
{{ $item->purchasable_type }} Name:
37-
<b>{{ $item?->purchasable?->title ?? $item?->purchasable?->name }}</b>
38-
</div>
39-
<div class="text-muted text-start">
40-
Payment Date: <b>{{ \Carbon\Carbon::parse($item->payment_date)->format('d F, Y') }}</b>
41-
</div>
42-
<div class="text-muted text-start">
43-
Transaction Id: <b>{{ $item->trx_id }}</b>
44-
</div>
45-
{{-- <div class="text-muted text-start">
31+
</div>
32+
<div class="text-muted text-start">
33+
Purchase Type: <b>{{ $item->purchasable_type }}</b>
34+
</div>
35+
<div class="text-muted text-start">
36+
{{ $item->purchasable_type }} Name:
37+
<b>{{ $item?->purchasable?->title ?? $item?->purchasable?->name }}</b>
38+
</div>
39+
<div class="text-muted text-start">
40+
Payment Date: <b>{{ \Carbon\Carbon::parse($item->payment_date)->format('d F, Y') }}</b>
41+
</div>
42+
<div class="text-muted text-start">
43+
Transaction Id: <b>{{ $item->trx_id }}</b>
44+
</div>
45+
{{-- <div class="text-muted text-start">
4646
Expire Date:
4747
<b>{{ $item->expire_date ? \Carbon\Carbon::parse($item->expire_date)->format('d F, Y') : 'After Approval' }}</b>
4848
</div> --}}
49+
</div>
50+
<div class="!bg-primary p-3 w-full">
51+
<div class="w-full mb-1 text-black d-flex justify-contents-between">
52+
Payble Amount: <b class="ms-auto"> {{ $item->payable_amount }} BDT</b>
4953
</div>
50-
<div class="bg-primary p-3 w-full">
51-
<div class="w-full mb-1 text-black d-flex justify-contents-between">
52-
Payble Amount: <b class="ms-auto"> {{ $item->payable_amount }} BDT</b>
53-
</div>
54-
<div class="w-full mb-1 text-black d-flex justify-contents-between">
55-
Paid Amount: <b class="ms-auto">{{ $item->paid ?? '0.00' }} BDT</b>
56-
</div>
57-
<div class="w-full mb-1 text-black d-flex justify-contents-between">
58-
Due Amount: <b class="ms-auto">{{ $item->due }} BDT</b>
59-
</div>
54+
<div class="w-full mb-1 text-black d-flex justify-contents-between">
55+
Paid Amount: <b class="ms-auto">{{ $item->paid ?? '0.00' }} BDT</b>
56+
</div>
57+
<div class="w-full mb-1 text-black d-flex justify-contents-between">
58+
Due Amount: <b class="ms-auto">{{ $item->due }} BDT</b>
6059
</div>
6160
</div>
6261
</div>
6362
@empty
64-
<div class="row">
63+
<div class="row col-span-full">
6564
<div class="col-md-2"></div>
6665
<div class="col-md-8">
6766
<img loading="lazy" class="w-100" src="{{ asset('frontend/assets/images/no_data.jpg') }}"

0 commit comments

Comments
 (0)