{"version":3,"sources":["webpack:///./src/helpers/tuitionfees/unauthorized-helper.ts","webpack:///./src/views/TuitionFees/CardPayment.vue?9bba","webpack:///./src/services/tuition-fees/payment-service.ts","webpack:///./src/views/TuitionFees/CardPayment.vue","webpack:///./src/views/TuitionFees/CardPayment.vue?e138","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?6eb6","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?3f8c","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?0283","webpack:///./src/components/tuition-fees/MirroringUserBanner.vue?1d4b","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/assets/visa_mastercard.png"],"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","_hoisted_3","_hoisted_4","_hoisted_5","src","_hoisted_6","_hoisted_7","_hoisted_8","render","_ctx","_cache","$props","$setup","$data","$options","_component_MirroringUserBanner","_component_BackToInvoicesButton","key","personalId","personName","lucatId","id","type","onClick","$event","performPayment","action","netsUrl","method","ref","registerCardRequest","endpointController","enpointRoute","registerPayment","baseApiUrl","log","fetch","headers","body","JSON","stringify","terminalResponse","components","BackToInvoicesButton","MirroringUserBanner","data","computed","$store","state","methods","getUserId","mirroredUser","MirroredUser","displayName","luEduPersonPrimaryId","commit","invoiceNo","$route","params","customerEmail","email","then","registerPaymentResponse","resourceUrl","redirectToNetsPaymentTerminal","error","saveTransactionResultAndRouteToResultPage","catch","e","netsForm","$refs","submit","getNetsResponse","transactionId","query","responseCode","terminalRespone","invoiceNumber","handleNetsTerminalResponse","result","operationResult","setItem","PaymentResponse","$router","getCurrentEntitlements","getters","getCurrentUser","checkIfUserIsStudentOrAdminMirroringUser","scrollToTop","scrollTo","mounted","__exports__","_component_font_awesome_icon","icon","$t","nullLucatId","shortPersonalId","onStopMirroringClicked","props","String","required","substr","length","goToTuitionFeeHome","module","exports"],"mappings":"wMAKMA,E,8HAUJ,SACEC,GAA8B,MAExBC,EAAkB,OAAsBC,QAC5C,OAAmBC,iBAGfC,IAAaJ,IAAW,UAC1BA,EAAYK,oBADc,aAC1B,EAA0BC,SAAS,aAgBvC,OAbKL,GAAuC,UAApBA,IACjBD,EAEMI,IACTG,QAAQC,KACN,qDACAR,GAGFS,KAAKC,uBAPLD,KAAKE,aAWkB,SAApBV,I,uBAOD,WACN,IAAMW,EAAM,GAAH,OAAM,uCAAN,aACHC,EACJ,yEACFC,OAAOC,KAAKH,EAAK,QAASC,K,iCAOpB,WACN,OAAOG,KAAK,CACVC,KAAM,qB,KAKG,WAAIlB,G,gFC5DbmB,EAA0B,eAAoB,KAAM,CAAEC,MAAO,gBAAkB,gBAAiB,GAChGC,EAA0B,eAAoB,KAAM,CAAED,MAAO,gBAAkB,gBAAiB,GAChGE,EAA0B,eAAoB,IAAK,KAAM,oEAAqE,GAC9HC,EAA0B,eAAoB,IAAK,KAAM,8EAA+E,GACxIC,EAA0B,eAAoB,IAAK,KAAM,CAChD,eAAoB,MAAO,CAAEC,IAAK,QAC7C,GACEC,EAA0B,eAAoB,KAAM,KAAM,MAAO,GACjEC,EAA0B,eAAoB,IAAK,KAAM,+JAAgK,GACzNC,EAAa,CAAC,UAEd,SAAUC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAiC,eAAkB,uBACnDC,EAAkC,eAAkB,wBAE1D,OAAQ,iBAAc,eAAoB,OAAW,KAAM,CACxD3B,KAAKR,iBACD,iBAAc,eAAakC,EAAgC,CAC1DE,IAAK,EACLC,WAAYT,EAAKS,WACjBC,WAAYV,EAAKU,WACjBC,QAASX,EAAKW,SACb,KAAM,EAAG,CAAC,aAAc,aAAc,aACzC,eAAoB,IAAI,GAC5BtB,EACAE,EACAC,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BAJO,WAKL,OAAsBhB,QAAQ,OAAmBlG,iBAAiB,GAClEM,KAAK8F,QAAQvF,KAAK,CAChBC,KAAM,oBAKO,W,iCCnDrB,MAAM8F,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASnF,GAAQ,CAAC,YAAY,qBAE1E,U,kDCPT,SAAUA,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQ,iBAAc,eAAoB,SAAU,CAClDO,GAAI,UACJC,KAAM,SACNvB,MAAO,+BACPwB,QAASb,EAAO,KAAOA,EAAO,GAAK,SAACc,GAAD,OAAkBf,EAAK8F,wBACzD,gC,4ECOgB,EAArB,qJAAkD,QAA7B,EAAoB,gBAZxC,eAAQ,CACPtD,QAAS,CAIPsD,mBAJO,WAKLlH,KAAK8F,QAAQvF,KAAK,CAChBC,KAAM,wBAKO,W,qBCVrB,MAAM8F,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASnF,KAErD,U,qBCPfgG,EAAOC,QAAU,IAA0B","file":"assets/js/chunk-7cbb86bf.cb1b150d.js","sourcesContent":["import SessionStorageService from \"@/services/sessionstorage-service\";\r\nimport { SessionStorageKeys } from \"@/constants/constants\";\r\nimport router from \"@/router\";\r\nimport { IUser } from \"@/interfaces/IUser\";\r\n\r\nclass UnauthorizedHelper {\r\n /**\r\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.\r\n * @param {IUser | undefined} currentUser - Represents the current user who is interacting with the system.\r\n * If the user is not logged in, the `currentUser` parameter wil be `undefined` otherwise it will contain the user's information.\r\n * @returns Returns a boolean value representing whether the current user is an admin mirroring a user.\r\n * If the current user is not logged in, the function will open a popup log in window to authorize the user.\r\n * If the current user is logged in but is not an admin mirroring a user or a student,\r\n * the function will redirect the user to the \"Unauthorized\" page.\r\n */\r\n checkIfUserIsStudentOrAdminMirroringUser(\r\n currentUser: IUser | undefined\r\n ): boolean {\r\n const isMirroringUser = SessionStorageService.getItem(\r\n SessionStorageKeys.IsMirroringUser\r\n );\r\n\r\n const isEmployee = currentUser\r\n ? currentUser.entitlements?.includes(\"Employee\")\r\n : false;\r\n\r\n if (!isMirroringUser || isMirroringUser === \"false\") {\r\n if (!currentUser) {\r\n this.openLogin();\r\n } else if (isEmployee) {\r\n console.warn(\r\n \"🚀 ~ UnauthorizedHelper ~ routing to unauthorized:\",\r\n currentUser\r\n );\r\n\r\n this.routeToUnauthorized();\r\n }\r\n }\r\n\r\n return isMirroringUser === \"true\";\r\n }\r\n\r\n /**\r\n * Opens a a popup log in window to authorize the user.\r\n * It is called when the user is not logged in and tries to access a page that requires authentication.\r\n */\r\n private openLogin() {\r\n const url = `${process.env.VUE_APP_BASE_API_URL}authorize`;\r\n const popupParams =\r\n \"scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no\";\r\n window.open(url, \"Login\", popupParams);\r\n }\r\n\r\n /**\r\n * Redirects the user to the \"Unauthorized\" page.\r\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.\r\n */\r\n private routeToUnauthorized() {\r\n router.push({\r\n name: \"Unauthorized\",\r\n });\r\n }\r\n}\r\n\r\nexport default new UnauthorizedHelper();\r\n","import { resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, createVNode as _createVNode, Fragment as _Fragment, createElementBlock as _createElementBlock } from \"vue\"\nimport _imports_0 from '@/assets/visa_mastercard.png'\n\n\nconst _hoisted_1 = /*#__PURE__*/_createElementVNode(\"h1\", { class: \"page-heading\" }, \"Tuition Fees\", -1)\nconst _hoisted_2 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"page-heading\" }, \"Card payment\", -1)\nconst _hoisted_3 = /*#__PURE__*/_createElementVNode(\"p\", null, \"You have selected to pay the invoice via a credit or debit card.\", -1)\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"p\", null, \" We accept payment by the following credit/debit cards: Visa, MasterCard. \", -1)\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"p\", null, [\n /*#__PURE__*/_createElementVNode(\"img\", { src: _imports_0 })\n], -1)\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"br\", null, null, -1)\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"p\", null, \" Lund University will have no access to the data recorded in the payment window and no third party will gain access to your personal or financial details. \", -1)\nconst _hoisted_8 = [\"action\"]\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 _hoisted_2,\n _hoisted_3,\n _hoisted_4,\n _hoisted_5,\n _createElementVNode(\"button\", {\n id: \"paymentBtn\",\n type: \"button\",\n class: \"btn btn-primary mb-3\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.performPayment()))\n }, \" Perform payment \"),\n _hoisted_6,\n _hoisted_7,\n _createElementVNode(\"form\", {\n action: _ctx.netsUrl,\n method: \"post\",\n ref: \"netsForm\"\n }, null, 8, _hoisted_8),\n _createVNode(_component_BackToInvoicesButton)\n ], 64))\n}","import BaseService from \"@/services/base-service\";\r\nimport {\r\n RegisterCardRequest,\r\n RegisterCardResponse,\r\n NetsTerminalResponse,\r\n} from \"@/interfaces/api\";\r\n\r\nclass PaymentService extends BaseService {\r\n /**\r\n * Registers a payment for the given invoice number\r\n *\r\n * @param {RegisterCardRequest} registerCardRequest - An object containing the invoice number and the customer email\r\n * @returns {Promise>} A promise with a response containing either the url of the payment page or an error message\r\n */\r\n async registerPayment(\r\n registerCardRequest: RegisterCardRequest\r\n ): Promise {\r\n const endpointController = \"Payment\";\r\n const enpointRoute = \"register\";\r\n const registerPayment = `${this.baseApiUrl}api/${endpointController}/${enpointRoute}`;\r\n console.log(\"Calling fetch with:\", registerPayment, registerCardRequest);\r\n return this.fetch(registerPayment, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(registerCardRequest),\r\n });\r\n }\r\n\r\n /**\r\n * Handles the response from the nets payment terminal by sending the results to the backend\r\n * which in turn will process the payment and return the result which will redirect to the\r\n * payment response page\r\n * @param {NetsTerminalResponse} terminalResponse - The response from the nets payment terminal\r\n * @returns {Promise>} A promise with a response\r\n */\r\n async handleNetsTerminalResponse(\r\n terminalResponse: NetsTerminalResponse\r\n ): Promise {\r\n const endpointController = \"Payment\";\r\n const enpointRoute = \"terminalResponse\";\r\n const registerPayment = `${this.baseApiUrl}api/${endpointController}/${enpointRoute}`;\r\n return this.fetch(registerPayment, {\r\n method: \"POST\",\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n },\r\n body: JSON.stringify(terminalResponse),\r\n });\r\n }\r\n}\r\n\r\nexport default new PaymentService();\r\n","\r\nimport { Options, Vue } from \"vue-class-component\";\r\nimport BackToInvoicesButton from \"@/components/tuition-fees/BackToInvoicesButton.vue\";\r\nimport MirroringUserBanner from \"@/components/tuition-fees/MirroringUserBanner.vue\";\r\nimport { SessionStorageKeys } from \"@/constants/constants\";\r\nimport UnauthorizedHelper from \"@/helpers/tuitionfees/unauthorized-helper\";\r\nimport {\r\n RegisterCardResponse,\r\n NetsTerminalResponse,\r\n RegisterCardRequest,\r\n TfPerson,\r\n} from \"@/interfaces/api\";\r\nimport SessionStorageService from \"@/services/sessionstorage-service\";\r\nimport PaymentService from \"@/services/tuition-fees/payment-service\";\r\n\r\n@Options({\r\n components: {\r\n BackToInvoicesButton,\r\n MirroringUserBanner,\r\n },\r\n data: () => ({\r\n /**\r\n * The current user object\r\n */\r\n currentUser: {},\r\n /**\r\n * The personal id of the user being mirrored by admin\r\n */\r\n personalId: \"\",\r\n /**\r\n * The name of the user being mirrored by admin\r\n */\r\n personName: \"\",\r\n /**\r\n * The lucat id of the user being mirrored by admin\r\n */\r\n lucatId: \"\",\r\n /**\r\n * A boolean to indicate if tfp-admin is mirroring user or not\r\n */ isMirroringUser: false,\r\n }),\r\n computed: {\r\n /**\r\n * The current user\r\n */\r\n currentUser() {\r\n return this.$store.state.currentUser;\r\n },\r\n },\r\n methods: {\r\n /**\r\n * Gets the personal id, lucat id and name of the person being mirrored\r\n */\r\n getUserId(): void {\r\n const mirroredUser: TfPerson | undefined = SessionStorageService.getItem(\r\n SessionStorageKeys.MirroredUser\r\n );\r\n\r\n if (mirroredUser) {\r\n this.personName = mirroredUser.displayName;\r\n this.personalId = mirroredUser.personalId;\r\n this.lucatId = mirroredUser.luEduPersonPrimaryId;\r\n }\r\n },\r\n /**\r\n * Makes a register payment call to backend and redirects to payment page via nets API\r\n */\r\n performPayment(): void {\r\n this.$store.commit(\"showSpinner\", true);\r\n\r\n const invoiceNo = this.$route.params.invoiceNo;\r\n const customerEmail = this.currentUser.email;\r\n\r\n const registerCardRequest: RegisterCardRequest = {\r\n invoiceNo: invoiceNo,\r\n customerEmail: customerEmail,\r\n };\r\n\r\n PaymentService.registerPayment(registerCardRequest)\r\n .then((registerPaymentResponse: RegisterCardResponse) => {\r\n if (registerPaymentResponse.resourceUrl) {\r\n this.netsUrl = registerPaymentResponse.resourceUrl;\r\n try {\r\n this.redirectToNetsPaymentTerminal(\r\n registerPaymentResponse.resourceUrl\r\n );\r\n } catch (error) {\r\n this.saveTransactionResultAndRouteToResultPage(error);\r\n }\r\n } else {\r\n this.saveTransactionResultAndRouteToResultPage(\r\n registerPaymentResponse.error\r\n );\r\n }\r\n })\r\n .catch((e: Error) => {\r\n console.error(e);\r\n });\r\n },\r\n /**\r\n * Submits the form in order to redirect to the nets payment terminal\r\n */\r\n redirectToNetsPaymentTerminal(resourceUrl: string): void {\r\n try {\r\n const netsForm = this.$refs.netsForm;\r\n netsForm.action = resourceUrl;\r\n netsForm.submit();\r\n } catch (e) {\r\n this.saveTransactionResultAndRouteToResultPage(e);\r\n }\r\n },\r\n /**\r\n * Gets the nets response from the route query\r\n * and calls the backend to process the payment\r\n */\r\n getNetsResponse(): void {\r\n const invoiceNo = this.$route.params.invoiceNo;\r\n const transactionId = this.$route.query.transactionId;\r\n const responseCode = this.$route.query.responseCode;\r\n\r\n if (transactionId) {\r\n this.$store.commit(\"showSpinner\", true);\r\n\r\n const terminalRespone: NetsTerminalResponse = {\r\n transactionId: transactionId,\r\n responseCode: responseCode,\r\n invoiceNumber: invoiceNo,\r\n };\r\n\r\n PaymentService.handleNetsTerminalResponse(terminalRespone)\r\n .then((result: string) => {\r\n this.saveTransactionResultAndRouteToResultPage(result);\r\n })\r\n .catch((e: Error) => {\r\n this.saveTransactionResultAndRouteToResultPage(e);\r\n });\r\n }\r\n },\r\n /**\r\n * Saves the transaction result in session storage and routes to the payment response page\r\n */\r\n saveTransactionResultAndRouteToResultPage(operationResult: string): void {\r\n this.getUserId();\r\n\r\n SessionStorageService.setItem(\r\n SessionStorageKeys.PaymentResponse,\r\n operationResult\r\n );\r\n\r\n this.$router.push({\r\n name: \"PaymentResponse\",\r\n });\r\n },\r\n\r\n getCurrentEntitlements() {\r\n this.currentUser = this.$store.getters.getCurrentUser;\r\n },\r\n /**\r\n * If not logged in or not a student, redirect to unauthorized page\r\n * Otherwise, check if admin is mirroring a user, if so show banner\r\n * if not redirect to unauthorized page\r\n */\r\n checkIfUserIsStudentOrAdminMirroringUser(): void {\r\n this.isMirroringUser =\r\n UnauthorizedHelper.checkIfUserIsStudentOrAdminMirroringUser(\r\n this.currentUser\r\n );\r\n },\r\n /**\r\n * Scrolls to the top of the page to solve a problem where the page is scrolled down\r\n * on load from when the user is positioned low on tuition fees page\r\n */\r\n scrollToTop() {\r\n window.scrollTo(0, 0);\r\n },\r\n },\r\n mounted() {\r\n this.getUserId();\r\n this.getNetsResponse();\r\n this.scrollToTop();\r\n this.getCurrentEntitlements();\r\n this.checkIfUserIsStudentOrAdminMirroringUser();\r\n },\r\n})\r\nexport default class CardPayment extends Vue {}\r\n","import { render } from \"./CardPayment.vue?vue&type=template&id=5fae30d6&ts=true\"\nimport script from \"./CardPayment.vue?vue&type=script&lang=ts\"\nexport * from \"./CardPayment.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"C:\\\\Users\\\\fr5673mo\\\\Documents\\\\git.lu.se\\\\.net\\\\student-portal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\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!./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}","\r\nimport SessionStorageService from \"@/services/sessionstorage-service\";\r\nimport { SessionStorageKeys } from \"@/constants/constants\";\r\nimport { PropType } from \"@vue/runtime-core\";\r\nimport { Options, Vue } from \"vue-class-component\";\r\n\r\n@Options({\r\n props: {\r\n /**\r\n * The personal id of the user being mirrored by admin\r\n */\r\n personalId: {\r\n type: String as PropType,\r\n required: false,\r\n },\r\n /**\r\n * The name of the user being mirrored by admin\r\n */\r\n personName: {\r\n type: String as PropType,\r\n required: false,\r\n },\r\n /**\r\n * The lucat id of the user being mirrored by admin\r\n */\r\n lucatId: {\r\n type: String as PropType,\r\n required: false,\r\n },\r\n },\r\n computed: {\r\n /**\r\n * The shortened personal id of only the last 10 digits\r\n */\r\n shortPersonalId(): string {\r\n const personalId = this.$props.personalId;\r\n return personalId ? personalId.substr(personalId.length - 10) : \"\";\r\n },\r\n /**\r\n * If the student cannot be found in Ladok, the lucat id will be null\r\n */\r\n nullLucatId(): string {\r\n const lucatId = this.$props.lucatId;\r\n return lucatId ? lucatId : \"\";\r\n },\r\n },\r\n methods: {\r\n /**\r\n * Routes to search user page\r\n */\r\n onStopMirroringClicked(): void {\r\n SessionStorageService.setItem(SessionStorageKeys.IsMirroringUser, false);\r\n this.$router.push({\r\n name: \"MirrorUser\",\r\n });\r\n },\r\n },\r\n})\r\nexport default class MirroringUserBanner extends Vue {}\r\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:\\\\Users\\\\fr5673mo\\\\Documents\\\\git.lu.se\\\\.net\\\\student-portal\\\\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__","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}","\r\nimport { Options, Vue } from \"vue-class-component\";\r\n\r\n@Options({\r\n methods: {\r\n /**\r\n * Redirects to the tuition fee home page\r\n */\r\n goToTuitionFeeHome(): void {\r\n this.$router.push({\r\n name: \"TuitionFeeHome\",\r\n });\r\n },\r\n },\r\n})\r\nexport default class BackToInvoicesButton extends Vue {}\r\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:\\\\Users\\\\fr5673mo\\\\Documents\\\\git.lu.se\\\\.net\\\\student-portal\\\\student-portal-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","module.exports = __webpack_public_path__ + \"assets/img/visa_mastercard.8503f2b8.png\";"],"sourceRoot":""}