Files
FE_CPONE/test/vuex/one-fo-registration-walk-in/api/reference.js
2026-04-27 10:13:31 +07:00

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 };
}
}