// API : // search bank // paramater : query , page , rowPerPage const URL = "/one-api/homeservice/registrasi-v5/"; export async function search(o_id, p_id, d_id, m_id,c_id) { try { var resp = await axios.post(URL + 'delivery/search', { order_id: o_id, patient_id: p_id, doctor_id: d_id, mou_id: m_id,c_id:c_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_deliveries(prm) { try { var resp = await axios.post(URL + 'delivery/search_deliveries', 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 listmou(prm) { try { var resp = await axios.post(URL + 'delivery/listmou', 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 add_new(prm) { try { //sipe add token prm["token"] = window.one_token(); var resp = await axios.post(URL + 'delivery/add_new', 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 }; } }