Initial import
This commit is contained in:
344
one-ui/masterdata/one-doctor-v4/api/doctor.js
Normal file
344
one-ui/masterdata/one-doctor-v4/api/doctor.js
Normal file
@@ -0,0 +1,344 @@
|
||||
const URL = "/one-api/v1/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/search', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function searchconfirm(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/searchconfirm', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function getsexreg(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getsexreg',{token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function getnewcode(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getnewcode',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function removecode(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/removecode',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function attachdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/attachdoctor',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function newdoctor(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/newdoctor',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function xdelete(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/deletedoctor',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getaddress',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchcity(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/searchcity',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function searchstaff(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/searchstaff',{token:token,name:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getdistrict(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getdistrict',{id:prm.M_CityID,token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getkelurahan(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getkelurahan',{token:token,id:prm.M_DistrictID});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getjpa(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/getjpa',{token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function savenewaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/savenewaddress',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveeditaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/saveeditaddress',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function deleteaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'verifydoctorv4/deleteaddress',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,326 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout>
|
||||
<v-text-field hide-details class="xs4 mt-1 ma-1" label="Kode" @keyup.enter="searchDoctor" outline v-model="code"></v-text-field>
|
||||
<v-text-field hide-details class="xs4 mt-1 ma-1" label="Nama + Alamat + No HP" @keyup.enter="searchDoctor" outline v-model="name"></v-text-field>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card>
|
||||
<v-subheader red--text text--lighten-1 align-center>DAFTAR DOKTER YANG SUDAH TERKONFIRMASI</v-subheader>
|
||||
|
||||
<v-layout row>
|
||||
<v-flex xs12 pb-2>
|
||||
<v-data-table :headers="headers" :items="doctorsconfirm" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)">
|
||||
<v-btn title="reset kode" :disabled="in_saving" @click="removeCode(props.item)" dark style="min-width:20px" small color="orange lighten-3">
|
||||
<v-icon small dark>close</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_DoctorCode}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.doctor_fullname}}</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)"
|
||||
v-html="reHTMLAddress(props.item.doctor_address)">
|
||||
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px" v-model="curr_page" :length="xtotal_page"></v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
|
||||
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.searchbox .v-btn {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,
|
||||
table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-dialog-info': httpVueLoader('../../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert': httpVueLoader('../../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("doctor/searchconfirm", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
reHTMLAddress(xxaddresses){
|
||||
var rtn = ''
|
||||
if(xxaddresses && xxaddresses !== ''){
|
||||
var peraddress = xxaddresses.split("+")
|
||||
peraddress.forEach(function(entry) {
|
||||
var perpart = entry.split("^")
|
||||
rtn += "<p class='mb-0 font-weight-black' style='font-size:11px'>"+perpart[0].toUpperCase()+"</p>"
|
||||
rtn += "<p class='mb-1 caption mono'>"+perpart[1]+"</p>"
|
||||
})
|
||||
}
|
||||
|
||||
return rtn
|
||||
},
|
||||
removeCode(row){
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
row.code = this.code
|
||||
row.name = this.name
|
||||
row.lastid = -1
|
||||
row.current_page = 1
|
||||
this.$store.dispatch("doctor/removecode",row)
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.M_DoctorID == this.$store.state.doctor.selected_doctor_right.M_DoctorID
|
||||
},
|
||||
searchDoctor() {
|
||||
this.$store.dispatch("doctor/searchconfirm", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(doc) {
|
||||
this.$store.commit("doctor/update_selected_doctor_right", doc)
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("doctor/update_no_save", 0)
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("doctor/update_alert_success", val)
|
||||
},
|
||||
setNewDoctor() {
|
||||
this.$store.commit("doctor/update_selected_doctor_right", {})
|
||||
this.$store.commit("doctor/update_preffix", '')
|
||||
this.$store.commit("doctor/update_doctor_name", '')
|
||||
this.$store.commit("doctor/update_suffix", '')
|
||||
this.$store.commit("doctor/update_selected_sex", {})
|
||||
this.$store.commit("doctor/update_selected_religion", {})
|
||||
this.$store.commit("doctor/update_phone", '')
|
||||
this.$store.commit("doctor/update_email", '')
|
||||
this.$store.commit("doctor/update_hp", '')
|
||||
this.$store.commit("doctor/update_note", '')
|
||||
this.$store.commit("doctor/update_pj", 'N')
|
||||
this.$store.commit("doctor/update_dpj", 'N')
|
||||
this.$store.commit("doctor/update_clinic", 'N')
|
||||
this.$store.commit("doctor/update_marketing_confirm", 'N')
|
||||
this.$store.commit("doctor/update_is_default", 'N')
|
||||
this.$store.commit("doctor/update_addresses", [])
|
||||
|
||||
this.$store.commit("doctor/update_act", 'new')
|
||||
},
|
||||
closeDialogSuccessxx() {
|
||||
let arrdoctor = this.$store.state.doctor.doctorsconfirm
|
||||
var idx = _.findIndex(arrdoctor, item => item.M_DoctorID === this.$store.state.doctor.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("doctor/searchconfirm", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
current_page: this.curr_page,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("doctor/update_dialog_success", false)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
in_saving: {
|
||||
get() {
|
||||
return this.$store.state.doctor.in_saving
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_in_saving", val)
|
||||
}
|
||||
},
|
||||
xstartdate: {
|
||||
get() {
|
||||
return this.$store.state.doctor.startdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_startdate", val)
|
||||
}
|
||||
},
|
||||
selected_filter_staff: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_filter_staff
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_filter_staff", val)
|
||||
this.searchDoctor()
|
||||
}
|
||||
},
|
||||
staffs: {
|
||||
get() {
|
||||
return this.$store.state.doctor.staffs
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_staffs", val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.doctor.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.doctor.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.doctor.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.doctor.search_status == 1
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.doctor.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_status", val)
|
||||
this.searchDoctor()
|
||||
}
|
||||
},
|
||||
doctorsconfirm() {
|
||||
return this.$store.state.doctor.doctorsconfirm
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.doctor.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
totaldoctor() {
|
||||
return this.$store.state.doctor.total_doctorconfirm
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.doctor.current_pageconfirm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_current_pageconfirm", val)
|
||||
this.$store.dispatch("doctor/searchconfirm", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
current_page: val,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.doctor.total_doctorconfirm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_total_doctorconfirm", val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.doctor.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_open_dialog_info", val)
|
||||
}
|
||||
},
|
||||
msginfo() {
|
||||
return this.$store.state.doctor.msg_info
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
code: '',
|
||||
name: '',
|
||||
page: 1,
|
||||
total_pages: 5,
|
||||
headers: [
|
||||
{
|
||||
text: "",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "5%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "30%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAMAT",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "45%",
|
||||
class: "pa-2 teal lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'M_DoctorName',
|
||||
totalItems: this.$store.state.doctor.total_doctorconfirm
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,923 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogform" persistent max-width="60%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="body-2">DATA DOKTER</v-card-title>
|
||||
<v-card-text class="mt-0 pt-0">
|
||||
<v-layout row>
|
||||
<v-flex ma-1 xs1>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Awalan"
|
||||
v-model="selected_doctor.M_DoctorPrefix"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs1>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Awalan 2"
|
||||
v-model="selected_doctor.M_DoctorPrefix2"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs7>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Nama Dokter"
|
||||
v-model="selected_doctor.M_DoctorName"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs1>
|
||||
<v-text-field
|
||||
style="font-size:12px"
|
||||
label="Akhiran"
|
||||
v-model="selected_doctor.M_DoctorSufix"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs1>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Akhiran 2"
|
||||
v-model="selected_doctor.M_DoctorSufix2"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs1>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Akhiran 3"
|
||||
v-model="selected_doctor.M_DoctorSufix3"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-select
|
||||
style="font-size:12px"
|
||||
item-text="m_sexname"
|
||||
return-object
|
||||
:items="xsexes"
|
||||
v-model="xsex"
|
||||
@change="changeForm"
|
||||
label="Jenis Kelamin*">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-select
|
||||
style="font-size:12px"
|
||||
item-text="M_ReligionName"
|
||||
return-object
|
||||
:items="xreligions"
|
||||
v-model="xreligion"
|
||||
@change="changeForm"
|
||||
label="Agama">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-autocomplete
|
||||
style="font-size:12px"
|
||||
label="Marketing"
|
||||
v-model="xstaff"
|
||||
:items="xstaffs"
|
||||
@change="changeForm"
|
||||
:search-input.sync="search_staff"
|
||||
auto-select-first no-filter
|
||||
item-text="Nat_StaffName"
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Pilih Marketing">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.Nat_StaffNames"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs2>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
label="Telepon"
|
||||
hide-details
|
||||
v-model="selected_doctor.M_DoctorPhone"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs2>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
hide-details
|
||||
style="font-size:12px"
|
||||
label="HP"
|
||||
v-model="selected_doctor.M_DoctorHP"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs2>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
hide-details
|
||||
style="font-size:12px"
|
||||
label="Email"
|
||||
v-model="selected_doctor.M_DoctorEmail"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex ma-1 xs2>
|
||||
<v-text-field
|
||||
@change="changeForm"
|
||||
hide-details
|
||||
style="font-size:12px"
|
||||
placeholder="DD-MM-YYYY"
|
||||
label="Tanggal Lahir"
|
||||
v-model="selected_doctor.M_DoctorDOB"
|
||||
mask="##-##-####"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex ma-1 xs4>
|
||||
<v-select
|
||||
@change="changeForm"
|
||||
hide-details
|
||||
style="font-size:12px"
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xspecialistes"
|
||||
v-model="selected_specialist"
|
||||
label="Spesialis">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider color="warning" class="mt-3"></v-divider>
|
||||
<v-divider color="warning" class="mb-3"></v-divider>
|
||||
<div v-for="(address,index) in xaddresses">
|
||||
<v-layout row>
|
||||
<v-flex xs3 ma-1>
|
||||
<v-text-field disabled style="font-size:12px" v-model="address.M_DoctorAddressNote" label="Label"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs3 ma-1>
|
||||
<v-select
|
||||
@change="changeForm"
|
||||
style="font-size:12px"
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="address.jpas"
|
||||
v-model="address.jpa"
|
||||
hide-details
|
||||
label="JPA"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<v-textarea
|
||||
disabled
|
||||
@change="changeForm"
|
||||
rows='1'
|
||||
auto-grow
|
||||
style="font-size:12px"
|
||||
label="Alamat Lengkap"
|
||||
v-model="address.M_DoctorAddressDescription"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn v-if="xnosave === 1" color="blue darken-1" :disabled="in_saving" flat @click="saveFormDoctor()">Simpan</v-btn>
|
||||
<v-btn color="grey darken-1" flat @click="dialogform = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout>
|
||||
<v-flex xs3>
|
||||
<v-text-field
|
||||
hide-details
|
||||
class="ma-1"
|
||||
label="Kode"
|
||||
@keyup.enter="searchDoctor"
|
||||
outline
|
||||
v-model="code">
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5>
|
||||
<v-text-field
|
||||
hide-details
|
||||
class="ma-1"
|
||||
label="Nama + Alamat + No HP"
|
||||
@keyup.enter="searchDoctor"
|
||||
outline
|
||||
v-model="name">
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-select
|
||||
class="mini-select ma-1"
|
||||
:items="xstatuses"
|
||||
style="font-size:14px"
|
||||
item-text="label"
|
||||
return-object
|
||||
v-model="xselectedstatus"
|
||||
label="Status"
|
||||
outline
|
||||
hide-details>
|
||||
</v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card ma-2>
|
||||
<v-subheader red--text text--lighten-1>
|
||||
<v-layout row>
|
||||
<v-flex class="text-sm-left" xs6>
|
||||
DAFTAR DOKTER YANG BELUM TERKONFIRMASI
|
||||
</v-flex>
|
||||
<v-flex class="text-sm-right" xs6>
|
||||
TOTAL DOKTER ({{xtotal_filter}})
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-subheader>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pb-2>
|
||||
<v-data-table :headers="headers" :items="doctors" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)">
|
||||
<v-btn title="konfirmasi" :disabled="in_saving" @click="newNumber(props.item)" v-if="props.item.M_DoctorIsMarketingConfirm === 'N'" dark style="min-width:20px" small color="teal lighten-3">
|
||||
<v-icon small dark>check</v-icon>
|
||||
</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)">
|
||||
<p class="mb-0">{{ props.item.M_DoctorOldCode}}</p>
|
||||
<p class="font-weight-black mb-0">{{ props.item.M_DoctorCode}}</p>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)">
|
||||
{{ props.item.doctor_fullname}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)"
|
||||
v-html="reHTMLAddress(props.item.doctor_address)"
|
||||
>
|
||||
|
||||
</td>
|
||||
<td class="text-xs-center pa-2"
|
||||
v-bind:class="{'amber lighten-4':isSelected(props.item)}"
|
||||
@click="selectMe(props.item)">
|
||||
<v-btn title="pergabungan" :disabled="in_saving" style="min-width:20px" class="mr-1" @click="confirmDoctor(props.item)" small color="teal lighten-3">
|
||||
<v-icon small class="white--text">person_add</v-icon>
|
||||
</v-btn>
|
||||
<v-btn title="edit" :disabled="in_saving" dark style="min-width:20px" class="ml-1" @click="openForm(props.item)" small color="purple">
|
||||
<v-icon small dark>edit</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination style="margin-top:10px;margin-bottom:10px;margin-right:10px" v-model="curr_page" :length="xtotal_page"></v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="opendialoginfo = false"></one-dialog-info>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()"
|
||||
@close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<v-dialog v-model="dialogdoctor" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Konfirmasi Dokter {{this.doctorname}}</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formdoctor">
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field readonly v-model="oldcode" label="Kode Lama"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field readonly v-model="newcode" label="Kode Baru"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" :disabled="in_saving" flat @click="saveFormDoctor()">Konfirmasi</v-btn>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormDoctor()">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.searchbox .v-btn {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,
|
||||
table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-dialog-info': httpVueLoader('../../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert': httpVueLoader('../../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("doctor/getsexreg", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
date: this.xstartdate,
|
||||
status: this.xselectedstatus.value,
|
||||
branch: this.selected_filter_branch.M_BranchCode,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
reHTMLAddress(xxaddresses){
|
||||
var rtn = ''
|
||||
if(xxaddresses && xxaddresses !== ''){
|
||||
var peraddress = xxaddresses.split("+")
|
||||
peraddress.forEach(function(entry) {
|
||||
var perpart = entry.split("^")
|
||||
rtn += "<p class='mb-0 font-weight-black' style='font-size:11px'>"+perpart[0].toUpperCase()+"</p>"
|
||||
rtn += "<p class='mb-1 caption mono'>"+perpart[1]+"</p>"
|
||||
})
|
||||
}
|
||||
|
||||
return rtn
|
||||
},
|
||||
changeForm(){
|
||||
this.$store.commit("doctor/update_no_save", 1)
|
||||
},
|
||||
newNumber(row){
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
row.code = this.code
|
||||
row.name = this.name
|
||||
row.date = this.xstartdate
|
||||
row.status = this.xselectedstatus.value
|
||||
row.branch = this.selected_filter_branch.M_BranchCode
|
||||
row.lastid = -1
|
||||
row.current_page = 1
|
||||
this.$store.dispatch("doctor/getnewcode",row)
|
||||
},
|
||||
openForm(row){
|
||||
this.$store.commit("doctor/update_no_save", 0)
|
||||
this.$store.commit("doctor/update_selected_doctor", row)
|
||||
this.xsex = {
|
||||
M_SexID: row.M_DoctorM_SexID,
|
||||
m_sexname: row.M_SexName
|
||||
}
|
||||
var xstaffs = [{
|
||||
Nat_StaffID: row.M_DoctorM_StaffID,
|
||||
Nat_StaffName: row.Nat_StaffName
|
||||
}]
|
||||
this.$store.commit("doctor/update_staffs", xstaffs)
|
||||
this.xstaff = {
|
||||
Nat_StaffID: row.M_DoctorM_StaffID,
|
||||
Nat_StaffName: row.Nat_StaffName
|
||||
}
|
||||
this.xreligion = {
|
||||
M_ReligionID: row.M_DoctorM_ReligionID,
|
||||
M_ReligionName: row.M_ReligionName
|
||||
}
|
||||
this.selected_specialist = {
|
||||
id:row.M_DoctorM_SpecialistID,
|
||||
name:row.M_SpecialistName
|
||||
}
|
||||
this.$store.dispatch("doctor/getaddress", {
|
||||
id: row.M_DoctorID
|
||||
})
|
||||
this.dialogform = true
|
||||
},
|
||||
formatDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [day, month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.M_DoctorID == this.$store.state.doctor.selected_doctor.M_DoctorID
|
||||
},
|
||||
searchDoctor() {
|
||||
this.$store.dispatch("doctor/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
date: this.xstartdate,
|
||||
status: this.xselectedstatus.value,
|
||||
branch: this.selected_filter_branch.M_BranchCode,
|
||||
current_page: 1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.commit("doctor/update_current_page", 1)
|
||||
},
|
||||
selectMe(doc) {
|
||||
this.$store.commit("doctor/update_selected_doctor", doc)
|
||||
this.$store.commit("doctor/update_preffix", doc.M_DoctorPrefix)
|
||||
this.$store.commit("doctor/update_doctor_name", doc.M_DoctorName)
|
||||
this.$store.commit("doctor/update_suffix", doc.M_DoctorSufix)
|
||||
this.$store.commit("doctor/update_selected_sex", {
|
||||
M_SexID: doc.M_DoctorM_SexID,
|
||||
m_sexname: doc.M_SexName
|
||||
})
|
||||
this.$store.commit("doctor/update_selected_branch", {
|
||||
M_BranchCode: doc.M_BranchCode,
|
||||
M_BranchName: doc.M_BranchName
|
||||
})
|
||||
this.$store.commit("doctor/update_selected_religion", {
|
||||
M_ReligionID: doc.M_DoctorM_ReligionID,
|
||||
M_ReligionName: doc.M_ReligionName
|
||||
})
|
||||
this.$store.commit("doctor/update_phone", doc.M_DoctorPhone)
|
||||
this.$store.commit("doctor/update_email", doc.M_DoctorEmail)
|
||||
this.$store.commit("doctor/update_hp", doc.M_DoctorHP)
|
||||
this.$store.commit("doctor/update_note", doc.M_DoctorNote)
|
||||
this.$store.commit("doctor/update_pj", doc.M_DoctorIsPJ)
|
||||
this.$store.commit("doctor/update_dpj", doc.M_DoctorIsDefaultPJ)
|
||||
this.$store.commit("doctor/update_clinic", doc.M_DoctorIsClinic)
|
||||
this.$store.commit("doctor/update_marketing_confirm", doc.M_DoctorIsMarketingConfirm)
|
||||
this.$store.commit("doctor/update_is_default", doc.M_DoctorIsDefault)
|
||||
this.$store.commit("doctor/update_is_default_email", doc.M_DoctorEmailIsDefault)
|
||||
|
||||
this.$store.commit("doctor/update_act", 'edit')
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("doctor/update_no_save", 0)
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("doctor/update_alert_success", val)
|
||||
},
|
||||
setNewDoctor() {
|
||||
this.$store.commit("doctor/update_selected_doctor", {})
|
||||
this.$store.commit("doctor/update_preffix", '')
|
||||
this.$store.commit("doctor/update_doctor_name", '')
|
||||
this.$store.commit("doctor/update_suffix", '')
|
||||
this.$store.commit("doctor/update_selected_sex", {})
|
||||
this.$store.commit("doctor/update_selected_religion", {})
|
||||
this.$store.commit("doctor/update_phone", '')
|
||||
this.$store.commit("doctor/update_email", '')
|
||||
this.$store.commit("doctor/update_hp", '')
|
||||
this.$store.commit("doctor/update_note", '')
|
||||
this.$store.commit("doctor/update_pj", 'N')
|
||||
this.$store.commit("doctor/update_dpj", 'N')
|
||||
this.$store.commit("doctor/update_clinic", 'N')
|
||||
this.$store.commit("doctor/update_marketing_confirm", 'N')
|
||||
this.$store.commit("doctor/update_is_default", 'N')
|
||||
this.$store.commit("doctor/update_addresses", [])
|
||||
|
||||
this.$store.commit("doctor/update_act", 'new')
|
||||
},
|
||||
saveFormDoctor() {
|
||||
console.log(this.xstaff)
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
var xprm = this.$store.state.doctor.selected_doctor
|
||||
xprm.M_DoctorM_SexID = this.xsex.M_SexID
|
||||
xprm.M_SexName = this.xsex.m_sexname
|
||||
xprm.M_DoctorM_StaffID = this.xstaff.Nat_StaffID
|
||||
xprm.M_DoctorM_StaffNIK = this.xstaff.Nat_StaffNIK
|
||||
xprm.Nat_StaffName = this.xstaff.Nat_StaffName
|
||||
xprm.M_DoctorM_ReligionID = this.xreligion.M_ReligionID
|
||||
xprm.M_ReligionName = this.xreligion.M_ReligionName
|
||||
xprm.M_DoctorM_SpecialistID = this.selected_specialist.id
|
||||
xprm.M_SpecialistName = this.selected_specialist.name
|
||||
xprm.addresses = this.xaddresses
|
||||
xprm.current_page = this.curr_page
|
||||
xprm.lastid = xprm.M_DoctorID
|
||||
xprm.code = this.code
|
||||
xprm.name = this.name
|
||||
xprm.date = this.xstartdate
|
||||
xprm.status = this.xselectedstatus.value
|
||||
xprm.branch = this.selected_filter_branch.M_BranchCode
|
||||
|
||||
//var xDate = moment(xprm.M_DoctorDOB, 'DDMMYYYY', true)
|
||||
//var isValidDate = xDate.isValid()
|
||||
//if(isValidDate)
|
||||
this.$store.dispatch("doctor/save",xprm)
|
||||
},
|
||||
closeDialogSuccess() {
|
||||
let arrdoctor = this.$store.state.doctor.doctors
|
||||
var idx = _.findIndex(arrdoctor, item => item.M_DoctorID === this.$store.state.doctor.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("doctor/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
date: this.xstartdate,
|
||||
status: this.xselectedstatus.value,
|
||||
branch: this.selected_filter_branch.M_BranchCode,
|
||||
current_page: this.curr_page,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("doctor/update_dialog_success", false)
|
||||
},
|
||||
confirmDoctor(data) {
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
var xprm = data
|
||||
xprm.current_page = this.curr_page
|
||||
xprm.lastid = -1
|
||||
xprm.code = this.code
|
||||
xprm.name = this.name
|
||||
xprm.date = this.xstartdate
|
||||
xprm.status = this.xselectedstatus.value
|
||||
xprm.branch = this.selected_filter_branch.M_BranchCode
|
||||
if(!_.isEmpty(this.$store.state.doctor.selected_doctor_right)){
|
||||
xprm.attacth_code = this.$store.state.doctor.selected_doctor_right.M_DoctorCode
|
||||
this.$store.dispatch("doctor/attachdoctor",xprm)
|
||||
}
|
||||
else{
|
||||
this.in_saving = false;
|
||||
var msginfo = "Bingung dong, mau diikutkan sama siapa ... pilih dulu ya yang sebelah kanan"
|
||||
this.$store.commit("doctor/update_msg_info", msginfo)
|
||||
this.opendialoginfo = true
|
||||
}
|
||||
},
|
||||
updateDialogFormDoctor() {
|
||||
this.$store.commit("doctor/update_dialog_form_doctor", false)
|
||||
},
|
||||
thr_search_staff: _.debounce(function () {
|
||||
this.$store.dispatch("doctor/searchstaff", this.search_staff)
|
||||
}, 2000),
|
||||
thr_search_city: _.debounce( function () {
|
||||
this.$store.dispatch("doctor/searchcity",this.search_city)
|
||||
},2000),
|
||||
},
|
||||
computed: {
|
||||
xnosave(){
|
||||
return this.$store.state.doctor.no_save
|
||||
},
|
||||
xaddresses(p) {
|
||||
return this.$store.state.doctor.addresses
|
||||
},
|
||||
xcities(){
|
||||
return this.$store.state.doctor.cities
|
||||
},
|
||||
labeladdress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.label_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_label_address",val)
|
||||
}
|
||||
},
|
||||
cityaddress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.city_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_city_address",val)
|
||||
this.$store.dispatch("doctor/getdistrict",this.$store.state.doctor.city_address)
|
||||
}
|
||||
},
|
||||
xdistricts(){
|
||||
return this.$store.state.doctor.districts
|
||||
},
|
||||
districtaddress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.district_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_district_address",val)
|
||||
this.$store.dispatch("doctor/getkelurahan",this.$store.state.doctor.district_address)
|
||||
}
|
||||
},
|
||||
xkelurahans(){
|
||||
return this.$store.state.doctor.kelurahans
|
||||
},
|
||||
kelurahanaddress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.kelurahan_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_kelurahan_address",val)
|
||||
}
|
||||
},
|
||||
xjpas(){
|
||||
return this.$store.state.doctor.jpas
|
||||
},
|
||||
jpaaddress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.jpa_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_jpa_address",val)
|
||||
}
|
||||
},
|
||||
descriptionaddress:{
|
||||
get() {
|
||||
return this.$store.state.doctor.description_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_description_address",val)
|
||||
}
|
||||
},
|
||||
selected_doctor: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_doctor", val)
|
||||
}
|
||||
},
|
||||
xspecialistes() {
|
||||
return this.$store.state.doctor.specialistes
|
||||
},
|
||||
xsexes() {
|
||||
return this.$store.state.doctor.sexes
|
||||
},
|
||||
xreligions() {
|
||||
return this.$store.state.doctor.religions
|
||||
},
|
||||
xstaffs() {
|
||||
return this.$store.state.doctor.staffs
|
||||
},
|
||||
xstaff: {
|
||||
get() {
|
||||
return this.$store.state.doctor.staff
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_staff", val)
|
||||
}
|
||||
},
|
||||
dialogdoctor() {
|
||||
return this.$store.state.doctor.dialog_form_doctor
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.xstartdate)
|
||||
},
|
||||
xstartdate: {
|
||||
get() {
|
||||
return this.$store.state.doctor.startdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_startdate", val)
|
||||
this.searchDoctor()
|
||||
}
|
||||
},
|
||||
in_saving: {
|
||||
get() {
|
||||
return this.$store.state.doctor.in_saving
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_in_saving", val)
|
||||
}
|
||||
},
|
||||
selected_filter_branch: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_filter_branch
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_filter_branch", val)
|
||||
this.searchDoctor()
|
||||
}
|
||||
},
|
||||
branchs: {
|
||||
get() {
|
||||
return this.$store.state.doctor.branchs
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_branchs", val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.doctor.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.doctor.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.doctor.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.doctor.search_status == 1
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.doctor.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_status", val)
|
||||
this.searchDoctor()
|
||||
}
|
||||
},
|
||||
doctors() {
|
||||
return this.$store.state.doctor.doctors
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.doctor.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
totaldoctor() {
|
||||
return this.$store.state.doctor.total_doctor
|
||||
},
|
||||
totaldoctorfilter() {
|
||||
return this.$store.state.doctor.total_doctorfilter
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.doctor.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_current_page", val)
|
||||
this.$store.dispatch("doctor/search", {
|
||||
code: this.code,
|
||||
name: this.name,
|
||||
date: this.xstartdate,
|
||||
status: this.xselectedstatus.value,
|
||||
branch: this.selected_filter_branch.M_BranchCode,
|
||||
current_page: val,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
newcode: {
|
||||
get() {
|
||||
return this.$store.state.doctor.newcode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_newcode", val)
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.doctor.total_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_total_doctor", val)
|
||||
}
|
||||
},
|
||||
xtotal_filter: {
|
||||
get() {
|
||||
return this.$store.state.doctor.total_filterdoctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_total_filterdoctor", val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.doctor.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_open_dialog_info", val)
|
||||
}
|
||||
},
|
||||
msginfo() {
|
||||
return this.$store.state.doctor.msg_info
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
search_staff(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.doctor.update_autocomplete_status == 1) return
|
||||
this.thr_search_staff()
|
||||
},
|
||||
search_city(val,old) {
|
||||
if (val == old ) return
|
||||
if (! val) return
|
||||
if (val.length < 1 ) return
|
||||
if (this.$store.state.doctor.update_autocomplete_status == 1 ) return
|
||||
this.thr_search_city()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogform:false,
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
xsex:{},
|
||||
xreligion:{},
|
||||
selected_specialist:{},
|
||||
search_staff:'',
|
||||
search_city:'',
|
||||
code: '',
|
||||
name: '',
|
||||
xid: 0,
|
||||
doctorname: '',
|
||||
oldcode: '',
|
||||
menufilterdatestart: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
page: 1,
|
||||
total_pages: 5,
|
||||
headers: [
|
||||
{
|
||||
text: "",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "5%",
|
||||
class: "pa-2 orange lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 orange lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "20%",
|
||||
class: "pa-2 orange lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAMAT",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "30%",
|
||||
class: "pa-2 orange lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "12%",
|
||||
class: "pa-2 orange lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'M_DoctorName',
|
||||
totalItems: this.$store.state.doctor.total_doctor
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
93
one-ui/masterdata/one-doctor-v4/index.php
Normal file
93
one-ui/masterdata/one-doctor-v4/index.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/icomoon-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content style="background:#F5E8DF!important" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-md-doctor-nonconfirm-list></one-md-doctor-nonconfirm-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<one-md-doctor-confirm-list></one-md-doctor-confirm-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../libs/vendor/numeral.min.js"></script>
|
||||
<script src="../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../libs/vendor/vue.js"></script>
|
||||
<script src="../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../libs/vendor/httpVueLoader.js"></script>
|
||||
<script src="../../libs/one_global.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
window.calculate_age = function (inp_dob) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(inp_dob))
|
||||
var year = now.diff(dob,'years')
|
||||
dob.add(year,'years')
|
||||
var month = now.diff(dob,'months')
|
||||
dob.add(month,'months')
|
||||
var day = now.diff(dob,'days')
|
||||
if (isNaN(year)) return ''
|
||||
return `${year} tahun ${month} bulan ${day} hari`
|
||||
}
|
||||
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
methods: {
|
||||
tab_selected : function(tab) {
|
||||
return this.$store.state.tab_selected == tab
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../apps/components/oneFooter.vue'),
|
||||
'one-md-doctor-nonconfirm-list': httpVueLoader('./components/oneMdDoctorNonConfirmList.vue'),
|
||||
'one-md-doctor-confirm-list': httpVueLoader('./components/oneMdDoctorConfirmList.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
859
one-ui/masterdata/one-doctor-v4/modules/doctor.js
Normal file
859
one-ui/masterdata/one-doctor-v4/modules/doctor.js
Normal file
@@ -0,0 +1,859 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/doctor.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_doctor: 0,
|
||||
search_doctorconfirm: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
statuses:[{label:'Belum konfirmasi', value:'N'},{label:'Sudah konfirmasi', value:'Y'}],
|
||||
selected_status:{label:'Belum konfirmasi', value:'N'},
|
||||
preffix:'',
|
||||
preffix2:'',
|
||||
doctor_name:'',
|
||||
suffix:'',
|
||||
suffix2:'',
|
||||
suffix3:'',
|
||||
doctors: [],
|
||||
total_doctors:0,
|
||||
doctorsconfirm: [],
|
||||
total_doctorsconfirm:0,
|
||||
doctor_address: [],
|
||||
sexes:[],
|
||||
selected_sex:{},
|
||||
religions:[],
|
||||
selected_religion:{},
|
||||
branchs:[],
|
||||
selected_branch:{},
|
||||
phone:'',
|
||||
hp:'',
|
||||
note:'',
|
||||
email:'',
|
||||
is_default_email:'',
|
||||
pj:'N',
|
||||
dpj:'N',
|
||||
clinic:'N',
|
||||
is_default:'N',
|
||||
marketing_confirm:'N',
|
||||
total_doctor: 0,
|
||||
total_doctorconfirm: 0,
|
||||
total_filterdoctor: 0,
|
||||
selected_doctor: {
|
||||
M_DoctorPrefix:'',
|
||||
M_DoctorPrefix2:'',
|
||||
M_DoctorName:'',
|
||||
M_DoctorSufix:'',
|
||||
M_DoctorSufix2:'',
|
||||
M_DoctorSufix3:'',
|
||||
M_DoctorPhone:'',
|
||||
M_DoctorEmail:'',
|
||||
M_DoctorHP:''
|
||||
},
|
||||
selected_doctor_right:{},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
open_alert_confirmation:false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
dialog_success: false,
|
||||
dialog_confirmation_delete: false,
|
||||
msg_confirmation_delete: "",
|
||||
dialog_confirmation_delete_addr: false,
|
||||
msg_confirmation_delete_addr: "",
|
||||
autocomplete_status:0,
|
||||
dialog_form_address: false,
|
||||
label_address:'',
|
||||
addresses:[],
|
||||
cities:[],
|
||||
city_address:{},
|
||||
districts:[],
|
||||
district_address:{},
|
||||
kelurahans:[],
|
||||
kelurahan_address:{},
|
||||
jpas:[],
|
||||
jpa_address:{},
|
||||
description_address:'',
|
||||
errors:[],
|
||||
current_page:1,
|
||||
current_pageconfirm:1,
|
||||
open_dialog_info:false,
|
||||
msg_info:'',
|
||||
selected_filter_branch:{},
|
||||
startdate:moment(new Date()).format('YYYY-MM-DD'),
|
||||
dialog_form_doctor: false,
|
||||
newcode: '',
|
||||
in_saving: false,
|
||||
staffs:[],
|
||||
staff:{},
|
||||
dob:'',
|
||||
specialistes:[]
|
||||
},
|
||||
mutations: {
|
||||
update_selected_doctor_right(state, val) {
|
||||
state.selected_doctor_right = val
|
||||
},
|
||||
update_dob(state, val) {
|
||||
state.dob = val
|
||||
},
|
||||
update_specialistes(state, val) {
|
||||
state.specialistes = val
|
||||
},
|
||||
update_staffs(state, val) {
|
||||
state.staffs = val
|
||||
},
|
||||
update_staff(state, val) {
|
||||
state.staff = val
|
||||
},
|
||||
update_in_saving(state, val) {
|
||||
state.in_saving = val
|
||||
},
|
||||
update_newcode(state, val) {
|
||||
state.newcode = val
|
||||
},
|
||||
update_dialog_form_doctor(state, val) {
|
||||
state.dialog_form_doctor = val
|
||||
},
|
||||
update_startdate(state,val){
|
||||
state.startdate = val
|
||||
},
|
||||
update_selected_filter_branch(state, val) {
|
||||
state.selected_filter_branch = val
|
||||
},
|
||||
update_msg_info(state, val) {
|
||||
state.msg_info = val
|
||||
},
|
||||
update_open_dialog_info(state, val) {
|
||||
state.open_dialog_info = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_doctor(state, doctor) {
|
||||
state.search_doctor = doctor
|
||||
},
|
||||
update_search_doctorconfirm(state, doctor) {
|
||||
state.search_doctorconfirm = doctor
|
||||
},
|
||||
update_preffix(state, val) {
|
||||
state.preffix = val
|
||||
},
|
||||
update_preffix2(state, val) {
|
||||
state.preffix2 = val
|
||||
},
|
||||
update_doctor_name(state, val) {
|
||||
state.doctor_name = val
|
||||
},
|
||||
update_suffix(state, val) {
|
||||
state.suffix = val
|
||||
},
|
||||
update_suffix2(state, val) {
|
||||
state.suffix2 = val
|
||||
},
|
||||
update_suffix3(state, val) {
|
||||
state.suffix3 = val
|
||||
},
|
||||
update_doctors(state, data) {
|
||||
state.doctors = data
|
||||
},
|
||||
update_doctorsconfirm(state, data) {
|
||||
state.doctorsconfirm = data
|
||||
},
|
||||
update_selected_status(state, val) {
|
||||
state.selected_status = val
|
||||
},
|
||||
update_selected_doctor(state, val) {
|
||||
state.selected_doctor = val
|
||||
},
|
||||
update_sexes(state, val) {
|
||||
state.sexes = val
|
||||
},
|
||||
update_selected_sex(state, val) {
|
||||
state.selected_sex = val
|
||||
},
|
||||
update_religions(state, val) {
|
||||
state.religions = val
|
||||
},
|
||||
update_selected_religion(state, val) {
|
||||
state.selected_religion = val
|
||||
},
|
||||
update_branchs(state, val) {
|
||||
state.branchs = val
|
||||
},
|
||||
update_selected_branch(state, val) {
|
||||
state.selected_branch = val
|
||||
},
|
||||
update_phone(state, val) {
|
||||
state.phone = val
|
||||
},
|
||||
update_is_default_email(state, val) {
|
||||
state.is_default_email = val
|
||||
},
|
||||
update_email(state, val) {
|
||||
state.email = val
|
||||
},
|
||||
update_hp(state, val) {
|
||||
state.hp = val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val
|
||||
},
|
||||
update_pj(state, val) {
|
||||
state.pj = val
|
||||
},
|
||||
update_dpj(state, val) {
|
||||
state.dpj = val
|
||||
},
|
||||
update_clinic(state, val) {
|
||||
state.clinic = val
|
||||
},
|
||||
update_marketing_confirm(state, val) {
|
||||
state.marketing_confirm = val
|
||||
},
|
||||
update_is_default(state, val) {
|
||||
state.is_default = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
update_open_alert_confirmation(state, val) {
|
||||
state.open_alert_confirmation = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_dialog_success(state, val) {
|
||||
state.dialog_success = val
|
||||
},
|
||||
update_dialog_confirmation_delete(state, val) {
|
||||
state.dialog_confirmation_delete = val
|
||||
},
|
||||
update_msg_confirmation_delete(state, val) {
|
||||
state.msg_confirmation_delete = val
|
||||
},
|
||||
update_dialog_confirmation_delete_addr(state, val) {
|
||||
state.dialog_confirmation_delete_addr = val
|
||||
},
|
||||
update_msg_confirmation_delete_addr(state, val) {
|
||||
state.msg_confirmation_delete_addr = val
|
||||
},
|
||||
update_addresses(state, val) {
|
||||
state.addresses = val
|
||||
},
|
||||
update_autocomplete_status(state,val){
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_dialog_form_address(state, val) {
|
||||
state.dialog_form_address = val
|
||||
},
|
||||
update_label_address(state, val) {
|
||||
state.label_address = val
|
||||
},
|
||||
update_cities(state, val) {
|
||||
state.cities = val
|
||||
},
|
||||
update_city_address(state, val) {
|
||||
state.city_address = val
|
||||
},
|
||||
update_districts(state, val) {
|
||||
state.districts = val
|
||||
},
|
||||
update_district_address(state, val) {
|
||||
state.district_address = val
|
||||
},
|
||||
update_kelurahans(state, val) {
|
||||
state.kelurahans = val
|
||||
},
|
||||
update_kelurahan_address(state, val) {
|
||||
state.kelurahan_address = val
|
||||
},
|
||||
update_jpas(state, val) {
|
||||
state.jpas = val
|
||||
},
|
||||
update_jpa_address(state, val) {
|
||||
state.jpa_address = val
|
||||
},
|
||||
update_description_address(state, val) {
|
||||
state.description_address = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_doctor(state, val) {
|
||||
state.total_doctor = val
|
||||
},
|
||||
update_total_filterdoctor(state, val) {
|
||||
state.total_filterdoctor = val
|
||||
},
|
||||
update_total_doctorconfirm(state, val) {
|
||||
state.total_doctorconfirm = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_current_pageconfirm(state, val) {
|
||||
state.current_pageconfirm = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_doctor", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_doctor", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_doctor", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_filter: resp.data.total_filter
|
||||
}
|
||||
context.commit("update_doctors", data.records)
|
||||
console.log(data.total)
|
||||
context.commit("update_total_doctor", data.total)
|
||||
context.commit("update_total_filterdoctor", data.total_filter)
|
||||
context.commit("update_no_save", 0)
|
||||
//context.commit("update_selected_doctor",{})
|
||||
if(data.records.length > 0){
|
||||
var doc = {}
|
||||
if(prm.lastid === -1){
|
||||
console.log("minsatu")
|
||||
context.commit("update_selected_doctor", data.records[0])
|
||||
doc = data.records[0]
|
||||
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_doctor", data.records[prm.lastid])
|
||||
doc = data.records[prm.lastid]
|
||||
|
||||
}
|
||||
|
||||
context.commit("update_preffix",doc.M_DoctorPrefix)
|
||||
context.commit("update_preffix2",doc.M_DoctorPrefix2)
|
||||
context.commit("update_doctor_name",doc.M_DoctorName)
|
||||
context.commit("update_suffix",doc.M_DoctorSufix)
|
||||
context.commit("update_suffix2",doc.M_DoctorSufix2)
|
||||
context.commit("update_suffix3",doc.M_DoctorSufix3)
|
||||
context.commit("update_selected_sex",{M_SexID:doc.M_DoctorM_SexID,m_sexname:doc.M_SexName})
|
||||
context.commit("update_selected_branch",{M_BranchCode:doc.M_BranchCode,M_BranchName:doc.M_BranchName})
|
||||
context.commit("update_selected_religion",{M_ReligionID:doc.M_DoctorM_ReligionID,M_ReligionName:doc.M_ReligionName})
|
||||
context.commit("update_phone",doc.M_DoctorPhone)
|
||||
context.commit("update_email",doc.M_DoctorEmail)
|
||||
context.commit("update_hp",doc.M_DoctorHP)
|
||||
context.commit("update_pj",doc.M_DoctorIsPJ)
|
||||
context.commit("update_dpj",doc.M_DoctorIsDefaultPJ)
|
||||
context.commit("update_clinic",doc.M_DoctorIsClinic)
|
||||
context.commit("update_marketing_confirm",doc.M_DoctorIsMarketingConfirm)
|
||||
context.commit("update_is_default",doc.M_DoctorIsDefault)
|
||||
}else{
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_preffix2",'')
|
||||
context.commit("update_doctor_name",'')
|
||||
context.commit("update_suffix",'')
|
||||
context.commit("update_suffix2",'')
|
||||
context.commit("update_suffix3",'')
|
||||
context.commit("update_selected_sex",{})
|
||||
context.commit("update_selected_branch",{})
|
||||
context.commit("update_selected_religion",{})
|
||||
context.commit("update_phone",'')
|
||||
context.commit("update_email",'')
|
||||
context.commit("update_hp",'')
|
||||
context.commit("update_pj",'N')
|
||||
context.commit("update_dpj",'N')
|
||||
context.commit("update_clinic",'N')
|
||||
context.commit("update_marketing_confirm",'N')
|
||||
context.commit("update_is_default",'')
|
||||
context.commit("update_addresses",[])
|
||||
//context.dispatch("getaddress",{id:doc.M_DoctorID})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_doctor", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async searchconfirm(context, prm) {
|
||||
context.commit("update_search_doctor", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.searchconfirm(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_doctor", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_doctor", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_doctorsconfirm", data.records)
|
||||
console.log(data.total)
|
||||
context.commit("update_total_doctorconfirm", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
//context.commit("update_selected_doctor",{})
|
||||
if(data.records.length > 0){
|
||||
var doc = {}
|
||||
if(prm.lastid === -1){
|
||||
console.log("minsatu")
|
||||
context.commit("update_selected_doctor", data.records[0])
|
||||
doc = data.records[0]
|
||||
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_doctor", data.records[prm.lastid])
|
||||
doc = data.records[prm.lastid]
|
||||
|
||||
}
|
||||
|
||||
context.commit("update_preffix",doc.M_DoctorPrefix)
|
||||
context.commit("update_preffix2",doc.M_DoctorPrefix2)
|
||||
context.commit("update_doctor_name",doc.M_DoctorName)
|
||||
context.commit("update_suffix",doc.M_DoctorSufix)
|
||||
context.commit("update_suffix2",doc.M_DoctorSufix2)
|
||||
context.commit("update_suffix3",doc.M_DoctorSufix3)
|
||||
context.commit("update_selected_sex",{M_SexID:doc.M_DoctorM_SexID,m_sexname:doc.M_SexName})
|
||||
context.commit("update_selected_branch",{M_BranchCode:doc.M_BranchCode,M_BranchName:doc.M_BranchName})
|
||||
context.commit("update_selected_religion",{M_ReligionID:doc.M_DoctorM_ReligionID,M_ReligionName:doc.M_ReligionName})
|
||||
context.commit("update_phone",doc.M_DoctorPhone)
|
||||
context.commit("update_email",doc.M_DoctorEmail)
|
||||
context.commit("update_hp",doc.M_DoctorHP)
|
||||
context.commit("update_pj",doc.M_DoctorIsPJ)
|
||||
context.commit("update_dpj",doc.M_DoctorIsDefaultPJ)
|
||||
context.commit("update_clinic",doc.M_DoctorIsClinic)
|
||||
context.commit("update_marketing_confirm",doc.M_DoctorIsMarketingConfirm)
|
||||
context.commit("update_is_default",doc.M_DoctorIsDefault)
|
||||
}else{
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_preffix2",'')
|
||||
context.commit("update_doctor_name",'')
|
||||
context.commit("update_suffix",'')
|
||||
context.commit("update_suffix2",'')
|
||||
context.commit("update_suffix3",'')
|
||||
context.commit("update_selected_sex",{})
|
||||
context.commit("update_selected_branch",{})
|
||||
context.commit("update_selected_religion",{})
|
||||
context.commit("update_phone",'')
|
||||
context.commit("update_email",'')
|
||||
context.commit("update_hp",'')
|
||||
context.commit("update_pj",'N')
|
||||
context.commit("update_dpj",'N')
|
||||
context.commit("update_clinic",'N')
|
||||
context.commit("update_marketing_confirm",'N')
|
||||
context.commit("update_is_default",'')
|
||||
context.commit("update_addresses",[])
|
||||
//context.dispatch("getaddress",{id:doc.M_DoctorID})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_doctor", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getsexreg(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getsexreg(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_sexes",data.records.sexes)
|
||||
context.commit("update_religions",data.records.religions)
|
||||
context.commit("update_branchs",data.records.branchs)
|
||||
context.commit("update_selected_filter_branch",data.records.branchs[0])
|
||||
context.commit("update_specialistes",data.records.specialistes)
|
||||
context.commit("update_jpas",data.records.jpas)
|
||||
prm.branch = data.records.branchs[0].M_BranchCode
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getnewcode(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getnewcode(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
newcode: resp.data.newcode
|
||||
}
|
||||
context.commit("update_in_saving", false)
|
||||
context.dispatch("search",prm)
|
||||
//context.commit("update_newcode",data.newcode)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_in_saving", false)
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async removecode(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.removecode(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
newcode: resp.data.newcode
|
||||
}
|
||||
context.commit("update_in_saving", false)
|
||||
context.dispatch("searchconfirm",prm)
|
||||
//context.commit("update_newcode",data.newcode)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_in_saving", false)
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async attachdoctor(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.attachdoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
newcode: resp.data.newcode
|
||||
}
|
||||
context.commit("update_in_saving", false)
|
||||
context.dispatch("search",prm)
|
||||
//context.commit("update_newcode",data.newcode)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_in_saving", false)
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async save(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_no_save", 0)
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_last_id", prm.M_DoctorID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Perubahan data Dokter " + prm.M_DoctorName + " sudah berhasil"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_doctor",false)
|
||||
context.commit("update_in_saving", false)
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async newdoctor(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.newdoctor(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data dokter " + prm.M_DoctorName + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async delete(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.xdelete(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_last_id", 0)
|
||||
context.commit("update_dialog_confirmation_delete",false)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data dokter " + prm.M_DoctorName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_preffix",'')
|
||||
context.commit("update_preffix2",'')
|
||||
context.commit("update_doctor_name",'')
|
||||
context.commit("update_suffix",'')
|
||||
context.commit("update_suffix2",'')
|
||||
context.commit("update_suffix3",'')
|
||||
context.commit("update_selected_sex",{})
|
||||
context.commit("update_selected_religion",{})
|
||||
context.commit("update_selected_branch",{})
|
||||
context.commit("update_phone",'')
|
||||
context.commit("update_email",'')
|
||||
context.commit("update_hp",'')
|
||||
context.commit("update_note",'')
|
||||
context.commit("update_pj",'N')
|
||||
context.commit("update_dpj",'N')
|
||||
context.commit("update_clinic",'N')
|
||||
context.commit("update_marketing_confirm",'N')
|
||||
context.commit("update_is_default",'N')
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_addresses",data.records)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async searchcity(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchcity(one_token(),prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_cities",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async getdistrict(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getdistrict(one_token(),prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_districts",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getkelurahan(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getkelurahan(one_token(),prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_kelurahans",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async getjpa(context) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getjpa(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_jpas",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async searchstaff(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchstaff(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_staffs", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async savenewaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savenewaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_form_address",false)
|
||||
context.commit("update_last_id", prm.M_DoctorAddressM_DoctorID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data alamat dokter " + prm.M_DoctorName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveeditaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveeditaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_form_address",false)
|
||||
context.commit("update_last_id", prm.M_DoctorAddressM_DoctorID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Perubahan data alamat dokter " + prm.M_DoctorName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async deleteaddress(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.deleteaddress(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_confirmation_delete_addr",false)
|
||||
context.commit("update_last_id", prm.M_DoctorAddressM_DoctorID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data alamat "+prm.M_DoctorAddressNote+" dari dokter " + prm.M_DoctorName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
one-ui/masterdata/one-doctor-v4/store.js
Normal file
27
one-ui/masterdata/one-doctor-v4/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import doctor from "./modules/doctor.js";
|
||||
import system from "../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
doctor: doctor,
|
||||
system: system
|
||||
},
|
||||
state: {
|
||||
tab_selected: 'pasien-dokter'
|
||||
},
|
||||
mutations: {
|
||||
change_tab(state, ntab) {
|
||||
state.tab_selected = ntab
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
change_tab(context, ntab) {
|
||||
context.commit('change_tab', ntab)
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user