![]() 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/addresses/ |
@extends('layouts.admin.app') @section('content') @section('stylesheets') <link href="{{ asset('css/sweetalert2.min.css') }}" rel="stylesheet" type="text/css" /> @endsection <div class="row"> <div class="col-md-12"> <section class="content"> @include('layouts.errors-and-messages') {{-- @if($addresses)--}} <div class="box"> <div class="box-body"> <div class="col-md-12"> <h3 class="bold">Addresses <span class="font-black">|</span> <a href="{{ route('admin.addresses.create') }}" class="btn btn-dark">+ Add New</a></h3> <table class="table table-striped table-hover table-checkable dataTable table-responsive table-responsive-md responsive" id="order_table"> <thead class="thead-dark"> <tr> <th scope="col" class="all">Address</th> <th scope="col" class="min-tablet-l">Customer</th> <th scope="col" class="desktop">Type</th> <th scope="col" class="min-tablet-l">Town</th> <th scope="col" class="desktop">County</th> <th scope="col" class="min-tablet-l">Eircode</th> <th scope="col" class="desktop">Phone</th> <th scope="col" class="desktop">Status</th> <th scope="col" class="min-mobile-l">Actions</th> </tr> </thead> <tbody> {{-- <!--@foreach ($addresses as $address)-->--}} {{-- <!-- <tr>-->--}} {{-- <!-- <td class="dtr-control">-->--}} {{-- <!-- <a href="{{ route('admin.addresses.edit', $address->id) }}">{{ $address->address_1 }}@if ($address->address_2), {{$address->address_1 }} @endif</a>-->--}} {{-- <!-- </td>-->--}} {{-- <!-- <td><a href="{{ url('/admin/customers/' . $address->customer_id) }}">{{ $address->customer }}</a></td>-->--}} {{-- <!-- <td>{{ ($address->billing_type_address == 1) ? 'Billing': 'Delivery' }}</td>-->--}} {{-- <!-- <td>{{ $address->town }}</td>-->--}} {{-- <!-- <td>{{ $address->county }}</td>-->--}} {{-- <!-- <td>{{ $address->zip }}</td>-->--}} {{-- <!-- <td>{{ $address->phone }}</td>-->--}} {{-- <!-- <td><span class="badge font-badge @if($address->status != '1') badge-danger @else badge-success @endif">@if($address->status != '1') disabled @else enabled @endif</span></td>-->--}} {{-- <!-- <td>-->--}} {{-- <!-- <form action="{{ route('admin.addresses.destroy', $address->id) }}" method="post" class="form-horizontal frm_delete_address">-->--}} {{-- <!-- {{ csrf_field() }}-->--}} {{-- <!-- <input type="hidden" name="_method" value="delete">-->--}} {{-- <!-- <div class="btn-group flex-wrap">-->--}} {{-- <!-- <a href="{{ route('admin.addresses.edit', $address->id) }}" class="btn btn-dark"><i class="fa fa-pencil"></i> Edit</a>-->--}} {{-- <!-- <button type="button" class="btn btn-danger btn_delete_address" {{ ( $address->billing_type_address == 1 ) ? 'disabled': '' }}><i class="fa fa-times"></i> Delete</button>-->--}} {{-- <!-- </div>-->--}} {{-- <!-- </form>-->--}} {{-- <!-- </td>-->--}} {{-- <!-- </tr>-->--}} {{-- <!--@endforeach-->--}} </tbody> </table> </div> </div> </div> {{-- @else--}} {{-- <div class="box">--}} {{-- <div class="box-body"><p class="alert alert-warning">No addresses found.</p></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; $('.btn_delete_address').click(function() { var refer = $(this); 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) { $(refer).closest('.frm_delete_address').submit(); } }); }); $('#order_table').DataTable({ "responsive": true, "processing": true, "serverSide": true, "ajax":{ "url": "{{ url('admin/addresses/server-pagination') }}", "dataType": "json", "type": "POST", "data":{ _token: "{{csrf_token()}}"} }, "columns": [ { "data": "address_1" }, { "data": "name" }, { "data": "billing_type_address" }, { "data": "town" }, { "data": "county" }, { "data": "eircode" }, { "data": "phone" }, { "data": "status" }, { "data": "actions" }, ], createdRow: function( row, data, dataIndex ) { // if(data.driver_name == ''){ // $( row ).find('td:eq(9)').addClass('redbg'); // } // Set the data-status attribute, and add a class $( row ).find('td:eq(0)').addClass('dtr-control'); }, "order": [[ 0, "desc" ]], "bAutoWidth": false, "rowReorder": { selector: 'td:nth-child(2)' }, "columnDefs": [ { "width": "130px", "targets": 8 } ] }); // $('#order_table').DataTable({ // "responsive": true, // "order": [[ 0, "desc" ]], // "bAutoWidth": false, // "rowReorder": { // selector: 'td:nth-child(2)' // }, // "columnDefs": [ // { "width": "130px", "targets": 8 } // ] // }); }); </script> @endsection