const flashData = $('.flash-data').data('flashdata');

    if (flashData=='simpan') {
            Swal.fire({
              position: 'top-end',
              icon: 'success',
              title: 'Data Telah Tersimpan',
              showConfirmButton: false,
              timer: 1500
            })
    } else if (flashData=='update') {
            Swal.fire({
              position: 'top-end',
              icon: 'warning',
              title: 'Data Telah Terupdate',
              showConfirmButton: false,
              timer: 1500
            })
    } else if (flashData=='hapus') {
            Swal.fire({
              position: 'top-end',
              icon: 'error',
              title: 'Data Telah Terhapus',
              showConfirmButton: false,
              timer: 1500
            })
    } else if (flashData=='lebih') {
            Swal.fire({
              position: 'top-end',
              icon: 'error',
              title: 'Penginputan Nilai Lebih',
              showConfirmButton: false,
              timer: 2000
            })
    } else if (flashData=='tutup') {
            Swal.fire({
              position: 'top-end',
              icon: 'error',
              title: 'Database Tertutup',
              showConfirmButton: false,
              timer: 2000
            })
    } else if (flashData=='terbuka') {
            Swal.fire({
              position: 'top-end',
              icon: 'success',
              title: 'Database Telah Dibuka',
              showConfirmButton: false,
              timer: 2000
            })
    } else if (flashData=='tertutup') {
            Swal.fire({
                title: 'Database sedang tertutup',
                text: "Apakah ingin membuka database?",
                icon: 'warning',
                showCancelButton: true,
                confirmButtonColor: '#3085d6',
                cancelButtonColor: '#d33',
                confirmButtonText: 'Buka Database'
              }).then((result) => {
                if (result.isConfirmed) {

                    window.location.href = "http://kasda.bkadsidrap.com/tutupbuku/dariberanda.html";
                }
              })
    } else if (flashData=='setuju') {
            Swal.fire({
              position: 'top-end',
              icon: 'success',
              title: 'Permintaan Disetujui',
              showConfirmButton: false,
              timer: 2000
            })
    } else if (flashData=='tolak') {
            Swal.fire({
              position: 'top-end',
              icon: 'error',
              title: 'Permintaan Ditolak',
              showConfirmButton: false,
              timer: 2000
            })
    } else if (flashData=='sudahdiinput') {
            Swal.fire({
              position: 'center',
              icon: 'warning',
              title: 'Nomor SP2D Sudah diinput',
              showConfirmButton: true,
              timer: 2000
            })
    } else if (flashData=='notfound') {
            Swal.fire({
              position: 'center',
              icon: 'warning',
              title: 'User dan Password tidak sesuai, silahkan login ulang',
              showConfirmButton: true,
              timer: 3000
            })
    } else if (flashData=='gagalogin') {
            Swal.fire({
              text: "User dan Password tidak sesuai",
              icon: "error",
              buttonsStyling: false,
              confirmButtonText: "Login Ulang",
              timer: 2500,
              customClass: {
                  confirmButton: "btn font-weight-bold btn-light-danger"
              }
            })
    }  