Flatten nested repos
This commit is contained in:
0
test/vuex/one-queue-admin/action.js
Normal file
0
test/vuex/one-queue-admin/action.js
Normal file
20
test/vuex/one-queue-admin/api/company.js
Normal file
20
test/vuex/one-queue-admin/api/company.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'company/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
82
test/vuex/one-queue-admin/api/counter.js
Normal file
82
test/vuex/one-queue-admin/api/counter.js
Normal file
@@ -0,0 +1,82 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/antrione/";
|
||||
|
||||
export async function loadx() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'counter/loadx');
|
||||
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 + 'counter/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 update(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'counter/update',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 deletex(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'counter/deletex',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
|
||||
};
|
||||
}
|
||||
}
|
||||
24
test/vuex/one-queue-admin/api/delivery.js
Normal file
24
test/vuex/one-queue-admin/api/delivery.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(o_id, p_id, d_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { order_id: o_id, patient_id: p_id, doctor_id: d_id });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
45
test/vuex/one-queue-admin/api/doctor.js
Normal file
45
test/vuex/one-queue-admin/api/doctor.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 searchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
24
test/vuex/one-queue-admin/api/language.js
Normal file
24
test/vuex/one-queue-admin/api/language.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
82
test/vuex/one-queue-admin/api/numbering.js
Normal file
82
test/vuex/one-queue-admin/api/numbering.js
Normal file
@@ -0,0 +1,82 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/antrione/";
|
||||
|
||||
export async function loadx() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'numbering/loadx');
|
||||
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 + 'numbering/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 update(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'numbering/update',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 deletex(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'numbering/deletex',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
|
||||
};
|
||||
}
|
||||
}
|
||||
121
test/vuex/one-queue-admin/api/order.js
Normal file
121
test/vuex/one-queue-admin/api/order.js
Normal file
@@ -0,0 +1,121 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function save(order_id, header, delivery, detail) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/save', {
|
||||
order_id: order_id,
|
||||
header: header,
|
||||
delivery: delivery,
|
||||
detail: detail
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function patientSearch(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
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 doctorSearch(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 doctorSearchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
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 languageSearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
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 deliverySearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
27
test/vuex/one-queue-admin/api/patient.js
Normal file
27
test/vuex/one-queue-admin/api/patient.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
26
test/vuex/one-queue-admin/api/patientaddress.js
Normal file
26
test/vuex/one-queue-admin/api/patientaddress.js
Normal file
@@ -0,0 +1,26 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function getAll(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patientaddress/get_all', {
|
||||
patient_id: id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
39
test/vuex/one-queue-admin/api/payment.js
Normal file
39
test/vuex/one-queue-admin/api/payment.js
Normal file
@@ -0,0 +1,39 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function get_order(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/get_order',{id:id});
|
||||
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 search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/search', {search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
74
test/vuex/one-queue-admin/api/px.js
Normal file
74
test/vuex/one-queue-admin/api/px.js
Normal file
@@ -0,0 +1,74 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/search', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 panel(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/panel', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 get_price(test_id, mou_id, cito) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_price', {
|
||||
test_id:test_id,
|
||||
mou_id:mou_id,
|
||||
cito:cito
|
||||
});
|
||||
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
82
test/vuex/one-queue-admin/api/service.js
Normal file
82
test/vuex/one-queue-admin/api/service.js
Normal file
@@ -0,0 +1,82 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/antrione/";
|
||||
|
||||
export async function loadx() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'service/loadx');
|
||||
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 + 'service/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 update(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'service/update',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 deletex(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'service/deletex',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
|
||||
};
|
||||
}
|
||||
}
|
||||
BIN
test/vuex/one-queue-admin/components/.requirementField.vue.swp
Normal file
BIN
test/vuex/one-queue-admin/components/.requirementField.vue.swp
Normal file
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-mou-px-left></one-mou-px-left>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-price-list></one-fo-registration-price-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-mou-px-left' : httpVueLoader('./oneMouPxLeft.vue'),
|
||||
'one-fo-registration-price-list' : httpVueLoader('./oneFoRegistrationPriceList.vue?ts='
|
||||
+ new Date().toISOString())
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-fo-registration-detail-order></one-fo-registration-detail-order>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-payment></one-fo-registration-payment>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-detail-order' : httpVueLoader('./oneFoRegistrationDetailOrder.vue'),
|
||||
'one-fo-registration-payment' : httpVueLoader('./oneFoRegistrationPayment.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
56
test/vuex/one-queue-admin/components/oneQueueTab.vue
Normal file
56
test/vuex/one-queue-admin/components/oneQueueTab.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12 text-xs-center mb-2>
|
||||
<v-card color="blue lighten-4">
|
||||
<v-card-text class="pb-0 pt-1">
|
||||
<v-btn
|
||||
v-for="tab in tabs"
|
||||
:color="tab.code == active ? 'white' : 'grey lighten-5'"
|
||||
class="white--text ma-0 tab-btn"
|
||||
:class="[tab.code == active ? 'active' : '']"
|
||||
@click="changeTab(tab.code)"
|
||||
flat
|
||||
:key="tab.code"
|
||||
:data="tab"
|
||||
>
|
||||
<!-- <v-icon left dark>{{ tab.icon }}</v-icon> -->
|
||||
<h6 class="title">{{ tab.label }}</h6>
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
border-bottom: solid 3px #ffeb3b!important;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
min-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
tabs : [
|
||||
{"label":"PENGATURAN", "icon":"opacity", "code":"01"},
|
||||
{"label":"PENOMORAN", "icon":"verified_user", "code":"02"}
|
||||
],
|
||||
|
||||
active : "01"
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
changeTab (x) {
|
||||
this.active = x;
|
||||
this.$store.commit('change_tab', x);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
22
test/vuex/one-queue-admin/components/oneQueueTab01.vue
Normal file
22
test/vuex/one-queue-admin/components/oneQueueTab01.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<v-layout row wrap >
|
||||
<v-flex xs12 sm6 fill-height pa-1>
|
||||
|
||||
<queue-admin></queue-admin>
|
||||
</v-flex>
|
||||
<v-flex xs12 sm6 fill-height pa-1>
|
||||
|
||||
<queue-counter></queue-counter>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'queue-admin' : httpVueLoader('./queueAdmin.vue'),
|
||||
'queue-numbering1' : httpVueLoader('./queueNumbering1.vue'),
|
||||
'queue-counter' : httpVueLoader('./queueCounter.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
21
test/vuex/one-queue-admin/components/oneQueueTab02.vue
Normal file
21
test/vuex/one-queue-admin/components/oneQueueTab02.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<v-layout row wrap >
|
||||
<v-flex xs12 sm12 fill-height pa-1>
|
||||
|
||||
<queue-numbering></queue-numbering>
|
||||
</v-flex>
|
||||
|
||||
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'queue-admin' : httpVueLoader('./queueAdmin.vue'),
|
||||
'queue-numbering' : httpVueLoader('./queueNumbering.vue'),
|
||||
'queue-counter' : httpVueLoader('./queueCounter.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
305
test/vuex/one-queue-admin/components/queueAdmin.vue
Normal file
305
test/vuex/one-queue-admin/components/queueAdmin.vue
Normal file
@@ -0,0 +1,305 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialogdeletealert"
|
||||
max-width="30%"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Peringatan !
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row>
|
||||
<v-flex xs12 d-flex>
|
||||
<v-layout row>
|
||||
<v-flex pb-1 xs12>
|
||||
<v-layout row>
|
||||
<v-flex pt-2 pr-2 xs12>
|
||||
{{msgalert}}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialogdeletealert = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="closeDeleteAlert()"
|
||||
>
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:color="color"
|
||||
:timeout="5000"
|
||||
:multi-line="false"
|
||||
:vertical="false"
|
||||
:top="true"
|
||||
|
||||
>
|
||||
{{msgsnackbar}}
|
||||
<v-btn
|
||||
flat
|
||||
@click="updateAlert_success(false)"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>LAYANAN</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="openFormService()" icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-data-table :headers="headers" :items="services" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-align:center" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.serviceCode }}</td>
|
||||
<td style="text-align:left" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.serviceName }}</td>
|
||||
<td style="text-align:center" v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.servicePriority }}</td>
|
||||
<td style="text-align:center" class="justify-center layout px-0">
|
||||
<v-icon color="primary" small class="mr-2" @click="editService(props.item)" > edit </v-icon>
|
||||
<v-icon color="error" small @click="deleteService(props.item)" > delete </v-icon>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="xdialogservice" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Service</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form
|
||||
ref="formservice"
|
||||
v-model="validservice"
|
||||
lazy-validation
|
||||
>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="servicecode" label="Kode Layanan" :rules="servicecodeRules" required></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<p class="error pl-2 pr-2" style="color:#fff" v-if="xerrorcode === true">Udah ada dong kode service yang sama</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="servicename" label="Nama Layanan" :rules="servicenameRules" required></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="servicepriority" label="Prioritas" ></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogService()">Tutup</v-btn>
|
||||
<v-btn v-if="xactservice === 'new'" color="blue darken-1" flat @click="saveFormService()">Simpan</v-btn>
|
||||
<v-btn v-if="xactservice === 'edit'" color="blue darken-1" flat @click="updateFormService()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
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("service/loadx")
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.serviceID == this.$store.state.service.selected_service.serviceID
|
||||
},
|
||||
selectMe(val) {
|
||||
|
||||
},
|
||||
updateDialogService(){
|
||||
this.$store.commit("service/update_dialog_service",false)
|
||||
},
|
||||
openFormService(){
|
||||
this.servicepriority = 1
|
||||
this.$store.commit("service/update_dialog_service",true)
|
||||
},
|
||||
saveFormService(){
|
||||
if (this.$refs.formservice.validate()) {
|
||||
this.$store.dispatch("service/save",{
|
||||
code:this.servicecode,
|
||||
name:this.servicename,
|
||||
priority:this.servicepriority
|
||||
})
|
||||
}
|
||||
},
|
||||
editService(data){
|
||||
this.xid = data.serviceID
|
||||
this.servicecode = data.serviceCode
|
||||
this.servicename = data.serviceName
|
||||
this.servicepriority = data.servicePriority
|
||||
this.$store.commit("service/update_act",'edit')
|
||||
this.$store.commit("service/update_error_code",false)
|
||||
this.$store.commit("service/update_dialog_service",true)
|
||||
},
|
||||
updateFormService(){
|
||||
if (this.$refs.formservice.validate()) {
|
||||
this.$store.dispatch("service/update",{
|
||||
id:this.xid,
|
||||
code:this.servicecode,
|
||||
name:this.servicename,
|
||||
priority:this.servicepriority
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
deleteService(data){
|
||||
this.xid = data.serviceID
|
||||
this.msgalert = "Yakin, mau hapus layanan "+data.serviceName+" ?"
|
||||
this.dialogdeletealert = true
|
||||
},
|
||||
closeDeleteAlert(){
|
||||
this.$store.dispatch("service/deletex",{
|
||||
id:this.xid,
|
||||
name:this.serviceName
|
||||
})
|
||||
this.dialogdeletealert = false
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
xactservice(){
|
||||
return this.$store.state.service.act
|
||||
},
|
||||
xerrorcode(){
|
||||
return this.$store.state.service.error_code
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.service.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("service/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
msgsnackbar(){
|
||||
return this.$store.state.service.msg_success
|
||||
},
|
||||
xdialogservice(){
|
||||
return this.$store.state.service.dialog_service
|
||||
},
|
||||
services() {
|
||||
return this.$store.state.service.services
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.service.load_status == 1
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("service/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
color:"success",
|
||||
validservice:false,
|
||||
servicecode:'',
|
||||
servicename:'',
|
||||
servicepriority:1,
|
||||
servicenameRules: [
|
||||
v => !!v || 'Nama Layanan harus diisi'
|
||||
],
|
||||
servicecodeRules: [
|
||||
v => !!v || 'Kode Layanan harus diisi'
|
||||
],
|
||||
dialogdeletealert:false,
|
||||
msgalert:"",
|
||||
xid:0,
|
||||
headers: [
|
||||
{
|
||||
text: "KODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA LAYANAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PRIORITAS",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
262
test/vuex/one-queue-admin/components/queueCounter.vue
Normal file
262
test/vuex/one-queue-admin/components/queueCounter.vue
Normal file
@@ -0,0 +1,262 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialogdeletealert"
|
||||
max-width="30%"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Peringatan !
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row>
|
||||
<v-flex xs12 d-flex>
|
||||
<v-layout row>
|
||||
<v-flex pb-1 xs12>
|
||||
<v-layout row>
|
||||
<v-flex pt-2 pr-2 xs12>
|
||||
{{msgalert}}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialogdeletealert = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="closeDeleteAlert()"
|
||||
>
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>COUNTER <font color="white">[ IP anda : {{ ownIP }} ]</font> </v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="openFormCounter()" icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-data-table :headers="headers" :items="counters" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.counterCode }}</td>
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}">{{ props.item.counterIP }}</td>
|
||||
<td class="justify-center layout px-0">
|
||||
<v-icon color="primary" small class="mr-2" @click="editCounter(props.item)" > edit </v-icon>
|
||||
<v-icon color="error" small @click="deleteCounter(props.item)" > delete </v-icon> </td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="xdialogcounter" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Counter</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form
|
||||
ref="formcounter"
|
||||
v-model="validcounter"
|
||||
lazy-validation
|
||||
>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="countercode" label="Kode Counter" :rules="countercodeRules" required></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<p class="error pl-2 pr-2" style="color:#fff" v-if="xerrorcode === true">Udah ada dong kode counter yang sama</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="counterip" label="IP Counter" :rules="counteripRules" required></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogCounter()">Tutup</v-btn>
|
||||
<v-btn v-if="xactcounter === 'new'" color="blue darken-1" flat @click="saveFormCounter()">Simpan</v-btn>
|
||||
<v-btn v-if="xactcounter === 'edit'" color="blue darken-1" flat @click="updateFormCounter()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
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("counter/loadx")
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.counterID == this.$store.state.counter.selected_counter.counterID
|
||||
},
|
||||
updateDialogCounter(){
|
||||
this.$store.commit("counter/update_dialog_counter",false)
|
||||
},
|
||||
openFormCounter(){
|
||||
this.counterpriority = 1
|
||||
this.$store.commit("counter/update_dialog_counter",true)
|
||||
},
|
||||
saveFormCounter(){
|
||||
if (this.$refs.formcounter.validate()) {
|
||||
this.$store.dispatch("counter/save",{
|
||||
code:this.countercode,
|
||||
ip:this.counterip
|
||||
})
|
||||
}
|
||||
},
|
||||
editCounter(data){
|
||||
this.xid = data.counterID
|
||||
this.countercode = data.counterCode
|
||||
this.counterip = data.counterIP
|
||||
this.$store.commit("counter/update_act",'edit')
|
||||
this.$store.commit("counter/update_error_code",false)
|
||||
this.$store.commit("counter/update_dialog_counter",true)
|
||||
},
|
||||
updateFormCounter(){
|
||||
if (this.$refs.formcounter.validate()) {
|
||||
this.$store.dispatch("counter/update",{
|
||||
id:this.xid,
|
||||
code:this.countercode,
|
||||
ip:this.counterip
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
deleteCounter(data){
|
||||
this.xid = data.counterID
|
||||
this.msgalert = "Yakin, mau hapus schedule "+data.counterCode+" ?"
|
||||
this.dialogdeletealert = true
|
||||
},
|
||||
closeDeleteAlert(){
|
||||
this.$store.dispatch("counter/deletex",{
|
||||
id:this.xid,
|
||||
name:this.counterCode
|
||||
})
|
||||
this.dialogdeletealert = false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
xactcounter(){
|
||||
return this.$store.state.counter.act
|
||||
},
|
||||
ownIP() {
|
||||
return this.$store.state.service.ownIP
|
||||
},
|
||||
xerrorcode(){
|
||||
return this.$store.state.counter.error_code
|
||||
},
|
||||
xdialogcounter(){
|
||||
return this.$store.state.counter.dialog_counter
|
||||
},
|
||||
counters() {
|
||||
return this.$store.state.counter.counters
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.counter.load_status == 1
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("counter/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
color:"success",
|
||||
validcounter:false,
|
||||
countercode:'',
|
||||
counterip:'',
|
||||
countercodeRules: [
|
||||
v => !!v || 'Kode Counter harus diisi'
|
||||
],
|
||||
counteripRules: [
|
||||
v => !!v || 'IP Counter harus diisi'
|
||||
],
|
||||
dialogdeletealert:false,
|
||||
msgalert:"",
|
||||
xid:0,
|
||||
headers: [
|
||||
{
|
||||
text: "KODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "IP",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "20%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "5%",
|
||||
class: "blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
364
test/vuex/one-queue-admin/components/queueNumbering.vue
Normal file
364
test/vuex/one-queue-admin/components/queueNumbering.vue
Normal file
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialogdeletealert"
|
||||
max-width="30%"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Peringatan !
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row>
|
||||
<v-flex xs12 d-flex>
|
||||
<v-layout row>
|
||||
<v-flex pb-1 xs12>
|
||||
<v-layout row>
|
||||
<v-flex pt-2 pr-2 xs12>
|
||||
{{msgalert}}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialogdeletealert = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="closeDeleteAlert()"
|
||||
>
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<v-toolbar class="pa-1 mb-2" color="blue lighten-3" dark height="50px">
|
||||
<v-toolbar-title>NUMBERING</v-toolbar-title>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="openFormNumbering()" icon>
|
||||
<v-icon>library_add</v-icon>
|
||||
</v-btn>
|
||||
</v-toolbar>
|
||||
|
||||
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-data-table :headers="headers" :items="numberings" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.serviceName }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingPrefix }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingPrefixDate }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingDigit }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingSufix }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingCounter }}</td>
|
||||
<td class="text-sm-center" v-bind:class="{'amber lighten-4':props.item.selected}" >{{ props.item.numberingReset }}</td>
|
||||
<td class="justify-center layout px-0">
|
||||
<v-icon color="primary" small class="mr-2" @click="editNumbering(props.item)" > edit </v-icon>
|
||||
<v-icon color="error" small @click="deleteNumbering(props.item)" > delete </v-icon>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
|
||||
</v-card>
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="xdialognumbering" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Penomoran</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form
|
||||
ref="formnumbering"
|
||||
v-model="validnumbering"
|
||||
lazy-validation
|
||||
>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
item-text="serviceName"
|
||||
return-object
|
||||
:items="xservices"
|
||||
v-model="xservice"
|
||||
label="Layanan"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="prefix" label="Sisipan Awal"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="prefixdate" label="Sisipan Awal Tanggal"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="digit" label="Digit" ></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="sufix" label="Sisipan Akhir" ></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="counter" label="Counter" ></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="reset" label="Reset" ></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogNumbering()">Tutup</v-btn>
|
||||
<v-btn v-if="xactnumbering === 'new'" color="blue darken-1" flat @click="saveFormNumbering()">Simpan</v-btn>
|
||||
<v-btn v-if="xactnumbering === 'edit'" color="blue darken-1" flat @click="updateFormNumbering()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
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("numbering/loadx")
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.numberingID == this.$store.state.numbering.selected_numbering.numberingID
|
||||
},
|
||||
updateDialogNumbering(){
|
||||
this.$store.commit("numbering/update_dialog_numbering",false)
|
||||
},
|
||||
openFormNumbering(){
|
||||
this.$store.commit("service/update_selected_service",{})
|
||||
this.prefix = ''
|
||||
this.prefixdate = ''
|
||||
this.digit = ''
|
||||
this.sufix = ''
|
||||
this.counter = 0
|
||||
this.reset = ''
|
||||
this.$store.commit("numbering/update_dialog_numbering",true)
|
||||
},
|
||||
saveFormNumbering(){
|
||||
if (this.$refs.formnumbering.validate()) {
|
||||
this.$store.dispatch("numbering/save",{
|
||||
serviceid:this.$store.state.service.selected_service.serviceID,
|
||||
prefix:this.prefix,
|
||||
prefixdate:this.prefixdate,
|
||||
digit:this.digit,
|
||||
sufix:this.sufix,
|
||||
counter:this.counter,
|
||||
reset:this.reset
|
||||
})
|
||||
}
|
||||
},
|
||||
editNumbering(data){
|
||||
this.xid = data.numberingID
|
||||
this.$store.commit("service/update_selected_service",{serviceID:data.serviceID,serviceCode:data.serviceCode,serviceName:data.serviceName})
|
||||
this.prefix = data.numberingPrefix
|
||||
this.prefixdate = data.numberingPrefixDate
|
||||
this.digit = data.numberingDigit
|
||||
this.sufix = data.numberingSufix
|
||||
this.counter = data.numberingCounter
|
||||
this.reset = data.numberingReset
|
||||
this.$store.commit("numbering/update_act",'edit')
|
||||
this.$store.commit("numbering/update_error_code",false)
|
||||
this.$store.commit("numbering/update_dialog_numbering",true)
|
||||
},
|
||||
updateFormNumbering(){
|
||||
if (this.$refs.formnumbering.validate()) {
|
||||
this.$store.dispatch("numbering/update",{
|
||||
id:this.xid,
|
||||
serviceid:this.$store.state.service.selected_service.serviceID,
|
||||
prefix:this.prefix,
|
||||
prefixdate:this.prefixdate,
|
||||
digit:this.digit,
|
||||
sufix:this.sufix,
|
||||
counter:this.counter,
|
||||
reset:this.reset
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
deleteNumbering(data){
|
||||
this.xid = data.numberingID
|
||||
this.msgalert = "Yakin, mau hapus numbering "+data.numberingPrefix+" ?"
|
||||
this.dialogdeletealert = true
|
||||
},
|
||||
closeDeleteAlert(){
|
||||
this.$store.dispatch("numbering/deletex",{
|
||||
id:this.xid,
|
||||
name:this.numberingPrefix
|
||||
})
|
||||
this.dialogdeletealert = false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
xactnumbering(){
|
||||
return this.$store.state.numbering.act
|
||||
},
|
||||
xerrorcode(){
|
||||
return this.$store.state.numbering.error_code
|
||||
},
|
||||
xservices(){
|
||||
return this.$store.state.service.services
|
||||
},
|
||||
xservice:{
|
||||
get() {
|
||||
return this.$store.state.service.selected_service
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("service/update_selected_service",val)
|
||||
}
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.numbering.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("numbering/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
msgsnackbar(){
|
||||
return this.$store.state.numbering.msg_success
|
||||
},
|
||||
xdialognumbering(){
|
||||
return this.$store.state.numbering.dialog_numbering
|
||||
},
|
||||
numberings() {
|
||||
return this.$store.state.numbering.numberings
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.numbering.load_status == 1
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("numbering/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
color:"success",
|
||||
validnumbering:false,
|
||||
xid:0,
|
||||
prefix:'',
|
||||
prefixdate:'',
|
||||
digit:'',
|
||||
sufix:'',
|
||||
counter:'',
|
||||
reset:'',
|
||||
dialogdeletealert:false,
|
||||
msgalert:"",
|
||||
headers: [
|
||||
{
|
||||
text: "LABEL PENOMORAN",
|
||||
align: "LEFT",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SISIPAN AWAL",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SISIPAN AWAL TANGGAL",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "DIGIT",
|
||||
align: "CENTER",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SISIPAN AKHIR",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "COUNTER",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "RESET",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "Center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
90
test/vuex/one-queue-admin/fajri.php
Normal file
90
test/vuex/one-queue-admin/fajri.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<!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/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar>
|
||||
</one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<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>
|
||||
<!-- komponen kiri -->
|
||||
<one-mou-px-left></one-mou-px-left>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-price-list></one-fo-registration-price-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>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
function one_money(inp) {
|
||||
return numeral(inp).format('0,000.00')
|
||||
}
|
||||
window.one_money = one_money
|
||||
function one_float(inp) {
|
||||
try {
|
||||
let val = parseFloat(inp)
|
||||
if (isNaN(val)) return 0.0
|
||||
return val
|
||||
} catch(e) {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
window.one_float = one_float
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-mou-px-left' : httpVueLoader('./components/oneMouPxLeft.vue'),
|
||||
'one-fo-registration-price-list' : httpVueLoader('./components/oneFoRegistrationPriceList.vue?ts='
|
||||
+ new Date().toISOString())
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
90
test/vuex/one-queue-admin/index.php
Normal file
90
test/vuex/one-queue-admin/index.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<!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/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<br/>
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5 one" >
|
||||
<v-container fluid pt-2 pb-2 pl-1 pr-1>
|
||||
<v-layout column>
|
||||
<v-flex xs12 shrink>
|
||||
<one-queue-tab></one-queue-tab>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <v-layout> -->
|
||||
<tab-01 v-show="tab_active == '01'"></tab-01>
|
||||
<tab-02 v-show="tab_active == '02'"></tab-02>
|
||||
<!-- </v-layout> -->
|
||||
</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">
|
||||
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
data : {
|
||||
|
||||
},
|
||||
computed : {
|
||||
tab_active () {
|
||||
return store.state.tab_active
|
||||
}
|
||||
},
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-queue-tab': httpVueLoader('./components/oneQueueTab.vue'),
|
||||
'tab-01' : httpVueLoader('./components/oneQueueTab01.vue'),
|
||||
'tab-02' : httpVueLoader('./components/oneQueueTab02.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.v-content.one {
|
||||
//padding:64px 0px 0px !important;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
72
test/vuex/one-queue-admin/modules/company.js
Normal file
72
test/vuex/one-queue-admin/modules/company.js
Normal file
@@ -0,0 +1,72 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/company.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
companies: [],
|
||||
total_company: 0,
|
||||
selected_company: {},
|
||||
selected_mou: {},
|
||||
|
||||
selected_px_tab: 'px'
|
||||
},
|
||||
mutations: {
|
||||
update_selected_px_tab(state,tab) {
|
||||
state.selected_px_tab = tab
|
||||
},
|
||||
|
||||
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_selected_mou(state,val) {
|
||||
state.selected_mou = val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_companies(state,data) {
|
||||
state.companies= data.records
|
||||
state.total_company= data.total
|
||||
},
|
||||
update_selected_company(state,val) {
|
||||
console.log('company aaaaa')
|
||||
console.log('1:'+JSON.stringify(store.state.company.selected_company))
|
||||
state.selected_company=val
|
||||
console.log('2:'+JSON.stringify(store.state.company.selected_company))
|
||||
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_companies",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
175
test/vuex/one-queue-admin/modules/counter.js
Normal file
175
test/vuex/one-queue-admin/modules/counter.js
Normal file
@@ -0,0 +1,175 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/counter.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
act:'new',
|
||||
dialog_counter:false,
|
||||
error_code:false,
|
||||
load_status:0,
|
||||
load_error_message:'',
|
||||
counters: [],
|
||||
total_counter: 0,
|
||||
selected_counter: {},
|
||||
save_status: 0,
|
||||
save_error_message: '',
|
||||
alert_success: false,
|
||||
msg_success: ""
|
||||
},
|
||||
mutations: {
|
||||
update_act(state,val) {
|
||||
state.act = val
|
||||
},
|
||||
update_error_code(state,val) {
|
||||
state.error_code = val
|
||||
},
|
||||
update_dialog_counter(state,val) {
|
||||
state.dialog_counter = val
|
||||
},
|
||||
update_load_status(state,status) {
|
||||
state.load_status = status
|
||||
},
|
||||
update_load_error_message(state,val) {
|
||||
state.load_error_message = val
|
||||
},
|
||||
update_counters(state,data){
|
||||
state.counters = data.records
|
||||
state.total_counter = data.total
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_save_error_message(state, val) {
|
||||
state.save_error_message = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async loadx(context) {
|
||||
context.commit("update_load_status",1)
|
||||
try {
|
||||
let resp= await api.loadx()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_load_status",2)
|
||||
context.commit("update_load_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_counters",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("update_error_code", false)
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
context.commit("update_dialog_counter", false)
|
||||
var msg = "Counter " + prm.code + " sudah tersimpan dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async update(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.update(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("update_error_code", false)
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
context.commit("update_dialog_counter", false)
|
||||
var msg = "Counter " + prm.code + " sudah tersimpan dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async deletex(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.deletex(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
var msg = "Counter " + prm.name + " sudah dihapus dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
83
test/vuex/one-queue-admin/modules/delivery.js
Normal file
83
test/vuex/one-queue-admin/modules/delivery.js
Normal file
@@ -0,0 +1,83 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/delivery.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
deliveries: [],
|
||||
patient_id: 0,
|
||||
doctor_id: 0,
|
||||
order_id: 0,
|
||||
|
||||
checked_id: []
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_deliveries(state,data) {
|
||||
for (var i in data) {
|
||||
if (state.checked_id.indexOf(data[i].idx) > -1)
|
||||
data[i].selected = true
|
||||
else
|
||||
data[i].selected = false
|
||||
}
|
||||
|
||||
state.deliveries = data
|
||||
},
|
||||
update_deliveries_2(state) {
|
||||
for (var i in state.deliveries) {
|
||||
if (state.checked_id.indexOf(state.deliveries[i].idx) > -1)
|
||||
state.deliveries[i].selected = true
|
||||
else
|
||||
state.deliveries[i].selected = false
|
||||
}
|
||||
// state.deliveries= data
|
||||
},
|
||||
update_selected_delivery(state,val) {
|
||||
state.selected_delivery=val
|
||||
},
|
||||
update_params(state, val) {
|
||||
if (val.p_id)
|
||||
state.patient_id = val.p_id;
|
||||
if (val.o_id)
|
||||
state.order_id = val.o_id;
|
||||
if (val.d_id)
|
||||
state.doctor_id = val.d_id;
|
||||
},
|
||||
update_checked_id(state, val) {
|
||||
state.checked_id = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(store.state.delivery.order_id,
|
||||
store.state.delivery.patient_id,
|
||||
store.state.delivery.doctor_id)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_deliveries",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
test/vuex/one-queue-admin/modules/doctor.js
Normal file
120
test/vuex/one-queue-admin/modules/doctor.js
Normal file
@@ -0,0 +1,120 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/doctor.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
doctors: [],
|
||||
total_doctor: 0,
|
||||
selected_doctor: {},
|
||||
selected_address: {},
|
||||
|
||||
doctors_pj: [],
|
||||
selected_doctor_pj : {},
|
||||
search_pj_status: 0,
|
||||
search_pj_error_message: "",
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_doctors(state,data) {
|
||||
state.doctors = data.records
|
||||
state.total_doctor= data.total
|
||||
},
|
||||
update_selected_doctor(state,doc) {
|
||||
state.selected_doctor= doc
|
||||
|
||||
if (!doc) return
|
||||
if (doc.address.length> 0) {
|
||||
state.selected_address = doc.address[0]
|
||||
} else {
|
||||
state.selected_address = {}
|
||||
}
|
||||
},
|
||||
update_selected_address(state,addr) {
|
||||
state.selected_address = addr
|
||||
},
|
||||
update_search_pj_error_message(state,status) {
|
||||
state.search_pj_error_message = status
|
||||
},
|
||||
update_search_pj_status(state,status) {
|
||||
state.search_pj_status = status
|
||||
},
|
||||
update_doctors_pj(state,data) {
|
||||
state.doctors_pj = data.records
|
||||
let flag_found = false
|
||||
data.records.forEach(function(d) {
|
||||
if (d.M_DoctorIsDefaultPJ == 'Y' ) {
|
||||
state.selected_doctor_pj = d
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (! flag_found & data.records.length > 0 ) state.selected_doctor_pj = data.records[0]
|
||||
},
|
||||
update_selected_doctor_pj(state,doc) {
|
||||
state.selected_doctor_pj = doc
|
||||
},
|
||||
|
||||
increment_mounted(state, n) {
|
||||
state.mounted = state.mounted + n;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search_pj(context) {
|
||||
context.commit("update_search_pj_status",1)
|
||||
try {
|
||||
let resp= await api.searchPj()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_pj_status",3)
|
||||
context.commit("update_search_pj_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_pj_status",2)
|
||||
context.commit("update_search_pj_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_doctors_pj",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_pj_status",3)
|
||||
context.commit("update_search_pj_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_doctors",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
51
test/vuex/one-queue-admin/modules/language.js
Normal file
51
test/vuex/one-queue-admin/modules/language.js
Normal file
@@ -0,0 +1,51 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/language.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
languages: [],
|
||||
selected_language: {},
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_languages(state,data) {
|
||||
state.languages= data.records
|
||||
if (data.records.length > 0) state.selected_language = data.records[0]
|
||||
},
|
||||
update_selected_language(state,val) {
|
||||
state.selected_language=val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_languages",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
176
test/vuex/one-queue-admin/modules/numbering.js
Normal file
176
test/vuex/one-queue-admin/modules/numbering.js
Normal file
@@ -0,0 +1,176 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/numbering.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
act:'new',
|
||||
dialog_numbering:false,
|
||||
error_code:false,
|
||||
load_status:0,
|
||||
load_error_message:'',
|
||||
numberings: [],
|
||||
total_numbering: 0,
|
||||
selected_numbering: {},
|
||||
save_status: 0,
|
||||
save_error_message: '',
|
||||
alert_success: false,
|
||||
msg_success: ""
|
||||
},
|
||||
mutations: {
|
||||
update_act(state,val) {
|
||||
state.act = val
|
||||
},
|
||||
update_error_code(state,val) {
|
||||
state.error_code = val
|
||||
},
|
||||
update_dialog_numbering(state,val) {
|
||||
state.dialog_numbering = val
|
||||
},
|
||||
update_load_status(state,status) {
|
||||
state.load_status = status
|
||||
},
|
||||
update_load_error_message(state,val) {
|
||||
state.load_error_message = val
|
||||
},
|
||||
update_numberings(state,data){
|
||||
state.numberings = data.records
|
||||
state.total_numbering = data.total
|
||||
},
|
||||
update_selected_numbering(state,val) {
|
||||
state.selected_numbering = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_save_error_message(state, val) {
|
||||
state.save_error_message = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async loadx(context) {
|
||||
context.commit("update_load_status",1)
|
||||
try {
|
||||
let resp= await api.loadx()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_load_status",2)
|
||||
context.commit("update_load_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_numberings",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
context.commit("update_dialog_numbering", false)
|
||||
var msg = "Service " + prm.prefix + " sudah tersimpan dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async update(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.update(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
context.commit("update_dialog_numbering", false)
|
||||
var msg = "Service " + prm.prefix + " sudah tersimpan dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async deletex(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.deletex(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("service/update_alert_success", true, { root: true })
|
||||
var msg = "Service " + prm.name + " sudah dihapus dong ..."
|
||||
context.commit("service/update_msg_success", msg, { root: true })
|
||||
context.dispatch("loadx")
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
112
test/vuex/one-queue-admin/modules/order.js
Normal file
112
test/vuex/one-queue-admin/modules/order.js
Normal file
@@ -0,0 +1,112 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/order.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
catatan_fo:'',
|
||||
diagnosa:'',
|
||||
patient_note: '',
|
||||
|
||||
finish_dialog_is_active: false,
|
||||
current_order: {},
|
||||
|
||||
received_sample: 'N'
|
||||
},
|
||||
mutations: {
|
||||
update_patient_note(state,val) {
|
||||
state.patient_note=val
|
||||
},
|
||||
update_catatan_fo(state,val) {
|
||||
state.catatan_fo=val
|
||||
},
|
||||
update_diagnosa(state,val) {
|
||||
state.diagnosa=val
|
||||
},
|
||||
update_finish_dialog_is_active(state, val) {
|
||||
state.finish_dialog_is_active = val
|
||||
},
|
||||
update_current_order(state, val) {
|
||||
state.current_order = val
|
||||
},
|
||||
|
||||
update_received_sample(state, val) {
|
||||
state.received_sample = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async save(context) {
|
||||
var order_id = 0;
|
||||
var delivery = [];
|
||||
var detail = [];
|
||||
var header = {
|
||||
patient_id: context.rootState.patient.selected_patient.M_PatientID,
|
||||
age: context.rootState.patient.selected_patient.patient_age,
|
||||
sender_doctor_id: context.rootState.doctor.selected_doctor.M_DoctorID,
|
||||
sender_address_id: context.rootState.doctor.selected_address.M_DoctorAddressID,
|
||||
pj_doctor_id: context.rootState.doctor.selected_doctor_pj.M_DoctorID,
|
||||
lang_id: context.rootState.language.selected_language.id,
|
||||
doctor_note: "",
|
||||
fo_note: "",
|
||||
company_id: context.rootState.company.selected_company.M_CompanyID,
|
||||
mou_id: context.rootState.company.selected_mou.M_MouID,
|
||||
received_sample: context.rootState.order.received_sample
|
||||
};
|
||||
|
||||
let dlv = context.rootState.delivery.deliveries
|
||||
for (var i in dlv) {
|
||||
if (dlv[i].selected == true) {
|
||||
let e = dlv[i].idx.split('-')
|
||||
delivery.push({
|
||||
delivery_id:e[0],
|
||||
delivery_type_id:e[1],
|
||||
address_id:e[2],
|
||||
note:dlv[i].note
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var px_tmp = [];
|
||||
var st = context.rootState.px.selected_test;
|
||||
for (var i in st) {
|
||||
px_tmp.push({
|
||||
t_id: st[i]['T_PriceID'],
|
||||
t_price: st[i]['T_PriceAmount'],
|
||||
t_disc: st[i]['T_PriceDisc'],
|
||||
t_discrp: st[i]['T_PriceDiscRp'],
|
||||
t_cito: st[i]['T_TestIsCito']
|
||||
})
|
||||
}
|
||||
|
||||
detail = px_tmp;
|
||||
|
||||
console.log(header);
|
||||
console.log(delivery)
|
||||
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.save(0, header, delivery, detail)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
|
||||
context.commit("update_current_order", resp.data.data)
|
||||
context.commit('update_finish_dialog_is_active', true)
|
||||
|
||||
context.commit('payment/update_order_id', resp.data.data.id, {root:true})
|
||||
context.dispatch('payment/get_order', resp.data.data.id, {root:true})
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
test/vuex/one-queue-admin/modules/patient.js
Normal file
82
test/vuex/one-queue-admin/modules/patient.js
Normal file
@@ -0,0 +1,82 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
noreg:'',
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
total_display: 0,
|
||||
selected_patient: {},
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state,val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state,data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
state.total_display = data.total_display
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(val.M_PatientDOB))
|
||||
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)) val.patient_age = ''
|
||||
else val.patient_age = `${year} tahun ${month} bulan ${day} hari`
|
||||
|
||||
state.selected_patient=val
|
||||
// store.state.patientaddress.patient_id = val.M_PatientID
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.noreg,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_patients",data)
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
86
test/vuex/one-queue-admin/modules/patientaddress.js
Normal file
86
test/vuex/one-queue-admin/modules/patientaddress.js
Normal file
@@ -0,0 +1,86 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/patientaddress.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
noreg:'',
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
total_display: 0,
|
||||
selected_patient: {},
|
||||
|
||||
address: [],
|
||||
patient_id: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state,val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state,data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
state.total_display = data.total_display
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
state.selected_patient=val
|
||||
},
|
||||
|
||||
update_address(state, val) {
|
||||
state.address = val;
|
||||
},
|
||||
|
||||
testx(state, val) {
|
||||
state.patient_id = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.getAll(context.state.patient_id)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = resp.data;
|
||||
context.commit("update_address",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async loadAddress(context, prm) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
tests (a) {
|
||||
alert(a)
|
||||
}
|
||||
}
|
||||
}
|
||||
107
test/vuex/one-queue-admin/modules/payment.js
Normal file
107
test/vuex/one-queue-admin/modules/payment.js
Normal file
@@ -0,0 +1,107 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/payment.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id: 0,
|
||||
|
||||
selected_patient: {
|
||||
order_no: '-',
|
||||
order_date: '-',
|
||||
order_mou: '-',
|
||||
order_company: '-',
|
||||
patient_name: '-',
|
||||
patient_mr: '-',
|
||||
doctor_sender: '-',
|
||||
doctor_pj: '-'
|
||||
},
|
||||
|
||||
order_detail: [
|
||||
// { n:1, d_id:1, t_id:1, t_name:'SGOT', t_price:80000, t_disctotal:7000, t_total:73000 },
|
||||
// { n:2, d_id:2, t_id:2, t_name:'SGPT', t_price:75000, t_disctotal:8000, t_total:67000 }
|
||||
],
|
||||
|
||||
order_subtotal: 0,
|
||||
order_rounding: 0,
|
||||
order_total: 0,
|
||||
|
||||
payment_cash_amount: 0,
|
||||
payment_debit_amount: 0,
|
||||
payment_credit_amount: 0,
|
||||
|
||||
payments: []
|
||||
},
|
||||
mutations: {
|
||||
update_order (state, data) {
|
||||
state.selected_patient = data.order_header
|
||||
state.order_detail = data.order_detail
|
||||
|
||||
state.order_subtotal = data.order_header.order_subtotal
|
||||
state.order_rounding = data.order_header.order_rounding
|
||||
state.order_total = data.order_header.order_total
|
||||
},
|
||||
|
||||
update_order_id (state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_payment(state, o) {
|
||||
if (o.type == 'cash')
|
||||
state.payment_cash_amount = o.amount
|
||||
if (o.type == 'debit')
|
||||
state.payment_debit_amount = o.amount
|
||||
if (o.type == 'credit')
|
||||
state.payment_credit_amount = o.amount
|
||||
},
|
||||
|
||||
update_payments(state, o) {
|
||||
state.payments = o
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async get_order(context, prm) {
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.get_order(prm)
|
||||
if (resp.status != "OK") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
// context.commit("update_search_status",2)
|
||||
// context.commit("update_search_error_message","")
|
||||
let data = resp.data.data
|
||||
context.commit("update_order", data)
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search(context, prm) {
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
// context.commit("update_search_status",2)
|
||||
// context.commit("update_search_error_message","")
|
||||
let data = resp.data
|
||||
context.commit("update_payments", data)
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
250
test/vuex/one-queue-admin/modules/px.js
Normal file
250
test/vuex/one-queue-admin/modules/px.js
Normal file
@@ -0,0 +1,250 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/px.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
tests: [],
|
||||
total_test: 0,
|
||||
selected_test: [],
|
||||
|
||||
search_panel: '',
|
||||
search_panel_status:0,
|
||||
panels: [],
|
||||
total_panel: 0,
|
||||
selected_panel: [],
|
||||
requirement: [],
|
||||
|
||||
cito: {test:[], panel:[]}
|
||||
},
|
||||
mutations: {
|
||||
update_requirement(state,val) {
|
||||
state.requirement = val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_selected_test(state,val) {
|
||||
// if (state.cito.length > 0) {
|
||||
for (var i in val) {
|
||||
val[i]['T_TestIsCito'] = 'N'
|
||||
if (state.cito.test.indexOf(val[i]['T_TestID']) > -1)
|
||||
val[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
state.selected_test = val
|
||||
},
|
||||
update_mouCompanyID(state,val) {
|
||||
state.mouCompanyID=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_tests(state,data) {
|
||||
state.tests= data.records
|
||||
state.total_test= data.total
|
||||
},
|
||||
update_search_panel(state,val) {
|
||||
state.search_panel=val
|
||||
},
|
||||
update_search_panel_status(state,status) {
|
||||
state.search_panel_status = status
|
||||
},
|
||||
update_panels(state,data) {
|
||||
console.log('--comit--',data)
|
||||
state.panels = data.records
|
||||
state.total_panel = data.total
|
||||
},
|
||||
update_selected_panel(state,val) {
|
||||
state.selected_panel= val
|
||||
},
|
||||
|
||||
update_cito(state, val) {
|
||||
let test = state.selected_test
|
||||
// if (val.length > 0) {
|
||||
|
||||
for (var i in test) {
|
||||
test[i]['T_TestIsCito'] = 'N'
|
||||
if (val.v.indexOf(test[i]['T_TestID']) > -1)
|
||||
test[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
state.cito[val.t] = val.v
|
||||
state.selected_test = test
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
delete_px (context, test) {
|
||||
let sel = context.state.selected_test
|
||||
sel.forEach(function(t, idx) {
|
||||
if(t.T_PriceID == test.T_PriceID) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
context.commit("update_selected_test", sel)
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(test)
|
||||
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
|
||||
context.commit("update_tests", dt)
|
||||
context.dispatch("update_req", null)
|
||||
},
|
||||
|
||||
update_req(context, px) {
|
||||
|
||||
let reqs = []
|
||||
let tests = context.state.selected_test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
|
||||
let panels = context.state.selected_panel
|
||||
panels.forEach( function(p) {
|
||||
let tests = p.test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
})
|
||||
|
||||
let requirement = context.state.requirement
|
||||
let flag_update_requirement = false
|
||||
if (reqs.length == 0 ) {
|
||||
requirement = []
|
||||
flag_update_requirement = true
|
||||
}
|
||||
requirement.forEach(function(r,idx) {
|
||||
if ( _.indexOf(reqs,r.label) == -1) {
|
||||
flag_update_requirement = true
|
||||
requirement.splice(idx,1)
|
||||
}
|
||||
})
|
||||
|
||||
if (flag_update_requirement) {
|
||||
context.commit('update_requirement', requirement)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let mouCompanyID = 0
|
||||
if (context.rootState.company.selected_mou.M_MouID) {
|
||||
mouCompanyID = context.rootState.company.selected_mou.M_MouID
|
||||
}
|
||||
let resp= await api.search(mouCompanyID,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_tests",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async panel(context,prm) {
|
||||
context.commit("update_search_panel_status",1)
|
||||
try {
|
||||
let mouCompanyID = 0
|
||||
if (context.rootState.company.selected_mou.M_MouCompanyID) {
|
||||
mouCompanyID = context.rootState.company.selected_mou.M_MouCompanyID
|
||||
}
|
||||
let resp= await api.panel(mouCompanyID,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_panel_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_panels",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async get_price(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
|
||||
let mou_id = context.rootState.company.selected_mou.M_MouID
|
||||
let resp = await api.get_price(prm.test_id, mou_id, prm.cito)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
let x = context.state.selected_test
|
||||
for (let i in x) {
|
||||
if (x[i].T_TestID == prm.test_id) {
|
||||
if (Math.round(resp.data.test_price) == 0) {
|
||||
x[i].T_TestIsCito = "N"
|
||||
let n = context.state.cito.test.indexOf(x[i].T_TestID)
|
||||
if (n > -1)
|
||||
context.state.cito.test.splice(n, 1)
|
||||
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(x[i])
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
context.commit("update_tests", dt)
|
||||
|
||||
x.splice(i, 1);
|
||||
}
|
||||
|
||||
else {
|
||||
x[i].T_PriceAmount = resp.data.test_price
|
||||
x[i].T_PriceDisc = resp.data.test_disc
|
||||
x[i].T_PriceDiscRp = resp.data.test_discrp
|
||||
}
|
||||
}
|
||||
}
|
||||
context.commit("update_selected_test", x)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
184
test/vuex/one-queue-admin/modules/service.js
Normal file
184
test/vuex/one-queue-admin/modules/service.js
Normal file
@@ -0,0 +1,184 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/service.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
act:'new',
|
||||
dialog_service:false,
|
||||
error_code:false,
|
||||
ownIP: '',
|
||||
load_status:0,
|
||||
load_error_message:'',
|
||||
services: [],
|
||||
selected_service:{},
|
||||
total_service: 0,
|
||||
selected_service: {},
|
||||
save_status: 0,
|
||||
save_error_message: '',
|
||||
alert_success: false,
|
||||
msg_success: ""
|
||||
},
|
||||
mutations: {
|
||||
update_ownIP(state,val) {
|
||||
state.ownIP= val
|
||||
},
|
||||
update_act(state,val) {
|
||||
state.act = val
|
||||
},
|
||||
update_error_code(state,val) {
|
||||
state.error_code = val
|
||||
},
|
||||
update_dialog_service(state,val) {
|
||||
state.dialog_service = val
|
||||
},
|
||||
update_load_status(state,status) {
|
||||
state.load_status = status
|
||||
},
|
||||
update_load_error_message(state,val) {
|
||||
state.load_error_message = val
|
||||
},
|
||||
update_services(state,data){
|
||||
state.services = data.records
|
||||
state.total_service = data.total
|
||||
},
|
||||
update_selected_service(state,val) {
|
||||
state.selected_service = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_save_error_message(state, val) {
|
||||
state.save_error_message = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async loadx(context) {
|
||||
context.commit("update_load_status",1)
|
||||
try {
|
||||
let resp= await api.loadx()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_load_status",2)
|
||||
context.commit("update_load_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_ownIP",resp.data.ownIP)
|
||||
context.commit("update_services",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_load_status",3)
|
||||
context.commit("update_load_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("update_error_code", false)
|
||||
context.commit("update_alert_success", true)
|
||||
context.commit("update_dialog_service", false)
|
||||
var msg = "Service " + prm.name + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async update(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.update(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("update_error_code", false)
|
||||
context.commit("update_alert_success", true)
|
||||
context.commit("update_dialog_service", false)
|
||||
var msg = "Service " + prm.name + " sudah tersimpan dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.dispatch("loadx")
|
||||
}else{
|
||||
context.commit("update_error_code", true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async deletex(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
let resp = await api.deletex(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_save_error_message", resp.message)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
if(data.total !== -1){
|
||||
context.commit("update_alert_success", true)
|
||||
var msg = "Service " + prm.name + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.dispatch("loadx")
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
context.commit("update_save_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
0
test/vuex/one-queue-admin/mutation.js
Normal file
0
test/vuex/one-queue-admin/mutation.js
Normal file
29
test/vuex/one-queue-admin/store.js
Normal file
29
test/vuex/one-queue-admin/store.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import service from "./modules/service.js";
|
||||
import counter from "./modules/counter.js";
|
||||
import numbering from "./modules/numbering.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state : {
|
||||
tab_active : '01'
|
||||
},
|
||||
|
||||
mutations : {
|
||||
change_tab(state, tab) {
|
||||
state.tab_active = tab;
|
||||
}
|
||||
},
|
||||
|
||||
modules : {
|
||||
service: service,
|
||||
counter:counter,
|
||||
numbering:numbering,
|
||||
system: system
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user