add modules folder based on s_menu

This commit is contained in:
2026-06-30 10:16:11 +07:00
parent 315b657ee3
commit a1aab09ac9
625 changed files with 192283 additions and 794 deletions

View File

@@ -0,0 +1,192 @@
const URL = "/one-api/mockup/purchase/transfer/TransferRequestNP/";
const URL_SJ = "/one-api/mockup/purchase/suratjalan/SuratJalan/";
export async function getBranches(params) {
try {
var resp = await axios.post(URL + "getBranches", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function getDivision(params) {
try {
var resp = await axios.post(URL + "getDivision", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function search(params) {
try {
var resp = await axios.post(URL + "search", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function createTfRequest(params) {
try {
var resp = await axios.post(URL + "createTfRequest", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function updateTfRequest(params) {
try {
var resp = await axios.post(URL + "updateTfRequest", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function deleteTfRequest(params) {
try {
var resp = await axios.post(URL + "deleteTfRequest", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function getListDetail(params) {
try {
var resp = await axios.post(URL + "getListDetail", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function getDraftDetail(params) {
try {
var resp = await axios.post(URL + "getDraftDetail", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function getListStock(params) {
try {
var resp = await axios.post(URL + "getListStock", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}
export async function getUserLevel(params) {
try {
var resp = await axios.post(URL + "getUserLevel", params);
if (resp.status !== 200) {
return {
status: "ERR",
message: response.statusText
}
}
let data = resp.data
return data
} catch (error) {
return {
status: "ERR",
message: error.message
}
}
}