No Description
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.

update.blade.php 5.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. @extends('admin.layouts.app')
  2. @section('content')
  3. <div class="row px-5">
  4. <div class="col-xl-12">
  5. <div class="card shadow">
  6. <div class="card-header bg-transparent">
  7. <div class="row align-items-center">
  8. <div class="col">
  9. <h6 class="text-uppercase text-muted ls-1 mb-1">Update User Management</h6>
  10. <h2 class="mb-0">Edit Pengguna Rumah Sakit</h2>
  11. </div>
  12. </div>
  13. </div>
  14. <div class="card-body">
  15. <form action="{{ route($route.'update_action') }}" class="form-global-handle" method="POST" enctype="multipart/form-data">
  16. @csrf
  17. <input type="hidden" name="id" value="{{Hashids::encode($data->id)}}">
  18. <div class="form-group">
  19. <label for="nama">Nama Rumah Sakit <span class="text-danger">*</span></label>
  20. <input type="text" name="nama" required class="form-control cek-email" value="{{ $data->nama }}" id="nama" placeholder="Contoh : Rumah Sakit Sidoni">
  21. </div>
  22. <div class="form-group">
  23. <label for="kode_rumah_sakit">Kode Rumah Sakit <span class="text-danger">*</span></label>
  24. <input type="text" name="kode_rumah_sakit" required class="form-control cek-email" value="{{ $data->kode_rumah_sakit }}" id="kode_rumah-sakit" placeholder="Contoh : Rumah Sakit Sidoni">
  25. </div>
  26. <div class="form-group">
  27. <label for="email">Email <span class="text-danger">*</span></label>
  28. <input type="email" name="email" required class="form-control cek_email" data-id="{{ Hashids::encode($data->user_login_id) }}" data-route="{{ route('cek_email') }}" value="{{ $data->user->email }}" id="email" placeholder="Contoh : sidoni@mail.com">
  29. <div class="email-notification"></div>
  30. </div>
  31. <div class="form-group">
  32. <label for="password">Password <span class="text-danger">*</span></label>
  33. <input type="password" name="password" class="form-control" id="password" placeholder="Contoh : *****">
  34. </div>
  35. <div class="form-group">
  36. <label for="nama_bank_darah">Nama Bank Darah <span class="text-danger">*</span></label>
  37. <input type="nama_bank_darah" required name="nama_bank_darah" value="{{ $data->nama_bank_darah }}" class="form-control" id="nama_bank_darah" placeholder="Contoh : Bank Darah Doni">
  38. </div>
  39. <div class="form-group">
  40. <label for="deskripsi">Deskripsi <span class="text-danger">*</span></label>
  41. <textarea name="deskripsi" required class="form-control" id="deskripsi" rows="5" value="Deskripsi">{{ $data->deskripsi }}</textarea>
  42. </div>
  43. <div class="form-group">
  44. <label for="alamat">Alamat <span class="text-danger">*</span></label>
  45. <textarea name="alamat" required class="form-control" id="alamat" rows="5" value="alamat">{{ $data->alamat }}</textarea>
  46. </div>
  47. <div class="form-group">
  48. <label> List Role <span class="text-danger">*</span></label>
  49. <div class="row">
  50. @foreach ($roles as $key => $value)
  51. <div class="col-lg-12">
  52. <div class="custom-control custom-control-alternative custom-checkbox mb-3">
  53. <input class="custom-control-input" name="role_id[]" value="{{ $value->id }}" {{ in_array($value->id, $data->user->roles()->get()->pluck('id')->toArray()) ? 'checked' : null }} id="customCheck{{$key}}" type="checkbox">
  54. <label class="custom-control-label" for="customCheck{{$key}}">{{ $value->name }}</label>
  55. </div>
  56. </div>
  57. @endforeach
  58. </div>
  59. </div>
  60. <div class="group">
  61. <button type="submit" class="btn btn-success">Simpan</button>
  62. <a class="btn btn-default bg-back" href="{{ route($route.'index') }}">Kembali</a>
  63. </div>
  64. </form>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. @endsection
  70. {{-- load JS yang lu perluin, selain itu no --}}
  71. @push('js')
  72. <script src="{{ asset('assets') }}/js/blockUI.js"></script>
  73. <script src="{{ asset('assets') }}/js/sweetalert2.js"></script>
  74. <script src="{{ asset('assets') }}/js/custom.js"></script>
  75. @endpush