const URL = "/one-api/mockup/masterdata/"; export async function search(token, packetname, testname, status) { try { var resp = await axios.post(URL + 'testfavorite/search', { token:token, packetnama: packetname, testname: testname, status: status }); 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 getsexreg(token) { try { var resp = await axios.post(URL + 'testfavorite/getsexreg',{token:token}); 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 save(prm) { try { var resp = await axios.post(URL + 'testfavorite/save',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 newtestfavorite(prm) { try { var resp = await axios.post(URL + 'testfavorite/newtestfavorite',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 xdelete(prm) { try { var resp = await axios.post(URL + 'testfavorite/deletetestfavorite',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 getaddress(prm) { try { var resp = await axios.post(URL + 'testfavorite/getaddress',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 searchtest(token,prm) { try { var resp = await axios.post(URL + 'testfavorite/searchtest',{token:token,search: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 searchpacket(token,search,tipe) { try { var resp = await axios.post(URL + 'testfavorite/searchpacket',{token:token,search:search,tipe:tipe}); 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 getsubarea(token,prm) { try { var resp = await axios.post(URL + 'testfavorite/getsubarea',{id:prm.T_TestID,token:token}); 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 savenewaddress(prm) { try { var resp = await axios.post(URL + 'testfavorite/savenewaddress',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 saveeditaddress(prm) { try { var resp = await axios.post(URL + 'testfavorite/saveeditaddress',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 deleteaddress(prm) { try { var resp = await axios.post(URL + 'testfavorite/deleteaddress',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 }; } }