add modules folder based on s_menu
This commit is contained in:
77
test/vuex/acc-one-md-periode/api/api-periode.js
Normal file
77
test/vuex/acc-one-md-periode/api/api-periode.js
Normal file
@@ -0,0 +1,77 @@
|
||||
const URL = "/one-api/mockup/masterdata/accounting/";
|
||||
|
||||
export async function getListing(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mdperiode/listperiode', params);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.message
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function p_delete(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mdperiode/deleteperiode', params);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function p_add(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mdperiode/addperiode', params);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function p_edit(params) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mdperiode/editperiode', params);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (error) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: error.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user