35 lines
873 B
JavaScript
35 lines
873 B
JavaScript
const URL = "/one-api/mockup/fo/walk_in_registration/";
|
|
|
|
export async function searchreference(search = "") {
|
|
try {
|
|
const resp = await axios.post(URL + "reference/searchreference", {
|
|
token: window.one_token(),
|
|
search: search || ""
|
|
});
|
|
|
|
if (resp.status !== 200) {
|
|
return { status: "ERR", message: resp.statusText };
|
|
}
|
|
|
|
return resp.data;
|
|
} catch (e) {
|
|
return { status: "ERR", message: e.message };
|
|
}
|
|
}
|
|
|
|
export async function searchordertype(search = "") {
|
|
try {
|
|
const resp = await axios.post(URL + "reference/searchordertype", {
|
|
token: window.one_token(),
|
|
search: search || ""
|
|
});
|
|
|
|
if (resp.status !== 200) {
|
|
return { status: "ERR", message: resp.statusText };
|
|
}
|
|
|
|
return resp.data;
|
|
} catch (e) {
|
|
return { status: "ERR", message: e.message };
|
|
}
|
|
} |