Flatten nested repos
This commit is contained in:
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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user