added pot todos functionality

This commit is contained in:
2024-02-28 14:48:18 +01:00
parent c327355c8a
commit fcc6517110
17 changed files with 1798 additions and 45 deletions

View File

@ -146,8 +146,12 @@ const confirmDeletePOT = async () => {
store.commit('undoDelete');
store.commit('changeToTemplatelist');
} catch (err) {
// console.log(err.response.statusText);
console.log(err);
console.log(err.response.statusText);
}
try {
await Axios.delete(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/deleteTodosPOT/${chosenPOTId.value}`);
} catch (err) {
console.log(err.response.statusText);
}
} else {
store.commit('undoDelete');
@ -161,9 +165,7 @@ const getProductionOrderTemplates = async () => {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllProductionOrderTemplates`);
productionOrderTemplates.value = response.data;
} catch (err) {
// console.log(err.response.statusText);
console.log(err);
console.log(err.response.statusText);
}
}
@ -212,6 +214,8 @@ const updateCustomerID = async () => {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${pot.value.customer}`);
customer.value = response.data;
pot.value.customerID = customer.value.customerID;
store.commit('toggleClientChanged');
store.commit('toggleClientId', pot.value.customerID);
} catch (err) {
console.log(err.response.statusText);
}
@ -237,6 +241,8 @@ const updateNewCustomerID = async () => {
try {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${newCustomer.value}`);
newCustomerID.value = response.data.customerID;
store.commit('toggleClientChanged');
store.commit('toggleClientId', newCustomerID.value)
} catch (err) {
console.log(err.response.statusText);
}