<template>
<div>

    <!-- dialog delete -->
    <v-dialog v-model="dialog_delete" persistent width="500">
        <v-card>
            <v-card-title class="headline grey lighten-2" primary-title>
                KONFIRMASI HAPUS 
                 <p class="mb-0 p-0">  {{ selected_list_data.MutasiRequestNumber }} </p>
            </v-card-title>
            <v-card-text>
                <p>
                  Apakah anda yakin menghapus data berikut
                  <span class="font-weight-bold"> {{ selected_list_data.MutasiRequestNumber }}</span>
                  ?
                </p>
            </v-card-text>
            <v-divider></v-divider>
            <v-card-actions>
                <v-spacer></v-spacer>
                <v-btn color="red" flat outline @click="dialog_delete = false">
                    TIDAK
                </v-btn>
                <v-btn color="green" flat outline @click="deleteRO()">
                    YA
                </v-btn>
            </v-card-actions>
        </v-card>
    </v-dialog>
</div>
</template>

<script>
module.exports = {
    data() {
        return {
            
        }
    },
    computed: {
        dialog_delete: {
            get() {
                return this.$store.state.mutasi.dialog_delete;
            },
            set(val) {
                this.$store.commit("mutasi/update_dialog_delete", val);
            }
        },
        selected_list_data() {
            return this.$store.state.mutasi.selected_list_data;
        }
    },
    methods: {
        deleteRO() {
            this.$store.dispatch("mutasi/deleteMutasi");
        }
    },
}
</script>