implemented poi and mvi
This commit is contained in:
126
plugins/vuex.js
126
plugins/vuex.js
@ -26,6 +26,7 @@ const store = createStore({
|
||||
editIcon: false,
|
||||
editUserIcon: false,
|
||||
deleteIcon: false,
|
||||
notAllInstancesIcon: false,
|
||||
|
||||
onAssetlist: true,
|
||||
onAsset: false,
|
||||
@ -169,6 +170,34 @@ const store = createStore({
|
||||
|
||||
changeToSet: false,
|
||||
updateDarkMode: false,
|
||||
|
||||
newNamePOI: '',
|
||||
newTemplateIDPOI: '',
|
||||
newCustomerIDPOI: '',
|
||||
newCustomerPOI: '',
|
||||
newAssetPOI: '',
|
||||
newStatePOI: '',
|
||||
newCreationDatePOI: '',
|
||||
newCompletionDatePOI: '',
|
||||
newUserPOI: '',
|
||||
newTemplateDescriptionPOI: '',
|
||||
newTemplateNotesPOI: '',
|
||||
newTimeSpentPOI: '',
|
||||
newNotesPOI: '',
|
||||
|
||||
newNameMVI: '',
|
||||
newTemplateIDMVI: '',
|
||||
newMaintenanceTypeMVI: '',
|
||||
newStateMVI: '',
|
||||
newCreationDateMVI: '',
|
||||
newCompletionDateMVI: '',
|
||||
newUserMVI: '',
|
||||
newCustomerIDMVI: '',
|
||||
newCustomerMVI: '',
|
||||
newTemplateNotesMVI: '',
|
||||
newTypeMVI: '',
|
||||
newTimeSpentMVI: '',
|
||||
newNotesMVI: '',
|
||||
};
|
||||
},
|
||||
mutations: {
|
||||
@ -234,6 +263,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToCustomerAssetlist(state) {
|
||||
state.onAssetlist = false
|
||||
@ -253,6 +283,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToAsset(state) {
|
||||
state.onAssetlist = false
|
||||
@ -272,6 +303,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToSolutionlistAsset(state) {
|
||||
state.onAssetlist = false
|
||||
@ -291,6 +323,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
// functions to change the production order and maintenance visit pages
|
||||
@ -313,6 +346,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToCustomerTemplatelist(state) {
|
||||
state.onTemplatelist = false
|
||||
@ -333,6 +367,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToTemplate(state) {
|
||||
state.onTemplatelist = false
|
||||
@ -353,6 +388,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToInstancelist(state) {
|
||||
state.onTemplatelist = false
|
||||
@ -373,6 +409,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = true
|
||||
},
|
||||
changeToInstance(state) {
|
||||
state.onTemplatelist = false
|
||||
@ -393,6 +430,12 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = true
|
||||
},
|
||||
seeAllIcon(state) {
|
||||
state.notAllInstancesIcon = false
|
||||
state.chosenPOTId = -1
|
||||
state.chosenMVTId = -1
|
||||
},
|
||||
addNewAsset(state) {
|
||||
state.newAsset = true
|
||||
@ -423,6 +466,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToCustomerSolutionlist(state) {
|
||||
state.onSolutionlist = false
|
||||
@ -441,6 +485,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToSolution(state) {
|
||||
state.onSolutionlist = false
|
||||
@ -459,6 +504,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
// functions to change the issue slip pages
|
||||
@ -479,6 +525,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToCustomerIssueSliplist(state) {
|
||||
state.onIssueSliplist = false
|
||||
@ -497,6 +544,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToIssueSlip(state) {
|
||||
state.onIssueSliplist = false
|
||||
@ -515,6 +563,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
// functions to change the issue pages
|
||||
@ -536,6 +585,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToIssueItem(state) {
|
||||
state.onIssueItemList = false
|
||||
@ -555,6 +605,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToIssueItemVariant(state) {
|
||||
state.onIssueItemList = false
|
||||
@ -574,6 +625,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
// functions to change the user pages
|
||||
@ -594,6 +646,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
changeToEmployee(state) {
|
||||
state.onEmployeelist = false
|
||||
@ -612,6 +665,7 @@ const store = createStore({
|
||||
state.editIcon = true
|
||||
state.editUserIcon = false
|
||||
state.deleteIcon = true
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
changeToSettings(state) {
|
||||
@ -628,6 +682,7 @@ const store = createStore({
|
||||
state.editIcon = false
|
||||
state.editUserIcon = true
|
||||
state.deleteIcon = false
|
||||
state.notAllInstancesIcon = false
|
||||
},
|
||||
|
||||
// functions to update the asset
|
||||
@ -750,6 +805,47 @@ const store = createStore({
|
||||
state.newPostcodeEmp = employee.postcode
|
||||
},
|
||||
|
||||
// function to update production order instance component
|
||||
updateProductionOrderInstanceComponent(state, productionOrderInstance) {
|
||||
state.newNamePOI = productionOrderInstance.name
|
||||
state.newTemplateIDPOI = productionOrderInstance.templateID
|
||||
state.newCustomerIDPOI = productionOrderInstance.customerID
|
||||
state.newCustomerPOI = productionOrderInstance.customer
|
||||
state.newAssetPOI = productionOrderInstance.asset
|
||||
state.newStatePOI = productionOrderInstance.state
|
||||
state.newCreationDatePOI = productionOrderInstance.creationDate
|
||||
state.newCompletionDatePOI = productionOrderInstance.completionDate
|
||||
state.newUserPOI = productionOrderInstance.user
|
||||
state.newTemplateDescriptionPOI = productionOrderInstance.templateDescription
|
||||
state.newTemplateNotesPOI = productionOrderInstance.templateNotes
|
||||
state.newTimeSpentPOI = productionOrderInstance.timeSpent
|
||||
state.newNotesPOI = productionOrderInstance.notes
|
||||
},
|
||||
updateProductionOrderInstanceTemplateID(state, id) {
|
||||
state.newTemplateIDPOI = id
|
||||
},
|
||||
|
||||
// function to update maintenance visit instance component
|
||||
updateMaintenanceVisitInstanceComponent(state, maintenanceVisitInstance) {
|
||||
state.newNameMVI = maintenanceVisitInstance.name
|
||||
state.newTemplateIDMVI = maintenanceVisitInstance.templateID
|
||||
state.newMaintenanceTypeMVI = maintenanceVisitInstance.maintenanceType
|
||||
state.newStateMVI = maintenanceVisitInstance.state
|
||||
state.newCreationDateMVI = maintenanceVisitInstance.creationDate
|
||||
state.newCompletionDateMVI = maintenanceVisitInstance.completionDate
|
||||
state.newUserMVI = maintenanceVisitInstance.user
|
||||
state.newCustomerIDMVI = maintenanceVisitInstance.customerID
|
||||
state.newCustomerMVI = maintenanceVisitInstance.customer
|
||||
state.newTemplateNotesMVI = maintenanceVisitInstance.templateNotes
|
||||
state.newTypeMVI = maintenanceVisitInstance.type
|
||||
state.newTimeSpentMVI = maintenanceVisitInstance.timeSpent
|
||||
state.newNotesMVI = maintenanceVisitInstance.notes
|
||||
},
|
||||
updateMaintenanceVisitInstanceTemplateID(state, id) {
|
||||
state.newTemplateIDMVI = id
|
||||
},
|
||||
|
||||
|
||||
setLocalStorageChanged(state) {
|
||||
state.localStorageChanged = !state.localStorageChanged
|
||||
},
|
||||
@ -987,6 +1083,36 @@ const store = createStore({
|
||||
state.newAddressEmp = ''
|
||||
state.newCityEmp = ''
|
||||
state.newPostcodeEmp = ''
|
||||
|
||||
// reset the poi page variables
|
||||
state.newNamePOI = ''
|
||||
state.newTemplateIDPOI = ''
|
||||
state.newCustomerIDPOI = ''
|
||||
state.newCustomerPOI = ''
|
||||
state.newAssetPOI = ''
|
||||
state.newStatePOI = ''
|
||||
state.newCreationDatePOI = ''
|
||||
state.newCompletionDatePOI = ''
|
||||
state.newUserPOI = ''
|
||||
state.newTemplateDescriptionPOI = ''
|
||||
state.newTemplateNotesPOI = ''
|
||||
state.newTimeSpentPOI = ''
|
||||
state.newNotesPOI = ''
|
||||
|
||||
// reset the mvi page variables
|
||||
state.newNameMVI = ''
|
||||
state.newTemplateIDMVI = ''
|
||||
state.newMaintenanceTypeMVI = ''
|
||||
state.newStateMVI = ''
|
||||
state.newCreationDateMVI = ''
|
||||
state.newCompletionDateMVI = ''
|
||||
state.newUserMVI = ''
|
||||
state.newCustomerIDMVI = ''
|
||||
state.newCustomerMVI = ''
|
||||
state.newTemplateNotesMVI = ''
|
||||
state.newTypeMVI = ''
|
||||
state.newTimeSpentMVI = ''
|
||||
state.newNotesMVI = ''
|
||||
},
|
||||
|
||||
// function to logout
|
||||
|
||||
Reference in New Issue
Block a user