const URL = "/one-api/one_consumable/masterdata/"; export async function searchsatuan(prm) { try { var resp = await axios.post(URL + 'searchsatuan', 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 addsatuan(prm) { try { var resp = await axios.post(URL + 'addsatuan', 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 edit(prm) { try { var resp = await axios.post(URL + 'edit', 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 deleterow(prm) { try { var resp = await axios.post(URL + 'deleterow', 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 }; } }