Viewing file: inbound_webhook.blade.php (4.29 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
@extends('layouts.customer')
@section('title') Inbound Webhook @endsection
@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')}}"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.css" />
<style> #toast-container .toast-success{ background: var(--primary) !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">@lang('customer.list')</h2> </div> <!-- /.card-header --> <div class="card-body"> <table id="webhookLists" class="table table-striped table-bordered dt-responsive nowrap"> <thead> <tr> <th>@lang('customer.name')</th> <th>@lang('customer.webhook')</th> </tr> </thead> <tbody> @php $counter=0; @endphp @foreach($allGateways as $key=>$gateway) @php $counter++ @endphp <tr> <td> {{strtoupper(str_replace('_','-',$key))}} </td> <td class="webhook-section" data-id="{{$counter}}"> <div class="row" > <div class="col-md-10"> {{$gateway}} </div> <div class="col-md-2"> <input type="hidden" value="{{$gateway}}" id="webhook_{{$counter}}"> <i id="copy_btn_{{$counter}}" data-id="{{$counter}}" class="fa fa-copy text-success d-none copy c-pointer"></i> </div> </div> </td> </tr> @endforeach </tbody>
</table> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.col --> </div> <!-- /.row --> </section> <!-- /.content --> @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 src="{{asset('js/readmore.min.js')}}"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/toastr.min.js" ></script> <script> "use strict"; $('#webhookLists').DataTable({ processing: true, serverSide: false, responsive:true,
});
$(document).on('mouseenter','.webhook-section', function (event) { const id=$(this).attr('data-id'); $('#copy_btn_'+id).removeClass('d-none'); }).on('mouseleave','.webhook-section', function(){ $('.copy').addClass('d-none'); });
$(document).on('click', '.copy', function(e){ const id=$(this).attr('data-id'); var copyText = document.getElementById("webhook_"+id); // Select the text field // Copy the text inside the text field navigator.clipboard.writeText(copyText.value);
toastr.success('Webhook successfully copied','Copied!', {timeOut: 2200}) })
</script> @endsection
|