{"version":3,"sources":["webpack:///./src/helpers/tuitionfees/unauthorized-helper.ts","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?6eb6","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?3f8c","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?1d4b","webpack:///./src/views/TuitionFees/PaymentResponse.vue?8b5a","webpack:///./src/components/tuition-fees/BackToInvoicesButton.vue?4f75","webpack:///./src/components/tuition-fees/BackToInvoicesButton.vue","webpack:///./src/components/tuition-fees/BackToInvoicesButton.vue?4834","webpack:///./src/views/TuitionFees/PaymentResponse.vue?8576","webpack:///./src/views/TuitionFees/PaymentResponse.vue","webpack:///./src/views/TuitionFees/PaymentResponse.vue?0492"],"names":["UnauthorizedHelper","currentUser","isMirroringUser","getItem","IsMirroringUser","isEmployee","entitlements","includes","console","warn","this","routeToUnauthorized","openLogin","url","popupParams","window","open","push","name","_hoisted_1","class","_hoisted_2","render","_ctx","_cache","$props","$setup","$data","$options","_component_font_awesome_icon","icon","$t","nullLucatId","shortPersonalId","personName","id","onClick","$event","onStopMirroringClicked","props","personalId","type","String","required","lucatId","computed","substr","length","methods","setItem","$router","__exports__","goToTuitionFeeHome","n","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_component_MirroringUserBanner","_component_BackToInvoicesButton","paymentResponse","href","mailToLink","components","BackToInvoicesButton","MirroringUserBanner","data","getPaymentResponse","$store","commit","PaymentResponse","getUserId","mirroredUser","MirroredUser","displayName","luEduPersonPrimaryId","checkIfUserIsStudentOrAdminMirroringUser","getters","getCurrentUser","mounted","unmounted","deleteItem"],"mappings":"wMAKMA,E,8HAUJ,SACEC,GAA8B,MAExBC,EAAkB,OAAsBC,QAC5C,OAAmBC,iBAGfC,IAAaJ,IAAW,UAC1BA,EAAYK,oBADc,aAC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OC,OAAO,eAAe,GAElC,IAAMT,EAAkB,OAAsBlE,QAC5C,OAAmB4E,iBAGrBrE,KAAK2D,gBAAkBA,EAElB3D,KAAK2D,kBACR3D,KAAK2D,gBAAkB,kBAO3BW,UAtBO,WAuBL,IAAMC,EAAqC,OAAsB9E,QAC/D,OAAmB+E,cAGjBD,IACFvE,KAAKwB,WAAa+C,EAAaE,YAC/BzE,KAAK8B,WAAayC,EAAazC,WAC/B9B,KAAKkC,QAAUqC,EAAaG,uBAQhCC,yCAtCO,WAuCL3E,KAAKT,YAAcS,KAAKmE,OAAOS,QAAQC,eACvC7E,KAAKR,gBACH,OAAmBmF,yCACjB3E,KAAKT,eAIbuF,QAhFO,WAiFL9E,KAAKsE,YACLtE,KAAKkE,qBACLlE,KAAK2E,4CAEPI,UArFO,WAsFL,OAAsBC,WAAW,OAAmBX,qBAGnC,W,iCC3FrB,MAAM5B,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7B,GAAQ,CAAC,YAAY,qBAE1E","file":"assets/js/chunk-84808c80.4e251e32.js","sourcesContent":["import SessionStorageService from \"@/services/sessionstorage-service\";\nimport { SessionStorageKeys } from \"@/constants/constants\";\nimport router from \"@/router\";\nimport { IUser } from \"@/interfaces/IUser\";\n\nclass UnauthorizedHelper {\n /**\n * The function checks if the current user is a student or an admin mirroring a user and returns a boolean value based on the conditions.\n * @param {IUser | undefined} currentUser - Represents the current user who is interacting with the system.\n * If the user is not logged in, the `currentUser` parameter wil be `undefined` otherwise it will contain the user's information.\n * @returns Returns a boolean value representing whether the current user is an admin mirroring a user.\n * If the current user is not logged in, the function will open a popup log in window to authorize the user.\n * If the current user is logged in but is not an admin mirroring a user or a student,\n * the function will redirect the user to the \"Unauthorized\" page.\n */\n checkIfUserIsStudentOrAdminMirroringUser(\n currentUser: IUser | undefined\n ): boolean {\n const isMirroringUser = SessionStorageService.getItem(\n SessionStorageKeys.IsMirroringUser\n );\n\n const isEmployee = currentUser\n ? currentUser.entitlements?.includes(\"Employee\")\n : false;\n\n if (!isMirroringUser || isMirroringUser === \"false\") {\n if (!currentUser) {\n this.openLogin();\n } else if (isEmployee) {\n console.warn(\n \"🚀 ~ UnauthorizedHelper ~ routing to unauthorized:\",\n currentUser\n );\n\n this.routeToUnauthorized();\n }\n }\n\n return isMirroringUser === \"true\";\n }\n\n /**\n * Opens a a popup log in window to authorize the user.\n * It is called when the user is not logged in and tries to access a page that requires authentication.\n */\n private openLogin() {\n const url = `${process.env.VUE_APP_BASE_API_URL}authorize`;\n const popupParams =\n \"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no\";\n window.open(url, \"Login\", popupParams);\n }\n\n /**\n * Redirects the user to the \"Unauthorized\" page.\n * It is called when the user is logged in but is not a student and tries to access a page that requires student privileges.\n */\n private routeToUnauthorized() {\n router.push({\n name: \"Unauthorized\",\n });\n }\n}\n\nexport default new UnauthorizedHelper();\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./MirroringUserBanner.vue?vue&type=style&index=0&id=ce0bfae8&scoped=true&lang=css\"","import { resolveComponent as _resolveComponent, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-ce0bfae8\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"mirroring\" }\nconst _hoisted_2 = [\"aria-label\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_font_awesome_icon = _resolveComponent(\"font-awesome-icon\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"span\", null, [\n _createVNode(_component_font_awesome_icon, {\n icon: 'info-circle',\n class: \"info\"\n }),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t(\"tuition-fees.mirroring\")) + \": \" + _toDisplayString(_ctx.nullLucatId) + \" - \" + _toDisplayString(_ctx.shortPersonalId) + \" - \" + _toDisplayString(_ctx.personName), 1)\n ]),\n _createElementVNode(\"button\", {\n id: \"stopMirroringBtn\",\n class: \"btn btn-outline-primary mr-2 stop-btn\",\n \"aria-label\": _ctx.$t('tuition-fees.back'),\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.onStopMirroringClicked()))\n }, _toDisplayString(_ctx.$t(\"tuition-fees.stop-mirroring\")), 9, _hoisted_2)\n ]))\n}","\nimport SessionStorageService from \"@/services/sessionstorage-service\";\nimport { SessionStorageKeys } from \"@/constants/constants\";\nimport { PropType } from \"@vue/runtime-core\";\nimport { Options, Vue } from \"vue-class-component\";\n\n@Options({\n props: {\n /**\n * The personal id of the user being mirrored by admin\n */\n personalId: {\n type: String as PropType,\n required: false,\n },\n /**\n * The name of the user being mirrored by admin\n */\n personName: {\n type: String as PropType,\n required: false,\n },\n /**\n * The lucat id of the user being mirrored by admin\n */\n lucatId: {\n type: String as PropType,\n required: false,\n },\n },\n computed: {\n /**\n * The shortened personal id of only the last 10 digits\n */\n shortPersonalId(): string {\n const personalId = this.$props.personalId;\n return personalId ? personalId.substr(personalId.length - 10) : \"\";\n },\n /**\n * If the student cannot be found in Ladok, the lucat id will be null\n */\n nullLucatId(): string {\n const lucatId = this.$props.lucatId;\n return lucatId ? lucatId : \"\";\n },\n },\n methods: {\n /**\n * Routes to search user page\n */\n onStopMirroringClicked(): void {\n SessionStorageService.setItem(SessionStorageKeys.IsMirroringUser, false);\n this.$router.push({\n name: \"MirrorUser\",\n });\n },\n },\n})\nexport default class MirroringUserBanner extends Vue {}\n","import { render } from \"./MirroringUserBanner.vue?vue&type=template&id=ce0bfae8&scoped=true&ts=true\"\nimport script from \"./MirroringUserBanner.vue?vue&type=script&lang=ts\"\nexport * from \"./MirroringUserBanner.vue?vue&type=script&lang=ts\"\n\nimport \"./MirroringUserBanner.vue?vue&type=style&index=0&id=ce0bfae8&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\GIT\\\\StudentPortal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-ce0bfae8\"]])\n\nexport default __exports__","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./PaymentResponse.vue?vue&type=style&index=0&id=90329d9c&scoped=true&lang=css\"","import { openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"button\", {\n id: \"backBtn\",\n type: \"button\",\n class: \"btn btn-outline-primary mb-3\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.goToTuitionFeeHome()))\n }, \" Return to list of invoices \"))\n}","\nimport { Options, Vue } from \"vue-class-component\";\n\n@Options({\n methods: {\n /**\n * Redirects to the tuition fee home page\n */\n goToTuitionFeeHome(): void {\n this.$router.push({\n name: \"TuitionFeeHome\",\n });\n },\n },\n})\nexport default class BackToInvoicesButton extends Vue {}\n","import { render } from \"./BackToInvoicesButton.vue?vue&type=template&id=5fca811e&ts=true\"\nimport script from \"./BackToInvoicesButton.vue?vue&type=script&lang=ts\"\nexport * from \"./BackToInvoicesButton.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\GIT\\\\StudentPortal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createVNode as _createVNode, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-90329d9c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h1\", { class: \"page-heading\" }, \"Tuition Fees\", -1))\nconst _hoisted_2 = {\n key: 1,\n class: \"margin-top-10\"\n}\nconst _hoisted_3 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", { class: \"page-heading\" }, \"Payment completed\", -1))\nconst _hoisted_4 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \"The payment has been carried out.\", -1))\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \" Please note that it might take a couple of days for your payment to be fully processed at the university. \", -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \" A receipt of your payment has been sent to your student email address. \", -1))\nconst _hoisted_7 = [\n _hoisted_3,\n _hoisted_4,\n _hoisted_5,\n _hoisted_6\n]\nconst _hoisted_8 = {\n key: 2,\n class: \"margin-top-10\"\n}\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"h2\", { class: \"page-heading\" }, \"Payment failed\", -1))\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"p\", null, \" There was a problem processing your payment. The payment service returned the following error message: \", -1))\nconst _hoisted_11 = { class: \"errorMsg\" }\nconst _hoisted_12 = /*#__PURE__*/_createTextVNode(\" If you need support, please contact the Finance Division at \")\nconst _hoisted_13 = [\"href\"]\nconst _hoisted_14 = { class: \"margin-top-25\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_MirroringUserBanner = _resolveComponent(\"MirroringUserBanner\")!\n const _component_BackToInvoicesButton = _resolveComponent(\"BackToInvoicesButton\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (this.isMirroringUser)\n ? (_openBlock(), _createBlock(_component_MirroringUserBanner, {\n key: 0,\n personalId: _ctx.personalId,\n personName: _ctx.personName,\n lucatId: _ctx.lucatId\n }, null, 8, [\"personalId\", \"personName\", \"lucatId\"]))\n : _createCommentVNode(\"\", true),\n _hoisted_1,\n (_ctx.paymentResponse === 'OK')\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, _hoisted_7))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _hoisted_9,\n _hoisted_10,\n _createElementVNode(\"p\", _hoisted_11, _toDisplayString(_ctx.paymentResponse), 1),\n _createElementVNode(\"p\", null, [\n _hoisted_12,\n _createElementVNode(\"a\", { href: _ctx.mailToLink }, \"tuitionfees@eken.lu.se\", 8, _hoisted_13)\n ])\n ])),\n _createElementVNode(\"div\", _hoisted_14, [\n _createVNode(_component_BackToInvoicesButton, {\n personalId: _ctx.personalId,\n personName: _ctx.personName,\n lucatId: _ctx.lucatId\n }, null, 8, [\"personalId\", \"personName\", \"lucatId\"])\n ])\n ], 64))\n}","\nimport { Options, Vue } from \"vue-class-component\";\nimport BackToInvoicesButton from \"@/components/tuition-fees/BackToInvoicesButton.vue\";\nimport MirroringUserBanner from \"@/components/tuition-fees/MirroringUserBanner.vue\";\nimport { SessionStorageKeys } from \"@/constants/constants\";\nimport UnauthorizedHelper from \"@/helpers/tuitionfees/unauthorized-helper\";\nimport { TfPerson } from \"@/interfaces/api\";\nimport SessionStorageService from \"@/services/sessionstorage-service\";\n\n@Options({\n components: { BackToInvoicesButton, MirroringUserBanner },\n data: () => ({\n /**\n * The payment response retrieved from session storage\n * Stored in session storage by CardPayment.vue\n */\n paymentResponse: \"\",\n /**\n * The personal id of the user being mirrored by admin\n */\n personalId: \"\",\n /**\n * The name of the user being mirrored by admin\n */\n personName: \"\",\n /**\n * The lucat id of the user being mirrored by admin\n */\n lucatId: \"\",\n /**\n * A boolean to indicate if tfp-admin is mirroring user or not\n */\n isMirroringUser: false,\n }),\n computed: {\n /**\n * The mailto link for contacting servicedesk\n */\n mailToLink() {\n return `\n mailto:servicedesk@lu.se?subject=Card%20payment%20failed&body=${this.paymentResponse}`;\n },\n },\n methods: {\n /**\n * Gets the payment response from session storage\n * Stored in session storage by CardPayment.vue\n */\n getPaymentResponse(): void {\n this.$store.commit(\"showSpinner\", false);\n\n const paymentResponse = SessionStorageService.getItem(\n SessionStorageKeys.PaymentResponse\n );\n\n this.paymentResponse = paymentResponse;\n\n if (!this.paymentResponse) {\n this.paymentResponse = \"Unknown error\";\n }\n },\n /**\n * Gets the personal id, lucat id and name of the person being mirrored\n * Stored in session storage by CardPayment.vue\n */\n getUserId(): void {\n const mirroredUser: TfPerson | undefined = SessionStorageService.getItem(\n SessionStorageKeys.MirroredUser\n );\n\n if (mirroredUser) {\n this.personName = mirroredUser.displayName;\n this.personalId = mirroredUser.personalId;\n this.lucatId = mirroredUser.luEduPersonPrimaryId;\n }\n },\n /**\n * If not logged in or not a student, redirect to unauthorized page\n * Otherwise, check if admin is mirroring a user, if so show banner\n * if not redirect to unauthorized page\n */\n checkIfUserIsStudentOrAdminMirroringUser(): void {\n this.currentUser = this.$store.getters.getCurrentUser;\n this.isMirroringUser =\n UnauthorizedHelper.checkIfUserIsStudentOrAdminMirroringUser(\n this.currentUser\n );\n },\n },\n mounted() {\n this.getUserId();\n this.getPaymentResponse();\n this.checkIfUserIsStudentOrAdminMirroringUser();\n },\n unmounted() {\n SessionStorageService.deleteItem(SessionStorageKeys.PaymentResponse);\n },\n})\nexport default class PaymentResponse extends Vue {}\n","import { render } from \"./PaymentResponse.vue?vue&type=template&id=90329d9c&scoped=true&ts=true\"\nimport script from \"./PaymentResponse.vue?vue&type=script&lang=ts\"\nexport * from \"./PaymentResponse.vue?vue&type=script&lang=ts\"\n\nimport \"./PaymentResponse.vue?vue&type=style&index=0&id=90329d9c&scoped=true&lang=css\"\n\nimport exportComponent from \"C:\\\\GIT\\\\StudentPortal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-90329d9c\"]])\n\nexport default __exports__"],"sourceRoot":""}