From c702ebcc0d2793babdc8355a083f8c8b56fddb58 Mon Sep 17 00:00:00 2001 From: Paolo Possanzini Date: Wed, 23 May 2018 10:57:16 +0200 Subject: [PATCH] bugfixing --- .../assets/styles/base/tooling-equipment.less | 26 +++++++++++++++---- Step/wwwroot/assets/styles/style.css | 18 ++++++++++++- Step/wwwroot/src/components/depot.ts | 2 +- .../src/components/tooling-equipment.ts | 20 +++++++++----- .../src/components/tooling-equipment.vue | 14 +++++----- .../src/components/tooling-families.ts | 12 +++++++-- .../src/components/tooling-families.vue | 14 +++++----- Step/wwwroot/src/components/tooling-magpos.ts | 13 ++++++++-- .../wwwroot/src/components/tooling-magpos.vue | 6 ++--- Step/wwwroot/src/components/tooling-shanks.ts | 24 +++++++++++------ .../wwwroot/src/components/tooling-shanks.vue | 10 +++---- Step/wwwroot/src/filters/searchFilter.ts | 1 + Step/wwwroot/src/services/toolingService.ts | 13 +++++----- Step/wwwroot/src/store/depot.store.ts | 13 +++++----- Step/wwwroot/src/store/tooling.store.ts | 18 +++++++++---- 15 files changed, 139 insertions(+), 65 deletions(-) diff --git a/Step/wwwroot/assets/styles/base/tooling-equipment.less b/Step/wwwroot/assets/styles/base/tooling-equipment.less index e61c0e9b..26aa2e25 100644 --- a/Step/wwwroot/assets/styles/base/tooling-equipment.less +++ b/Step/wwwroot/assets/styles/base/tooling-equipment.less @@ -88,13 +88,14 @@ display: flex; align-items: center; justify-content: center; + height: 63px;; border-top: solid 2px @color-label-grey; button{ background-image: linear-gradient(to bottom,@color-nice-blue,@color-darkish-blue); color: @color-white; width: 48px; height: 47px; - margin: 28px; + // margin: 28px; padding: 0; .fa{ width: 22px; @@ -176,7 +177,7 @@ } } - + } @@ -188,7 +189,7 @@ .text-body div + div{ margin-top: 11px; } - + } .tooling-families-container .tab-box-right, .tooling-shanks-container .tab-box-right, .tooling-equipment-container .tab-box-right{ @@ -224,7 +225,7 @@ margin-left: 20px; padding: 0; .fa { - vertical-align: middle; + vertical-align: middle; font-size: 21px; } } @@ -278,4 +279,19 @@ .avoid-clicks { pointer-events: none; -} \ No newline at end of file +} + +.list-vertical, .group-label-button, .tab-box-right{ + position: relative; + &.avoid-clicks::after{ + content: ""; + position: absolute; + top: 0; + left:0; + right: 0; + bottom: 0; + background: rgba(255,255,255,0.5); + } +} + + diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 1f1224fa..54512005 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -4922,6 +4922,7 @@ footer .container button.big:before { display: flex; align-items: center; justify-content: center; + height: 63px; border-top: solid 2px #979797; } .tooling-equipment-container .tooling-equipment-box .body .list-left .footer button, @@ -4944,7 +4945,6 @@ footer .container button.big:before { color: #fff; width: 48px; height: 47px; - margin: 28px; padding: 0; } .tooling-equipment-container .tooling-equipment-box .body .list-left .footer button .fa, @@ -6883,6 +6883,22 @@ footer .container button.big:before { .avoid-clicks { pointer-events: none; } +.list-vertical, +.group-label-button, +.tab-box-right { + position: relative; +} +.list-vertical.avoid-clicks::after, +.group-label-button.avoid-clicks::after, +.tab-box-right.avoid-clicks::after { + content: ""; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(255, 255, 255, 0.5); +} .info-equipment-container { height: 100%; width: 100%; diff --git a/Step/wwwroot/src/components/depot.ts b/Step/wwwroot/src/components/depot.ts index 89f47eda..17848c2d 100644 --- a/Step/wwwroot/src/components/depot.ts +++ b/Step/wwwroot/src/components/depot.ts @@ -41,7 +41,7 @@ export default class depot extends Vue { } public returnChildId(elem){ - debugger + if(elem.childTool){ return elem.childTool.id; } diff --git a/Step/wwwroot/src/components/tooling-equipment.ts b/Step/wwwroot/src/components/tooling-equipment.ts index 80fa0c75..f9ddb9c8 100644 --- a/Step/wwwroot/src/components/tooling-equipment.ts +++ b/Step/wwwroot/src/components/tooling-equipment.ts @@ -12,6 +12,13 @@ export default class toolingEquipment extends Vue { public get tools(): server.Tool[] { return (this.$store.state as AppModel).tooling.tools; } + public searchText: string = ""; + public currentFilter : string = ""; + + public applyFilter(){ + this.currentFilter = this.searchText; + } + public toolsConfiguration: server.ToolsConfiguration[] = null; public edgeConfiguration: server.EdgeConfiguration[] = null; @@ -147,7 +154,8 @@ export default class toolingEquipment extends Vue { } public cancel = function () { - this.selectedTool = null; + // this.selectedTool = null; + this.enableModify = false; this.disableList = false; } @@ -162,7 +170,7 @@ export default class toolingEquipment extends Vue { private internalCounter = -1; public addEdge(){ - debugger + this.disableList = true; this.enableModify = true; var obj = { edgeAdditionalParams:{}}; @@ -194,7 +202,7 @@ export default class toolingEquipment extends Vue { } async saveEdge(tool, model){ - debugger + delete model.id; new ToolingService().SetEdgeData(tool,model).then(response => { this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; @@ -205,7 +213,7 @@ export default class toolingEquipment extends Vue { } async modifyEdge(tool, model){ - debugger + new ToolingService().UpdateEdgeData(tool,model).then(response => { this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; @@ -214,7 +222,7 @@ export default class toolingEquipment extends Vue { } async buttonSave(tool: any, edge: any){ - debugger + if(tool.id){ if(edge && edge.id > 0){ this.modifyEdge(tool, edge); @@ -238,7 +246,7 @@ export default class toolingEquipment extends Vue { } async deleteEdgeData(tool, model){ - debugger + new ToolingService().DeleteEdgeData(tool, model).then(response => { this.selectedTool = null; }); diff --git a/Step/wwwroot/src/components/tooling-equipment.vue b/Step/wwwroot/src/components/tooling-equipment.vue index 7574e948..8d758b7b 100644 --- a/Step/wwwroot/src/components/tooling-equipment.vue +++ b/Step/wwwroot/src/components/tooling-equipment.vue @@ -14,13 +14,13 @@ {{'tooling_equipment_label_search' | localize("Seleziona un utensile")}}
- - + +
- @@ -53,7 +53,7 @@ v-if="t.name != '' && t.category == c" v-model="selectedTool[t.name]" :read-only="t.readOnly || !disableList" - :title="'tooling_equipment_param_' + t.name | localize(t.name)" + :title="'tooling_equipment_param_' + t.name | localize(t.name)" :type="t.type"> @@ -79,15 +79,15 @@ v-if="c.name != '' && c.category == ce" v-model="ed[c.name]" :read-only="c.readOnly" - :title="'tooling_equipment_cedgepar_' + c.name | localize(c.name)" + :title="'tooling_equipment_cedgepar_' + c.name | localize(c.name)" :type="c.type">
{{'tooling_equipment_list_category_geometry' | localize('geometry')}}
diff --git a/Step/wwwroot/src/components/tooling-families.ts b/Step/wwwroot/src/components/tooling-families.ts index c2dd7a80..2f8e21d8 100644 --- a/Step/wwwroot/src/components/tooling-families.ts +++ b/Step/wwwroot/src/components/tooling-families.ts @@ -13,6 +13,13 @@ export default class toolingFamilies extends Vue { public familyConfiguration: server.FamilyConfiguration[] = null; public get childToolsFamily(): server.ToolsConfiguration[] { return (this.$store.state as AppModel).tooling.childToolsFamily; } + public searchText: string = ""; + public currentFilter : string = ""; + + public applyFilter(){ + this.currentFilter = this.searchText; + } + public get categories(): string[] { let cat: Set = new Set(); for (const key in this.familyConfiguration) { @@ -92,8 +99,9 @@ export default class toolingFamilies extends Vue { } public cancel = function () { - this.selectedTool = null; + // this.selectedTool = null; this.disableList = false; + this.enableModify = false; } async save(item) { @@ -118,7 +126,7 @@ export default class toolingFamilies extends Vue { async buttonSave(tool: any){ - debugger + if(tool.id){ this.modifyFamily(tool); } diff --git a/Step/wwwroot/src/components/tooling-families.vue b/Step/wwwroot/src/components/tooling-families.vue index 6cb20ea7..9c99667a 100644 --- a/Step/wwwroot/src/components/tooling-families.vue +++ b/Step/wwwroot/src/components/tooling-families.vue @@ -14,20 +14,20 @@ {{'tooling_families_label_search' | localize("Seleziona una famiglia")}}
- - + +
-
-
@@ -38,7 +38,7 @@
- +
{{'tooling_families_boxright_header_modify' | localize("Modifica di")}} {{selectedTool.name}}
{{'tooling_families_boxright_header_add' | localize("Aggiungi")}} {{selectedTool.name}}
@@ -62,7 +62,7 @@
- +
{{'tooling_childtoolsfamily_skill_tools' | localize(" Utensile")}} {{enableEquipment}}
diff --git a/Step/wwwroot/src/components/tooling-magpos.ts b/Step/wwwroot/src/components/tooling-magpos.ts index e43cd32e..10ab6493 100644 --- a/Step/wwwroot/src/components/tooling-magpos.ts +++ b/Step/wwwroot/src/components/tooling-magpos.ts @@ -7,10 +7,18 @@ import { toolingActions } from "../store/tooling.store"; @Component({ components: { equipment, inputBox } }) export default class toolingMagPos extends Vue { - + public get magpos(): server.MagazinesPositions[] { return (this.$store.state as AppModel).tooling.magazinesPositions; } public magposConfiguration: server.MagazinePosConfiguration[] = null; + public searchText: string = ""; + public currentFilter : string = ""; + + + public applyFilter(){ + this.currentFilter = this.searchText; + } + public selectedTool: any = null; public enableModify: any = false; @@ -34,8 +42,9 @@ export default class toolingMagPos extends Vue { } public cancel = function () { - this.selectedTool = null; + // this.selectedTool = null; this.disableList = false; + this.enableModify = false; } async modifyMagPos(model) { diff --git a/Step/wwwroot/src/components/tooling-magpos.vue b/Step/wwwroot/src/components/tooling-magpos.vue index 55139db2..ec76958a 100644 --- a/Step/wwwroot/src/components/tooling-magpos.vue +++ b/Step/wwwroot/src/components/tooling-magpos.vue @@ -14,13 +14,13 @@ {{'tooling_magpos_label_search' | localize("Seleziona una manina")}}
- - + +
- diff --git a/Step/wwwroot/src/components/tooling-shanks.ts b/Step/wwwroot/src/components/tooling-shanks.ts index 164afc14..1bcd6b62 100644 --- a/Step/wwwroot/src/components/tooling-shanks.ts +++ b/Step/wwwroot/src/components/tooling-shanks.ts @@ -16,6 +16,14 @@ export default class toolingShanks extends Vue { public shankConfiguration: server.ShankConfiguration[] = null; public childToolsShank: server.ToolsConfiguration[] = null; + public searchText: string = ""; + public currentFilter : string = ""; + + + public applyFilter(){ + this.currentFilter = this.searchText; + } + public get availableTools(): server.Tools[] { return (this.$store.state as AppModel).depot.availableTool; } public get categories(): string[] { @@ -92,7 +100,7 @@ export default class toolingShanks extends Vue { public selectTab(elem){ - debugger + if(elem == 'Parameters'){ this.enableParameters = true; this.enableEquipment = false; @@ -127,7 +135,7 @@ export default class toolingShanks extends Vue { } public addToolToShank(){ - debugger + new DepotService().GetToolAvailable().then(response => { this.disableList = true; var obj = {}; @@ -154,14 +162,14 @@ export default class toolingShanks extends Vue { this.selectedTool.childsTools.splice(l,1); } } - this.selectedTool = null; + this.enableModify = false; this.disableList = false; - this.selectedEquipment = null; + // this.selectedEquipment = null; } - + async buttonSave(tool: any){ - debugger + if(tool.id){ this.modifyShank(tool); } @@ -190,7 +198,7 @@ export default class toolingShanks extends Vue { } public addToolsToShank(shank){ - debugger + let model = this.toolSelected; for(let l in this.selectedTool.childsTools){ if(this.selectedTool.childsTools[l].multitoolId){ @@ -217,7 +225,7 @@ export default class toolingShanks extends Vue { // }); } public removeToolsToShank(shank){ - debugger + let model = this.selectedEquipment; new ToolingService().removeToolToShank(shank, model).then(response => { this.disableList = false; diff --git a/Step/wwwroot/src/components/tooling-shanks.vue b/Step/wwwroot/src/components/tooling-shanks.vue index 39efbd30..1c98cb33 100644 --- a/Step/wwwroot/src/components/tooling-shanks.vue +++ b/Step/wwwroot/src/components/tooling-shanks.vue @@ -14,13 +14,13 @@ {{'tooling_shanks_label_search' | localize("Seleziona un codolo")}}
- - + +
- {{'tooling_shanks_label_add' | localize("Aggiungi codolo")}}
- + @@ -93,7 +93,7 @@
- ("api/tool_table/families"); + toolingActions.clearFamilies(store); toolingActions.updateFamilies(store, result); } async GetShanks() { @@ -128,25 +129,25 @@ export class ToolingService extends baseRestService { return response; } async DeleteTool(model: any) { - debugger + var result = await this.Delete("/api/tool_table/tool/" + model.id); toolingActions.deleteTool(store, model); return result; } async SetEdgeData(tool: any,model: any){ - debugger + var result = await this.Post("/api/tool_table/tool/" + tool.id + "/edge", model); toolingActions.setEdgeData(store, {tool,result}); return result; } async UpdateEdgeData(tool: any, model: any){ - debugger + var result = await this.Put("/api/tool_table/tool/"+ tool.id + "/edge/" + model.id, model); toolingActions.updateEdgeData(store, model); return result; } async DeleteEdgeData(tool: any, model: any){ - debugger + var result = await this.Delete("/api/tool_table/tool/" + tool.id + "/edge/" + model.id); toolingActions.deleteEdgeData(store, {tool,model}); return result; @@ -174,13 +175,13 @@ export class ToolingService extends baseRestService { } async addToolToShank(shank: any, model: any){ - debugger + var response = await this.Put("/api/tool_table/shank/"+ shank.id + "/load/" + model.multitoolId + "/tool/" + model.id, model); toolingActions.addToolToShank(store,{shank, model}); return response; } async removeToolToShank(shank: any, model: any){ - debugger + var response = await this.Put("/api/tool_table/shank/"+ shank.id + "/unload/" + model.multitoolId + "/" + model.id, model); toolingActions.removeToolToShank(store,{shank, model}); return response; diff --git a/Step/wwwroot/src/store/depot.store.ts b/Step/wwwroot/src/store/depot.store.ts index 212384a4..ac84a7b5 100644 --- a/Step/wwwroot/src/store/depot.store.ts +++ b/Step/wwwroot/src/store/depot.store.ts @@ -3,13 +3,13 @@ export interface DepotStoreModel { availableMultiTool: Array availableTool: Array } - + export interface DepotActions { updateDepot(context, model: server.DepotModel[]); updateAvailableMultiTool(context, model: server.MultiTools[]); updateAvailableTool(context, model: server.Tools[]); } - + export const depotStore = { state: { depot: [], @@ -18,21 +18,21 @@ export interface DepotStoreModel { } as DepotStoreModel, mutations: { UpdateDepot(store, model: server.DepotModel[]) { - debugger + store.depot = []; for (const key in model) { store.depot.push(model[key]); } }, UpdateAvailableMultiTool(store, model: server.MultiTools[]) { - debugger + store.availableMultiTool = []; for (const key in model) { store.availableMultiTool.push(model[key]); } }, UpdateAvailableTool(store, model: server.Tools[]) { - debugger + store.availableTool = []; for (const key in model) { store.availableTool.push(model[key]); @@ -51,6 +51,5 @@ export interface DepotStoreModel { } } as DepotActions } - + export const depotActions = depotStore.actions as DepotActions; - \ No newline at end of file diff --git a/Step/wwwroot/src/store/tooling.store.ts b/Step/wwwroot/src/store/tooling.store.ts index 56628f7a..ecef464d 100644 --- a/Step/wwwroot/src/store/tooling.store.ts +++ b/Step/wwwroot/src/store/tooling.store.ts @@ -53,6 +53,8 @@ export interface ToolingActions { setEdgeData(context, {tool,result}); addToolToShank(context, {shank,model}); removeToolToShank(context, {shank,model}); + + clearFamilies(context); } export const toolingStore = { @@ -156,12 +158,12 @@ export const toolingStore = { store.shanks = Array.from(store._shanks.values()); }, DeleteTool(store, model: server.Tool) { - debugger + store._tools.delete(model.id); store.tools = Array.from(store._tools.values()); }, DeleteEdgeData(store, {tool,model}){ - debugger + let idx = store.tools.indexOf(tool); store.tools[idx].edgesData.forEach(function(value,key){ if(value.id == model.id){ @@ -178,12 +180,12 @@ export const toolingStore = { // store.edgesData = Array.from(store._edgesData.values()); }, SetEdgeData(store,{tool,result}){ - debugger + let idx = store.tools.indexOf(tool); store.tools[idx].edgesData.push(result); }, AddToolToShank(store,{shank,model}){ - debugger + for(let l in store.shanks){ if(store.shanks[l].id == shank.id){ store.shanks[l].childsTools.push(model); @@ -191,7 +193,7 @@ export const toolingStore = { } }, RemoveToolToShank(store,{shank,model}){ - debugger + let idx = store.shanks.indexOf(shank); store.shanks[idx].childsTools.forEach(function(value,key){ if(value.id == model.id){ @@ -203,6 +205,9 @@ export const toolingStore = { // store.shanks[l].childsTools.splice(model.multitoolId,0); // } // } + }, clearFamilies(store){ + store._families.clear(); + store.families = Array.from(store._families.values()); } }, actions: { @@ -344,6 +349,9 @@ export const toolingStore = { }, updateEdgeAdditionalParamsConfiguration(context, model: Map>) { context.commit("UpdateEdgeAdditionalParamsConfiguration", model); + }, + clearFamilies(context){ + context.commit("clearFamilies"); } } as ToolingActions