-
- {{-- {!! $data->links() !!} --}}
+
+
+
+
+ {{-- {!! $data->links() !!} --}}
+
+
- @section('scripts')
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- @endsection
+
+
+ $(document).on("click", ".chk-upload", function() {
+ let val = $(this).val();
+ let reset = $(this).prop("checked") == 1 ? 0 : 1;
+ location.href = "{{ URL::to(" / admin / users ") }}/" + val + "/lock-upload/" + reset;
+ });
+
+ $(document).on("click", ".user_lock_tambah_data", function() {
+ let val = $(this).val();
+ let reset = $(this).prop("checked") == 1 ? 0 : 1;
+ location.href = "{{ URL::to(" / admin / users ") }}/" + val + "/lock-tambah-data/" + reset;
+ });
+
+ $(document).on("click", ".user_lock_ubah_data", function() {
+ let val = $(this).val();
+ let reset = $(this).prop("checked") == 1 ? 0 : 1;
+ location.href = "{{ URL::to(" / admin / users ") }}/" + val + "/lock-ubah-data/" + reset;
+ });
+
+ $(document).on("click", ".user_lock_hapus_data", function() {
+ let val = $(this).val();
+ let reset = $(this).prop("checked") == 1 ? 0 : 1;
+ location.href = "{{ URL::to(" / admin / users ") }}/" + val + "/lock-hapus-data/" + reset;
+ });
+
+ $("#btn_lock_all").on("click", function() {
+ let test = Swal.fire({
+ title: 'Fitur upload data akan dikunci untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-upload-all/0/0";
+ }
+ })
+ });
+
+
+
+ $("#btn_reset_lock_all").on("click", function() {
+ let test = Swal.fire({
+ title: 'Fitur upload data akan direset untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-upload-all/0/1";
+ }
+ })
+ });
+
+
+ $("#btn_lock_tambah").on("click", function() {
+ let checkVal = $(this).prop("checked");
+ let test = Swal.fire({
+ title: 'Fitur tambah data akan dikunci untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ let val = checkVal == true ? 1 : 2;
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-tambah-all/0/0/" + val;
+ }
+ })
+ });
+
+ $("#btn_reset_tambah").on("click", function() {
+ let test = Swal.fire({
+ title: 'Fitur tambah data akan direset untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-tambah-all/0/1";
+ }
+ })
+ });
+
+ $("#btn_lock_ubah").on("click", function() {
+ let checkVal = $(this).prop("checked");
+ let test = Swal.fire({
+ title: 'Fitur ubah data akan dikunci untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ let val = checkVal == true ? 1 : 2;
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-ubah-all/0/0/" + val;
+ }
+ })
+ });
+
+ $("#btn_reset_ubah").on("click", function() {
+ let test = Swal.fire({
+ title: 'Fitur ubah data akan direset untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-ubah-all/0/1";
+ }
+ })
+ });
+
+ $("#btn_lock_hapus").on("click", function() {
+ let checkVal = $(this).prop("checked");
+ let test = Swal.fire({
+ title: 'Fitur hapus data akan dikunci untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ let val = checkVal == true ? 1 : 2;
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-hapus-all/0/0/" + val;
+ }
+ })
+ });
+
+ $("#btn_reset_hapus").on("click", function() {
+ let test = Swal.fire({
+ title: 'Fitur upload data akan direset untuk semua user!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = "{{ URL::to(" / admin / users ") }}/lock-hapus-all/0/1";
+ }
+ })
+ });
+
+
+ $(document).on("click", ".btn_reset_password", function(e) {
+ e.preventDefault();
+ let url = $(this).attr("href");
+ let test = Swal.fire({
+ title: 'Password akan direset!?',
+ showDenyButton: true,
+ showCancelButton: false,
+ confirmButtonText: 'Ya',
+ denyButtonText: "Tidak",
+ icon: "warning",
+ }).then((result) => {
+ /* Read more about isConfirmed, isDenied below */
+ if (result.isConfirmed) {
+ location.href = url;
+ }
+ })
+ });
+ $("#optRole").on("change", function() {
+ dtTable.draw();
+ });
+ });
+
+@endsection
@stop
\ No newline at end of file