diff --git a/Step/wwwroot/src/components/depot.ts b/Step/wwwroot/src/components/depot.ts index 3ae340c9..770b288c 100644 --- a/Step/wwwroot/src/components/depot.ts +++ b/Step/wwwroot/src/components/depot.ts @@ -166,13 +166,13 @@ export default class depot extends Vue { } public openInfoShank(item) { - InfoEquipment.enableModalShank = true; - InfoEquipment.currentShank = item; + ModalHelper.infoEquipmentModal.enableModalShank = true; + ModalHelper.infoEquipmentModal.currentShank = item; ModalHelper.ShowModal(InfoEquipment); } public openInfoEquipment(item) { - InfoEquipment.enableModalShank = false; - InfoEquipment.currentEquipment = item; + ModalHelper.infoEquipmentModal.enableModalShank = false; + ModalHelper.infoEquipmentModal.currentEquipment = item; ModalHelper.ShowModal(InfoEquipment); } diff --git a/Step/wwwroot/src/components/info-equipment.ts b/Step/wwwroot/src/components/info-equipment.ts index 76f46164..303549ae 100644 --- a/Step/wwwroot/src/components/info-equipment.ts +++ b/Step/wwwroot/src/components/info-equipment.ts @@ -6,7 +6,7 @@ import { Factory, MessageService, awaiter } from "src/_base"; import { ToolingService } from "../services/toolingService"; import { AppModel } from "src/store"; -@Component({ name: "infoEquipment", components: { modal: Modal } }) +@Component({ name: "InfoEquipment", components: { modal: Modal } }) export default class InfoEquipment extends Vue { public title: string = ""; @@ -40,12 +40,13 @@ export default class InfoEquipment extends Vue { return Array.from(cat.values()); } - public shankConfiguration: server.ShankConfiguration[] = null; + public get shankConfiguration(): server.ShankConfiguration[] { + return (this.$store.state as AppModel).tooling.shankConfiguration; + } public toolsConfiguration: server.ToolsConfiguration[] = null; async mounted(){ await new ToolingService().GetToolsConfiguration(); - this.shankConfiguration = (this.$store.state as AppModel).tooling.shankConfiguration; this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; if(InfoEquipment.enableModalShank){ this.selectedTool = InfoEquipment.currentShank; diff --git a/Step/wwwroot/src/components/info-equipment.vue b/Step/wwwroot/src/components/info-equipment.vue index a5af5753..45935e7e 100644 --- a/Step/wwwroot/src/components/info-equipment.vue +++ b/Step/wwwroot/src/components/info-equipment.vue @@ -15,7 +15,7 @@
{{'info-equipment_category_' + c | localize(c)}}
- + {{s.name}} {{selectedTool[s.name]}} @@ -34,4 +34,76 @@ - + + diff --git a/Step/wwwroot/src/modules/base-components/ModalHelper.ts b/Step/wwwroot/src/modules/base-components/ModalHelper.ts index 3f1a3b3a..023a618b 100644 --- a/Step/wwwroot/src/modules/base-components/ModalHelper.ts +++ b/Step/wwwroot/src/modules/base-components/ModalHelper.ts @@ -7,6 +7,11 @@ export class ModalHelper { positionId: 0, magazineId: 0 }; + public static infoEquipmentModal = { + currentShank: null, + currentEquipment: null, + enableModalShank: false + }; private static _modalData = { title: "", content: "",