{"version":3,"sources":["webpack:///./src/services/generated/types/model/request/GetSafetyAnchorPointsBySiHaDocumentationRequestModel.ts","webpack:///./src/services/viewModel/request/SiHaSafetyAnchorPoint/GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/4.safetyAnchorPoints.vue?8a52","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/4.safetyAnchorPoints.vue?746e","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/4.safetyAnchorPoints.vue?ecc7","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/4.safetyAnchorPoints.vue"],"names":["this","dto","sihaDocumentationId","value","transformFromQuery","queries","Number","parseFloat","isNaN","undefined","transformToDTO","transformFromDTO","render","_vm","_h","$createElement","_c","_self","attrs","ref","columns","on","$event","safetyAnchorPointSelection","scopedSlots","_u","key","fn","gotoNewSafetyAnchorPoint","$media","isDesktop","_v","_s","$t","_e","staticClass","model","callback","$$v","numberToMultiply","expression","multiplySafetyAnchorPoints","isMobile","proxy","entry","gotoSafetyAnchorPointDetail","values","id","deleteSafetyAnchorPoint","safetyAnchorPointList","staticRenderFns","extend","auth","props","type","Object","default","data","safetyHooks","errorResponse","isLoading","computed","siHaDocumentationId","$router","currentRoute","params","parseInt","innerValue","get","set","$emit","mounted","field","format","resolveSafetyHookName","loadSafetyHooks","populateData","methods","usedSH","find","sh","name","$service","api","siHaSafetyHook","getSafetyHookList","response","items","$dialog","confirm","wantsDelete","siHaSafetyAnchorPoint","console","error","request","GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel","getSafetyAnchorPointsBySiHaDocumentation","list","push","multiplySafetyAnchorPoint","component"],"mappings":"8KASA,2B,+CAmBA,OAnB2F,oBASzF,sBAAI,kCAAmB,C,IAAvB,WAA4B,OAAOA,KAAKC,IAAIC,qB,IAC5C,SAAwBC,GAASH,KAAKC,IAAIC,oBAAsBC,G,gCAGtD,YAAAC,mBAAV,SA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OAEF,OADA,SACA,GAAM/C,KAAK4E,gB,OAAX,S,sDAGFgB,QAAQC,MAAM,GACd7F,KAAK2D,cAAgB,E,oBAEvB3D,KAAK4D,WAAY,E,YAEbgB,aAAY,W,4HAIH,OAHb5E,KAAK4D,WAAY,EACXkC,EAAU,IAAIC,EAAA,KACpBD,EAAQ5F,oBAAsBF,KAAK8D,oBACtB,GAAM9D,KAAKkF,SAASC,IAAIQ,sBAAsBK,yCAAyCF,I,cAA9FG,EAAO,SACbjG,KAAKiD,sBAAwBgD,EAAKV,MAClCvF,KAAK4D,WAAY,E,YAEnBf,4BAAA,SAA4BE,GAC1B/C,KAAK+D,QAAQmC,KAAK,0CAAmClG,KAAK8D,oBAAmB,8BAAsBf,KAErGnB,yBAAwB,WACtB5B,KAAK+D,QAAQmC,KAAK,0CAAmClG,KAAK8D,oBAAmB,yBAEzErB,2BAAN,W,2HACMzC,KAAKuC,kBAAoBvC,KAAKuB,2BAA2B,GAAGwB,GAC9D,GAAM/C,KAAKkF,SAASC,IAAIQ,sBAAsBQ,0BAA0BnG,KAAKuB,2BAA2B,GAAGwB,GAAG5C,MAAQH,KAAKuC,mBADzH,M,OAIF,OAHA,SACAvC,KAAKuB,2BAA6B,GAClCvB,KAAKuC,sBAAmB9B,EACxB,GAAMT,KAAK4E,gB,OAAX,S,sCCjKygB,I,YCO7gBwB,EAAY,eACd,EACAxF,EACAsC,GACA,EACA,KACA,KACA,MAIa,aAAAkD,E","file":"js/chunk-08355bd4.15e670ad.js","sourcesContent":["// ╭────────────────────────────────────────────────────────────────────────────────────╮\r\n// ┊ This file was automatically generated\r\n// ┊ Please do not modify manually\r\n// ┊ ©gl it 2022 - http://www.gl-it.ch\r\n// ╰────────────────────────────────────────────────────────────────────────────────────╯\r\n\r\nimport BaseModel from '@glittr/frontend-core/src/plugins/servicelayer/serviceTypes/baseModel';\r\nimport GetSafetyAnchorPointsBySiHaDocumentationRequestDTO from '../../dto/request/GetSafetyAnchorPointsBySiHaDocumentationRequestDTO';\r\n\r\nexport default abstract class GetSafetyAnchorPointsBySiHaDocumentationRequestModel extends BaseModel {\r\n // #region ──BodyRequest──────────────────────────╮\r\n // #endregion ───────────────────────────────────────╯\r\n // #region ──HeaderRequest──────────────────────────╮\r\n // #endregion ─────────────────────────────────────────╯\r\n // #region ──QueryRequest──────────────────────────╮\r\n /**\r\n * @type {int64}\r\n */\r\n get sihaDocumentationId() { return this.dto.sihaDocumentationId; }\r\n set sihaDocumentationId(value) { this.dto.sihaDocumentationId = value; }\r\n // #endregion ────────────────────────────────────────╯\r\n\r\n protected transformFromQuery(queries: Record): void {\r\n let value: any;\r\n value = Number.parseFloat(queries.sihaDocumentationId);\r\n value = Number.isNaN(value) ? undefined : value;\r\n this.dto.sihaDocumentationId = value;\r\n }\r\n}\r\n","import GetSafetyAnchorPointsBySiHaDocumentationRequestModel from '../../../generated/types/model/request/GetSafetyAnchorPointsBySiHaDocumentationRequestModel';\r\n\r\nexport default class GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel extends GetSafetyAnchorPointsBySiHaDocumentationRequestModel {\r\n protected transformToDTO() {}\r\n protected transformFromDTO() {}\r\n}\r\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('il-wizard-step',[_c('p-row',[_c('p-col',{attrs:{\"xs12\":\"\",\"md9\":\"\",\"xl7\":\"\"}},[_c('p-list-view',{ref:\"safetyAnchorPointList\",attrs:{\"columns\":_vm.columns,\"can-sort\":\"\",\"can-select\":\"\"},on:{\"selection-change\":function($event){_vm.safetyAnchorPointSelection = $event}},scopedSlots:_vm._u([{key:\"table-actions\",fn:function(){return [_c('p-col',{attrs:{\"justify-start\":\"\"}},[_c('p-button',{on:{\"click\":_vm.gotoNewSafetyAnchorPoint}},[_c('p-icon',{attrs:{\"left\":_vm.$media.isDesktop}},[_vm._v(\" add \")]),(_vm.$media.isDesktop)?_c('span',[_vm._v(\" \"+_vm._s(_vm.$t('page.createOrUpdateDocumentation.button.createSafetyAnchorPoint'))+\" \")]):_vm._e()],1)],1),_c('p-col',{attrs:{\"justify-end\":\"\"}},[_c('p-row',{attrs:{\"justify-end\":\"\",\"dense\":\"\"}},[_c('p-number-field',{staticClass:\"ix-4\",attrs:{\"disabled\":!_vm.safetyAnchorPointSelection[0],\"max\":500,\"min\":1,\"solo\":\"\"},model:{value:(_vm.numberToMultiply),callback:function ($$v) {_vm.numberToMultiply=$$v},expression:\"numberToMultiply\"}}),_c('p-button',{attrs:{\"disabled\":!_vm.safetyAnchorPointSelection[0]},on:{\"click\":_vm.multiplySafetyAnchorPoints}},[_c('p-icon',{attrs:{\"left\":!_vm.$media.isMobile}},[_vm._v(\" content_copy \")]),(!_vm.$media.isMobile)?_c('span',[_vm._v(\" \"+_vm._s(_vm.$t('page.createOrUpdateDocumentation.button.multiply'))+\" \")]):_vm._e()],1)],1)],1)]},proxy:true},{key:\"entry-actions\",fn:function(ref){\nvar entry = ref.entry;\nreturn [_c('p-row',[_c('p-button',{attrs:{\"dense\":\"\"},on:{\"click\":function($event){return _vm.gotoSafetyAnchorPointDetail(entry.values.id)}}},[_c('p-icon',{attrs:{\"dense\":\"\"}},[_vm._v(\" edit \")])],1),_c('p-button',{attrs:{\"secondary\":\"\",\"dense\":\"\"},on:{\"click\":function($event){return _vm.deleteSafetyAnchorPoint(entry.values.id)}}},[_c('p-icon',{attrs:{\"color\":\"interaction\",\"dense\":\"\"}},[_vm._v(\" delete \")])],1)],1)]}}]),model:{value:(_vm.safetyAnchorPointList),callback:function ($$v) {_vm.safetyAnchorPointList=$$v},expression:\"safetyAnchorPointList\"}})],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport IpTableColumn from '@glittr/frontend-core/src/components/p-table/IpTableColumn';\nimport GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel from '@/src/services/viewModel/request/SiHaSafetyAnchorPoint/GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel';\nimport SiHaDocumentationResourceViewModel from '@/src/services/viewModel/resource/SiHaDocumentationResourceViewModel';\nimport SafetyAnchorPointListResourceViewModel from '@/src/services/viewModel/resource/SafetyAnchorPointListResourceViewModel';\nimport SafetyHookResourceViewModel from '@/src/services/viewModel/resource/SafetyHookResourceViewModel';\n\nexport default Vue.extend({\n auth: true,\n props: {\n value: { type: Object, default: undefined },\n },\n data: () => ({\n safetyHooks: [] as SafetyHookResourceViewModel[],\n errorResponse: undefined as any,\n columns: [] as IpTableColumn[],\n numberToMultiply: 1 as number | undefined,\n safetyAnchorPointList: [] as SafetyAnchorPointListResourceViewModel[],\n isLoading: false,\n safetyAnchorPointSelection: [] as any,\n }),\n computed: {\n siHaDocumentationId() {\n const id = this.$router.currentRoute?.params?.id as string | undefined;\n if (id) {\n return Number.parseInt(id, 10);\n }\n return undefined;\n },\n innerValue: {\n get(): SiHaDocumentationResourceViewModel {\n return this.value ?? {};\n },\n set(value: SiHaDocumentationResourceViewModel) {\n this.$emit('input', value);\n },\n },\n },\n async mounted() {\n this.columns = [\n {\n value: Vue.$t('page.safetyAnchorPointDetail.label.safetyAnchorPointNr'),\n field: 'name',\n },\n // TODO: Load Name of safetyhook\n {\n value: Vue.$t('page.safetyAnchorPointDetail.label.usedSafetyAnchorPoint'),\n field: 'safetyHookId',\n format: (id: number) => this.resolveSafetyHookName(id),\n },\n ];\n await this.loadSafetyHooks();\n await this.populateData();\n },\n methods: {\n resolveSafetyHookName(id: number) {\n const usedSH = this.safetyHooks.find((sh: SafetyHookResourceViewModel) => sh.id === id);\n return usedSH?.name ?? '...';\n },\n async loadSafetyHooks() {\n const response = await this.$service.api.siHaSafetyHook.getSafetyHookList();\n this.safetyHooks = response.items;\n },\n async deleteSafetyAnchorPoint(id: number) {\n this.isLoading = true;\n try {\n const wantsDelete = await this.$dialog.confirm(this.$t('app.confirmDelete'), this.$t('app.doYouWantToDelete'));\n if (wantsDelete) {\n await this.$service.api.siHaSafetyAnchorPoint.deleteSafetyAnchorPoint(id);\n await this.populateData();\n }\n } catch (error) {\n console.error(error);\n this.errorResponse = error;\n }\n this.isLoading = false;\n },\n async populateData() {\n this.isLoading = true;\n const request = new GetSafetyAnchorPointsBySiHaDocumentationRequestViewModel();\n request.sihaDocumentationId = this.siHaDocumentationId;\n const list = await this.$service.api.siHaSafetyAnchorPoint.getSafetyAnchorPointsBySiHaDocumentation(request);\n this.safetyAnchorPointList = list.items;\n this.isLoading = false;\n },\n gotoSafetyAnchorPointDetail(id: number) {\n this.$router.push(`/glaromat/il/siha/documentation/${this.siHaDocumentationId}/safetyAnchorPoint/${id}`);\n },\n gotoNewSafetyAnchorPoint() {\n this.$router.push(`/glaromat/il/siha/documentation/${this.siHaDocumentationId}/safetyAnchorPoint/`);\n },\n async multiplySafetyAnchorPoints() {\n if (this.numberToMultiply && this.safetyAnchorPointSelection[0].id) {\n await this.$service.api.siHaSafetyAnchorPoint.multiplySafetyAnchorPoint(this.safetyAnchorPointSelection[0].id.value!, this.numberToMultiply!);\n this.safetyAnchorPointSelection = [];\n this.numberToMultiply = undefined as number | undefined;\n await this.populateData();\n }\n },\n },\n});\n","import mod from \"-!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./4.safetyAnchorPoints.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./4.safetyAnchorPoints.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./4.safetyAnchorPoints.vue?vue&type=template&id=6a011b50&\"\nimport script from \"./4.safetyAnchorPoints.vue?vue&type=script&lang=ts&\"\nexport * from \"./4.safetyAnchorPoints.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}