Viewing file: index.blade.php (4.69 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.customer')
@section('title', trans('customer.responder_create'))
@section('extra-css') <link rel="stylesheet" href="{{asset('plugins/datatables-bs4/css/dataTables.bootstrap4.min.css')}}"> <link rel="stylesheet" href="{{asset('plugins/datatables-responsive/css/responsive.bootstrap4.min.css')}}"> @endsection
@section('content') <!-- Main content --> <section class="content"> <div class="row"> <div class="col-12"> <div class="card"> <div class="card-header"> <h2 class="card-title">@lang('customer.auto_responders')</h2> <div class="float-right"> <button class="btn btn-primary new_responder" type="button"> @lang('admin.form.button.new') </button> </div> </div> <!-- /.card-header --> <div class="card-body table-body"> <table id="plans" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th>{{trans('Name')}}</th> <th>@lang('admin.table.status')</th> <th>@lang('admin.table.created_at')</th> <th>@lang('admin.table.action')</th> </tr> </thead>
</table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content -->
<div class="modal fade" id="new_responder" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <form method="post" action="{{route('customer.responders.store')}}"> @csrf
<div class="modal-header"> <h5 class="modal-title">New Responder</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <div class="node-settings"> @csrf <div class="form-group"> <label class="mt-2" for="">{{ trans('Enter Responder Name') }}</label> <input type="text" placeholder="{{ trans('Enter Name') }}" name="name" class="form-control"> </div>
<div class="form-group"> <label for="">{{trans('Status')}}</label> <select name="status" class="form-control"> <option value="active">{{trans('Active')}}</option> <option value="inactive">{{trans('Inactive')}}</option> </select> </div>
</div>
</div> <div class="modal-footer"> <button type="submit" class="btn btn-primary">Save</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> </div> </form> </div> </div> </div> @endsection
@section('extra-scripts') <script src="{{asset('plugins/datatables/jquery.dataTables.min.js')}}"></script> <script src="{{asset('plugins/datatables-bs4/js/dataTables.bootstrap4.min.js')}}"></script> <script src="{{asset('plugins/datatables-responsive/js/dataTables.responsive.min.js')}}"></script> <script src="{{asset('plugins/datatables-responsive/js/responsive.bootstrap4.min.js')}}"></script>
<script> "use strict"; $('#plans').DataTable({ processing: true, serverSide: true, responsive:true, ajax:'{{route('customer.responders.get.all')}}', columns: [ { "data": "name" }, { "data": "status" }, { "data": "created_at" }, { "data": "action" }, ] });
$(document).on('click', '.new_responder', function(e){
$('#new_responder').modal('show'); }) </script> @endsection
|