{"version":3,"sources":["webpack:///./src/views/account/login.vue?82e2","webpack:///src/views/account/login.vue","webpack:///./src/views/account/login.vue?37ee","webpack:///./src/views/account/login.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_e","isLoginValid","on","$event","preventDefault","onSubmit","attrs","directives","name","rawName","value","expression","login","class","errors","has","domProps","target","composing","$set","isProcessing","publicSignup","url","_s","text","staticRenderFns","data","isError","username","password","base64Image","version","show","methods","authorizeUser","authorize","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,WAAW,CAAEJ,EAAW,QAAEI,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACN,EAAIO,GAAG,+DAA+DP,EAAIQ,KAAOR,EAAIS,aAA4IT,EAAIQ,KAAlIJ,EAAG,MAAM,CAACE,YAAY,sBAAsB,CAACN,EAAIO,GAAG,0EAAmFH,EAAG,OAAO,CAACE,YAAY,qBAAqBI,GAAG,CAAC,OAAS,SAASC,GAAgC,OAAxBA,EAAOC,iBAAwBZ,EAAIa,SAASF,MAAW,CAACP,EAAG,MAAM,CAACE,YAAY,cAAc,CAACF,EAAG,QAAQ,CAACU,MAAM,CAAC,IAAM,UAAU,CAACd,EAAIO,GAAG,WAAWH,EAAG,QAAQ,CAACW,WAAW,CAAC,CAACC,KAAK,WAAWC,QAAQ,aAAaC,MAAM,WAAaC,WAAW,cAAc,CAACH,KAAK,QAAQC,QAAQ,UAAUC,MAAOlB,EAAIoB,MAAc,SAAED,WAAW,mBAAmBb,YAAY,eAAee,MAAM,CAAE,aAAcrB,EAAIsB,OAAOC,IAAI,UAAWT,MAAM,CAAC,GAAK,QAAQ,KAAO,QAAQ,KAAO,OAAO,aAAe,MAAM,YAAc,wBAAwB,aAAa,SAASU,SAAS,CAAC,MAASxB,EAAIoB,MAAc,UAAGV,GAAG,CAAC,MAAQ,SAASC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OP,EAAIQ,KAAMR,EAAI6B,aAAiB,KAAEzB,EAAG,cAAc,CAACE,YAAY,yCAAyCQ,MAAM,CAAC,GAAKd,EAAI6B,aAAaC,MAAM,CAAC9B,EAAIO,GAAGP,EAAI+B,GAAG/B,EAAI6B,aAAaG,SAAShC,EAAIQ,MAAM,QAC1sFyB,EAAkB,G,ohCC0CtB,OACEjB,KAAM,QACNkB,KAAM,WACJ,MAAO,CACLN,cAAc,EACdnB,cAAc,EACd0B,SAAS,EACTf,MAAO,CACLgB,SAAU,KACVC,SAAU,MAEZC,YAAa,KACbC,QAAS,QACTV,aAAc,CACZW,KAAR,SAAe,6CAAf,cACQV,IAAK,4CACLE,KAAM,gDAIZS,QAAS,EAAX,CACI,SADJ,WACA,mIACA,wBADA,UACA,EADA,OAEA,EAFA,iDAMA,kBANA,8CAQIC,cATJ,WASA,WACMzC,KAAK2B,cAAe,EACpB3B,KAAK0C,UAAU1C,KAAKmB,OAC1B,iBACQ,IAAR,0BACQ,EAAR,gCAEA,mBAGQ,GAFA,EAAR,gBAEA,gEACU,OAAV,kBAGU,EAAV,gBAIA,+BAEE,QAjDF,WAiDA,kGACA,EADA,+CC5F8V,I,YCO1VwB,EAAY,eACd,EACA7C,EACAkC,GACA,EACA,KACA,KACA,MAIa,aAAAW,E","file":"js/chunk-2d0e5f4e.cc9af621.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('fragment',[(_vm.isError)?_c('div',{staticClass:\"alert alert-danger\"},[_vm._v(\" Oops! An error occurred while attempting to log you in. \")]):_vm._e(),(!_vm.isLoginValid)?_c('div',{staticClass:\"alert alert-danger\"},[_vm._v(\" You have entered the wrong username or password, please try again. \")]):_vm._e(),_c('form',{staticClass:\"d-flex flex-column\",on:{\"submit\":function($event){$event.preventDefault();return _vm.onSubmit($event)}}},[_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"email\"}},[_vm._v(\"Email\")]),_c('input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"},{name:\"model\",rawName:\"v-model\",value:(_vm.login.username),expression:\"login.username\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('email') },attrs:{\"id\":\"email\",\"name\":\"email\",\"type\":\"text\",\"autocomplete\":\"off\",\"placeholder\":\"Please enter username\",\"data-vv-as\":\"Email\"},domProps:{\"value\":(_vm.login.username)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.login, \"username\", $event.target.value)}}}),_c('span',{staticClass:\"invalid-feedback\",attrs:{\"aria-live\":\"polite\"}},[_vm._v(\"Email field is required.\")])]),_c('div',{staticClass:\"form-group\"},[_c('label',{attrs:{\"for\":\"password\"}},[_vm._v(\"Password\")]),_c('input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"},{name:\"model\",rawName:\"v-model\",value:(_vm.login.password),expression:\"login.password\"}],staticClass:\"form-control\",class:{ 'is-invalid': _vm.errors.has('password') },attrs:{\"id\":\"password\",\"name\":\"password\",\"type\":\"password\",\"autocomplete\":\"off\",\"placeholder\":\"Please enter your password\",\"data-vv-as\":\"Password\"},domProps:{\"value\":(_vm.login.password)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.$set(_vm.login, \"password\", $event.target.value)}}}),_c('span',{staticClass:\"invalid-feedback\",attrs:{\"aria-live\":\"polite\"}},[_vm._v(\"Password field is required.\")])]),_c('button',{staticClass:\"btn btn-success ld-ext-right\",class:{ 'running' : _vm.isProcessing },attrs:{\"type\":\"submit\",\"disabled\":_vm.isProcessing}},[_vm._v(\" Login \"),_c('div',{staticClass:\"ld ld-ring ld-spin\"})]),_c('div',{staticClass:\"d-flex justify-content-center\"},[_c('router-link',{staticClass:\"font-weight-medium text-center d-block\",attrs:{\"to\":\"/forgotpassword\"}},[_vm._v(\"Forgot Password?\")]),(_vm.publicSignup.show)?_c('span',{staticClass:\"mr-2 ml-2\"},[_vm._v(\"|\")]):_vm._e(),(_vm.publicSignup.show)?_c('router-link',{staticClass:\"font-weight-medium text-center d-block\",attrs:{\"to\":_vm.publicSignup.url}},[_vm._v(_vm._s(_vm.publicSignup.text))]):_vm._e()],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n  <fragment>\r\n    <div class=\"alert alert-danger\" v-if=\"isError\">\r\n      Oops! An error occurred while attempting to log you in.\r\n    </div>\r\n\r\n    <div class=\"alert alert-danger\" v-if=\"!isLoginValid\">\r\n      You have entered the wrong username or password, please try again.\r\n    </div>\r\n\r\n    <form class=\"d-flex flex-column\" v-on:submit.prevent=\"onSubmit\">\r\n      <div class=\"form-group\">\r\n        <label for=\"email\">Email</label>\r\n        <input id=\"email\" name=\"email\" type=\"text\" class=\"form-control\" :class=\"{ 'is-invalid': errors.has('email') }\"\r\n          autocomplete=\"off\" placeholder=\"Please enter username\" v-validate=\"'required'\" v-model=\"login.username\" data-vv-as=\"Email\" />\r\n        <span class=\"invalid-feedback\" aria-live=\"polite\">Email field is required.</span>\r\n      </div>\r\n\r\n      <div class=\"form-group\">\r\n        <label for=\"password\">Password</label>\r\n        <input id=\"password\" name=\"password\" type=\"password\" class=\"form-control\" :class=\"{ 'is-invalid': errors.has('password') }\"\r\n          autocomplete=\"off\" placeholder=\"Please enter your password\" v-validate=\"'required'\" v-model=\"login.password\" data-vv-as=\"Password\" />\r\n        <span class=\"invalid-feedback\" aria-live=\"polite\">Password field is required.</span>\r\n      </div>\r\n\r\n      <button type=\"submit\" class=\"btn btn-success ld-ext-right\" :class=\"{ 'running' : isProcessing }\" :disabled=\"isProcessing\">\r\n        Login\r\n        <div class=\"ld ld-ring ld-spin\"></div>\r\n      </button>\r\n\r\n      <div class=\"d-flex justify-content-center\">\r\n        <router-link to=\"/forgotpassword\" class=\"font-weight-medium text-center d-block\">Forgot Password?</router-link>\r\n        <span class=\"mr-2 ml-2\" v-if=\"publicSignup.show\">|</span>\r\n        <router-link :to=\"publicSignup.url\" class=\"font-weight-medium text-center d-block\" v-if=\"publicSignup.show\">{{ publicSignup.text }}</router-link>\r\n      </div>\r\n\r\n    </form>\r\n  </fragment>\r\n</template>\r\n\r\n<script>\r\nimport { mapActions } from \"vuex\";\r\n\r\nexport default {\r\n  name: \"login\",\r\n  data: function() {\r\n    return {\r\n      isProcessing: false,\r\n      isLoginValid: true,\r\n      isError: false,\r\n      login: {\r\n        username: null,\r\n        password: null\r\n      },\r\n      base64Image: null,\r\n      version: process.env.VERSION,\r\n      publicSignup: {\r\n        show: (process.env.VUE_APP_TEMPLATE_LOGIN_PUBLIC_SIGNUP_SHOW || 'true').toUpperCase() === 'TRUE',\r\n        url: process.env.VUE_APP_TEMPLATE_LOGIN_PUBLIC_SIGNUP_URL,\r\n        text: process.env.VUE_APP_TEMPLATE_LOGIN_PUBLIC_SIGNUP_TEXT\r\n      },\r\n    };\r\n  },\r\n  methods: {\r\n    async onSubmit() {\r\n      var isFormValid = await this.$validator.validate();\r\n      if (!isFormValid) {\r\n        return;\r\n      }\r\n\r\n      this.authorizeUser();\r\n    },\r\n    authorizeUser() {\r\n      this.isProcessing = true;\r\n      this.authorize(this.login)\r\n        .then(() => {\r\n          let redirect = this.$route.query.redirect;\r\n          this.$router.push(redirect || \"dashboard\");\r\n        })\r\n        .catch(err => {\r\n          this.isProcessing = false;\r\n\r\n          if (err.response && err.response.data.model && err.response.data.model.errors) {\r\n            return this.isLoginValid = false;\r\n          }\r\n          else {\r\n            this.isError = true;\r\n          }\r\n        });\r\n    },\r\n    ...mapActions([\"authorize\"])\r\n  },\r\n  async mounted () {\r\n    if (process.env.NODE_ENV === 'development') {\r\n      this.login.username = \"sadmin@esolutionsgroup.ca\";\r\n      this.login.password = \"$Link2Build2019\";\r\n    }\r\n  }\r\n};\r\n</script>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./login.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./login.vue?vue&type=template&id=7759b0dc&\"\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\nexport default component.exports"],"sourceRoot":""}