|
9 | 9 | <h4 class="mt-5 mb-3 text-center" style="font-size:28px; font-weight:600;">Purchase Items
|
10 | 10 | </h4>
|
11 | 11 |
|
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"> |
13 | 14 | @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"> |
18 | 20 | <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') }} |
30 | 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 | + |
31 | 30 | </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"> |
46 | 46 | Expire Date:
|
47 | 47 | <b>{{ $item->expire_date ? \Carbon\Carbon::parse($item->expire_date)->format('d F, Y') : 'After Approval' }}</b>
|
48 | 48 | </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> |
49 | 53 | </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> |
60 | 59 | </div>
|
61 | 60 | </div>
|
62 | 61 | </div>
|
63 | 62 | @empty
|
64 |
| - <div class="row"> |
| 63 | + <div class="row col-span-full"> |
65 | 64 | <div class="col-md-2"></div>
|
66 | 65 | <div class="col-md-8">
|
67 | 66 | <img loading="lazy" class="w-100" src="{{ asset('frontend/assets/images/no_data.jpg') }}"
|
|
0 commit comments