|
6 | 6 | {{-- Services --}}
|
7 | 7 | @section('main')
|
8 | 8 | <div class="container">
|
9 |
| - <h4 class="my-5" style="font-size:28px; font-weight:600;">Purchase Items |
| 9 | + <h4 class="mt-5 mb-3" style="font-size:28px; font-weight:600;">Purchase Items |
10 | 10 | </h4>
|
11 | 11 |
|
12 |
| - <div class="row mb-3" > |
| 12 | + <div class="d-flex justify-content-start align-items-center gap-4 mb-3"> |
13 | 13 | @forelse ($purchaseItem as $item)
|
14 |
| - @php |
15 |
| - $model = app('App\Models\\' . $item->purchasable_type); |
16 |
| - $modelTableRowID = $model::find($item->id); |
17 |
| - @endphp |
18 |
| - <div class="col-md-4"> |
19 |
| - <div class="w-100 h-100"> |
20 |
| - <h6 class="{{ $item->approved == 1 ? 'text-success' : 'text-danger' }}"> |
21 |
| - {{ $item->approved == 1 ? 'Approved.' : 'Pendding for Approved.' }}</h6> |
22 |
| - <div class="d-flex flex-column align-items-center border p-3"> |
23 |
| - <span class="text-muted text-start"> |
24 |
| - {{ $item->purchasable_type }} |
25 |
| - </span> |
26 |
| - <span class="text-dark text-capitalize" href=""> |
27 |
| - @if ($modelTableRowID->title) |
28 |
| - <h6>{{ $modelTableRowID->title }}</h6> |
29 |
| - @elseif($modelTableRowID->name) |
30 |
| - <h6>{{ $modelTableRowID->name }}</h6> |
31 |
| - @endif |
32 |
| - |
33 |
| - </span> |
34 |
| - <span class=" text-muted"> |
35 |
| - {{ $item->name }} |
36 |
| - </span> |
37 |
| - <span class=" text-muted"> |
38 |
| - Contact Number: {{ $item->contact_number }} |
39 |
| - </span> |
40 |
| - <span class="text-muted"> |
41 |
| - Transaction Id: {{ $item->trx_id }} |
42 |
| - </span> |
43 |
| - <span class="text-muted"> |
44 |
| - Payment Date: {{ $item->payment_date }} |
45 |
| - </span> |
46 |
| - <span class=" text-muted"> |
47 |
| - Expire Date: {{ $item->expire_date }} |
48 |
| - </span> |
49 |
| - </div> |
50 |
| - <div class="bg-primary p-2 custom-grid"> |
51 |
| - <span class="mb-1 text-black d-block"> |
52 |
| - Payble Amount: {{ $item->payable_amount }} |
53 |
| - </span> |
54 |
| - <span class="mb-1 text-black d-block"> |
55 |
| - Paid Amount: {{ $item->paid }} |
56 |
| - </span> |
57 |
| - <span class="mb-1 text-black d-block"> |
58 |
| - Due Amount: {{ $item->due }} |
59 |
| - </span> |
| 14 | + <div class="" style="width: max-content;"> |
| 15 | + <div class="w-100 h-100 rounded-2" style="overflow: hidden;"> |
| 16 | + <div class="align-items-center border p-3"> |
| 17 | + <span class="ms-auto fw-bold mb-2 {{ $item->approved == 1 ? 'text-success' : 'text-danger' }}"> |
| 18 | + {{ $item->approved == 1 ? 'Approved.' : 'Waiting for Approval.' }}</span> |
| 19 | + <div class="text-muted text-start"> |
| 20 | + Purchase Type: <b>{{ $item->purchasable_type }}</b> |
| 21 | + </div> |
| 22 | + <div class="text-muted text-start"> |
| 23 | + {{ $item->purchasable_type }} Name: |
| 24 | + <b>{{ $item?->purchasable?->title ?? $item?->purchasable?->name }}</b> |
| 25 | + </div> |
| 26 | + <div class="text-muted text-start"> |
| 27 | + Payment Date: <b>{{ \Carbon\Carbon::parse($item->payment_date)->format('d F, Y') }}</b> |
| 28 | + </div> |
| 29 | + <div class="text-muted text-start"> |
| 30 | + Transaction Id: <b>{{ $item->trx_id }}</b> |
| 31 | + </div> |
| 32 | + <div class="text-muted text-start"> |
| 33 | + Expire Date: |
| 34 | + <b>{{ $item->expire_date ? \Carbon\Carbon::parse($item->expire_date)->format('d F, Y') : 'After Approval' }}</b> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + <div class="bg-primary p-3 w-full"> |
| 38 | + <div class="w-full mb-1 text-black d-flex justify-contents-between"> |
| 39 | + Payble Amount: <b class="ms-auto"> {{ $item->payable_amount }} BDT</b> |
| 40 | + </div> |
| 41 | + <div class="w-full mb-1 text-black d-flex justify-contents-between"> |
| 42 | + Paid Amount: <b class="ms-auto">{{ $item->paid ?? '0.00' }} BDT</b> |
| 43 | + </div> |
| 44 | + <div class="w-full mb-1 text-black d-flex justify-contents-between"> |
| 45 | + Due Amount: <b class="ms-auto">{{ $item->due }} BDT</b> |
| 46 | + </div> |
| 47 | + </div> |
| 48 | + </div> |
60 | 49 | </div>
|
61 |
| - </div> |
62 |
| - </div> |
63 |
| - @empty |
64 |
| - <div class="row"> |
65 |
| - <div class="col-md-2"></div> |
66 |
| - <div class="col-md-8"> |
67 |
| - <img loading="lazy" class="w-100" src="{{ asset('frontend/assets/images/no_data.jpg') }}" |
68 |
| - style="height:100%;" class="img-fluid p-5" alt="Responsive image"> |
| 50 | + @empty |
| 51 | + <div class="row"> |
| 52 | + <div class="col-md-2"></div> |
| 53 | + <div class="col-md-8"> |
| 54 | + <img loading="lazy" class="w-100" src="{{ asset('frontend/assets/images/no_data.jpg') }}" |
| 55 | + style="height:100%;" class="img-fluid p-5" alt="Responsive image"> |
| 56 | + </div> |
| 57 | + <div class="col-md-2"></div> |
69 | 58 | </div>
|
70 |
| - <div class="col-md-2"></div> |
71 |
| - </div> |
72 |
| - @endforelse |
| 59 | + @endforelse |
73 | 60 | </div>
|
74 | 61 | </div>
|
75 | 62 | @endsection
|
|
0 commit comments