![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mcoil.corals.io/resources/views/admin/service-box/ |
@extends('layouts.admin.app') @section('content') <div class="row"> <div class="col-md-12"> <section class="content"> @include('layouts.errors-and-messages') @if($serviceBox) <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Services Box <small>- list of services available for your modules</small></h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="services_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">ID</th> <th scope="col" class="min-mobile-l">Title</th> <th scope="col" class="min-tablet-l">Sub Title</th> <th scope="col" class="min-mobile-l">Section Type</th> <th scope="col" class="min-tablet-l">Order Number</th> <th scope="col" class="min-mobile-l">Actions</th> </tr> </thead> <tbody> @foreach ($serviceBox as $service) <tr> <td class="dtr-control" >{{ $service->id }}</td> <td >{{ $service->title }}</td> <td >{{ $service->sub_title }}</td> <td >{{ $service->type }}</td> <td >{{ $service->orderNo }}</td> <td > <div class="btn-group"> <a href="{{ route('admin.service.box.edit', $service->id) }}" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a> </div> </td> </tr> @endforeach </tbody> </table> </div> </div> </div> @endif </section> </div> </div> @endsection @section('js') <script src="{{ asset('js/sweetalert2.all.min.js') }}"></script> <script type="text/javascript"> $(document).ready( function () { $.fn.DataTable.ext.pager.numbers_length = 5; $('#services_table').DataTable({ "responsive": true, "order": [[ 1, "asc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, "columnDefs": [ { "width": "50px", "targets": 5 } ] }); $('.delete_submit').on('click',function(e) { var refer = $(this).attr("id"); var step_remove_url = $(this).closest("#remove-from-form").attr('action'); e.preventDefault(); e.stopPropagation(); if (refer != '') { Swal.fire({ title: 'Are you sure?', text: "You won't be able to revert this!", type: 'warning', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, delete it!' }).then((result) => { if (result.value) { Swal.fire({ title: 'Deleted!', text: "Your page has been deleted.", type: 'success', showConfirmButton: false, timer: 1500 }); $.ajax({ url: step_remove_url, method: "POST", data: { "_token": "{{ csrf_token() }}", "_method": "delete", id: refer }, success:function(response){ setTimeout(function(){ window.location.reload(); }, 1500); } }); } }); } }); }); </script> @endsection