Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,39 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/helper.js"
export default {
namespaced: true,
state: {
loading:false,
error:''
},
mutations: {
update_calc_age_status(state,value) {
state.loading= value
},
update_error(state,value) {
state.error= value
}
},
actions: {
async calc_age(context,orderID) {
context.commit("update_loading", true)
try {
let prm = { orderID }
prm["token"] = one_token()
let resp = await api.calc_age(prm)
context.commit("update_loading",false)
if (resp.status != "OK") {
context.commit("update_error", resp.message)
} else {
context.commit("update_error", "")
}
} catch (e) {
context.commit("update_loading", false)
context.commit("update_error", e.message)
}
}
}
}