Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

view_api_integration_index.blade.php 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
  2. @section('page_title', 'Kompaun')
  3. @section('sub_page_title', '')
  4. @section('name', $user->StaffDetail->full_name)
  5. @section('img_profile', $user->StaffDetail->profile_img)
  6. @section('content')
  7. <style type="text/css">
  8. select.form-control, select.form-control:focus, select.form-control:hover {
  9. border: 1px solid #ccc !important;
  10. height: auto !important;
  11. }
  12. .panel-group .panel {
  13. margin-bottom: 0;
  14. overflow: hidden;
  15. border-radius: 4px;
  16. }
  17. .panel-default {
  18. border-color: #ddd;
  19. }
  20. .panel-default>.panel-heading {
  21. color: #333;
  22. background-color: #f5f5f5;
  23. border-color: #ddd;
  24. }
  25. .panel-title {
  26. margin-top: 0;
  27. margin-bottom: 0;
  28. font-size: 16px;
  29. color: inherit;
  30. }
  31. .panel-body .table>thead>tr>th, .panel-body .table>tbody>tr>th, .panel-body .table>tfoot>tr>th, .panel-body .table>thead>tr>td, .panel-body .table>tbody>tr>td, .panel-body .table>tfoot>tr>td , .panel-body div{
  32. padding: 8px 15px;
  33. line-height: 1.428571429;
  34. vertical-align: top;
  35. border-top: 1px solid #ddd;
  36. }
  37. .glyphicon { margin-right:10px; }
  38. .panel-body { padding:0px; }
  39. .panel-body table tr td { padding-left: 15px }
  40. .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
  41. .panel-body .table, .panel-body div {margin-bottom: 0px; }
  42. .active { color: #d84315; }
  43. .active:hover { color: #d84315; }
  44. hr {
  45. margin-top: 0.6rem !important;
  46. margin-bottom: 0.6rem !important;
  47. }
  48. </style>
  49. <div class="inner-page">
  50. <div class="row">
  51. <div class="col-md-12">
  52. <div class="fluid">
  53. @if(count($errors) > 0)
  54. <div class="alert alert-danger icons-alert">
  55. @foreach($errors->all() as $error)
  56. <p>{{$error}}</p>
  57. @endforeach
  58. </div>
  59. @endif
  60. @if(Session::get('error_msg'))
  61. <div class="alert alert-danger icons-alert">
  62. {!! Session::get('error_msg') !!}
  63. </div>
  64. @elseif(Session::get('success_msg'))
  65. <div class="alert alert-success icons-alert">
  66. {!! Session::get('success_msg') !!}
  67. </div>
  68. @endif
  69. </div>
  70. </div>
  71. </div>
  72. <div class="row">
  73. <div class="col-xl-2 col-md-12">
  74. <div class="panel panel-default">
  75. <div class="panel-heading">
  76. <h4 class="panel-title"> Navigasi </h4>
  77. </div>
  78. <div class="panel-body">
  79. <div>
  80. <a href="{{ url('/main/api-key') }}">Senarai Api Key</a>
  81. </div>
  82. <div>
  83. <a href="{{ url('/main/api-integration') }}" class="active">Senarai Api Integrasi</a>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="col-xl-10">
  89. <div class="card">
  90. <div class="card-header">
  91. <h5>List of clients access API Key</h5>
  92. <button type="button" class="btn btn-sm btn-outline-danger float-right waves-effect" data-toggle="modal" data-target="#TambahApi">Create Client Api</button>
  93. </div>
  94. <div class="card-block">
  95. <div class="dt-responsive table-responsive">
  96. <table id="permohonan" class="table table-sm table-striped table-bordered nowrap">
  97. <thead>
  98. <tr>
  99. <th>Date & Time</th>
  100. <th>Client</th>
  101. <th>Scopes</th>
  102. <th>Key</th>
  103. <th>Status</th>
  104. </tr>
  105. </thead>
  106. <tfoot>
  107. <tr>
  108. <th>Date & Time</th>
  109. <th>Client</th>
  110. <th>Scopes</th>
  111. <th>Key</th>
  112. <th>Status</th>
  113. </tr>
  114. </tfoot>
  115. </table>
  116. </div>
  117. </div>
  118. <!-- <div class="animation-modal"> -->
  119. <div class="modal fade" id="TambahApi" tabindex="-1" role="dialog">
  120. <div class="modal-dialog modal-lg" role="document">
  121. <div class="modal-content">
  122. <div class="modal-header">
  123. <h4 class="modal-title">Add New Integration Api</h4>
  124. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  125. <span aria-hidden="true">&times;</span>
  126. </button>
  127. </div>
  128. <div class="modal-body">
  129. <form action="{{ url('/main/add-api-integration') }}" class="main cussPayment" method="POST">
  130. <input type="hidden" name="_token" id="csrf-token" value="{{ Session::token() }}" />
  131. <div class="row clearfix">
  132. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  133. <label for="subject"><b>Type Api <code>*</code></b></label>
  134. <div class="form-group">
  135. <select id="type_api" name="type_api" class="form-control" required>
  136. <option value="">Sila pilih api</option>
  137. @foreach($api as $d)
  138. <option value="{{ $d->_id }}">{{$d->name}}</option>
  139. @endforeach
  140. </select>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="row clearfix">
  145. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  146. <label for="subject"><b>Client <code>*</code></b></label>
  147. <div class="form-group">
  148. <input type="text" name="client" class="form-control" required="">
  149. </div>
  150. </div>
  151. </div>
  152. <hr>
  153. <button type="button" class="btn btn-sm btn-default waves-effect float-left" data-dismiss="modal">Close</button>
  154. <button type="submit" class="btn btn-sm btn-danger float-right waves-effect">Create Client Api</button>
  155. </form>
  156. </div>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. @endsection
  165. @section('external_js')
  166. <script type="text/javascript">
  167. $.ajaxSetup({
  168. headers: {
  169. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  170. }
  171. });
  172. $(document).ready(function() {
  173. var origin = window.location.origin;
  174. $(".theme-loader").animate({
  175. opacity: "0"
  176. },1000);
  177. setTimeout(function() {
  178. $(".theme-loader").remove();
  179. }, 800);
  180. $('[data-toggle="tooltip"]').tooltip();
  181. $('#permohonan').DataTable({
  182. "ordering": false,
  183. "serverSide": true,
  184. "processing": true,
  185. "ajax": "{{ url('/api/setting/api-integration/list') }}",
  186. "columns": [
  187. { "data": "index","name": "index"},
  188. { "data": "client","name": "client"},
  189. { "data": "api","name": "api"},
  190. { "data": "key" , "name": "key" },
  191. { "data": "status", "name": "status"}
  192. ],
  193. "columnDefs": [
  194. {
  195. "render": function ( data, type, row ) {
  196. if (data.indexOf("New/") >= 0) {
  197. var split = data.split('/');
  198. return '<label class="label label-success">'+split[0]+'</label>&nbsp;'+split[1];
  199. }else {
  200. return data;
  201. }
  202. },
  203. "targets": 0,
  204. },
  205. ],
  206. "language": {
  207. "paginate": {
  208. "previous": "Sebelum",
  209. "next": "Selepas"
  210. },
  211. "sLengthMenu": "Tunjukkan _MENU_ entri",
  212. "zeroRecords": "Tiada Data Ditemui",
  213. "infoEmpty": "Tiada Rekod Yang Wujud",
  214. "infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)",
  215. "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
  216. "sSearch": "Cari:",
  217. }
  218. });
  219. });
  220. </script>
  221. @endsection