69 lines
2.6 KiB
Vue
69 lines
2.6 KiB
Vue
<template>
|
|
<v-dialog v-model="dialog_confirm_posting" persistetnt width="40vw">
|
|
<v-card>
|
|
<v-card-title class="headline grey lighten-2" primary-title>
|
|
POSTING SEMUA JURNAL PADA PERIODE {{ selected_periode.periodeName }}
|
|
</v-card-title>
|
|
<v-card-text>
|
|
<div v-for="item in total_jurnal_not_posted" :key="item.jurnalEditStatus">
|
|
<p v-if="item.jurnalEditStatus == 'N'">
|
|
Jumlah jurnal yang dapat diposting: <strong>{{ item.total_jurnal }}</strong>
|
|
</p>
|
|
<p v-if="item.jurnalEditStatus == 'Y'">
|
|
Jumlah jurnal yang tidak dapat diposting: <strong>{{ item.total_jurnal }}</strong>
|
|
(belum diverifikasi setelah edit)
|
|
</p>
|
|
</div>
|
|
<p>
|
|
Apakah anda yakin akan melakukan posting semua jurnal yang dibuat dalam rentang waktu
|
|
<strong>{{ selected_periode.periode }}</strong> ?
|
|
</p>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="error" outline flat @click="dialog_confirm_posting = false">Batal</v-btn>
|
|
<v-btn color="primary" dark @click="postingJurnal()">Ya</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
</template>
|
|
|
|
<script>
|
|
module.exports = {
|
|
data() {
|
|
return {
|
|
|
|
}
|
|
},
|
|
computed: {
|
|
selected_periode() {
|
|
return this.$store.state.journal.selected_periode
|
|
},
|
|
total_jurnal_not_posted() {
|
|
return this.$store.state.journal.total_jurnal_not_posted
|
|
},
|
|
dialog_confirm_posting: {
|
|
get() {
|
|
return this.$store.state.journal.dialog_confirm_posting;
|
|
},
|
|
set(val) {1
|
|
this.$store.commit("journal/update_dialog_confirm_posting", val);
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
postingJurnal() {
|
|
var jurnal = this.total_jurnal_not_posted.find(jrnl => jrnl.jurnalEditStatus === 'N')
|
|
if (jurnal && Number(jurnal.total_jurnal) > 0) {
|
|
this.$store.dispatch("journal/postingJurnal", { typeid: jurnal.JurnalTypeID });
|
|
return;
|
|
}
|
|
this.$store.commit("journal/update_open_dialog_info", true);
|
|
this.$store.commit("journal/update_msg_info",
|
|
"semua jurnal para periode ini sudah terposting"
|
|
);
|
|
}
|
|
},
|
|
}
|
|
</script>
|