| 
									
										
										
										
											2022-11-06 21:41:24 +11:00
										 |  |  | @section('title', 'Misc services') | 
					
						
							| 
									
										
										
										
											2022-11-13 15:53:05 +11:00
										 |  |  | <x-app-layout> | 
					
						
							|  |  |  |     <x-slot name="header"> | 
					
						
							|  |  |  |         {{ __('Misc') }} | 
					
						
							|  |  |  |     </x-slot> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |     <div class="container" id="app"> | 
					
						
							|  |  |  |         <x-delete-confirm-modal></x-delete-confirm-modal> | 
					
						
							|  |  |  |         <x-card class="shadow mt-3"> | 
					
						
							|  |  |  |             <a href="{{ route('misc.create') }}" class="btn btn-primary mb-3">Add misc service</a> | 
					
						
							| 
									
										
										
										
											2022-10-13 14:36:21 +11:00
										 |  |  |             <x-response-alerts></x-response-alerts> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |             <div class="table-responsive"> | 
					
						
							|  |  |  |                 <table class="table table-bordered"> | 
					
						
							|  |  |  |                     <thead class="table-light"> | 
					
						
							|  |  |  |                     <tr> | 
					
						
							|  |  |  |                         <th class="text-nowrap">Name</th> | 
					
						
							|  |  |  |                         <th class="text-nowrap">Owned since</th> | 
					
						
							|  |  |  |                         <th class="text-nowrap">Due in</th> | 
					
						
							|  |  |  |                         <th class="text-nowrap">Price</th> | 
					
						
							|  |  |  |                         <th class="text-nowrap">Actions</th> | 
					
						
							|  |  |  |                     </tr> | 
					
						
							|  |  |  |                     </thead> | 
					
						
							|  |  |  |                     <tbody> | 
					
						
							|  |  |  |                     @if(!empty($misc[0])) | 
					
						
							|  |  |  |                         @foreach($misc as $m) | 
					
						
							|  |  |  |                             <tr> | 
					
						
							|  |  |  |                                 <td class="text-nowrap">{{$m->name}}</td> | 
					
						
							|  |  |  |                                 <td class="text-nowrap"> | 
					
						
							|  |  |  |                                     @if(!is_null($m->owned_since)) | 
					
						
							|  |  |  |                                         {{ date_format(new DateTime($m->owned_since), 'jS F Y') }} | 
					
						
							|  |  |  |                                     @endif | 
					
						
							|  |  |  |                                 </td> | 
					
						
							| 
									
										
										
										
											2022-07-20 14:35:12 +10:00
										 |  |  |                                 <td class="text-nowrap">{{ now()->diffInDays($m->price->next_due_date) }} | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                     <small>days</small></td> | 
					
						
							| 
									
										
										
										
											2022-07-20 14:35:12 +10:00
										 |  |  |                                 <td class="text-nowrap">{{$m->price->price}} {{$m->price->currency}} | 
					
						
							|  |  |  |                                     <small>{{\App\Process::paymentTermIntToString($m->price->term)}}</small></td> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                 <td class="text-nowrap"> | 
					
						
							| 
									
										
										
										
											2022-07-20 14:35:12 +10:00
										 |  |  |                                     <form action="{{ route('misc.destroy', $m->id) }}" method="POST"> | 
					
						
							|  |  |  |                                         <a href="{{ route('misc.edit', $m->id) }}" | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                            class="text-body mx-1"> | 
					
						
							|  |  |  |                                             <i class="fas fa-pen" title="edit"></i></a> | 
					
						
							| 
									
										
										
										
											2022-07-20 14:35:12 +10:00
										 |  |  |                                         <a href="{{ route('misc.show', $m->id) }}" | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                            class="text-body mx-1"> | 
					
						
							|  |  |  |                                             <i class="fas fa-eye" title="view"></i> | 
					
						
							|  |  |  |                                         </a> | 
					
						
							|  |  |  |                                         @csrf | 
					
						
							|  |  |  |                                         @method('DELETE') | 
					
						
							| 
									
										
										
										
											2022-10-20 11:56:35 +11:00
										 |  |  |                                         <i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal" | 
					
						
							| 
									
										
										
										
											2022-10-20 14:57:30 +11:00
										 |  |  |                                            id="{{$m->id}}" title="{{$m->name}}"></i> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                     </form> | 
					
						
							|  |  |  |                                 </td> | 
					
						
							|  |  |  |                             </tr> | 
					
						
							|  |  |  |                         @endforeach | 
					
						
							|  |  |  |                     @else | 
					
						
							|  |  |  |                         <tr> | 
					
						
							|  |  |  |                             <td class="px-4 py-2 border text-red-500" colspan="3">No misc services found.</td> | 
					
						
							|  |  |  |                         </tr> | 
					
						
							|  |  |  |                     @endif | 
					
						
							|  |  |  |                     </tbody> | 
					
						
							|  |  |  |                 </table> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </x-card> | 
					
						
							| 
									
										
										
										
											2022-10-20 11:59:03 +11:00
										 |  |  |         <x-details-footer></x-details-footer> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |     </div> | 
					
						
							|  |  |  |     <x-modal-delete-script> | 
					
						
							|  |  |  |         <x-slot name="uri">misc</x-slot> | 
					
						
							|  |  |  |     </x-modal-delete-script> | 
					
						
							| 
									
										
										
										
											2022-11-13 15:53:05 +11:00
										 |  |  | </x-app-layout> |