{"version":3,"sources":["webpack:///./src/components/DynamicConfirmation/Templates lazy ^\\.\\/Template.*\\.vue$ namespace object","webpack:///./src/views/Confirmation/Confirmation.vue?2103","webpack:///./src/components/DynamicConfirmation/DynamicConfirmation.vue?17ac","webpack:///./src/components/DynamicConfirmation/DynamicConfirmation.ts","webpack:///./src/components/DynamicConfirmation/DynamicConfirmation.ts?530a","webpack:///./src/components/DynamicConfirmation/DynamicConfirmation.vue","webpack:///./src/views/Confirmation/Confirmation.ts","webpack:///./src/views/Confirmation/Confirmation.ts?6365","webpack:///./src/views/Confirmation/Confirmation.vue","webpack:///./src/views/Confirmation/Confirmation.scss?eeb8"],"names":["map","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","Error","code","ids","id","keys","Object","module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","suName","confirmationMessage","on","downloadFile","equestRouteName","_v","_s","$t","_e","staticRenderFns","component","tag","confirmationTitle","$event","$emit","slot","loader","catch","suUcFirst","charAt","toUpperCase","slice","default","components","Contact","filename","getItem","localItemKeys","followUpFilename","fileString","blobPdf","b64toBlob","url","window","URL","createObjectURL","link","document","createElement","setAttribute","style","display","body","appendChild","click","removeChild","deleteItem","$store","getters","participant","$route","params","screening","isModified","equest","birthDate","appBirthdate","format","McsisConstants","SwissDateFormat","partId","isRdvModified","hasRdv","isDeleted","DynamicConfirmation"],"mappings":"mGAAA,IAAIA,EAAM,CACT,wCAAyC,CACxC,OACA,mBAGF,SAASC,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAEJ,EAAKE,GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIC,MAAM,uBAAyBP,EAAM,KAEjD,MADAM,EAAEE,KAAO,mBACHF,KAIR,IAAIG,EAAMX,EAAIE,GAAMU,EAAKD,EAAI,GAC7B,OAAOR,EAAoBK,EAAEG,EAAI,IAAIJ,MAAK,WACzC,OAAOJ,EAAoBS,MAG7BX,EAAoBY,KAAO,WAC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,KAAKsD,OAAOC,QAAQ,OAAYC,eAH3C,qCAOI,OAAO,eAAcxD,KAAKyD,OAAOC,OAAOC,aAAe3D,KAAK4D,aAPhE,sCAWI,IAAMC,EAAS,yCACTtD,EAASP,KAAKyD,OAAOC,OAAOC,UAC5BG,EAAY,IAAO9D,KAAKwD,YAAYO,cAAeC,OAAOC,EAAA,KAAeC,iBACzEC,EAASnE,KAAKwD,YAAYW,OAEhC,gBAAUN,EAAV,YAAoBtD,EAApB,0CAA4D4D,EAA5D,sBAAgFL,KAhBpF,6BAmByB,OAAO9D,KAAKyD,OAAOC,OAAOC,YAnBnD,iCAsBI,OAAO3D,KAAKsD,OAAOC,QAAQ,OAAYa,iBAtB3C,gCA2BI,OAAQpE,KAAKsD,OAAOC,QAAQ,OAAYc,SAAWrE,KAAKsD,OAAOC,QAAQ,OAAYa,iBA3BvF,0CA+BI,OAAIpE,KAAK4D,WACH5D,KAAKsE,UACA,kCAEA,wCAGA,0CAtCf,GAA0C,QAArB,EAAY,gBALhC,eAAU,CACTxC,WAAY,CACVyC,oBAAA,MAGiB,WChBwQ,ICQzR,G,UAAY,eACd,EACAzE,EACAkB,GACA,EACA,KACA,KACA,OAIa,e,kECnBf,yBAAya,EAAG","file":"js/chunk-6d4a0535.js","sourcesContent":["var map = {\n\t\"./TemplateDefault/TemplateDefault.vue\": [\n\t\t\"391f\",\n\t\t\"chunk-5240c15d\"\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn __webpack_require__.e(ids[1]).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function webpackAsyncContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackAsyncContext.id = \"8591\";\nmodule.exports = webpackAsyncContext;","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"fullpage-wrapper\"},[_c('div',{staticClass:\"confirmation-template\"},[_c('DynamicConfirmation',{attrs:{\"showFollowup\":false,\"su-name\":_vm.suName,\"confirmation-title\":\"page.confirmation.title\",\"confirmation-message\":_vm.confirmationMessage},on:{\"download-file\":_vm.downloadFile,\"download-file-custom\":_vm.downloadFile}}),(_vm.showEquestLink)?_c('a',{attrs:{\"href\":_vm.equestRouteName,\"target\":\"_blank\"}},[_vm._v(_vm._s(_vm.$t('buttons.equestHome')))]):_vm._e()],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.component)?_c(_vm.component,{tag:\"component\",attrs:{\"confirmation-title\":_vm.confirmationTitle,\"confirmation-message\":_vm.confirmationMessage},on:{\"download-file-custom\":function($event){return _vm.$emit('download-file-custom')}}},[(_vm.showFollowup)?_c('div',{attrs:{\"slot\":\"followup\"},slot:\"followup\"},[_c('button',{staticClass:\"button button-download reversed\",on:{\"click\":function($event){return _vm.$emit('download-file')}}},[_vm._v(_vm._s(_vm.$t('page.confirmation.downloadFile')))])]):_vm._e(),_c('Contact',{attrs:{\"slot\":\"contact\"},slot:\"contact\"})],1):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { Component, Vue, Prop } from 'vue-property-decorator';\r\nimport Contact from '@/components/Contact/Contact';\r\n\r\n@Component({\r\n components: {\r\n Contact,\r\n },\r\n})\r\nexport default class DynamicConfirmation extends Vue {\r\n @Prop({ default: 'default' })\r\n public suName!: string;\r\n @Prop({ default: '' })\r\n public confirmationTitle!: string;\r\n @Prop({ default: false })\r\n public showFollowup!: boolean;\r\n @Prop({ default: '' })\r\n public confirmationMessage!: string;\r\n\r\n // The component we want to load\r\n public component: any = null;\r\n\r\n get loader() {\r\n if (!this.suName) {\r\n return () => import('./Templates/TemplateDefault/TemplateDefault.vue');\r\n }\r\n // Get the first letter of su in upper case and import the component\r\n const suUcFirst = this.suName.charAt(0).toUpperCase() + this.suName.slice(1);\r\n return () => import(`./Templates/Template${suUcFirst}/Template${suUcFirst}.vue`);\r\n }\r\n\r\n protected mounted() {\r\n this.loader()\r\n .then(() => {\r\n this.component = () => this.loader();\r\n })\r\n .catch(() => {\r\n // In case the SU doesn't have a specific template, we load the default one\r\n this.component = () => import('./Templates/TemplateDefault/TemplateDefault.vue');\r\n });\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!./DynamicConfirmation.ts?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!./DynamicConfirmation.ts?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DynamicConfirmation.vue?vue&type=template&id=6320f7a7&\"\nimport script from \"./DynamicConfirmation.ts?vue&type=script&lang=ts&\"\nexport * from \"./DynamicConfirmation.ts?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","import { Component, Vue } from 'vue-property-decorator';\r\nimport LocalStoreService from '@/store/local.store';\r\nimport BlobConverter from '@/utils/blobconverter';\r\nimport DynamicConfirmation from '@/components/DynamicConfirmation/DynamicConfirmation.vue';\r\nimport { GetterTypes } from '@/store-vuex/types';\r\nimport { AppointmentDTO } from '@/models/AppointmentDTO';\r\nimport { AppointmentStatus } from '@/models/constants/enums';\r\nimport moment from 'moment';\r\nimport { useEquestHome } from '@/config/app.config';\r\nimport { McsisConstants } from '@/models/constants/McsisConstants';\r\n\r\n@Component({\r\n components: {\r\n DynamicConfirmation,\r\n },\r\n})\r\nexport default class Confirmation extends Vue {\r\n\r\n private get participant(): AppointmentDTO {\r\n return this.$store.getters[GetterTypes.participant];\r\n }\r\n\r\n protected get showEquestLink(): boolean {\r\n return useEquestHome(this.$route.params.screening) && !this.isModified;\r\n }\r\n\r\n private get equestRouteName(): string {\r\n const equest = process.env.VUE_APP_EQUEST_ROOT;\r\n const suName = this.$route.params.screening;\r\n const birthDate = moment(this.participant.appBirthdate!).format(McsisConstants.SwissDateFormat);\r\n const partId = this.participant.partId;\r\n\r\n return `${equest}/${suName}/at-home/identification?partId=${partId}&birthDate=${birthDate}`;\r\n }\r\n\r\n private get suName() { return this.$route.params.screening; }\r\n\r\n private get isModified(): boolean {\r\n return this.$store.getters[GetterTypes.isRdvModified];\r\n }\r\n\r\n private get isDeleted(): boolean {\r\n // si on est à la confirmation sans rdv alors il s'agit d'une suppression\r\n return !this.$store.getters[GetterTypes.hasRdv] && this.$store.getters[GetterTypes.isRdvModified];\r\n }\r\n\r\n private get confirmationMessage(): string {\r\n if (this.isModified) {\r\n if (this.isDeleted) {\r\n return 'page.confirmation.deleteMessage';\r\n } else {\r\n return 'page.confirmation.modificationMessage';\r\n }\r\n } else {// création ou validation d'une auto-allocation\r\n return 'page.confirmation.validationMessage';\r\n }\r\n }\r\n\r\n /**\r\n * @brief Download the follow-up only if we already have a filename and it's an inclusion.\r\n */\r\n protected downloadFile(): void {\r\n const filename = LocalStoreService.getItem(LocalStoreService.localItemKeys.followUpFilename);\r\n if (filename) {\r\n const fileString = LocalStoreService.getItem(filename);\r\n if (fileString) {\r\n const blobPdf = BlobConverter.b64toBlob(fileString, 'application/pdf');\r\n const url = window.URL.createObjectURL(blobPdf);\r\n const link = document.createElement('a');\r\n\r\n link.setAttribute('href', url);\r\n link.setAttribute('download', filename);\r\n link.style.display = 'none';\r\n document.body.appendChild(link);\r\n link.click();\r\n document.body.removeChild(link);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @brief Remove the PDF related data\r\n */\r\n protected beforeDestroy(): void {\r\n const filename = LocalStoreService.getItem(LocalStoreService.localItemKeys.followUpFilename);\r\n if (filename) {\r\n LocalStoreService.deleteItem(filename);\r\n LocalStoreService.deleteItem(LocalStoreService.localItemKeys.followUpFilename);\r\n }\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!./Confirmation.ts?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!./Confirmation.ts?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Confirmation.vue?vue&type=template&id=06b3d521&\"\nimport script from \"./Confirmation.ts?vue&type=script&lang=ts&\"\nexport * from \"./Confirmation.ts?vue&type=script&lang=ts&\"\nimport style0 from \"./Confirmation.scss?vue&type=style&index=0&lang=scss&\"\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","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./Confirmation.scss?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./Confirmation.scss?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}