const URL = "/one-api/mockup/masterdata/report/"; export async function searchparam(prm) { try { var resp = await axios.post(URL + 'searchparam', 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 }; } } // dropdown reports export async function get_reports(prm) { try { var resp = await axios.post(URL + 'get_reports', 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 get_type(prm) { try { var resp = await axios.post(URL + 'get_type', 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 addparam(prm) { try { var resp = await axios.post(URL + 'addparam', 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 editparam(prm) { try { var resp = await axios.post(URL + 'editparam', 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 deleteparam(prm) { try { var resp = await axios.post(URL + 'deleteparam', 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 }; } }