{"version":3,"sources":["webpack:///./src/views/auth/PasswordReset.vue","webpack:///./src/views/auth/PasswordReset.vue?6098","webpack:///./src/views/auth/PasswordReset.vue?96e1"],"names":["class","type","ref","id","onSubmitForgotPassword","validation-schema","forgotPassword","placeholder","name","autocomplete","to","components","Field","Form","ErrorMessage","store","router","submitButton","shape","email","required","label","values","value","setAttribute","setTimeout","dispatch","FORGOT_PASSWORD","then","fire","text","icon","buttonsStyling","confirmButtonText","customClass","confirmButton","push","catch","getters","getErrors","removeAttribute","render"],"mappings":"kJAEOA,MAAM,8D,GAuBFA,MAAM,gB,GASJA,MAAM,gC,GACJA,MAAM,iB,GAQVA,MAAM,mD,GAEPC,KAAK,SACLC,IAAI,eACJC,GAAG,2BACHH,MAAM,yC,8OA9Cd,gCAkEM,MAlEN,EAkEM,CAhEJ,yBA8DO,GA7DLA,MAAM,wDACL,SAAQ,EAAAI,uBACTD,GAAG,+BACFE,oBAAmB,EAAAC,gB,8BAGpB,IAUM,C,YAVN,gCAUM,OAVDN,MAAM,qBAAmB,CAE5B,gCAAiD,MAA7CA,MAAM,kBAAiB,qBAI3B,gCAEM,OAFDA,MAAM,8BAA6B,gD,IAQ1C,gCAcM,MAdN,EAcM,C,YAbJ,gCAAoE,SAA7DA,MAAM,2CAA0C,SAAK,IAC5D,yBAME,GALAA,MAAM,kCACNC,KAAK,QACLM,YAAY,GACZC,KAAK,QACLC,aAAa,QAEf,gCAIM,MAJN,EAIM,CAHJ,gCAEM,MAFN,EAEM,CADJ,yBAA6B,GAAfD,KAAK,gBAOzB,gCAqBM,MArBN,EAqBM,CApBJ,gCAaS,SAbT,EAaS,aAPP,gCAA6C,QAAvCR,MAAM,mBAAkB,YAAQ,GACtC,gCAKO,QALDA,MAAM,sBAAoB,C,6BAAC,oBAE/B,gCAEQ,QADNA,MAAM,yD,UAKZ,yBAGiC,GAF/BU,GAAG,WACHV,MAAM,0C,8BACL,IAAM,a,6BAAN,a,0ICrDI,+BAAgB,CAC7BQ,KAAM,iBACNG,WAAY,CACVC,MAAA,OACAC,KAAA,OACAC,aAAA,QAEF,QACE,MAAMC,EAAQ,iBACRC,EAAS,iBAETC,EAAe,iBAAwB,MAGvCX,EAAiB,SAAaY,MAAM,CACxCC,MAAO,SAAaA,QAAQC,WAAWC,MAAM,WAIzCjB,EAA0BkB,I,MAEZ,QAAlB,EAAAL,EAAaM,aAAK,SAAEC,aAAa,oBAAqB,MAGtDC,WAAW,K,MAETV,EACGW,SAAS,OAAQC,gBAAiBL,GAClCM,KAAK,KACJ,IAAKC,KAAK,CACRC,KAAM,wCACNC,KAAM,UACNC,gBAAgB,EAChBC,kBAAmB,cACnBC,YAAa,CACXC,cAAe,mCAEhBP,MAAK,WAENZ,EAAOoB,KAAK,CAAE5B,KAAM,mBAGvB6B,MAAM,KAEL,IAAKR,KAAK,CACRC,KAAMf,EAAMuB,QAAQC,UAAU,GAC9BR,KAAM,QACNC,gBAAgB,EAChBC,kBAAmB,aACnBC,YAAa,CACXC,cAAe,oCAKL,QAAlB,EAAAlB,EAAaM,aAAK,SAAEiB,gBAAgB,sBACnC,MAGL,MAAO,CACLpC,yBACAE,iBACAW,mBCpEN,EAAOwB,OAASA,EAED","file":"js/chunk-2d0daae8.bedf051f.js","sourcesContent":["\r\n\r\n\r\n","\r\nimport { defineComponent, ref } from \"vue\";\r\nimport { ErrorMessage, Field, Form } from \"vee-validate\";\r\nimport { useStore } from \"vuex\";\r\nimport { useRouter } from \"vue-router\";\r\nimport * as Yup from \"yup\";\r\nimport { Actions } from \"@/store/enums/StoreEnums\";\r\nimport Swal from \"sweetalert2/dist/sweetalert2.min.js\";\r\n\r\nexport default defineComponent({\r\n name: \"password-reset\",\r\n components: {\r\n Field,\r\n Form,\r\n ErrorMessage,\r\n },\r\n setup() {\r\n const store = useStore();\r\n const router = useRouter();\r\n\r\n const submitButton = ref(null);\r\n\r\n //Create form validation object\r\n const forgotPassword = Yup.object().shape({\r\n email: Yup.string().email().required().label(\"Email\"),\r\n });\r\n\r\n //Form submit function\r\n const onSubmitForgotPassword = (values) => {\r\n // Activate loading indicator\r\n submitButton.value?.setAttribute(\"data-kt-indicator\", \"on\");\r\n\r\n // dummy delay\r\n setTimeout(() => {\r\n // Send login request\r\n store\r\n .dispatch(Actions.FORGOT_PASSWORD, values)\r\n .then(() => {\r\n Swal.fire({\r\n text: \"All is cool! Now you submit this form\",\r\n icon: \"success\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Ok, got it!\",\r\n customClass: {\r\n confirmButton: \"btn fw-bold btn-light-primary\",\r\n },\r\n }).then(function () {\r\n // Go to page after successfully login\r\n router.push({ name: \"dashboard\" });\r\n });\r\n })\r\n .catch(() => {\r\n // Alert then login failed\r\n Swal.fire({\r\n text: store.getters.getErrors[0],\r\n icon: \"error\",\r\n buttonsStyling: false,\r\n confirmButtonText: \"Try again!\",\r\n customClass: {\r\n confirmButton: \"btn fw-bold btn-light-danger\",\r\n },\r\n });\r\n });\r\n\r\n submitButton.value?.removeAttribute(\"data-kt-indicator\");\r\n }, 2000);\r\n };\r\n\r\n return {\r\n onSubmitForgotPassword,\r\n forgotPassword,\r\n submitButton,\r\n };\r\n },\r\n});\r\n","import { render } from \"./PasswordReset.vue?vue&type=template&id=4ea824d0\"\nimport script from \"./PasswordReset.vue?vue&type=script&lang=ts\"\nexport * from \"./PasswordReset.vue?vue&type=script&lang=ts\"\nscript.render = render\n\nexport default script"],"sourceRoot":""}