add modules folder based on s_menu
This commit is contained in:
384
test/vuex/acc-one-mutasi-receive/modules/form.js
Normal file
384
test/vuex/acc-one-mutasi-receive/modules/form.js
Normal file
@@ -0,0 +1,384 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
|
||||
import * as api from "../api/api.js";
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
dialog_form_mutasi: false,
|
||||
mutasi_date: moment(new Date()).format('YYYY-MM-DD'),
|
||||
list_category: [],
|
||||
selected_category: {},
|
||||
list_branch_asal: [],
|
||||
selected_branch_asal: {},
|
||||
list_branch_tujuan: [],
|
||||
selected_branch_tujuan: {},
|
||||
note: '',
|
||||
dialog_select_item: false,
|
||||
list_ro: [],
|
||||
selected_ro: {},
|
||||
current_page: 1,
|
||||
x_search: '',
|
||||
total_pages: 0,
|
||||
list_item_receive: [],
|
||||
select_item_temp: [],
|
||||
list_mutasi_item: [],
|
||||
dialog_form_mutasi_verif: false,
|
||||
dialog_form_mutasi_approve: false,
|
||||
selected_warehouse: {},
|
||||
list_warehouse: [],
|
||||
list_ruangan: [],
|
||||
selected_ruangan: {}
|
||||
},
|
||||
mutations: {
|
||||
update_dialog_form_mutasi(state, val) {
|
||||
state.dialog_form_mutasi = val;
|
||||
},
|
||||
update_mutasi_date(state, val) {
|
||||
state.mutasi_date = val;
|
||||
},
|
||||
update_list_category(state, val) {
|
||||
state.list_category = val;
|
||||
},
|
||||
update_selected_category(state, val) {
|
||||
state.selected_category = val;
|
||||
},
|
||||
update_list_branch_asal(state, val) {
|
||||
state.list_branch_asal = val;
|
||||
},
|
||||
update_selected_branch_asal(state, val) {
|
||||
state.selected_branch_asal = val;
|
||||
},
|
||||
update_list_branch_tujuan(state, val) {
|
||||
state.list_branch_tujuan = val;
|
||||
},
|
||||
update_selected_branch_tujuan(state, val) {
|
||||
state.selected_branch_tujuan = val;
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val;
|
||||
},
|
||||
update_dialog_select_item(state, val) {
|
||||
state.dialog_select_item = val;
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val;
|
||||
},
|
||||
update_x_search(state, val) {
|
||||
state.x_search = val;
|
||||
state.current_page = 1;
|
||||
},
|
||||
update_total_pages(state, val) {
|
||||
state.total_pages = val;
|
||||
},
|
||||
update_list_item_receive(state, val) {
|
||||
state.list_item_receive = val;
|
||||
},
|
||||
update_select_item_temp(state, val) {
|
||||
state.select_item_temp = val;
|
||||
},
|
||||
update_list_ro(state, val) {
|
||||
state.list_ro = val;
|
||||
},
|
||||
update_selected_ro(state, val) {
|
||||
state.selected_ro = val;
|
||||
},
|
||||
update_list_mutasi_item(state, val) {
|
||||
state.list_mutasi_item = val;
|
||||
},
|
||||
update_dialog_form_mutasi_verif(state, val) {
|
||||
state.dialog_form_mutasi_verif = val
|
||||
},
|
||||
update_dialog_form_mutasi_approve(state, val) {
|
||||
state.dialog_form_mutasi_approve = val
|
||||
},
|
||||
update_selected_warehouse(state, val) {
|
||||
state.selected_warehouse = val;
|
||||
},
|
||||
update_list_warehouse(state, val) {
|
||||
state.list_warehouse = val;
|
||||
},
|
||||
update_list_ruangan(state, val) {
|
||||
state.list_ruangan = val;
|
||||
},
|
||||
update_selected_ruangan(state, val) {
|
||||
state.selected_ruangan = val;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
resetForm(context) {
|
||||
context.state.mutasi_date = moment(new Date()).format('YYYY-MM-DD')
|
||||
context.state.selected_category = {}
|
||||
context.state.selected_branch_asal = {}
|
||||
context.state.selected_branch_tujuan = {}
|
||||
context.state.selected_warehouse = {}
|
||||
context.state.selected_ruangan = {}
|
||||
context.state.note = ''
|
||||
context.state.list_mutasi_item = []
|
||||
},
|
||||
|
||||
async getCategory(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
search: ''
|
||||
}
|
||||
const resp = await api.getCategory(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_category", resp.data.records);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getBranchAsal(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token()
|
||||
}
|
||||
const resp = await api.getBranchAsal(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_branch_asal", resp.data.records);
|
||||
context.commit("update_selected_branch_asal", resp.data.records[0]);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getBranchTujuan(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
branch_id: context.rootState.mutasi.selected_list_data.MutasiHandoverToBranchID
|
||||
}
|
||||
const resp = await api.getBranchTujuan(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_branch_tujuan", resp.data.records);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getWarehouse(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
branch_id: context.rootState.mutasi.selected_list_data.MutasiHandoverToBranchID
|
||||
}
|
||||
const resp = await api.getWarehouse(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_warehouse", resp.data);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getRuangan(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
branch_id: context.rootState.mutasi.selected_list_data.MutasiHandoverToBranchID
|
||||
}
|
||||
const resp = await api.getRuangan(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_ruangan", resp.data);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getReceiveOrderPo(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
branchAsalCode: context.state.selected_branch_asal.M_BranchCode,
|
||||
itemCategoryID: context.state.selected_category.itemCategoryID,
|
||||
search: '',
|
||||
}
|
||||
const resp = await api.getReceiveOrderPo(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_ro", resp.data.records);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getItemReceive(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
warhouseID: context.state.selected_ro.ReceiveOrderPoWarehouseID,
|
||||
branchAsalCode: context.state.selected_ro.ReceiveOrderPoM_BranchCode,
|
||||
receiveOrderPoID: context.state.selected_ro.ReceiveOrderPoID,
|
||||
search: '',
|
||||
current_page: context.state.current_page
|
||||
}
|
||||
const resp = await api.getItemReceive(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_list_item_receive", resp.data.records);
|
||||
context.commit("update_total_pages", resp.data.total_page);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async saveMutasi(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
mutasi_date: context.state.mutasi_date,
|
||||
category_id: context.state.selected_category.itemCategoryID,
|
||||
branch_asal_id: context.state.selected_branch_asal.M_BranchID,
|
||||
branch_tujuan_id: context.state.selected_branch_tujuan.M_BranchID,
|
||||
note: context.state.note,
|
||||
list_mutasi: context.state.list_mutasi_item
|
||||
}
|
||||
const resp = await api.saveMutasi(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.dispatch("resetForm");
|
||||
context.dispatch("mutasi/search", {}, {root: true});
|
||||
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'success',
|
||||
msg: resp.data,
|
||||
isOpen: true
|
||||
}, {root: true});
|
||||
|
||||
context.commit("update_dialog_form_mutasi", false);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async saveEditMutasi(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
mutasi_request_id: context.rootState.mutasi.selected_list_data.MutasiRequestID,
|
||||
mutasi_date: context.state.mutasi_date,
|
||||
category_id: context.state.selected_category.itemCategoryID,
|
||||
branch_asal_id: context.state.selected_branch_asal.M_BranchID,
|
||||
branch_tujuan_id: context.state.selected_branch_tujuan.M_BranchID,
|
||||
note: context.state.note,
|
||||
list_mutasi: context.state.list_mutasi_item
|
||||
}
|
||||
const resp = await api.saveEditMutasi(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.dispatch("resetForm");
|
||||
context.dispatch("mutasi/search", {}, {root: true});
|
||||
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'success',
|
||||
msg: resp.data,
|
||||
isOpen: true
|
||||
}, {root: true});
|
||||
|
||||
context.commit("update_dialog_form_mutasi_approve", false);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("mutasi/update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
300
test/vuex/acc-one-mutasi-receive/modules/mutasi.js
Normal file
300
test/vuex/acc-one-mutasi-receive/modules/mutasi.js
Normal file
@@ -0,0 +1,300 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
|
||||
import mutasi from "../../acc-one-mutasi-request-approved/modules/mutasi.js";
|
||||
import * as api from "../api/api.js";
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
alert_error: false,
|
||||
err_message: "",
|
||||
menu_start_date: false,
|
||||
menu_end_date: false,
|
||||
d_start_date: new Date().toISOString().substring(0, 10),
|
||||
d_end_date: new Date().toISOString().substring(0, 10),
|
||||
f_start_date: moment(new Date()).format("YYYY-MM-DD"),
|
||||
f_end_date: moment(new Date()).format("YYYY-MM-DD"),
|
||||
f_status: '',
|
||||
status_options: [
|
||||
{ text: 'All', value: '' },
|
||||
{ text: 'sent', value: 'sent' },
|
||||
{ text: 'Received', value: 'Received' },
|
||||
],
|
||||
f_search : '',
|
||||
list_data: [],
|
||||
selected_list_data: {},
|
||||
isLoading: 0,
|
||||
current_page: 1,
|
||||
total_pages: 0,
|
||||
snackbar: {
|
||||
color: 'success',
|
||||
msg: '',
|
||||
isOpen: false
|
||||
},
|
||||
dialog_delete: false,
|
||||
approve_level: 0,
|
||||
dialog_reject: false,
|
||||
note_reject: '',
|
||||
dialog_form_mutasi_receive: false,
|
||||
dialog_form_mutasi_view: false,
|
||||
dialog_barcode: false,
|
||||
indeterminatex: false,
|
||||
bar_chx_all: false,
|
||||
barcodes: [],
|
||||
urlQrCode: '',
|
||||
selected_barcode: []
|
||||
},
|
||||
mutations: {
|
||||
update_alert_error(state, val) {
|
||||
state.alert_error = val;
|
||||
},
|
||||
update_err_message(state, val) {
|
||||
state.err_message = val;
|
||||
},
|
||||
update_menu_start_date(state, val) {
|
||||
state.menu_start_date = val;
|
||||
},
|
||||
update_menu_end_date(state, val) {
|
||||
state.menu_end_date = val;
|
||||
},
|
||||
update_d_start_date(state, val) {
|
||||
state.d_start_date = val;
|
||||
},
|
||||
update_d_end_date(state, val) {
|
||||
state.d_end_date = val;
|
||||
},
|
||||
update_f_start_date(state, val) {
|
||||
state.f_start_date = val;
|
||||
},
|
||||
update_f_end_date(state, val) {
|
||||
state.f_end_date = val;
|
||||
},
|
||||
update_f_status(state, val) {
|
||||
state.f_status = val;
|
||||
},
|
||||
update_status_options(state, val) {
|
||||
state.status_options = val;
|
||||
},
|
||||
update_f_search(state, val) {
|
||||
state.f_search = val;
|
||||
state.current_page = 1
|
||||
},
|
||||
update_list_data(state, val) {
|
||||
state.list_data = val;
|
||||
},
|
||||
update_selected_list_data(state, val) {
|
||||
state.selected_list_data = val;
|
||||
},
|
||||
update_isLoading(state, val) {
|
||||
state.isLoading = val;
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val;
|
||||
},
|
||||
update_total_pages(state, val) {
|
||||
state.total_pages = val;
|
||||
},
|
||||
update_snackbar(state, data) {
|
||||
state.snackbar = data
|
||||
},
|
||||
update_dialog_delete(state, val) {
|
||||
state.dialog_delete = val
|
||||
},
|
||||
update_approve_level(state, data) {
|
||||
state.approve_level = data
|
||||
},
|
||||
update_dialog_reject(state, val) {
|
||||
state.dialog_reject = val
|
||||
},
|
||||
update_note_reject(state, val) {
|
||||
state.note_reject = val
|
||||
},
|
||||
update_dialog_form_mutasi_receive(state, val) {
|
||||
state.dialog_form_mutasi_receive = val
|
||||
},
|
||||
update_dialog_form_mutasi_view(state, val) {
|
||||
state.dialog_form_mutasi_view = val
|
||||
},
|
||||
update_dialog_barcode(state, val) {
|
||||
state.dialog_barcode = val
|
||||
},
|
||||
update_indeterminatex(state, val) {
|
||||
state.indeterminatex = val
|
||||
},
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_selected_barcode(state, val) {
|
||||
state.selected_barcode = val
|
||||
},
|
||||
update_barcodes(state, val) {
|
||||
state.barcodes = val
|
||||
},
|
||||
update_urlQrCode(state, val) {
|
||||
state.urlQrCode = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_isLoading", 1)
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
search: context.state.f_search,
|
||||
start_date: context.state.f_start_date,
|
||||
end_date: context.state.f_end_date,
|
||||
current_page: context.state.current_page,
|
||||
status: context.state.f_status
|
||||
}
|
||||
const resp = await api.search(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("update_isLoading", 3)
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
} else {
|
||||
context.commit("update_isLoading", 2)
|
||||
context.commit("update_list_data", resp.data.records);
|
||||
context.commit("update_total_pages", resp.data.total_page);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("update_isLoading", 3)
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
}, { root: true });
|
||||
}
|
||||
},
|
||||
|
||||
async getItemDetail(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
mutasiHandoverID: context.state.selected_list_data.MutasiHandoverID
|
||||
}
|
||||
const resp = await api.getItemDetail(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
});
|
||||
} else {
|
||||
context.commit("form/update_mutasi_date", context.state.selected_list_data.MutasiHandoverDate, { root: true });
|
||||
|
||||
let category = {
|
||||
itemCategoryID: context.state.selected_list_data.itemCategoryID,
|
||||
itemCategoryName: context.state.selected_list_data.itemCategoryName
|
||||
}
|
||||
context.commit("form/update_selected_category", category, { root: true });
|
||||
|
||||
let branch_asal = {
|
||||
M_BranchID: context.state.selected_list_data.branch_asal_id,
|
||||
M_BranchName: context.state.selected_list_data.branch_asal_name,
|
||||
M_BranchCode: context.state.selected_list_data.branch_asal_code,
|
||||
}
|
||||
context.commit("form/update_selected_branch_asal", branch_asal, { root: true });
|
||||
|
||||
let branch_tujuan = {
|
||||
M_BranchID: context.state.selected_list_data.branch_tujuan_id,
|
||||
M_BranchName: context.state.selected_list_data.branch_tujuan_name,
|
||||
M_BranchCode: context.state.selected_list_data.branch_tujuan_code,
|
||||
}
|
||||
context.commit("form/update_selected_branch_tujuan", branch_tujuan, { root: true });
|
||||
|
||||
if (context.state.selected_list_data.WarehouseID != null && context.state.selected_list_data.WarehouseID != '') {
|
||||
let warehouse = {
|
||||
WarehouseID: context.state.selected_list_data.WarehouseID,
|
||||
WarehouseName: context.state.selected_list_data.WarehouseName
|
||||
}
|
||||
context.commit("form/update_selected_warehouse", warehouse, { root: true });
|
||||
}
|
||||
|
||||
if (context.state.selected_list_data.M_RuanganID != null && context.state.selected_list_data.M_RuanganID != '') {
|
||||
let ruangan = {
|
||||
M_RuanganID: context.state.selected_list_data.M_RuanganID,
|
||||
M_RuanganName: context.state.selected_list_data.M_RuanganName
|
||||
}
|
||||
context.commit("form/update_selected_ruangan", ruangan, { root: true });
|
||||
}
|
||||
|
||||
context.commit("form/update_note", context.state.selected_list_data.MutasiHandoverNote, { root: true });
|
||||
context.commit("form/update_list_mutasi_item", resp.data.records, { root: true });
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async receive(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
mutasi_handover_id: context.state.selected_list_data.MutasiHandoverID,
|
||||
warehouse_id: context.rootState.form.selected_warehouse.WarehouseID,
|
||||
ruangan_id: context.rootState.form.selected_ruangan.M_RuanganID
|
||||
}
|
||||
const resp = await api.receive(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
});
|
||||
} else {
|
||||
context.dispatch("search");
|
||||
|
||||
context.commit("update_snackbar", {
|
||||
color: 'success',
|
||||
msg: resp.data,
|
||||
isOpen: true
|
||||
});
|
||||
|
||||
context.commit("update_dialog_form_mutasi_receive", false);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async getBarcodes(context) {
|
||||
try {
|
||||
let param = {
|
||||
token: one_token(),
|
||||
mutasi_handover_id: context.state.selected_list_data.MutasiHandoverID
|
||||
}
|
||||
const resp = await api.getBarcodes(param);
|
||||
if (resp.status != 'OK') {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: resp.message,
|
||||
isOpen: true
|
||||
});
|
||||
} else {
|
||||
context.commit("update_barcodes", resp.data);
|
||||
}
|
||||
} catch (error) {
|
||||
context.commit("update_snackbar", {
|
||||
color: 'error',
|
||||
msg: error.message,
|
||||
isOpen: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user