Flatten nested repos
This commit is contained in:
20
test/vuex/one-queue-fo-v2/api/company.js
Normal file
20
test/vuex/one-queue-fo-v2/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
|
||||
};
|
||||
}
|
||||
}
|
||||
24
test/vuex/one-queue-fo-v2/api/delivery.js
Normal file
24
test/vuex/one-queue-fo-v2/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-fo-v2/api/doctor.js
Normal file
45
test/vuex/one-queue-fo-v2/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-fo-v2/api/language.js
Normal file
24
test/vuex/one-queue-fo-v2/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
|
||||
};
|
||||
}
|
||||
}
|
||||
121
test/vuex/one-queue-fo-v2/api/order.js
Normal file
121
test/vuex/one-queue-fo-v2/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-fo-v2/api/patient.js
Normal file
27
test/vuex/one-queue-fo-v2/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-fo-v2/api/patientaddress.js
Normal file
26
test/vuex/one-queue-fo-v2/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-fo-v2/api/payment.js
Normal file
39
test/vuex/one-queue-fo-v2/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-fo-v2/api/px.js
Normal file
74
test/vuex/one-queue-fo-v2/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
|
||||
};
|
||||
}
|
||||
}
|
||||
182
test/vuex/one-queue-fo-v2/api/queue.js
Normal file
182
test/vuex/one-queue-fo-v2/api/queue.js
Normal file
@@ -0,0 +1,182 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL = "http://" + window.location.host + ":9099/";
|
||||
|
||||
const URLAPI = "/one-api/antrian/";
|
||||
|
||||
export async function fo_url() {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'fo_url/');
|
||||
var resp = await axios.get(URLAPI + "queuefov2/fo_url");
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function loadx(serviceid) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'list/'+serviceid);
|
||||
var resp = await axios.post(
|
||||
URLAPI + "queuefov2/list_queue_today/" + serviceid, { token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function loadservice() {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'list_service');
|
||||
var resp = await axios.get(URLAPI + "queuefov2/list_service");
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function docall(numbx) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'call/'+numbx);
|
||||
var resp = await axios.post(
|
||||
URLAPI + "queuefov2/call_queue_today_by_queue_number/" + numbx, { token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function dorecall(numbx, qID) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'recall/'+numbx);
|
||||
var resp = await axios.post(
|
||||
URLAPI +
|
||||
"queuefov2/call_recall_today_by_queue_number/" +
|
||||
numbx +
|
||||
"/" +
|
||||
qID,
|
||||
{ token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function doserve(numbx, qID) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'serve/'+numbx);
|
||||
var resp = await axios.post(
|
||||
URLAPI + "queuefov2/call_serve_today_by_queue_number/" + numbx + "/" + qID, { token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function dodone(numbx, qID) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'done/'+numbx);
|
||||
var resp = await axios.post(
|
||||
URLAPI + "queuefov2/call_done_today_by_queue_number/" + numbx + "/" + qID, { token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function doskip(numbx, qID) {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'skip/'+numbx);
|
||||
var resp = await axios.post(
|
||||
URLAPI + "queuefov2/call_skip_today_by_queue_number/" + numbx + "/" + qID, { token: one_token() }
|
||||
);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText,
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message,
|
||||
};
|
||||
}
|
||||
}
|
||||
25
test/vuex/one-queue-fo-v2/api/summary.js
Normal file
25
test/vuex/one-queue-fo-v2/api/summary.js
Normal file
@@ -0,0 +1,25 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL = "http://" + window.location.host + ":9099/";
|
||||
const URLAPI = "/one-api/antrian/";
|
||||
|
||||
export async function loadx() {
|
||||
try {
|
||||
// var resp = await axios.get(URL + 'info');
|
||||
var resp = await axios.post(URLAPI + 'queuefov2/call_info', { token: one_token() });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user