Flatten nested repos
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function lookup(token, search,all ) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/lookup', { token: token, search: search, all:all });
|
||||
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(token,name) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/addnewautoverification', {
|
||||
token:token,
|
||||
name: name
|
||||
});
|
||||
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 update(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/editautoverification', {
|
||||
id:prm.id,
|
||||
name: prm.name,
|
||||
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 xdelete(token,id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/deleteautoverification', { id: id, 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
|
||||
};
|
||||
}
|
||||
}
|
||||
124
test/vuex/one-md-auto-verification/api/deltacheck.js
Normal file
124
test/vuex/one-md-auto-verification/api/deltacheck.js
Normal file
@@ -0,0 +1,124 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function search(token,search, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/searchtest', { token:token,search: search, id: 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 save(token, testid, differenceid, validinterval, timeid, upperlimit, lowerlimit) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/savedeltacheck', {
|
||||
testid: testid,
|
||||
differenceid: differenceid,
|
||||
validinterval: validinterval,
|
||||
timeid: timeid,
|
||||
upperlimit: upperlimit,
|
||||
lowerlimit: lowerlimit,
|
||||
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 lookup(token,id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/lookupdeltacheck', { id: id , 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 xdelete(token, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/deleteautoverificationtest', { id: id, 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 selecttime(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/selecttime',{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 selectdif(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/selectdif',{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
|
||||
};
|
||||
}
|
||||
}
|
||||
101
test/vuex/one-md-auto-verification/api/multirule.js
Normal file
101
test/vuex/one-md-auto-verification/api/multirule.js
Normal file
@@ -0,0 +1,101 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function search(token,search, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/searchhasil', { token:token,search: search, id: 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 save(token, testid, hasilid) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/savemultirule', {
|
||||
testid: testid,
|
||||
hasilid: hasilid,
|
||||
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 lookup(token,id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/lookuphasil', { id: id , 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 xdelete(token, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/deletemultirule', { id: id, 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 selectvaluex(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/selectvaluex',{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
|
||||
};
|
||||
}
|
||||
}
|
||||
83
test/vuex/one-md-auto-verification/api/trendanalys.js
Normal file
83
test/vuex/one-md-auto-verification/api/trendanalys.js
Normal file
@@ -0,0 +1,83 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function search(token,search, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/searchtest', { token:token,search: search, id: 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 save(token, testid, mintest, trendvalue) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/savetrendanalys', {
|
||||
testid: testid,
|
||||
mintest: mintest,
|
||||
trendvalue: trendvalue,
|
||||
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 lookup(token,id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/lookuptrendanalys', { id: id , 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 xdelete(token, id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'autoverification/deleteautoverificationtest', { id: id, 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
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user