Viewing file: headerid_request.blade.php (5.92 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.admin')
@section('title', trans('admin.header_id_request'))
@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')}}"> <style> .select2-container{ width: 100% !important; } </style> @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">{{trans('admin.header_id_request')}}</h2> <div class="float-right"> <a class="btn btn-info" href="{{route('admin.sender.headerid')}}">@lang('admin.form.button.back')</a> </div> </div> <!-- /.card-header --> <div class="card-body"> <table id="requests" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th>@lang('admin.table.customer_name')</th> {{-- <th>@lang('From')</th> --}} <th>@lang('admin.table.sender_id')</th> <th>@lang('admin.table.status')</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="approvedModal" role="dialog"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header p-2"> <h4 class="modal-title ml-1">{{trans('admin.header_id')}}</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <form method="post" role="form" action="{{route('admin.sender.request.headerId.approve')}}" enctype="multipart/form-data"> @csrf <input type="hidden" name="id" id="id"> <input type="hidden" name="status"> <div class="form-group"> <label >{{trans('admin.header_id')}} *</label> <input type="text" name="sender_id" class="form-control" readonly placeholder="{{trans('admin.header_id')}}"> </div> <div class="form-group gateways"> <label for="edit_gateway">@lang('admin.form.platform')</label> <select class="form-control select2" name="dynamic_gateway_id" > @foreach($gateways as $gateway) <option value="{{$gateway->id}}">{{ucfirst(str_replace('_', ' ', $gateway->name))}}</option> @endforeach </select> <small> {{trans('admin.header_gateway_configure')}} <a class="text-danger" target="_blank" href="{{route('admin.gateway.index')}}"><b>click here <i class="fas fa-external-link-alt"></i></b></a></small> </div> <div class="modal-footer p-2"> <button id="modal-confirm-btn" type="submit" class="btn btn-primary btn-sm">@lang('customer.submit')</button> <button type="button" class="btn btn-secondary btn-sm" data-dismiss="modal">@lang('customer.close')</button> </div> </form> </div> </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"; $('#requests').DataTable({ processing: true, serverSide: true, responsive:true, ajax:'{{route('admin.sender.get.all.headerid.requests')}}', columns: [ { "data": "customer" }, // { "data": "from" }, { "data": "sender_id"}, { "data": "status" }, { "data": "action" }, ] });
$(document).on('click', '.approve_btn', function (e){ const id = $(this).attr('data-id'); const status = $(this).attr('data-status'); const sender_id = $(this).attr('data-senderid');
$('input[name="sender_id"]').val(sender_id); $('input[name="id"]').val(id); $('input[name="status"]').val(status); $('#approvedModal').modal('show'); if(status=='review_pending'){ $('.gateways').addClass('d-none'); }else { $('.gateways').removeClass('d-none'); } });
$('select[name="from"]').select2({ placeholder:'Select a from', }); </script> @endsection
|