Dashboard sipadu mbip
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

memo_detail.blade.php 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. @extends('layout.master', ['uid' => $user->_id, 'token' => $user->token_firebase])
  2. @section('page_title', 'Kompaun (Kertas Siasatan)')
  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. .panel-body { padding:0px; }
  38. .panel-body table tr td { padding-left: 15px }
  39. .panel-body table tr td a:hover , .panel-body div a:hover{ color: #d84315 !important; }
  40. .panel-body .table, .panel-body div {margin-bottom: 0px; }
  41. .glyphicon { margin-right:10px; }
  42. .active { color: #d84315; }
  43. .active:hover { color: #d84315; }
  44. #custom table {
  45. table-layout:fixed !important;
  46. border-collapse: collapse !important;
  47. width: 100%;
  48. word-wrap:break-word !important;
  49. }
  50. #custom td, #custom th {
  51. border-top: 1px solid #dee2e6;
  52. border-bottom: 1px solid #dee2e6;
  53. }
  54. .longtext{
  55. word-wrap: break-word !important;
  56. word-break: break-word !important;
  57. padding: 0.6rem 2rem;
  58. }
  59. .btn i {
  60. margin-right: 0px;
  61. }
  62. </style>
  63. <div class="inner-page">
  64. <!-- Display message -->
  65. <div class="row">
  66. <div class="col-md-12">
  67. <div class="fluid">
  68. @if(count($errors) > 0)
  69. <div class="alert alert-danger icons-alert">
  70. @foreach($errors->all() as $error)
  71. <p>{{$error}}</p>
  72. @endforeach
  73. </div>
  74. @endif
  75. @if(Session::get('error_msg'))
  76. <div class="alert alert-danger icons-alert">
  77. {!! Session::get('error_msg') !!}
  78. </div>
  79. @elseif(Session::get('success_msg'))
  80. <div class="alert alert-success icons-alert">
  81. {!! Session::get('success_msg') !!}
  82. </div>
  83. @endif
  84. </div>
  85. </div>
  86. </div>
  87. <!-- End Display message -->
  88. <div class="row">
  89. <div class="col-xl-2 col-md-12">
  90. <div class="panel panel-default">
  91. <div class="panel-heading">
  92. <h4 class="panel-title"> Maklumat Terperinci </h4>
  93. </div>
  94. <div class="panel-body">
  95. @if($compound->status == 'Belum Bayar')
  96. <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
  97. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}">Kompaun</a></div>
  98. @if($compound->modul == '04')
  99. <!-- <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/investigation" class="{{ Request::is('main/compound/*/investigation') ? 'active' : '' }}">Pengesahan Kompaun</a></div> -->
  100. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo','main/compound/*/memo/*/edit') ? 'active' : '' }}">Memo/Nota</a></div>
  101. @elseif($compound->modul == '05')
  102. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/notice" class="{{ Request::is('main/compound/*/notice') ? 'active' : '' }}">Notis Amaran</a></div>
  103. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo','main/compound/*/memo/*/edit') ? 'active' : '' }}">Memo/Nota</a></div>
  104. @elseif($compound->modul == '06')
  105. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/inventory" class="{{ Request::is('main/compound/*/inventory') ? 'active' : '' }}">Inventori</a></div>
  106. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo','main/compound/*/memo/*/edit') ? 'active' : '' }}">Memo/Nota</a></div>
  107. @elseif($compound->modul == '07')
  108. <div><a href="{{ url('main/compound') }}/{{$compound->kpd}}/inventory/auction" class="{{ Request::is('main/compound/*/inventory/auction') ? 'active' : '' }}">Jualan Lelong</a></div>
  109. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/memo" class="{{ Request::is('main/compound/*/memo','main/compound/*/memo/*/edit') ? 'active' : '' }}">Memo/Nota</a></div>
  110. @endif
  111. <div><a target="_blank" href="{{ url('/main/compound') }}/{{$compound->kpd}}/pdf">Cetak/Papar PDF</a></div>
  112. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}/task" class="{{ Request::is('main/compound/*/task') ? 'active' : '' }}">Serahan Modul/PenguatKuasa</a></div>
  113. @elseif($compound->status == 'Berbayar')
  114. <div><a href="{{ url('main/compound') }}/{{ $compound->kpd }}/index" class="{{ Request::is('main/compound/*/index') ? 'active' : '' }}">Garis Masa/Sejarah</a></div>
  115. <div><a href="{{ url('/main/compound') }}/{{$compound->kpd}}" class="{{ Request::is('main/compound/*') ? 'active' : '' }}">Kompaun</a></div>
  116. <div><a target="_blank" href="{{ url('/main/compound') }}/{{$compound->kpd}}/pdf">Cetak/Papar PDF</a></div>
  117. @endif
  118. </div>
  119. </div>
  120. </div>
  121. <div class="col-xl-10 col-md-12">
  122. <div class="row">
  123. <div class="col-md-12">
  124. <div class="card">
  125. <div class="card-header">
  126. @if(empty($role))
  127. <h5 class="card-header-text">
  128. Maklumat Memo / Nota [ No.Kompaun : <code>{{ $compound->kpd }}</code> | No.Siri : <code>{{ $file->no_siri }}</code> | Modul: <code>-</code>]
  129. </h5>
  130. @else
  131. <h5 class="card-header-text">
  132. Maklumat Memo / Nota [ No.Kompaun : <code>{{ $compound->kpd }}</code> | No.Siri : <code>{{ $file->no_siri }}</code> | Modul: <code>{{ $role->name }}</code>]
  133. </h5>
  134. @endif
  135. <span><code>Perhatian!!</code> Memo boleh ditambah mahupun dikemaskini sekiranya kompaun bukan berada dalam <code>kategori modul kompaun</code>.</span>
  136. </div>
  137. </div>
  138. </div>
  139. </div>
  140. <div class="row">
  141. <div class="col-md-12">
  142. <div class="card">
  143. <div class="card-block">
  144. <div class="row">
  145. <div class="col-md-12">
  146. @if($file->modul != '03')
  147. <button id="nota-btn" type="button" class="btn btn-sm btn-outline-danger waves-effect f-right" data-toggle="tooltip" data-placement="top" title data-original-title="Tambah Nota/Memo">
  148. <i class="icofont icofont-edit"></i>
  149. </button>
  150. @endif
  151. </div>
  152. </div>
  153. <hr>
  154. <div id="view-nota" class="row">
  155. <div class="col-xl-12">
  156. <div class="data_table_main dt-responsive table-responsive">
  157. <table id="nota" class="table table-sm table-striped table-bordered nowrap" style="width:100%">
  158. <thead>
  159. <tr>
  160. <th>#</th>
  161. <th>Modul</th>
  162. <th>Jenis Memo</th>
  163. <th>No.Rujukan</th>
  164. <th>Tarikh Mula</th>
  165. <th>Tarikh Akhir</th>
  166. <th>DiKeluarkan</th>
  167. <th>Disahkan</th>
  168. <th>Tindakan</th>
  169. </tr>
  170. </thead>
  171. <tfoot>
  172. <tr>
  173. <th>#</th>
  174. <th>Modul</th>
  175. <th>Jenis Memo</th>
  176. <th>No.Rujukan</th>
  177. <th>Tarikh Mula</th>
  178. <th>Tarikh Akhir</th>
  179. <th>DiKeluarkan</th>
  180. <th>Disahkan</th>
  181. <th>Tindakan</th>
  182. </tr>
  183. </tfoot>
  184. </table>
  185. </div>
  186. </div>
  187. </div>
  188. <div id="edit-nota" class="row">
  189. <div class="col-lg-12 col-md-12">
  190. <form method="POST" action="{{ url('/main/compound/memo/request/add') }}" enctype="multipart/form-data">
  191. <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
  192. <input type="hidden" name="kpd" value="{{ $compound->kpd }}">
  193. <div class="row">
  194. <div class="col-lg-12 col-md-12">
  195. <div class="form-group form-primary">
  196. <label class="float-label"><b>Jenis Memo/Nota <code>*</code></b></label>
  197. <select id="jenis_memo" name="jenis_memo" class="form-control" required>
  198. <option value="">Pilih Jenis Memo</option>
  199. <!-- <option value="Tambahan">Tambahan Harga</option> -->
  200. <option value="Lain-lain">Lain-lain</option>
  201. </select>
  202. <span class="form-bar"></span>
  203. </div>
  204. </div>
  205. </div>
  206. <div class="row">
  207. <div class="col-lg-6 col-md-12">
  208. <div class="form-group form-primary">
  209. <label class="float-label"><b>No.Rujukan <code>*</code></b></label>
  210. <input type="text" name="no_rujukan" class="form-control" value="{{ old('no_rujukan')}}" required="">
  211. <span class="form-bar"></span>
  212. </div>
  213. </div>
  214. <!-- <div class="col-lg-6 col-md-12">
  215. <div class="form-group form-primary">
  216. <label class="float-label"><b>Tawaran Kompaun Baru <code>*</code></b></label>
  217. <input type="text" name="tawaran" class="form-control" value="{{ old('tawaran')}}" placeholder="5%">
  218. <span class="form-bar"></span>
  219. <small style="color: red;">Format tawaran kompaun mesti dalam bentuk <b>peratus (%)</b></small>
  220. </div>
  221. </div> -->
  222. </div>
  223. <div class="row">
  224. <div class="col-lg-12 col-md-12">
  225. <div class="form-group form-primary">
  226. <label class="float-label"><b>Subjek <code>*</code></b></label>
  227. <input type="text" name="subjek" class="form-control" value="{{ old('subjek')}}" required="">
  228. <span class="form-bar"></span>
  229. </div>
  230. </div>
  231. <div class="col-lg-12 col-md-12">
  232. <div class="form-group form-primary">
  233. <label class="float-label"><b>Penerangan <code>*</code></b></label>
  234. <textarea type="text" name="penerangan" id="penerangan" style="width: 100%; height: 200px" required=""> {{ old('penerangan')}}</textarea>
  235. <span class="form-bar"></span>
  236. </div>
  237. </div>
  238. </div>
  239. <!-- Drag Drop -->
  240. <div class="row" style="margin-bottom: 1.25em;">
  241. <div class="col-lg-12">
  242. <div class="dropzone" id="uploadF">
  243. <label class="float-label"><b>Tekan untuk memuat PDF. <code>Optional</code></b></label>
  244. <div class="fallback">
  245. <input name="attachment[]" id="attachment" type="file" class="form-control form-control-sm" multiple />
  246. </div>
  247. </div>
  248. <code>Format <b>PDF</b> sahaja yang diterima</code>
  249. </div>
  250. </div>
  251. <div class="row">
  252. <div class="col-lg-6 col-md-12">
  253. <div class="form-group form-primary">
  254. <label class="float-label"><b>Tarikh Mula <code>*</code></b></label>
  255. <input type="datetime-local" name="tarikh_mula" value="{{ old('tarikh_mula')}}" class="form-control">
  256. <span class="form-bar"></span>
  257. </div>
  258. </div>
  259. <div class="col-lg-6 col-md-12">
  260. <div class="form-group form-primary">
  261. <label class="float-label"><b>Tarikh Akhir <code>*</code></b></label>
  262. <input type="date" name="tarikh_akhir" value="{{ old('tarikh_akhir')}}" class="form-control">
  263. <span class="form-bar"></span>
  264. </div>
  265. </div>
  266. </div>
  267. <hr>
  268. <div class="md-group-add-on"></div>
  269. <div class="f-right m-t-20">
  270. <button type="submit" class="btn btn-sm btn-outline-danger waves-effect">Simpan Rekod Memo</button>
  271. <a href="javascript:;" id="nota-cancel" class="btn btn-sm btn-out-dashed waves-effect waves-light btn-default btn-square">Batal</a>
  272. </div>
  273. </form>
  274. </div>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. @endsection
  284. @section('external_js')
  285. <script type="text/javascript" src="{{ asset('js/toggle_button_edit.js') }}"></script>
  286. <script type="text/javascript">
  287. var table = $('#nota').DataTable({
  288. "ordering": false,
  289. "serverSide": true,
  290. "processing": true,
  291. "ajax": "{{ url('api/compound') }}/{{$file->no_siri}}/memo/list",
  292. "columns": [
  293. { "data": "index","name": "index"},
  294. { "data": "modul","name": "modul"},
  295. { "data": "jenis","name": "jenis"},
  296. { "data": "no_rujukan", "name": "no_rujukan" },
  297. { "data": "mula", "name": "mula"},
  298. { "data": "akhir", "name": "akhir"},
  299. { "data": "dikeluakan", "name": "dikeluakan"},
  300. { "data": "disahkan", "name": "disahkan"},
  301. { "data": "tindakan","name": "tindakan"}
  302. ],
  303. "columnDefs": [
  304. {
  305. "render": function ( data, type, row ) {
  306. if (data.indexOf("Baru/") >= 0) {
  307. var split = data.split('/');
  308. return '<label class="label label-success">'+split[0]+'</label>&nbsp;'+split[1];
  309. }else {
  310. return data;
  311. }
  312. },
  313. "targets": 0,
  314. },
  315. {
  316. "render": function ( data, type, row ) {
  317. var currentLogin = '{{ $user->_id }}';
  318. if(data == ''){
  319. return '<a onclick="confirmMemo(\''+row.tindakan+'\',\'' + row.no_rujukan + '\',\'' + currentLogin + '\')" class="tabledit-edit-button btn btn-sm btn-warning waves-effect waves-light" style="float: none;color:#333" data-toggle="tooltip" data-placement="top" title="Mengesahkan">Minta Pengesahan</a>';
  320. }else{
  321. return '<a onclick="confirmMemo(\''+row.tindakan+'\',\'' + row.no_rujukan + '\',\'' + currentLogin + '\')" class="tabledit-edit-button btn btn-sm btn-danger waves-effect waves-light" style="float: none;color:#fff" data-toggle="tooltip" data-placement="top" title="Tidak disahkan">Tidak Disahkan</a>';
  322. }
  323. },
  324. "targets": 7,
  325. },
  326. {
  327. "render": function ( data, type, row ) {
  328. var kpd = '{{ $compound->kpd }}';
  329. var editLink = "{{ url('/main/compound') }}"+"/"+kpd+"/memo/"+data+"/edit";
  330. var pdfLink = "{{ url('/main/setting/memo') }}"+"/"+data+"/view/detail";
  331. var staff = "{{ $user->_id}}";
  332. if(row.modul == '-'){
  333. return '<div class="btn-group btn-group-sm" style="float: none;"><a target="_blank" href="'+pdfLink+'" class="tabledit-edit-button btn btn-success waves-effect waves-light" style="float: none;" data-toggle="tooltip" data-placement="top" title="Maklumat Memo"><span class="icofont icofont-eye-alt" style="color:white"></span></a></div>';
  334. }else {
  335. return '<div class="btn-group btn-group-sm" style="float: none;"><a target="_blank" href="'+pdfLink+'" class="tabledit-edit-button btn btn-success waves-effect waves-light" style="float: none;" data-toggle="tooltip" data-placement="top" title="Maklumat Memo"><span class="icofont icofont-eye-alt" style="color:white"></span></a> <a href="'+editLink+'" class="tabledit-edit-button btn btn-primary waves-effect waves-light" style="float: none;" data-toggle="tooltip" data-placement="top" title="Kemaskini Memo"><span class="icofont icofont-ui-edit" style="color:white"></span></a> <a onclick="deleteA(\''+kpd+'\',\''+data+'\',\'' + row.no_rujukan + '\',\'' + staff + '\')" data-toggle="tooltip" data-placement="top" title="Buang Memo" class="tabledit-delete-button btn btn-danger waves-effect waves-light" style="float: none;"><span class="icofont icofont-ui-delete" style="color:white"></span></a></div>';
  336. }
  337. },
  338. "targets": 8,
  339. },
  340. ],
  341. "language": {
  342. "paginate": {
  343. "previous": "Sebelum",
  344. "next": "Selepas"
  345. },
  346. "sLengthMenu": "Tunjukkan _MENU_ entri",
  347. "zeroRecords": "Tiada Data Ditemui",
  348. "infoEmpty": "Tiada Rekod Yang Wujud",
  349. "infoFiltered": "(Ditapis daripada _MAX_ jumlah rekod)",
  350. "info": "Tunjuk _START_ hingga _END_ daripada _TOTAL_ entri",
  351. "sSearch": "Cari:",
  352. }
  353. });
  354. function confirmMemo(cid,rujukan,currentLogin) {
  355. var mid = cid;
  356. var rujukan = rujukan;
  357. swal({
  358. title: "",
  359. text: "Mengesahkan Memo ( " + rujukan + " ) ?",
  360. html: true,
  361. type: "warning",
  362. showCancelButton: true,
  363. confirmButtonClass: "btn-danger",
  364. confirmButtonText: "Ya!",
  365. cancelButtonText: "Batal!",
  366. closeOnConfirm: false
  367. },
  368. function(isConfirm){
  369. if (!isConfirm) return;
  370. $.ajax({
  371. type: "POST",
  372. url: "{{ url('api/setting/memo/confirm') }}",
  373. data: { "_token": "{{ csrf_token() }}", id: mid, confirm_id: currentLogin, kpd: "{{ $compound->kpd }}"},
  374. success:function(data){
  375. if(data['status'] == "true"){
  376. swal({
  377. title: "Berjaya",
  378. text: data['desc'],
  379. type: "success",
  380. showCancelButton: false,
  381. confirmButtonText: "OK!",
  382. closeOnConfirm: true
  383. },
  384. function(){
  385. table.ajax.url("{{ url('api/compound') }}/{{$file->no_siri}}/memo/list").load();
  386. });
  387. }else if(data['status'] == "false"){
  388. swal({
  389. title: "Tidak Berjaya",
  390. text: data['desc'],
  391. type: "error",
  392. showCancelButton: false,
  393. confirmButtonText: "OK!",
  394. closeOnConfirm: true
  395. },
  396. function(){
  397. table.ajax.url("{{ url('api/compound') }}/{{$file->no_siri}}/memo/list").load();
  398. });
  399. }
  400. },
  401. error: function (xhr, ajaxOptions, thrownError) {
  402. swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
  403. }
  404. });
  405. });
  406. };
  407. function deleteA(kpd,cid,rujukan,staff) {
  408. var kpd = kpd;
  409. var cid = cid;
  410. var rujukan = rujukan;
  411. swal({
  412. title: "Adakah anda pasti?",
  413. text: "Anda tidak akan dapat memulihkan rekod memo ini ( " + rujukan + " )",
  414. html: true,
  415. type: "warning",
  416. showCancelButton: true,
  417. confirmButtonClass: "btn-danger",
  418. confirmButtonText: "Ya!",
  419. cancelButtonText: "Batal!",
  420. closeOnConfirm: false
  421. },
  422. function(isConfirm){
  423. if (!isConfirm) return;
  424. $.ajax({
  425. type: "POST",
  426. url: "{{ url('api/compound/delete/memo') }}",
  427. data: { "_token": "{{ csrf_token() }}", id: cid, kpd: kpd, staff:staff },
  428. success:function(data){
  429. if(data['status'] == "true"){
  430. swal({
  431. title: "Berjaya",
  432. text: data['desc'],
  433. type: "success",
  434. showCancelButton: false,
  435. confirmButtonText: "OK!",
  436. closeOnConfirm: true
  437. },
  438. function(){
  439. table.ajax.url("{{ url('api/compound') }}/{{$file->no_siri}}/memo/list").load();
  440. });
  441. }else if(data['status'] == "false"){
  442. swal({
  443. title: "Tidak Berjaya",
  444. text: data['desc'],
  445. type: "error",
  446. showCancelButton: false,
  447. confirmButtonText: "OK!",
  448. closeOnConfirm: true
  449. },
  450. function(){
  451. table.ajax.url("{{ url('api/compound') }}/{{$file->no_siri}}/memo/list").load();
  452. });
  453. }
  454. },
  455. error: function (xhr, ajaxOptions, thrownError) {
  456. swal("Error deleting!", "Rekod tidak berjaya di buang", "error");
  457. }
  458. });
  459. });
  460. };
  461. $.ajaxSetup({
  462. headers: {
  463. 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  464. }
  465. });
  466. $(document).ready(function() {
  467. var origin = window.location.origin;
  468. $(".theme-loader").animate({
  469. opacity: "0"
  470. },1000);
  471. setTimeout(function() {
  472. $(".theme-loader").remove();
  473. }, 800);
  474. /*** Tooltip ***/
  475. $('#nota').on('draw.dt', function () {
  476. $('[data-toggle="tooltip"]').tooltip();
  477. });
  478. /** Nota/Memo **/
  479. $('#edit-nota').hide();
  480. $('#nota-save').on('click', function() {
  481. var c = $('#nota-btn').find("i");
  482. c.removeClass('icofont-close');
  483. c.addClass('icofont-edit');
  484. $('#view-nota').show();
  485. $('#edit-nota').hide();
  486. });
  487. $('#nota-cancel').on('click', function() {
  488. var c = $('#nota-btn').find("i");
  489. c.removeClass('icofont-close');
  490. c.addClass('icofont-edit');
  491. $('#view-nota').show();
  492. $('#edit-nota').hide();
  493. });
  494. $('#nota-btn').on('click', function() {
  495. var b = $(this).find("i");
  496. var edit_class = b.attr('class');
  497. if (edit_class == 'icofont icofont-edit') {
  498. b.removeClass('icofont-edit');
  499. b.addClass('icofont-close');
  500. $('#view-nota').hide();
  501. $('#edit-nota').show();
  502. } else {
  503. b.removeClass('icofont-close');
  504. b.addClass('icofont-edit');
  505. $('#view-nota').show();
  506. $('#edit-nota').hide();
  507. }
  508. });
  509. });
  510. </script>
  511. @endsection