| 
									
										
										
										
											2022-10-20 14:57:30 +11:00
										 |  |  | @section('title', 'Resellers') | 
					
						
							| 
									
										
										
										
											2022-11-13 15:53:05 +11:00
										 |  |  | <x-app-layout> | 
					
						
							|  |  |  |     <x-slot name="header"> | 
					
						
							|  |  |  |         {{ __('Reseller') }} | 
					
						
							|  |  |  |     </x-slot> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |     <div class="container" id="app"> | 
					
						
							|  |  |  |         <div class="card shadow mt-3"> | 
					
						
							|  |  |  |             <div class="card-body"> | 
					
						
							|  |  |  |                 <a href="{{ route('reseller.create') }}" class="btn btn-primary mb-3">Add a reseller</a> | 
					
						
							| 
									
										
										
										
											2022-10-31 16:00:43 +11:00
										 |  |  |                 <x-response-alerts></x-response-alerts> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                 <div class="table-responsive"> | 
					
						
							| 
									
										
										
										
											2024-12-09 16:44:07 +11:00
										 |  |  |                     <table class="table table-bordered" id="reseller-table"> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                         <thead class="table-light"> | 
					
						
							|  |  |  |                         <tr> | 
					
						
							|  |  |  |                             <th>Name</th> | 
					
						
							|  |  |  |                             <th>Type</th> | 
					
						
							|  |  |  |                             <th>Accounts</th> | 
					
						
							|  |  |  |                             <th>Location</th> | 
					
						
							|  |  |  |                             <th>Provider</th> | 
					
						
							|  |  |  |                             <th>Disk</th> | 
					
						
							| 
									
										
										
										
											2022-11-11 15:15:06 +11:00
										 |  |  |                             <th>Domains</th> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                             <th>Price</th> | 
					
						
							|  |  |  |                             <th>Due</th> | 
					
						
							|  |  |  |                             <th>Had since</th> | 
					
						
							|  |  |  |                             <th>Actions</th> | 
					
						
							|  |  |  |                         </tr> | 
					
						
							|  |  |  |                         </thead> | 
					
						
							|  |  |  |                         <tbody> | 
					
						
							|  |  |  |                         @if(!empty($resellers)) | 
					
						
							|  |  |  |                             @foreach($resellers as $row) | 
					
						
							|  |  |  |                                 <tr> | 
					
						
							|  |  |  |                                     <td>{{ $row->main_domain }}</td> | 
					
						
							|  |  |  |                                     <td>{{ $row->reseller_type }}</td> | 
					
						
							|  |  |  |                                     <td>{{ $row->accounts }}</td> | 
					
						
							| 
									
										
										
										
											2022-07-19 15:55:10 +10:00
										 |  |  |                                     <td class="text-nowrap">{{ $row->location->name }}</td> | 
					
						
							|  |  |  |                                     <td class="text-nowrap">{{ $row->provider->name }}</td> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                     <td>{{ $row->disk_as_gb }} <small>GB</small></td> | 
					
						
							| 
									
										
										
										
											2022-11-11 15:15:06 +11:00
										 |  |  |                                     <td>{{ $row->domains_limit }}</td> | 
					
						
							| 
									
										
										
										
											2022-07-19 15:55:10 +10:00
										 |  |  |                                     <td>{{ $row->price->price }} {{$row->price->currency}} {{\App\Process::paymentTermIntToString($row->price->term)}}</td> | 
					
						
							|  |  |  |                                     <td>{{Carbon\Carbon::parse($row->price->next_due_date)->diffForHumans()}}</td> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                     <td class="text-nowrap">{{ $row->owned_since }}</td> | 
					
						
							|  |  |  |                                     <td class="text-nowrap"> | 
					
						
							| 
									
										
										
										
											2022-07-19 15:55:10 +10:00
										 |  |  |                                         <form action="{{ route('reseller.destroy', $row->id) }}" method="POST"> | 
					
						
							|  |  |  |                                             <a href="{{ route('reseller.show', $row->id) }}" | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                                class="text-body mx-1"><i class="fas fa-eye" title="view"></i></a> | 
					
						
							| 
									
										
										
										
											2022-07-19 15:55:10 +10:00
										 |  |  |                                             <a href="{{ route('reseller.edit', $row->id) }}" | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |                                                class="text-body mx-1"><i class="fas fa-pen" title="edit"></i></a> | 
					
						
							| 
									
										
										
										
											2022-10-13 14:19:39 +11:00
										 |  |  |                                             <i class="fas fa-trash text-danger ms-3" @click="confirmDeleteModal" | 
					
						
							|  |  |  |                                                id="{{$row->id}}" title="{{$row->main_domain}}"></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 reseller hosting found.</td> | 
					
						
							|  |  |  |                             </tr> | 
					
						
							|  |  |  |                         @endif | 
					
						
							|  |  |  |                         </tbody> | 
					
						
							|  |  |  |                     </table> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 </div> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |         </div> | 
					
						
							| 
									
										
										
										
											2022-10-20 14:57:30 +11:00
										 |  |  |         <x-details-footer></x-details-footer> | 
					
						
							| 
									
										
										
										
											2022-11-13 15:53:05 +11:00
										 |  |  |         <x-delete-confirm-modal></x-delete-confirm-modal> | 
					
						
							| 
									
										
										
										
											2022-03-06 02:29:58 +11:00
										 |  |  |     </div> | 
					
						
							| 
									
										
										
										
											2022-10-20 11:56:35 +11:00
										 |  |  |     <x-modal-delete-script> | 
					
						
							|  |  |  |         <x-slot name="uri">reseller</x-slot> | 
					
						
							|  |  |  |     </x-modal-delete-script> | 
					
						
							| 
									
										
										
										
											2024-12-09 16:44:07 +11:00
										 |  |  | 
 | 
					
						
							|  |  |  |     @section('scripts') | 
					
						
							|  |  |  |         <script> | 
					
						
							|  |  |  |             window.addEventListener('load', function () { | 
					
						
							|  |  |  |                 $('#reseller-table').DataTable({ | 
					
						
							|  |  |  |                     "pageLength": 15, | 
					
						
							|  |  |  |                     "lengthMenu": [5, 10, 15, 25, 30, 50, 75, 100], | 
					
						
							|  |  |  |                     "columnDefs": [ | 
					
						
							|  |  |  |                         {"orderable": false, "targets": [10]} | 
					
						
							|  |  |  |                     ], | 
					
						
							|  |  |  |                     "initComplete": function () { | 
					
						
							|  |  |  |                         $('.dataTables_length,.dataTables_filter').addClass('mb-2'); | 
					
						
							|  |  |  |                         $('.dataTables_paginate').addClass('mt-2'); | 
					
						
							|  |  |  |                         $('.dataTables_info').addClass('mt-2 text-muted '); | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                 }); | 
					
						
							|  |  |  |             }) | 
					
						
							|  |  |  |         </script> | 
					
						
							|  |  |  |     @endsection | 
					
						
							| 
									
										
										
										
											2022-11-13 15:53:05 +11:00
										 |  |  | </x-app-layout> |