implemented mvt and solutions

This commit is contained in:
2024-03-04 10:24:55 +01:00
parent 1e001bb4a1
commit 488eba45e1
57 changed files with 3389 additions and 1125 deletions

View File

@ -45,6 +45,7 @@ const store = createStore({
onTemplate: false,
onInstancelist: false,
onInstance: false,
newNamePOT: '',
newCustomerIDPOT: '',
newCustomerPOT: '',
@ -54,6 +55,28 @@ const store = createStore({
newNotesPOT: '',
chosenPOTId: -1,
newNameMVT: '',
newCustomerIDMVT: '',
newCustomerMVT: '',
newLastViewMVT: '',
newUserMVT: '',
newTypeMVT: '',
newNotesMVT: '',
chosenMVTId: -1,
onSolutionlist: true,
onCustomerSolutionlist: false,
onSolution: false,
chosenSolutionId: -1,
newSolutionNameSol: '',
newCustomerIDSol: '',
newCustomerSol: '',
newAssetNameSol: '',
newTypeSol: '',
newLastViewSol: '',
newUserSol: '',
newDescriptionSol: '',
newNotesSol: '',
};
},
mutations: {
@ -79,7 +102,7 @@ const store = createStore({
state.filteredByClient = ''
},
toggleClientChanged(state) {
state.clientChanged = !state.clientChanged
state.clientChanged = !state.clientChanged
},
toggleClientId(state, id) {
state.changedClientId = id
@ -112,7 +135,7 @@ const store = createStore({
state.onSolutionlistAsset = true
},
// functions to change the production order pages
// functions to change the production order and maintenance visit pages
changeToTemplatelist(state) {
state.onTemplatelist = true
state.onCustomerTemplatelist = false
@ -149,6 +172,23 @@ const store = createStore({
state.onInstance = true
},
// functions to change the solution pages
changeToSolutionlist(state) {
state.onSolutionlist = true
state.onCustomerSolutionlist = false
state.onSolution = false
},
changeToCustomerSolutionlist(state) {
state.onSolutionlist = false
state.onCustomerSolutionlist = true
state.onSolution = false
},
changeToSolution(state) {
state.onSolutionlist = false
state.onCustomerSolutionlist = false
state.onSolution = true
},
// functions to update the asset
updateAssetComponent(state, asset) {
state.newAssetName = asset.assetName
@ -187,6 +227,29 @@ const store = createStore({
state.newNotesPOT = pot.notes
},
// functions to update the maintenance visit template
updateMaintenanceVisitTemplateComponent(state, mvt) {
state.newNameMVT = mvt.name
state.newCustomerIDMVT = mvt.customerId
state.newCustomerMVT = mvt.customer
state.newUserMVT = mvt.user
state.newTypeMVT = mvt.type
state.newNotesMVT = mvt.notes
},
// functions to update the solution
updateSolutionComponent(state, sol) {
state.newSolutionNameSol = sol.solutionName
state.newCustomerIDSol = sol.customerId
state.newCustomerSol = sol.customer
state.newAssetNameSol = sol.assetName
state.newLastViewSol = sol.lastView
state.newTypeSol = sol.type
state.newDescriptionSol = sol.description
state.newNotesSol = sol.notes
state.newUserSol = sol.user
},
// function to set the chosen asset
setChosenAsset(state, id) {
state.chosenAssetId = id
@ -197,6 +260,16 @@ const store = createStore({
state.chosenPOTId = id
},
// function to set the chosen maintenance visit template
setChosenMVT(state, id) {
state.chosenMVTId = id
},
// function to set the chosen solution
setChosenSolution(state, id) {
state.chosenSolutionId = id
},
// function to reset the pages
resetStore(state) {
state.editable = false
@ -206,7 +279,7 @@ const store = createStore({
state.chosenAssetId = -1
state.filteredByClient = ''
state.new = false
state.clientChanged = false
state.clientChanged = false
state.changedClientId = -1
// reset the asset page variables
@ -237,10 +310,33 @@ const store = createStore({
state.newNamePOT = ''
state.newCustomerIDPOT = ''
state.newCustomerPOT = ''
state.newUserPOT = false
state.newUserPOT = ''
state.newDescriptionPOT = ''
state.newNotesPOT = ''
state.newLastViewPOT = ''
state.chosenPOTId = -1
// reset the maintenance visit template page variables
state.newNameMVT = ''
state.newCustomerIDMVT = ''
state.newCustomerMVT = ''
state.newUserMVT = ''
state.newTypeMVT = ''
state.newNotesMVT = ''
state.newLastViewMVT = ''
state.chosenMVTId = -1
// reset the solution page variables
state.newSolutionNameSol = ''
state.newCustomerIDSol = ''
state.newCustomerSol = ''
state.newAssetNameSol = ''
state.newLastViewSol = ''
state.newTypeSol = ''
state.newDescriptionSol = ''
state.newNotesSol = ''
state.newUserSol = ''
state.chosenSolutionId = -1
},
// functions to (undo) delete an asset
@ -268,15 +364,19 @@ const store = createStore({
state.onCustomerAssetlist = false
state.onAsset = true
state.onSolutionlistAsset = false
// set the production order variables
// set the production order and maintenance visit variables
state.onTemplatelist = false
state.onCustomerTemplatelist = false
state.onTemplate = true
state.onInstancelist = false
state.onInstance = false
},
// set the solution variables
state.onSolutionlist = false
state.onCustomerSolutionlist = false
state.onSolution = true
},
},
});