This commit is contained in:
Alessandro Francia
2018-05-30 12:26:48 +02:00
parent 9f81f63ae6
commit 74bfd366c1
4 changed files with 16 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ declare module server {
magazinePosConfiguration: Array<MagazinePosConfiguration>
edgesConfiguration: EdgesConfiguration
maxTools: number
maxEdgesPerTools: number
}
export interface EdgesConfiguration {
@@ -20,6 +20,10 @@ export default class toolingEquipment extends Vue {
return (this.$store.state as AppModel).tooling.maxTools;
}
public get maxEdgesPerTools(): number{
return (this.$store.state as AppModel).tooling.maxEdgesPerTools;
}
public searchText: string = "";
public currentFilter: string = "";
@@ -43,6 +43,7 @@ export class ToolingService extends baseRestService {
"api/configuration/tool_manager"
);
toolingActions.setMaxTools(store, result.maxTools);
toolingActions.setMaxEdgesPerTools(store, result.maxEdgesPerTools);
toolingActions.updateToolsConfigurations(store, result.toolsConfiguration);
toolingActions.updateMagazinePosConfigurations(
store,
+10 -1
View File
@@ -17,6 +17,7 @@ export interface ToolingStoreModel {
edgesAdditionalParamsConfiguration: Map<string, Array<string>>
edgesData: Array<server.EdgesData>
maxTools: number
maxEdgesPerTools: number
}
export interface ToolingActions {
@@ -60,6 +61,7 @@ export interface ToolingActions {
clearFamilies(context);
setMaxTools(context, number);
setMaxEdgesPerTools(context, number);
}
export const toolingStore = {
@@ -92,7 +94,8 @@ export const toolingStore = {
edgesAdditionalParamsConfiguration: null,
edgesData: [],
_edgesData: new Map<number, server.EdgesData>(),
maxTools: 0
maxTools: 0,
maxEdgesPerTools: 0
} as ToolingStoreModel,
mutations: {
UpdateMagazine(store, model: server.MagazineModel[]) {
@@ -223,9 +226,15 @@ export const toolingStore = {
},
SetMaxTools(store,number){
store.maxTools = number;
},
SetMaxEdgesPerTools(store, number){
store.maxEdgesPerTools = number;
}
},
actions: {
setMaxEdgesPerTools(context, maxEdgesPerTools: number){
context.commit("SetMaxEdgesPerTools", maxEdgesPerTools);
},
setMaxTools(context, maxTools: number){
context.commit("SetMaxTools", maxTools);
},