{"version":3,"sources":["webpack:///./src/components/otp/OtpCodeInput.vue?e406","webpack:///./src/components/otp/OtpCodeInput.vue","webpack:///./src/components/otp/OtpCodeInput.vue?9728","webpack:///./src/views/auth/SignIn.vue?a023","webpack:///./src/views/otp/OtpInput.vue","webpack:///./src/views/otp/OtpInput.vue?e943","webpack:///./src/core/helpers/sign_in_page_helpers.ts","webpack:///./src/views/auth/SignIn.vue","webpack:///./src/views/auth/SignIn.vue?f131"],"names":["_hoisted_1","class","render","_ctx","_cache","$props","$setup","$data","$options","type","name","onPaste","handlePaste","args","onInput","ev","handleFieldInput","onKeydown","handleKeyDown","ref","maxlength","value","emits","setup","props","emit","input1","input2","input3","input4","input5","input6","inputs","getValues","map","input","join","focusInput","inputIndex","field","focus","event","clipboardData","pastedData","getData","i","Math","min","length","currentInput","preventDefault","index","target","key","srcElement","__exports__","style","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_component_router_link","_component_Field","_component_ErrorMessage","_component_Form","_component_OtpInput","requireOtp","loading","onSubmitOtp","handleOtpSubmit","otpKey","id","onSubmit","onSubmitLogin","login","default","to","_","autocomplete","disabled","handleFormSubmit","novalidate","data-kt-redirect-url","handleRememberMe","Boolean","components","OtpCodeInput","data","rememberDevice","methods","this","checked","code","$emit","resendActivationMail","userID","ApiService","get","response","Error","confirmEmail","error","fire","title","message","icon","heightAuto","showCancelButton","confirmButtonText","showLoaderOnConfirm","preConfirm","allowOutsideClick","isLoading","showValidationMessage","showSimpleAlert","duration","position","toast","timer","showConfirmButton","showModalAlert","handleLoginError","Field","Form","OtpInput","ErrorMessage","store","router","ability","can","rules","email","password","submitButton","setLoading","shape","required","label","route","undefined","query","wasVerified","replace","values","dispatch","LOGOUT","LOGIN","then","payload","forEach","rule","update","should_enable_2fa","push","role","catch","responce","otp"],"mappings":"kIAEMA,EAAa,CAAEC,MAAO,UAErB,SAASC,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,OAAQ,yBAAc,gCAAoB,MAAOR,EAAY,CAC3D,gCAAoB,QAAS,CAC3BS,KAAM,OACNC,KAAM,SACNC,QAASP,EAAO,KAAOA,EAAO,GAEpC,W,IAAC,sDAAY,OAACD,EAAKS,aAAeT,EAAKS,YAAW,MAAhBT,EAAoBU,KAChDC,QAASV,EAAO,KAAOA,EAAO,GAAK,SAAAW,GAAM,OAAAZ,EAAKa,iBAAiB,EAAGD,KAClEE,UAAWb,EAAO,KAAOA,EAAO,GAAK,SAAAW,GAAM,OAAAZ,EAAKe,cAAc,EAAGH,KACjE,iBAAkB,iCAClBI,IAAK,SACLC,UAAW,IACXnB,MAAO,2EACPoB,MAAO,IACN,KAAM,KACT,gCAAoB,QAAS,CAC3BZ,KAAM,OACNC,KAAM,SACNC,QAASP,EAAO,KAAOA,EAAO,GAEpC,W,IAAC,sDAAY,OAACD,EAAKS,aAAeT,EAAKS,YAAW,MAAhBT,EAAoBU,KAChDM,IAAK,SACLF,UAAWb,EAAO,KAAOA,EAAO,GAAK,SAAAW,GAAM,OAAAZ,EAAKe,cAAc,EAAGH,KACjED,QAASV,EAAO,KAAOA,EAAO,GAAK,SAAAW,GAAM,OAAAZ,EAAKa,iBAAiB,EAAGD,KAClE,iBAAkB,iCAClBK,UAAW,IACXnB,MAAO,2EACPoB,MAAO,IACN,KAAM,KACT,gCAAoB,QAAS,CAC3BZ,KAAM,OACNC,KAAM,SACNC,QAASP,EAAO,KAAOA,EAAO,GAEpC,W,IAAC,sDAAY,OAACD,EAAKS,aAAeT,EAAKS,YAAW,MAAhBT,EAAoBU,KAChDC,QAASV,EAAO,KAAOA,EAAO,GAAK,SAAAW,GAAM,OAAAZ,EAAKa,iBAAiB,EAAGD,KAClEE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JA,EAAQlB,MAAMmB,SAAQ,SAAAC,GACpBrB,EAAIqB,EAAM,UAGZtB,EAAQuB,OAAOrB,GACc,aAAzBkB,EAAQM,KAAK,GAAGnD,MAClBwB,EAAO0B,KAAK,sBACT1B,EAAO0B,KAAK,KACjBnB,GAAW,MAEZqB,OAAM,SAAAC,GACiB,gBAAlBA,EAAStK,OACXgF,EAAOpE,OAAS,GAElBoI,GAAW,GACXb,GAAiBmC,OAIvB,MAAO,CACLnF,cAAa,EACbJ,gBAAe,EACfF,QAAO,EACPG,OAAM,EACNJ,WAAU,EACVQ,MAAK,EACL2D,aAAY,MCzIlB,MAAM,GAA2B,IAAgB,GAAQ,CAAC,CAAC,SAAStJ,KAErD","file":"js/chunk-00221c58.62ce03ba.js","sourcesContent":["import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { class: \"d-flex\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"input\", {\n type: \"text\",\n name: \"code_1\",\n onPaste: _cache[0] || (_cache[0] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n onInput: _cache[1] || (_cache[1] = ev => _ctx.handleFieldInput(1, ev)),\n onKeydown: _cache[2] || (_cache[2] = ev => _ctx.handleKeyDown(0, ev)),\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n ref: \"input1\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544),\n _createElementVNode(\"input\", {\n type: \"text\",\n name: \"code_2\",\n onPaste: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n ref: \"input2\",\n onKeydown: _cache[4] || (_cache[4] = ev => _ctx.handleKeyDown(1, ev)),\n onInput: _cache[5] || (_cache[5] = ev => _ctx.handleFieldInput(2, ev)),\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544),\n _createElementVNode(\"input\", {\n type: \"text\",\n name: \"code_3\",\n onPaste: _cache[6] || (_cache[6] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n onInput: _cache[7] || (_cache[7] = ev => _ctx.handleFieldInput(3, ev)),\n onKeydown: _cache[8] || (_cache[8] = ev => _ctx.handleKeyDown(2, ev)),\n ref: \"input3\",\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544),\n _createElementVNode(\"input\", {\n type: \"text\",\n name: \"code_4\",\n onPaste: _cache[9] || (_cache[9] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n onKeydown: _cache[10] || (_cache[10] = ev => _ctx.handleKeyDown(3, ev)),\n onInput: _cache[11] || (_cache[11] = ev => _ctx.handleFieldInput(4, ev)),\n ref: \"input4\",\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544),\n _createElementVNode(\"input\", {\n type: \"text\",\n name: \"code_5\",\n onInput: _cache[12] || (_cache[12] = ev => _ctx.handleFieldInput(5, ev)),\n onPaste: _cache[13] || (_cache[13] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n onKeydown: _cache[14] || (_cache[14] = ev => _ctx.handleKeyDown(4, ev)),\n ref: \"input5\",\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544),\n _createElementVNode(\"input\", {\n type: \"text\",\n onPaste: _cache[15] || (_cache[15] = \n//@ts-ignore\n(...args) => (_ctx.handlePaste && _ctx.handlePaste(...args))),\n name: \"code_6\",\n onKeydown: _cache[16] || (_cache[16] = ev => _ctx.handleKeyDown(5, ev)),\n ref: \"input6\",\n onInput: _cache[17] || (_cache[17] = ev => _ctx.handleFieldInput(6, ev)),\n \"data-inputmask\": \"'mask': '9', 'placeholder': ''\",\n maxlength: \"1\",\n class: \"form-control bg-transparent h-md-60 w-md-60 fs-2qx text-center mx-1 my-2\",\n value: \"\"\n }, null, 544)\n ]))\n}","\nimport { defineComponent, ref } from \"vue\";\nexport default defineComponent({\n emits: [\"code-ready\"],\n name: \"otp-code-input\",\n setup: function(props, { emit }) {\n const input1 = ref();\n const input2 = ref();\n const input3 = ref();\n const input4 = ref();\n const input5 = ref();\n const input6 = ref();\n const inputs = [input1, input2, input3, input4, input5, input6];\n\n function getValues(): string {\n return inputs\n .map(input => (input && input.value ? input.value.value : \"\"))\n .join(\"\");\n }\n\n function focusInput(inputIndex: number): void {\n if (inputIndex < 0 || inputIndex > 5) {\n return;\n }\n const field = inputs[inputIndex];\n if (field) {\n field.value?.focus();\n }\n }\n\n function handlePaste(event): void {\n const clipboardData = event.clipboardData;\n const pastedData = clipboardData.getData(\"text\");\n\n for (let i = 1; i <= Math.min(pastedData.length, inputs.length); i++) {\n const currentInput = inputs[i - 1];\n if (currentInput && currentInput.value) {\n currentInput.value.value = pastedData[i - 1];\n }\n }\n inputs[5].value?.focus();\n if (getValues().length == 6) {\n emit(\"code-ready\", getValues());\n }\n event.preventDefault();\n }\n\n function handleFieldInput(index: number, event): void {\n if (index <= 5 && event.target.value) {\n inputs[index].value?.focus();\n }\n if (getValues().length == 6) {\n emit(\"code-ready\", getValues());\n }\n }\n\n function handleKeyDown(index: number, event): void {\n if (\"Backspace\" === event.key) {\n if (0 !== index && index <= 6) {\n inputs[index - 1].value?.focus();\n event.srcElement.value = \"\";\n }\n }\n }\n\n return {\n handleFieldInput,\n handleKeyDown,\n handlePaste,\n focusInput,\n getValues,\n input1,\n input2,\n input3,\n input4,\n input5,\n input6\n };\n }\n});\n","import { render } from \"./OtpCodeInput.vue?vue&type=template&id=210387c6&ts=true\"\nimport script from \"./OtpCodeInput.vue?vue&type=script&lang=ts\"\nexport * from \"./OtpCodeInput.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { createElementVNode as _createElementVNode, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createStaticVNode as _createStaticVNode, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = {\n class: \"d-flex flex-column flex-column-fluid bgi-position-y-bottom position-x-center bgi-no-repeat bgi-size-contain bgi-attachment-fixed\",\n style: {\"background-image\":\"url('media/illustrations/progress-hd.png')\"}\n}\nconst _hoisted_2 = { class: \"d-flex flex-center flex-column flex-column-fluid p-0 p-md-10 pb-lg-20\" }\nconst _hoisted_3 = { class: \"w-lg-500px bg-white rounded shadow-sm p-10 p-lg-15 mx-auto\" }\nconst _hoisted_4 = { class: \"text-center mb-10\" }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"h1\", { class: \"text-dark mb-3\" }, \" Sign In to Wanted Crew International \", -1)\nconst _hoisted_6 = { class: \"text-gray-400 fw-bold fs-4\" }\nconst _hoisted_7 = /*#__PURE__*/_createTextVNode(\" New Here? \")\nconst _hoisted_8 = /*#__PURE__*/_createTextVNode(\"Create an Account\")\nconst _hoisted_9 = { class: \"fv-row mb-10\" }\nconst _hoisted_10 = /*#__PURE__*/_createElementVNode(\"label\", { class: \"form-label fs-6 fw-bolder text-dark\" }, \"Email\", -1)\nconst _hoisted_11 = { class: \"fv-plugins-message-container\" }\nconst _hoisted_12 = { class: \"fv-help-block\" }\nconst _hoisted_13 = { class: \"fv-row mb-10\" }\nconst _hoisted_14 = { class: \"d-flex flex-stack mb-2\" }\nconst _hoisted_15 = /*#__PURE__*/_createElementVNode(\"label\", { class: \"form-label fw-bolder text-dark fs-6 mb-0\" }, \"Password\", -1)\nconst _hoisted_16 = /*#__PURE__*/_createTextVNode(\" Forgot Password ? \")\nconst _hoisted_17 = { class: \"fv-plugins-message-container\" }\nconst _hoisted_18 = { class: \"fv-help-block\" }\nconst _hoisted_19 = { class: \"text-center\" }\nconst _hoisted_20 = [\"disabled\", \"data-kt-indicator\"]\nconst _hoisted_21 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"indicator-label\" }, \" Continue \", -1)\nconst _hoisted_22 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"indicator-progress\" }, [\n /*#__PURE__*/_createTextVNode(\" Please wait... \"),\n /*#__PURE__*/_createElementVNode(\"span\", { class: \"spinner-border spinner-border-sm align-middle ms-2\" })\n], -1)\nconst _hoisted_23 = [\n _hoisted_21,\n _hoisted_22\n]\nconst _hoisted_24 = /*#__PURE__*/_createStaticVNode(\"\", 1)\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_Field = _resolveComponent(\"Field\")!\n const _component_ErrorMessage = _resolveComponent(\"ErrorMessage\")!\n const _component_Form = _resolveComponent(\"Form\")!\n const _component_OtpInput = _resolveComponent(\"OtpInput\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (!_ctx.requireOtp)\n ? (_openBlock(), _createBlock(_component_Form, {\n key: 0,\n class: \"form w-100\",\n id: \"kt_login_signin_form\",\n onSubmit: _ctx.onSubmitLogin,\n \"validation-schema\": _ctx.login\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createVNode(_component_router_link, {\n to: \"/sign-up\",\n class: \"link-primary fw-bolder\"\n }, {\n default: _withCtx(() => [\n _hoisted_8\n ]),\n _: 1\n })\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _hoisted_10,\n _createVNode(_component_Field, {\n class: \"form-control form-control-lg form-control-solid\",\n type: \"text\",\n name: \"email\",\n autocomplete: \"off\"\n }),\n _createElementVNode(\"div\", _hoisted_11, [\n _createElementVNode(\"div\", _hoisted_12, [\n _createVNode(_component_ErrorMessage, { name: \"email\" })\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_13, [\n _createElementVNode(\"div\", _hoisted_14, [\n _hoisted_15,\n _createVNode(_component_router_link, {\n to: \"/password-reset\",\n class: \"link-primary fs-6 fw-bolder\"\n }, {\n default: _withCtx(() => [\n _hoisted_16\n ]),\n _: 1\n })\n ]),\n _createVNode(_component_Field, {\n class: \"form-control form-control-lg form-control-solid\",\n type: \"password\",\n name: \"password\",\n autocomplete: \"off\"\n }),\n _createElementVNode(\"div\", _hoisted_17, [\n _createElementVNode(\"div\", _hoisted_18, [\n _createVNode(_component_ErrorMessage, { name: \"password\" })\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"button\", {\n type: \"submit\",\n ref: \"submitButton\",\n disabled: _ctx.loading,\n \"data-kt-indicator\": _ctx.loading ? 'on' : 'off',\n class: \"btn btn-lg btn-primary w-100 mb-5\"\n }, _hoisted_23, 8, _hoisted_20)\n ])\n ]),\n _: 1\n }, 8, [\"onSubmit\", \"validation-schema\"]))\n : (_openBlock(), _createBlock(_component_OtpInput, {\n loading: _ctx.loading,\n onSubmitOtp: _ctx.handleOtpSubmit,\n key: _ctx.otpKey\n }, null, 8, [\"loading\", \"onSubmitOtp\"]))\n ])\n ]),\n _hoisted_24\n ]))\n}","\n\n\n\n\n","import { render } from \"./OtpInput.vue?vue&type=template&id=a686eb0a\"\nimport script from \"./OtpInput.vue?vue&type=script&lang=js\"\nexport * from \"./OtpInput.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import Swal from \"sweetalert2\";\nimport ApiService from \"@/core/services/ApiService\";\n\ntype LoginError = {\n message: string;\n type: string;\n userID?: number;\n};\n\nasync function resendActivationMail(userID: number | undefined) {\n try {\n const response = await ApiService.get(\n `api/v2/resendActivationMail/${userID}`\n );\n return response;\n } catch (error) {\n throw new Error(\"Failed to resend activation mail\");\n }\n}\n\nasync function confirmEmail(error: LoginError) {\n try {\n await Swal.fire({\n title: error.message,\n icon: \"info\",\n heightAuto: false,\n showCancelButton: true,\n confirmButtonText: \"Resend email\",\n showLoaderOnConfirm: true,\n preConfirm: () => resendActivationMail(error.userID),\n allowOutsideClick: () => !Swal.isLoading()\n });\n\n await Swal.fire({\n title: \"Email resent, please check your inbox.\",\n heightAuto: false,\n icon: \"success\"\n });\n } catch {\n Swal.showValidationMessage(`Sorry, there was an error.`);\n }\n}\n\nfunction showSimpleAlert(\n title: string,\n icon: \"error\" | \"success\",\n duration = 1000\n) {\n Swal.fire({\n position: \"top-end\",\n icon,\n title,\n toast: true,\n timer: duration,\n showConfirmButton: false,\n showCancelButton: false\n });\n}\n\nfunction showModalAlert(title: string, icon: \"error\" | \"success\") {\n Swal.fire({\n title,\n icon,\n heightAuto: false\n });\n}\n\nasync function handleLoginError(error: LoginError) {\n switch (error.type) {\n case \"confirm_email\":\n await confirmEmail(error);\n break;\n\n case \"invalid_credentials\":\n showSimpleAlert(error.message, \"error\");\n break;\n\n case \"invalid_otp\":\n showModalAlert(error.message, \"error\");\n break;\n\n default:\n showSimpleAlert(\"Sorry, there was an error.\", \"error\");\n }\n}\n\nexport { handleLoginError };\n","\r\nimport { defineComponent, onMounted, ref } from \"vue\";\r\nimport { ErrorMessage, Field, Form } from \"vee-validate\";\r\nimport { Actions } from \"@/store/enums/StoreEnums\";\r\nimport { useStore } from \"vuex\";\r\nimport { useRouter, useRoute } from \"vue-router\";\r\nimport Swal from \"sweetalert2\";\r\nimport * as Yup from \"yup\";\r\nimport { AbilityBuilder, Ability } from \"@casl/ability\";\r\nimport { useAbility } from \"@casl/vue\";\r\nimport OtpInput from \"@/views/otp/OtpInput.vue\";\r\nimport { handleLoginError } from \"@/core/helpers/sign_in_page_helpers\";\r\nimport AccessService from \"@/core/services/AccessService\";\r\n\r\nexport default defineComponent({\r\n name: \"sign-in\",\r\n components: {\r\n Field,\r\n Form,\r\n OtpInput,\r\n ErrorMessage\r\n },\r\n setup() {\r\n const store = useStore();\r\n const router = useRouter();\r\n const ability = useAbility();\r\n const loading = ref(false);\r\n const { can, rules } = new AbilityBuilder(Ability);\r\n const requireOtp = ref(false);\r\n const email = ref(\"\");\r\n const password = ref(\"\");\r\n const otpKey = ref(0);\r\n\r\n const submitButton = ref(null);\r\n\r\n function setLoading(value: boolean): void {\r\n loading.value = value;\r\n }\r\n\r\n const login = Yup.object().shape({\r\n email: Yup.string()\r\n .email()\r\n .required()\r\n .label(\"Email\"),\r\n password: Yup.string()\r\n .min(4)\r\n .required()\r\n .label(\"Password\")\r\n });\r\n\r\n onMounted(() => {\r\n const route = useRoute();\r\n if (route.query.wasVerified != undefined) {\r\n router.replace({ query: {} });\r\n Swal.fire({\r\n icon: \"success\",\r\n title: \"Email succesfully verified, you can now login!\",\r\n timer: 2000,\r\n heightAuto: false\r\n });\r\n }\r\n });\r\n const onSubmitLogin = values => {\r\n store.dispatch(Actions.LOGOUT);\r\n setLoading(true);\r\n store\r\n .dispatch(Actions.LOGIN, values)\r\n .then(payload => {\r\n payload.rules.forEach(rule => {\r\n can(rule, \"all\");\r\n });\r\n setLoading(false);\r\n ability.update(rules);\r\n if (payload.should_enable_2fa) {\r\n router.push(\"/otp/enable\");\r\n return;\r\n } else if (payload.role[0].title == \"Applicant\") {\r\n router.push(\"/users/me/personal\");\r\n return;\r\n }\r\n router.push(\"/\");\r\n })\r\n .catch(responce => {\r\n setLoading(false);\r\n switch (responce.type) {\r\n case \"otp_required\":\r\n requireOtp.value = true;\r\n email.value = values.email;\r\n password.value = values.password;\r\n break;\r\n case \"2fa_mandatory\":\r\n handleLoginError(responce);\r\n break;\r\n case \"invalid_credentials\":\r\n Swal.fire({\r\n title: \"Invalid credentials\",\r\n icon: \"error\",\r\n showCancelButton: false\r\n });\r\n break;\r\n }\r\n });\r\n };\r\n\r\n const handleOtpSubmit = payload => {\r\n setLoading(true);\r\n store\r\n .dispatch(Actions.LOGIN, {\r\n email: email.value,\r\n password: password.value,\r\n otp: payload.code,\r\n rememberDevice: payload.rememberDevice\r\n ? payload.rememberDevice\r\n : false\r\n })\r\n .then(payload => {\r\n payload.rules.forEach(rule => {\r\n can(rule, \"all\");\r\n });\r\n\r\n ability.update(rules);\r\n if (payload.role[0].title == \"Applicant\")\r\n router.push(\"/users/me/personal\");\r\n else router.push(\"/\");\r\n setLoading(false);\r\n })\r\n .catch(responce => {\r\n if (responce.type === \"invalid_otp\") {\r\n otpKey.value += 1;\r\n }\r\n setLoading(false);\r\n handleLoginError(responce);\r\n });\r\n };\r\n\r\n return {\r\n onSubmitLogin,\r\n handleOtpSubmit,\r\n loading,\r\n otpKey,\r\n requireOtp,\r\n login,\r\n submitButton\r\n };\r\n }\r\n});\r\n","import { render } from \"./SignIn.vue?vue&type=template&id=49720e70&ts=true\"\nimport script from \"./SignIn.vue?vue&type=script&lang=ts\"\nexport * from \"./SignIn.vue?vue&type=script&lang=ts\"\n\nimport exportComponent from \"/codebuild/output/src1803551405/src/wci-front/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}