-
+
+
-
@@ -64,7 +64,7 @@ const goToChosenMVT = (id) => {
store.commit('changeToTemplate');
};
-const clientFilter = computed(() => store.state.filteredByClient);
+const customerFilter = computed(() => store.state.filteredByCustomer);
const searchable = computed(() => store.state.searchable);
const mvtSearchFilter = ref('');
@@ -73,8 +73,8 @@ const maintenanceVisitTemplates = ref([]);
//get all maintenance visit templates
const getMaintenanceVisitTemplates = async () => {
- if (!(clientFilter.value === '')) {
- await getFilteredMVTByClient();
+ if (!(customerFilter.value === '')) {
+ await getFilteredMVTByCustomer();
} else {
try {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllMaintenanceVisitTemplates`);
@@ -105,10 +105,10 @@ const updateSearchTerm = async () => {
await getMaintenanceVisitTemplates();
}
-//get all maintenance visit templates based on the searched client
-const getFilteredMVTByClient = async () => {
+//get all maintenance visit templates based on the searched customer
+const getFilteredMVTByCustomer = async () => {
try {
- const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedMVTsByClient/${clientFilter.value}`);
+ const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedMVTsByCustomer/${customerFilter.value}`);
maintenanceVisitTemplates.value = response.data;
} catch (err) {
console.log(err.response.statusText);
@@ -116,7 +116,7 @@ const getFilteredMVTByClient = async () => {
}
watch(searchable, updateSearchTerm);
-watch(clientFilter, getMaintenanceVisitTemplates);
+watch(customerFilter, getMaintenanceVisitTemplates);
onMounted(async () => {
await getMaintenanceVisitTemplates();
@@ -190,7 +190,7 @@ export default {
font: 400 0.75rem/250% Overpass, sans-serif;
}
-.clientLabel {
+.customerLabel {
width: 5.5625em;
height: 1.875em;
font-family: "Overpass";
diff --git a/components/server/ProductionOrdersTemplate.vue b/components/server/ProductionOrdersTemplate.vue
index 4461998..ea88ab2 100644
--- a/components/server/ProductionOrdersTemplate.vue
+++ b/components/server/ProductionOrdersTemplate.vue
@@ -5,8 +5,8 @@
Customer:
{{ mvt.customer }}
@@ -208,8 +208,8 @@ const updateCustomerID = async () => {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${mvt.value.customer}`);
customer.value = response.data;
mvt.value.customerID = customer.value.customerID;
- store.commit('toggleClientChanged');
- store.commit('toggleClientId', mvt.value.customerID);
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', mvt.value.customerID);
} catch (err) {
console.log(err.response.statusText);
}
@@ -235,8 +235,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)
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', newCustomerID.value)
} catch (err) {
console.log(err.response.statusText);
}
diff --git a/components/server/MaintenanceVisitsTemplateTable.vue b/components/server/MaintenanceVisitsTemplateTable.vue
index ba15be8..b21556f 100644
--- a/components/server/MaintenanceVisitsTemplateTable.vue
+++ b/components/server/MaintenanceVisitsTemplateTable.vue
@@ -1,6 +1,6 @@
Template:
+ Template:
-
-
+
+
-
@@ -59,7 +59,7 @@ const goToChosenPOT = (id) => {
store.commit('changeToTemplate');
};
-const clientFilter = computed(() => store.state.filteredByClient);
+const customerFilter = computed(() => store.state.filteredByCustomer);
const searchable = computed(() => store.state.searchable);
const potSearchFilter = ref('');
@@ -68,8 +68,8 @@ const productionOrderTemplates = ref([]);
//get all productionOrder templates
const getProductionOrderTemplates = async () => {
- if (!(clientFilter.value === '')) {
- await getFilteredPOTByClient();
+ if (!(customerFilter.value === '')) {
+ await getFilteredPOTByCustomer();
} else {
try {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllProductionOrderTemplates`);
@@ -100,17 +100,17 @@ const updateSearchTerm = async () => {
await getProductionOrderTemplates();
}
-//get all productionOrder templates based on the searched client
-const getFilteredPOTByClient = async () => {
+//get all productionOrder templates based on the searched customer
+const getFilteredPOTByCustomer = async () => {
try {
- const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedPOTsByClient/${clientFilter.value}`);
+ const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedPOTsByCustomer/${customerFilter.value}`);
productionOrderTemplates.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
}
-watch(clientFilter, getProductionOrderTemplates);
+watch(customerFilter, getProductionOrderTemplates);
watch(searchable, updateSearchTerm);
onMounted(async () => {
@@ -314,7 +314,7 @@ th {
color: #000;
}
-.clientLabel {
+.customerLabel {
width: 5.5625em;
height: 1.875em;
font-family: "Overpass";
diff --git a/components/server/Solution.vue b/components/server/Solution.vue
index 206efa3..1ac8b77 100644
--- a/components/server/Solution.vue
+++ b/components/server/Solution.vue
@@ -5,8 +5,8 @@
Customer:
{{ pot.customer }}
@@ -214,8 +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);
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', pot.value.customerID);
} catch (err) {
console.log(err.response.statusText);
}
@@ -241,8 +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)
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', newCustomerID.value)
} catch (err) {
console.log(err.response.statusText);
}
diff --git a/components/server/ProductionOrdersTemplateTable.vue b/components/server/ProductionOrdersTemplateTable.vue
index 5d02c78..75c7679 100644
--- a/components/server/ProductionOrdersTemplateTable.vue
+++ b/components/server/ProductionOrdersTemplateTable.vue
@@ -1,6 +1,6 @@
Template:
+ Template:
-
-
+
+
Customer:
{{ sol.customer }}
@@ -163,8 +163,8 @@ const newDescription = ref('');
const newNotes = ref('');
const newLastView = ref('');
const newUser = ref('');
-const changedClientId = computed(() => store.state.changedClientId);
-const clientChanged = computed(() => store.state.clientChanged);
+const changedCustomerId = computed(() => store.state.changedCustomerId);
+const customerChanged = computed(() => store.state.customerChanged);
// get solution from id
const getSolutionById = async () => {
@@ -178,28 +178,28 @@ const getSolutionById = async () => {
console.log(err.response.statusText);
}
}
- await getConfigItemsFromClient();
+ await getConfigItemsFromCustomer();
}
-//get all config items from the selected client
-const getConfigItemsFromClient = async () => {
+//get all config items from the selected customer
+const getConfigItemsFromCustomer = async () => {
if (!addBool.value) {
try {
- const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${sol.value.customerID}`);
+ const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${sol.value.customerID}`);
configItems.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
} else {
try {
- const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromClient/${changedClientId.value}`);
+ const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCIFromCustomer/${changedCustomerId.value}`);
configItems.value = response.data;
} catch (err) {
console.log(err.response.statusText);
}
}
- if (clientChanged.value) {
- store.commit('toggleClientChanged');
+ if (customerChanged.value) {
+ store.commit('toggleCustomerChanged');
}
}
@@ -308,8 +308,8 @@ const updateCustomerID = async () => {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getCustomerByName/${sol.value.customer}`);
customer.value = response.data;
sol.value.customerID = customer.value.customerID;
- store.commit('toggleClientChanged');
- store.commit('toggleClientId', sol.value.customerID);
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', sol.value.customerID);
} catch (err) {
console.log(err.response.statusText);
}
@@ -321,13 +321,13 @@ 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);
+ store.commit('toggleCustomerChanged');
+ store.commit('toggleCustomerId', newCustomerID.value);
} catch (err) {
console.log(err.response.statusText);
}
updateSol();
- await getConfigItemsFromClient();
+ await getConfigItemsFromCustomer();
}
// include delay to avoid 503 error
@@ -338,7 +338,7 @@ const triggerBackendCallsWithDelay = async (fetchDataFunc) => {
}
watch(deleteBool, confirmDeleteSolution);
-watch(clientChanged, getSolutionById);
+watch(customerChanged, getSolutionById);
onMounted(() => {
getSolutionById();
diff --git a/components/server/SolutionChecklist.vue b/components/server/SolutionChecklist.vue
index c4dcb8f..818d4bc 100644
--- a/components/server/SolutionChecklist.vue
+++ b/components/server/SolutionChecklist.vue
@@ -165,7 +165,7 @@ const newDescriptionSol = computed(() => store.state.newDescriptionSol);
const newStepTodo = computed(() => solTodos.value.length);
const chosenSolId = computed(() => store.state.chosenSolutionId);
-const clientChanged = computed(() => store.state.clientChanged);
+const customerChanged = computed(() => store.state.customerChanged);
const changedCustomerId = computed(() => store.state.changedCustomerId);
const darkMode = ref(true)
@@ -217,7 +217,7 @@ const addSol = async () => {
}
}
if (newCustomerSol.value.length === 0) {
- alert("Please choose a client!");
+ alert("Please choose a customer!");
return;
}
let allFine = true;
@@ -267,7 +267,7 @@ const addSol = async () => {
// add new row of todo for the new solution
const addRowForNewSol = async () => {
if (newCustomerSol.value.length === 0) {
- alert("Please choose a client first!");
+ alert("Please choose a customer first!");
return;
}
await getConfigItemsFromCustomer();
@@ -371,7 +371,7 @@ const getSolutionTodosById = async () => {
}
}
-//get all config items from the selected client
+//get all config items from the selected customer
const getConfigItemsFromCustomer = async () => {
if (!addBool.value) {
try {
@@ -388,7 +388,7 @@ const getConfigItemsFromCustomer = async () => {
console.log(err.response.statusText);
}
}
- if (clientChanged.value) {
+ if (customerChanged.value) {
store.commit('toggleCustomerChanged');
}
}
@@ -419,7 +419,7 @@ const deleteSolTodo = async (id) => {
await getSolutionTodosById();
}
-watch(clientChanged, getSolutionById);
+watch(customerChanged, getSolutionById);
onMounted(() => {
getSolutionTodosById();
diff --git a/components/server/SolutionTable.vue b/components/server/SolutionTable.vue
index 1bbda45..b2286fd 100644
--- a/components/server/SolutionTable.vue
+++ b/components/server/SolutionTable.vue
@@ -64,7 +64,7 @@ const goToChosenSolution = (id) => {
store.commit('changeToSolution');
};
-const clientFilter = computed(() => store.state.filteredByClient);
+const customerFilter = computed(() => store.state.filteredByCustomer);
const searchable = computed(() => store.state.searchable);
const solutionSearchFilter = ref('');
@@ -79,8 +79,8 @@ const updateSearchTerm = async () => {
//get all solutions
const getSolutions = async () => {
- if (!(clientFilter.value === '')) {
- await getFilteredSolutionsByClient();
+ if (!(customerFilter.value === '')) {
+ await getFilteredSolutionsByCustomer();
} else {
try {
const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getAllSolutions`);
@@ -91,10 +91,10 @@ const getSolutions = async () => {
}
}
-//get all solutions based on the searched client
-const getFilteredSolutionsByClient = async () => {
+//get all solutions based on the searched customer
+const getFilteredSolutionsByCustomer = async () => {
try {
- const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByClient/${clientFilter.value}`);
+ const response = await Axios.get(`https://${clientsideConfig.url}:${clientsideConfig.port}/api/getSelectedSolutionsByCustomer/${customerFilter.value}`);
solutions.value = response.data;
} catch (err) {
console.log(err.response.statusText);
@@ -115,7 +115,7 @@ const searchSolution = async () => {
}
}
-watch(clientFilter, getSolutions);
+watch(customerFilter, getSolutions);
watch(searchable, updateSearchTerm);
diff --git a/components/server/TemplateChecklist.vue b/components/server/TemplateChecklist.vue
index e37257e..8206b03 100644
--- a/components/server/TemplateChecklist.vue
+++ b/components/server/TemplateChecklist.vue
@@ -163,7 +163,7 @@ const newDescriptionPOT = computed(() => store.state.newDescriptionPOT);
const newNotesPOT = computed(() => store.state.newNotesPOT);
const newStepTodo = computed(() => potTodos.value.length);
const chosenPOTId = computed(() => store.state.chosenPOTId);
-const clientChanged = computed(() => store.state.clientChanged);
+const customerChanged = computed(() => store.state.customerChanged);
const changedCustomerId = computed(() => store.state.changedCustomerId);
const darkMode = ref(true)
@@ -215,7 +215,7 @@ const addPOT = async () => {
}
}
if (newCustomerPOT.value.length === 0) {
- alert("Please choose a client!");
+ alert("Please choose a customer!");
return;
}
let allFine = true;
@@ -263,7 +263,7 @@ const addPOT = async () => {
// add new row of todo for the new pot
const addRowForNewPOT = async () => {
if (newCustomerPOT.value.length === 0) {
- alert("Please choose a client first!");
+ alert("Please choose a customer first!");
return;
}
await getConfigItemsFromCustomer();
@@ -367,7 +367,7 @@ const getPOTTodosById = async () => {
}
}
-//get all config items from the selected client
+//get all config items from the selected customer
const getConfigItemsFromCustomer = async () => {
if (!addBool.value) {
try {
@@ -384,7 +384,7 @@ const getConfigItemsFromCustomer = async () => {
console.log(err.response.statusText);
}
}
- if (clientChanged.value) {
+ if (customerChanged.value) {
store.commit('toggleCustomerChanged');
}
}
@@ -415,7 +415,7 @@ const deletePOTTodo = async (id) => {
await getPOTTodosById();
}
-watch(clientChanged, getPOTById);
+watch(customerChanged, getPOTById);
onMounted(() => {
getPOTTodosById();
diff --git a/components/server/TemplateChecklistMVT.vue b/components/server/TemplateChecklistMVT.vue
index 9425e59..e4aab3f 100644
--- a/components/server/TemplateChecklistMVT.vue
+++ b/components/server/TemplateChecklistMVT.vue
@@ -163,7 +163,7 @@ const newTypeMVT = computed(() => store.state.newTypeMVT);
const newNotesMVT = computed(() => store.state.newNotesMVT);
const newStepTodo = computed(() => mvtTodos.value.length);
const chosenMVTId = computed(() => store.state.chosenMVTId);
-const clientChanged = computed(() => store.state.clientChanged);
+const customerChanged = computed(() => store.state.customerChanged);
const changedCustomerId = computed(() => store.state.changedCustomerId);
const darkMode = ref(true)
@@ -215,7 +215,7 @@ const addMVT = async () => {
}
}
if (newCustomerMVT.value.length === 0) {
- alert("Please choose a client!");
+ alert("Please choose a customer!");
return;
}
let allFine = true;
@@ -263,7 +263,7 @@ const addMVT = async () => {
// add new row of todo for the new MVT
const addRowForNewMVT = async () => {
if (newCustomerMVT.value.length === 0) {
- alert("Please choose a client first!");
+ alert("Please choose a customer first!");
return;
}
await getConfigItemsFromCustomer();
@@ -367,7 +367,7 @@ const getMvtTodosById = async () => {
}
}
-//get all config items from the selected client
+//get all config items from the selected customer
const getConfigItemsFromCustomer = async () => {
if (!addBool.value) {
try {
@@ -384,7 +384,7 @@ const getConfigItemsFromCustomer = async () => {
console.log(err.response.statusText);
}
}
- if (clientChanged.value) {
+ if (customerChanged.value) {
store.commit('toggleCustomerChanged');
}
}
@@ -415,7 +415,7 @@ const deleteMVTTodo = async (id) => {
await getMvtTodosById();
}
-watch(clientChanged, getMVTById);
+watch(customerChanged, getMVTById);
onMounted(() => {
getMvtTodosById();
diff --git a/plugins/vuex.js b/plugins/vuex.js
index de23be9..1ff7f41 100644
--- a/plugins/vuex.js
+++ b/plugins/vuex.js
@@ -404,8 +404,8 @@ const store = createStore({
},
// function to update the asset filter
- updateFilterbyCustomer(state, client) {
- state.filteredByCustomer = client
+ updateFilterbyCustomer(state, customer) {
+ state.filteredByCustomer = customer
},
// function to get to the add page
diff --git a/server/middleware/maintenanceVisitTemplates.ts b/server/middleware/maintenanceVisitTemplates.ts
index 4fea5ff..bba0969 100644
--- a/server/middleware/maintenanceVisitTemplates.ts
+++ b/server/middleware/maintenanceVisitTemplates.ts
@@ -142,7 +142,7 @@ export default defineEventHandler(async (event) => {
}
if (event.path.startsWith("/api/getSelectedMVTsByCustomer")) {
- // get selected maintenance visit templates object by client from backend
+ // get selected maintenance visit templates object by customer from backend
let filteredCustomer = null;
const path = event._path;
const pathSegments = path.split('/');
diff --git a/server/middleware/productionOrderTemplates.ts b/server/middleware/productionOrderTemplates.ts
index 813da71..0a6ff74 100644
--- a/server/middleware/productionOrderTemplates.ts
+++ b/server/middleware/productionOrderTemplates.ts
@@ -141,7 +141,7 @@ export default defineEventHandler(async (event) => {
}
if (event.path.startsWith("/api/getSelectedPOTsByCustomer")) {
- // get selected production order templates object by client from backend
+ // get selected production order templates object by customer from backend
let filteredCustomer = null;
const path = event._path;
const pathSegments = path.split('/');
diff --git a/server/middleware/solutions.ts b/server/middleware/solutions.ts
index 800c7bb..6bc9d3c 100644
--- a/server/middleware/solutions.ts
+++ b/server/middleware/solutions.ts
@@ -53,7 +53,7 @@ export default defineEventHandler(async (event) => {
}
if (event.path.startsWith("/api/getSelectedSolutionsByCustomer")) {
- // get selected solutions object by client from backend
+ // get selected solutions object by customer from backend
let filteredCustomer = null;
const path = event._path;
const pathSegments = path.split('/');