{"version":3,"sources":["webpack:///./resources/js/src/app/mixins/buttonSizeProperty.mixin.js","webpack:///./resources/js/src/app/components/customer/login/Login.vue?757e","webpack:///./resources/js/src/app/components/customer/login/Login.vue?01f7","webpack:///resources/js/src/app/components/customer/login/Login.vue","webpack:///./resources/js/src/app/components/customer/login/Login.vue"],"names":["BUTTON_SIZES","LEGACY_CLASS_MAP","ButtonSizePropertyMixin","props","buttonSize","type","String","default","validator","value","Object","keys","indexOf","computed","buttonSizeClass","hasOwnProperty","this","render","_vm","_h","$createElement","_c","_self","staticClass","ref","attrs","id","_uid","method","class","modalElement","directives","name","rawName","username","expression","autocomplete","domProps","on","input","$event","target","composing","_v","for","_s","$translate","showPassword","password","checked","Array","isArray","_i","change","$$a","$$el","$$c","$$i","concat","slice","_q","staticStyle","cursor","position","right","click","togglePasswordVisibility","height","width","fill","xmlns","viewBox","d","row","href","showResetPwdView","_t","disabled","isDisabled","preventDefault","validateLogin","apply","arguments","icon","loading","_withStripped","component","options","__file"],"mappings":"q8BAAA,IAAMA,EAAe,CAAC,SAAU,UAE1BC,EAAmB,CACrB,GAAM,SACN,GAAM,GACN,GAAM,UAGGC,EACb,CACIC,MAAO,CACHC,WACA,CACIC,KAAM,CAACC,OAAQ,MACfC,QAAS,KACTC,UAAW,SAAAC,GAEP,OAIsB,IAJf,CACH,IADG,OAEAT,EAFA,EAGAU,OAAOC,KAAKV,KACjBW,QAAQH,MAKtBI,SAAU,CACNC,gBADM,WAGF,OAAIb,EAAiBc,eAAeC,KAAKZ,YAE9BH,EAAiBe,KAAKZ,YAG1BY,KAAKZ,e,wCClCxB,IAAIa,EAAS,WACX,IAAIC,EAAMF,KACNG,EAAKD,EAAIE,eACTC,EAAKH,EAAII,MAAMD,IAAMF,EACzB,OAAOE,EAAG,MAAO,CAAEE,YAAa,mBAAqB,CACnDF,EACE,OACA,CACEG,IAAK,YACLC,MAAO,CAAEC,GAAI,cAAgBR,EAAIS,KAAMC,OAAQ,SAEjD,CACEP,EAAG,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,eAEU,EAAV,QACA,mDACA,OACA,QAIU,QAKN,WA5GJ,WA8GM,KAAN,iCAAQ,OAAR,yCACM,EAAN,mDAGI,yBAlHJ,WAoHM,KAAN,mC,OCxNIC,EAAY,YACd,EACArE,EH2ToB,IGzTpB,EACA,KACA,KACA,MAuBFqE,EAAUC,QAAQC,OAAS,2DACZ,UAAAF,E","file":"chunks/ceres-14.min.js","sourcesContent":["const BUTTON_SIZES = [\"btn-sm\", \"btn-lg\"];\n\nconst LEGACY_CLASS_MAP = {\n \"sm\": \"btn-sm\",\n \"md\": \"\",\n \"lg\": \"btn-lg\"\n};\n\nexport const ButtonSizePropertyMixin =\n{\n props: {\n buttonSize:\n {\n type: [String, null],\n default: null,\n validator: value =>\n {\n return [\n \"\",\n ...BUTTON_SIZES,\n ...Object.keys(LEGACY_CLASS_MAP)\n ].indexOf(value) !== -1;\n }\n }\n },\n\n computed: {\n buttonSizeClass()\n {\n if (LEGACY_CLASS_MAP.hasOwnProperty(this.buttonSize))\n {\n return LEGACY_CLASS_MAP[this.buttonSize];\n }\n\n return this.buttonSize;\n }\n }\n};\n","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"login-pwd-reset\" }, [\n _c(\n \"form\",\n {\n ref: \"loginForm\",\n attrs: { id: \"login-form-\" + _vm._uid, method: \"post\" },\n },\n [\n _c(\"div\", { class: { \"modal-body\": _vm.modalElement } }, [\n _c(\"div\", { staticClass: \"row\" }, [\n _c(\"div\", { staticClass: \"col-12\" }, [\n _c(\n \"div\",\n {\n staticClass: \"input-unit\",\n attrs: { \"data-validate\": \"mail\" },\n },\n [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.username,\n expression: \"username\",\n },\n ],\n attrs: {\n \"data-testing\": \"email-login\",\n type: \"email\",\n name: \"email\",\n autocomplete: \"email\",\n id: \"email\" + _vm._uid,\n \"data-autofocus\": \"\",\n },\n domProps: { value: _vm.username },\n on: {\n input: function ($event) {\n if ($event.target.composing) {\n return\n }\n _vm.username = $event.target.value\n },\n },\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"email\" + _vm._uid } }, [\n _vm._v(\n _vm._s(_vm.$translate(\"Ceres::Template.loginEmail\")) + \"*\"\n ),\n ]),\n ]\n ),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"error-msg\" }, [\n _vm._v(\n _vm._s(\n _vm.$translate(\"Ceres::Template.loginEnterConfirmEmail\")\n )\n ),\n ]),\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-12\" }, [\n _c(\n \"div\",\n {\n staticClass: \"input-unit d-flex align-items-center\",\n class: { \"no-bottom\": _vm.modalElement },\n attrs: { \"data-validate\": \"text\" },\n },\n [\n (_vm.showPassword ? \"text\" : \"password\") === \"checkbox\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.password,\n expression: \"password\",\n },\n ],\n attrs: {\n \"data-testing\": \"password-login\",\n name: \"password\",\n autocomplete: \"current-password\",\n id: \"password\" + _vm._uid,\n type: \"checkbox\",\n },\n domProps: {\n checked: Array.isArray(_vm.password)\n ? _vm._i(_vm.password, null) > -1\n : _vm.password,\n },\n on: {\n change: function ($event) {\n var $$a = _vm.password,\n $$el = $event.target,\n $$c = $$el.checked ? true : false\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v)\n if ($$el.checked) {\n $$i < 0 && (_vm.password = $$a.concat([$$v]))\n } else {\n $$i > -1 &&\n (_vm.password = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)))\n }\n } else {\n _vm.password = $$c\n }\n },\n },\n })\n : (_vm.showPassword ? \"text\" : \"password\") === \"radio\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.password,\n expression: \"password\",\n },\n ],\n attrs: {\n \"data-testing\": \"password-login\",\n name: \"password\",\n autocomplete: \"current-password\",\n id: \"password\" + _vm._uid,\n type: \"radio\",\n },\n domProps: { checked: _vm._q(_vm.password, null) },\n on: {\n change: function ($event) {\n _vm.password = null\n },\n },\n })\n : _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.password,\n expression: \"password\",\n },\n ],\n attrs: {\n \"data-testing\": \"password-login\",\n name: \"password\",\n autocomplete: \"current-password\",\n id: \"password\" + _vm._uid,\n type: _vm.showPassword ? \"text\" : \"password\",\n },\n domProps: { value: _vm.password },\n on: {\n input: function ($event) {\n if ($event.target.composing) {\n return\n }\n _vm.password = $event.target.value\n },\n },\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"password\" + _vm._uid } }, [\n _vm._v(\n _vm._s(_vm.$translate(\"Ceres::Template.loginPassword\")) +\n \"*\"\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"span\",\n {\n staticClass: \"mx-2\",\n staticStyle: {\n cursor: \"pointer\",\n position: \"absolute\",\n right: \"0\",\n },\n on: {\n click: function ($event) {\n return _vm.togglePasswordVisibility()\n },\n },\n },\n [\n !_vm.showPassword\n ? _c(\n \"svg\",\n {\n staticStyle: {\n height: \"1rem\",\n width: \"auto\",\n fill: \"#999\",\n },\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 576 512\",\n },\n },\n [\n _c(\"path\", {\n attrs: {\n d: \"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\",\n },\n }),\n ]\n )\n : _c(\n \"svg\",\n {\n staticStyle: {\n height: \"1rem\",\n width: \"auto\",\n fill: \"#999\",\n },\n attrs: {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 640 512\",\n },\n },\n [\n _c(\"path\", {\n attrs: {\n d: \"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z\",\n },\n }),\n ]\n ),\n ]\n ),\n ]\n ),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"error-msg\" }, [\n _vm._v(\n _vm._s(_vm.$translate(\"Ceres::Template.loginEmptyPassword\"))\n ),\n ]),\n ]),\n ]),\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n class: {\n \"modal-footer justify-content-between\": _vm.modalElement,\n row: !_vm.modalElement,\n },\n },\n [\n _c(\"div\", { class: { \"col-7 col-sm-4\": !_vm.modalElement } }, [\n _c(\n \"a\",\n {\n staticClass: \"small text-appearance\",\n attrs: { href: \"javascript:void(0)\" },\n on: { click: _vm.showResetPwdView },\n },\n [\n _vm._v(\n _vm._s(\n _vm.$translate(\"Ceres::Template.loginForgotPassword\")\n ) + \"?\"\n ),\n ]\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { class: { \"col-5 col-sm-8 text-sm-right\": !_vm.modalElement } },\n [\n _vm._t(\"extend-overlay-buttons\"),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn btn-primary btn-appearance btn-medium\",\n class: [\n { \"float-right\": !_vm.modalElement },\n _vm.buttonSizeClass,\n ],\n attrs: {\n \"data-testing\": \"submit-login\",\n disabled: _vm.isDisabled,\n },\n on: {\n click: function ($event) {\n $event.preventDefault()\n return _vm.validateLogin.apply(null, arguments)\n },\n },\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.$translate(\"Ceres::Template.login\")) +\n \"\\n \"\n ),\n _c(\"icon\", {\n attrs: { icon: \"user\", loading: _vm.isDisabled },\n }),\n ],\n 1\n ),\n ],\n 2\n ),\n ]\n ),\n ]\n ),\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Login.vue?vue&type=script&lang=js&\"","<template>\r\n <div class=\"login-pwd-reset\">\r\n <form ref=\"loginForm\" :id=\"'login-form-' + _uid\" method=\"post\">\r\n <div :class=\"{'modal-body': modalElement}\">\r\n <div class=\"row\">\r\n <div class=\"col-12\">\r\n <div class=\"input-unit\" data-validate=\"mail\">\r\n <input data-testing=\"email-login\" type=\"email\" name=\"email\" autocomplete=\"email\" :id=\"'email' + _uid\" v-model=\"username\" data-autofocus>\r\n <label :for=\"'email' + _uid\">{{ $translate(\"Ceres::Template.loginEmail\") }}*</label>\r\n </div>\r\n <span class=\"error-msg\">{{ $translate(\"Ceres::Template.loginEnterConfirmEmail\") }}</span>\r\n </div>\r\n <div class=\"col-12\">\r\n <div class=\"input-unit d-flex align-items-center\" :class=\"{'no-bottom': modalElement}\" data-validate=\"text\">\r\n <input data-testing=\"password-login\" :type=\"showPassword ? 'text' : 'password'\" name=\"password\" autocomplete=\"current-password\" :id=\"'password' + _uid\" v-model=\"password\">\r\n <label :for=\"'password' + _uid\">{{ $translate(\"Ceres::Template.loginPassword\") }}*</label>\r\n <span @click=\"togglePasswordVisibility()\" class=\"mx-2\" style=\"cursor: pointer; position: absolute; right:0;\">\r\n <svg v-if=\"!showPassword\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\" style=\"height: 1rem; width: auto; fill: #999;\">\r\n <path d=\"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"/>\r\n </svg>\r\n <svg v-else xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\" style=\"height: 1rem; width: auto; fill: #999;\">\r\n <path d=\"M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z\"/>\r\n </svg>\r\n </span>\r\n </div>\r\n <span class=\"error-msg\">{{ $translate(\"Ceres::Template.loginEmptyPassword\") }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div :class=\"{'modal-footer justify-content-between': modalElement, 'row': !modalElement}\">\r\n <div :class=\"{'col-7 col-sm-4': !modalElement}\">\r\n <a href=\"javascript:void(0)\" @click=\"showResetPwdView\" class=\"small text-appearance\">{{ $translate(\"Ceres::Template.loginForgotPassword\") }}?</a>\r\n </div>\r\n <div :class=\"{'col-5 col-sm-8 text-sm-right': !modalElement}\">\r\n <slot name=\"extend-overlay-buttons\"></slot>\r\n <button data-testing=\"submit-login\" @click.prevent=\"validateLogin\" :disabled=\"isDisabled\" class=\"btn btn-primary btn-appearance btn-medium\" :class=\"[{'float-right': !modalElement}, buttonSizeClass]\">\r\n {{ $translate(\"Ceres::Template.login\") }}\r\n <icon icon=\"user\" :loading=\"isDisabled\"></icon>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { ButtonSizePropertyMixin } from \"../../../mixins/buttonSizeProperty.mixin\";\r\n\r\nimport ApiService from \"../../../services/ApiService\";\r\nimport NotificationService from \"../../../services/NotificationService\";\r\nimport ModalService from \"../../../services/ModalService\";\r\nimport AutoFocusService from \"../../../services/AutoFocusService\";\r\nimport ValidationService from \"../../../services/ValidationService\";\r\nimport {getContainingComponent, isNullOrUndefined} from \"../../../helper/utils\";\r\n\r\nexport default {\r\n mixins: [ButtonSizePropertyMixin],\r\n\r\n props: {\r\n backlink: {\r\n type: String\r\n },\r\n modalElement: {\r\n type: String\r\n },\r\n hasToForward:\r\n {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n\r\n data()\r\n {\r\n return {\r\n password: \"\",\r\n username: \"\",\r\n loginFields: [],\r\n isDisabled: false,\r\n showPassword: false\r\n };\r\n },\r\n\r\n mounted()\r\n {\r\n this.$nextTick(() =>\r\n {\r\n this.loginFields = this.$refs.loginForm.querySelectorAll(\".input-unit\");\r\n\r\n AutoFocusService.triggerAutoFocus();\r\n });\r\n },\r\n\r\n watch:\r\n {\r\n password(val, oldVal)\r\n {\r\n this.resetError();\r\n },\r\n\r\n username(val, oldVal)\r\n {\r\n this.resetError();\r\n }\r\n },\r\n\r\n methods:\r\n {\r\n /**\r\n * Open the login modal\r\n */\r\n showLogin()\r\n {\r\n ModalService.findModal(document.getElementById(this.modalElement)).show();\r\n },\r\n\r\n validateLogin()\r\n {\r\n ValidationService.validate($(\"#login-form-\" + this._uid))\r\n .done(() =>\r\n {\r\n this.sendLogin();\r\n })\r\n .fail(invalidFields =>\r\n {\r\n ValidationService.markInvalidFields(invalidFields, \"error\");\r\n });\r\n },\r\n\r\n /**\r\n * Send the login data\r\n */\r\n sendLogin()\r\n {\r\n this.isDisabled = true;\r\n\r\n ApiService.post(\"/rest/io/customer/login\", { email: this.username, password: this.password }, { supressNotifications: true })\r\n .done(response =>\r\n {\r\n ApiService.setToken(response);\r\n\r\n // NotificationService.success(\r\n // this.$translate(\"Ceres::Template.loginSuccessful\")\r\n // ).closeAfter(3000);\r\n\r\n sessionStorage.setItem('loginSuccess', 'true');\r\n sessionStorage.setItem('loginReloaded', 'false');\r\n\r\n if (this.backlink !== null && this.backlink)\r\n {\r\n location.assign(decodeURIComponent(this.backlink));\r\n }\r\n else if (this.hasToForward)\r\n {\r\n location.assign(location.origin);\r\n }\r\n else\r\n {\r\n location.reload();\r\n }\r\n })\r\n .fail(response =>\r\n {\r\n this.isDisabled = false;\r\n\r\n switch (response.error.code)\r\n {\r\n case 401:\r\n this.loginFields.forEach(element => element.classList.add(\"has-login-error\"));\r\n\r\n let translationKey = \"Ceres::Template.loginFailed\";\r\n\r\n if (response.error.message.length > 0 && response.error.message === \"user is blocked\")\r\n {\r\n translationKey = \"Ceres::Template.loginBlocked\";\r\n }\r\n NotificationService.error(\r\n this.$translate(translationKey)\r\n ).closeAfter(10000);\r\n break;\r\n default:\r\n return;\r\n }\r\n });\r\n },\r\n\r\n showResetPwdView()\r\n {\r\n this.resetError();\r\n\r\n this.$store.dispatch(\"loadComponent\", \"forgot-password-modal\");\r\n\r\n Vue.nextTick(() =>\r\n {\r\n let modalDOM = document.querySelector('#resetPwd');\r\n let modalVue = getContainingComponent(modalDOM);\r\n\r\n modalVue.$data.username = this.username;\r\n\r\n let showModal = () => ModalService.findModal(modalDOM).show();\r\n\r\n if(this.modalElement)\r\n {\r\n ModalService\r\n .findModal(document.getElementById(this.modalElement))\r\n .hide()\r\n .then(showModal);\r\n }\r\n else\r\n {\r\n showModal();\r\n }\r\n });\r\n },\r\n\r\n resetError()\r\n {\r\n this.loginFields.forEach( element => element.classList.remove(\"has-login-error\"));\r\n ValidationService.unmarkAllFields(\"#login-form-\" + this._uid);\r\n },\r\n\r\n togglePasswordVisibility()\r\n {\r\n this.showPassword = !this.showPassword;\r\n }\r\n }\r\n}\r\n</script>\r\n","import { render, staticRenderFns } from \"./Login.vue?vue&type=template&id=0f0e37b8&\"\nimport script from \"./Login.vue?vue&type=script&lang=js&\"\nexport * from \"./Login.vue?vue&type=script&lang=js&\"\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\n/* hot reload */\nif (module.hot) {\n var api = require(\"/Users/philippneumann/Documents/frontendstudios/8291/430/GonserDT/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('0f0e37b8')) {\n api.createRecord('0f0e37b8', component.options)\n } else {\n api.reload('0f0e37b8', component.options)\n }\n module.hot.accept(\"./Login.vue?vue&type=template&id=0f0e37b8&\", function () {\n api.rerender('0f0e37b8', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"resources/js/src/app/components/customer/login/Login.vue\"\nexport default component.exports"],"sourceRoot":""}