{"version":3,"sources":["webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/_createOrUpdateDocumentation.vue?3256","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/schema/1.projectInformation.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/schema/2.blueprints.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/schema/3.systemDetails.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/schema/4.safetyAnchorPoints.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/schema/5.documentation.ts","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/_createOrUpdateDocumentation.vue?a9a4","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/_createOrUpdateDocumentation.vue?2ed1","webpack:///./src/views/pages/app/siha/processes/createOrUpdateDocumentation/_createOrUpdateDocumentation.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","title","steps","initializeData","saveServiceFunction","loadServiceFunction","model","siHaDocumentationId","staticRenderFns","queryBuilder","properties","projectNumber","type","maxLength","required","addressLine","postalCode","city","clientCompanyName","clientFirstName","clientLastName","clientAddressLine","clientPostalCode","clientCity","clientPhoneNumber","clientEMail","pattern","validationPatterns","email","safetyHookIds","minItems","extend","auth","data","isLoading","SiHaDocumentationResourceViewModel","breadcrumb","component","schema","sendData","disabled","computed","id","$router","currentRoute","params","Number","parseInt","methods","initializedModel","fromDTO","$service","api","siHaDocumentation","getSiHaDocumentation","stepNr","updateSiHaDocumentation","createSiHaDocumentation","response","Error","replace"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,YAAY,CAACE,MAAM,CAAC,MAAQN,EAAIO,MAAM,MAAQP,EAAIQ,MAAM,kBAAkBR,EAAIS,eAAe,wBAAwBT,EAAIU,oBAAoB,wBAA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ACZC,UAAW,WAAM,wDACjBC,OAAQ,EACRC,UAAU,GAEZ,CACEH,WAAY,sDACZC,UAAW,WAAM,wDACjBC,OAAQ,EACRC,UAAU,GAEZ,CACEH,WAAY,sDACZC,UAAW,WAAM,wDACjBC,OAAQ,EACRE,SAAU,SAACP,GAA6C,OAACA,EAAD,qBACxDM,UAAU,GAEZ,CACEH,WAAY,sDACZC,UAAW,WAAM,wDACjBC,OAAQ,EACRE,SAAU,SAACP,GAA6C,OAACA,EAAD,qBACxDM,UAAU,MAIhBE,SAAU,CACRlC,oBAAA,W,QACQmC,EAAsC,QAAjC,EAAyB,QAAzB,EAAA/C,KAAKgD,QAAQC,oBAAY,eAAEC,cAAM,eAAEH,GAC9C,GAAIA,EACF,OAAOI,OAAOC,SAASL,EAAI,MAKjCM,QAAS,CACP7C,eAAA,WACE,IAAM8C,GAAmB,IAAId,EAAA,MAAqCe,QAAQ,IAE1E,OAAOD,GAEH5C,oBAAmB,W,6FAEvB,OADAV,KAAKuC,WAAY,EACbvC,KAAKY,oBACP,GAAOZ,KAAKwD,SAASC,IAAIC,kBAAkBC,qBAAqB3D,KAAKY,uBAEvEZ,KAAKuC,WAAY,EACjB,GAAOvC,KAAKQ,0BAERC,oBAAN,SAA0BmD,EAAgBjD,G,gIACA,kBAA7BX,KAAKY,oBAAZ,MACF,GAAMZ,KAAKwD,SAASC,IAAIC,kBAAkBG,wBAAwB7D,KAAKY,oBAAqBD,I,cAA5F,S,aAGiB,SAAMX,KAAKwD,SAASC,IAAIC,kBAAkBI,wBAAwBnD,I,OACnF,GADMoD,EAAW,UACZA,EACH,MAAM,IAAIC,MAAM,uEAElBhE,KAAKgD,QAAQiB,QAAQ,wDAAiDF,EAAQ,Y,sCChGmc,I,YCOrhBrB,EAAY,eACd,EACA5C,EACAe,GACA,EACA,KACA,KACA,MAIa,aAAA6B,E","file":"js/chunk-2d0a3ea7.50b33973.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('il-wizard',{attrs:{\"title\":_vm.title,\"steps\":_vm.steps,\"initialize-data\":_vm.initializeData,\"save-service-function\":_vm.saveServiceFunction,\"load-service-function\":_vm.loadServiceFunction,\"model-class\":_vm.model,\"disable-next-steps\":!_vm.siHaDocumentationId,\"to-on-complete\":\"/glaromat/il/siha\"}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\nimport validationPatterns from '@glittr/frontend-core/src/plugins/validation/validationPatterns';\r\n\r\nexport default {\r\n ...queryBuilder.properties({\r\n projectNumber: { type: ['null', 'string'], maxLength: 30 },\r\n title: { type: 'string', required: true, maxLength: 255 },\r\n addressLine: { type: 'string', required: true, maxLength: 255 },\r\n postalCode: { type: 'string', required: true, maxLength: 10 },\r\n city: { type: 'string', required: true, maxLength: 255 },\r\n clientCompanyName: { type: 'string', required: true, maxLength: 255 },\r\n clientFirstName: { type: ['null', 'string'], maxLength: 255 },\r\n clientLastName: { type: ['null', 'string'], maxLength: 255 },\r\n clientAddressLine: { type: ['null', 'string'], maxLength: 255 },\r\n clientPostalCode: { type: ['null', 'string'], maxLength: 10 },\r\n clientCity: { type: ['null', 'string'], maxLength: 255 },\r\n clientPhoneNumber: { type: ['null', 'string'], maxLength: 50 },\r\n clientEMail: { type: ['null', 'string'], pattern: validationPatterns.email, maxLength: 255 },\r\n }),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({}),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({\r\n safetyHookIds: {\r\n minItems: 1,\r\n },\r\n }),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({}),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({}),\r\n};\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { StepData } from '@/src/components/processes/il-wizard.vue';\nimport SiHaDocumentationResourceViewModel from '@/src/services/viewModel/resource/SiHaDocumentationResourceViewModel';\nimport oneSchema from './schema/1.projectInformation';\nimport twoSchema from './schema/2.blueprints';\nimport threeSchema from './schema/3.systemDetails';\nimport fourSchema from './schema/4.safetyAnchorPoints';\nimport fiveSchema from './schema/5.documentation';\n\nexport default Vue.extend({\n auth: true,\n data: () => ({\n isLoading: false,\n model: SiHaDocumentationResourceViewModel,\n title: 'page.createOrUpdateDocumentation.title.project',\n steps: [\n {\n breadcrumb: 'page.createOrUpdateDocumentation.label.stepTitles.1',\n component: () => import('./1.projectInformation.vue'),\n schema: oneSchema,\n sendData: true,\n },\n {\n breadcrumb: 'page.createOrUpdateDocumentation.label.stepTitles.2',\n component: () => import('./2.blueprints.vue'),\n schema: twoSchema,\n sendData: true,\n },\n {\n breadcrumb: 'page.createOrUpdateDocumentation.label.stepTitles.3',\n component: () => import('./3.systemDetails.vue'),\n schema: threeSchema,\n sendData: true,\n },\n {\n breadcrumb: 'page.createOrUpdateDocumentation.label.stepTitles.4',\n component: () => import('./4.safetyAnchorPoints.vue'),\n schema: fourSchema,\n disabled: (data: SiHaDocumentationResourceViewModel) => !data.hasSavedSafetyHooks,\n sendData: true,\n },\n {\n breadcrumb: 'page.createOrUpdateDocumentation.label.stepTitles.5',\n component: () => import('./5.documentation.vue'),\n schema: fiveSchema,\n disabled: (data: SiHaDocumentationResourceViewModel) => !data.hasSavedSafetyHooks,\n sendData: true,\n },\n ] as StepData[],\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 },\n methods: {\n initializeData() {\n const initializedModel = new SiHaDocumentationResourceViewModel().fromDTO({\n } as Parameters[0]);\n return initializedModel;\n },\n async loadServiceFunction() {\n this.isLoading = true;\n if (this.siHaDocumentationId) {\n return this.$service.api.siHaDocumentation.getSiHaDocumentation(this.siHaDocumentationId);\n }\n this.isLoading = false;\n return this.initializeData();\n },\n async saveServiceFunction(stepNr: number, model : SiHaDocumentationResourceViewModel) {\n if (typeof this.siHaDocumentationId === 'number') {\n await this.$service.api.siHaDocumentation.updateSiHaDocumentation(this.siHaDocumentationId, model);\n } else {\n // TODO: This should actually return a number directly and not a response-wrapper?\n const response = await this.$service.api.siHaDocumentation.createSiHaDocumentation(model);\n if (!response) {\n throw new Error('Unable to create new Documentation, no id was returned from backend');\n }\n this.$router.replace(`/glaromat/il/siha/process/updateDocumentation/${response}?step=1`);\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!./_createOrUpdateDocumentation.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!./_createOrUpdateDocumentation.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./_createOrUpdateDocumentation.vue?vue&type=template&id=3cdf5539&\"\nimport script from \"./_createOrUpdateDocumentation.vue?vue&type=script&lang=ts&\"\nexport * from \"./_createOrUpdateDocumentation.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":""}