{"version":3,"sources":["webpack:///./src/views/user/UserProfile.vue?34cf","webpack:///./src/components/ChangeUserPasswordPopup.vue?24ad","webpack:///./src/components/ChangeUserPasswordPopup.vue?88c7","webpack:///./src/components/ChangeUserPasswordPopup.vue?0601","webpack:///./src/components/ChangeUserPasswordPopup.vue","webpack:///./src/views/user/UserProfile.vue?6721","webpack:///./src/views/user/UserProfile.vue?42d1","webpack:///./src/views/user/UserProfile.vue","webpack:///./src/views/user/UserProfile.vue?1821"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","directives","name","rawName","value","isLoading","$helpers","isExists","user","expression","staticClass","ref","isAdminEdit","showError","_v","isButtonsDisabled","validateForm","on","changePassword","saveChanges","_e","staticRenderFns","onChangeUserPasswordPopupClosed","model","callback","$$v","isPopupVisible","staticStyle","$const","minPasswordLength","maxPasswordLength","validateState","currentPassword","_s","veeErrors","first","newPassword","confirmNewPassword","any","val","oldVal","$appUtils","specialUserPasswordTrim","errorMessage","$bvToast","toast","title","variant","scope","vvIsValidationScopeValid","vvValidateState","a","$validator","validateAll","isValid","users","data","success","components","component","thisInst","initData","$nextTick","generalAndContactInfoSection","$refs","afterDataInit","userInfo","obtainUserInfo","anyInArray","accesses","x","type","veeFields","dirty","validated","has","afterUserInit","getProfile","u","changeUserPasswordPopup","openChangeUserPasswordPopup","updateProfile","isAnyChanges","UserGeneralAndContactInfoSection","ChangeUserPasswordPopup"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,cAAc,CAACE,MAAM,CAAC,GAAK,sBAAsB,CAACF,EAAG,SAAS,CAACG,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,OAAQV,EAAIW,WAAaX,EAAIY,SAASC,SAASb,EAAIc,MAAOC,WAAW,0CAA0CC,YAAY,QAAQ,CAACZ,EAAG,mCAAmC,CAACa,IAAI,+BAA+BX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AKa,MAAO,SAACgD,GAC5BA,EAAKC,QACDD,EAAK0B,aACL,EAAKtC,SAASC,MAAM,0BAA2B,CAC3CC,MAAO,QACPC,QAAS,YAGb,EAAKH,SAASC,MAAM,oDAAqD,CACrEC,MAAO,eACPC,QAAS,SAIjB,EAAKlC,YAGT,EAAKE,mBAAoB,KAC1B,SAAA4B,GACC,EAAK5B,mBAAoB,EAEzB,EAAKF,UAAU8B,MAGnBhD,KAAKoB,mBAAoB,EAxCjC,iDA/DJ,8DAAyC,QAApB,EAAW,GAL/B,eAAU,CACP2C,WAAY,CACRyB,mCAAA,KAAkCC,wBAAA,MAGrB,WCrDmY,ICQpZ,G,UAAY,eACd,EACA3F,EACA4B,GACA,EACA,KACA,KACA,OAIa,e,6CCnBf,W","file":"js/chunk-0cac6609.c6342a42.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-container',{attrs:{\"id\":\"user-profile-page\"}},[_c('b-form',{directives:[{name:\"show\",rawName:\"v-show\",value:(!_vm.isLoading && _vm.$helpers.isExists(_vm.user)),expression:\"!isLoading && $helpers.isExists(user)\"}],staticClass:\"mt-1\"},[_c('UserGeneralAndContactInfoSection',{ref:\"generalAndContactInfoSection\",attrs:{\"user\":_vm.user,\"is-user-create\":false,\"is-admin-edit\":_vm.isAdminEdit,\"show-error-notification\":_vm.showError}}),_c('b-row',[_c('b-col',{attrs:{\"cols\":\"4\"}},[_c('b-button',{staticClass:\"float-left\",attrs:{\"to\":{ name: 'home' }}},[_vm._v(\"Назад\")])],1),_c('b-col',{staticClass:\"text-center\",attrs:{\"cols\":\"4\"}},[_c('b-button',{staticClass:\"btn-icon\",attrs:{\"variant\":\"warning\",\"disabled\":_vm.isButtonsDisabled || !_vm.validateForm},on:{\"click\":_vm.changePassword}},[_c('i',{staticClass:\"feather icon-lock\"}),_vm._v(\" Змінити пароль\\n \")])],1),_c('b-col',{attrs:{\"cols\":\"4\"}},[_c('b-button',{staticClass:\"btn-icon float-right\",attrs:{\"variant\":\"success\",\"disabled\":_vm.isButtonsDisabled || !_vm.validateForm},on:{\"click\":_vm.saveChanges}},[_c('i',{staticClass:\"feather icon-check\"}),_vm._v(\" Зберегти\\n \")])],1)],1)],1),(_vm.isLoading)?_c('page-loading-indicator'):_vm._e(),_c('ChangeUserPasswordPopup',{ref:\"changeUserPasswordPopup\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"centered\":\"\",\"hide-footer\":\"\",\"no-close-on-backdrop\":\"\",\"title\":\"Змінити пароль\"},on:{\"hidden\":_vm.onChangeUserPasswordPopupClosed},model:{value:(_vm.isPopupVisible),callback:function ($$v) {_vm.isPopupVisible=$$v},expression:\"isPopupVisible\"}},[_c('div',{staticClass:\"change-user-password-popup\"},[(_vm.isLoading)?_c('div',[_c('b-spinner',{staticStyle:{\"width\":\"3rem\",\"height\":\"3rem\"},attrs:{\"label\":\"Завантаження...\"}})],1):_c('div',[_c('b-container',[_c('b-form',[_c('b-col',[_c('b-form-group',{attrs:{\"label\":\"Пароль\",\"label-for\":\"currentPassword-input\"}},[_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|min:' + _vm.$const.minPasswordLength + '|max:' + _vm.$const.maxPasswordLength),expression:\"'required|min:' + $const.minPasswordLength + '|max:' + $const.maxPasswordLength\"}],attrs:{\"id\":\"currentPassword-input\",\"name\":\"currentPassword-input\",\"type\":\"password\",\"data-vv-as\":\"\\\"Пароль\\\"\",\"placeholder\":\"Пароль\",\"state\":_vm.validateState('currentPassword-input'),\"aria-describedby\":\"currentPassword-input-feedback\"},model:{value:(_vm.currentPassword),callback:function ($$v) {_vm.currentPassword=$$v},expression:\"currentPassword\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":\"currentPassword-input-feedback\"}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('currentPassword-input'))+\"\\n \")])],1),_c('b-form-group',{attrs:{\"label\":\"Новий пароль\",\"label-for\":\"newPassword-input\"}},[_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|min:' + _vm.$const.minPasswordLength + '|max:' + _vm.$const.maxPasswordLength + '|appPassword'),expression:\"'required|min:' + $const.minPasswordLength + '|max:' + $const.maxPasswordLength + '|appPassword'\"}],ref:\"newPassword\",attrs:{\"id\":\"newPassword-input\",\"name\":\"newPassword-input\",\"type\":\"password\",\"data-vv-as\":\"\\\"Новий пароль\\\"\",\"placeholder\":\"Новий пароль\",\"state\":_vm.validateState('newPassword-input'),\"aria-describedby\":\"newPassword-input-feedback\"},model:{value:(_vm.newPassword),callback:function ($$v) {_vm.newPassword=$$v},expression:\"newPassword\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":\"newPassword-input-feedback\"}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('newPassword-input'))+\"\\n \")])],1),_c('b-form-group',{attrs:{\"label\":\"Підтвердження пароля\",\"label-for\":\"confirmNewPassword-input\"}},[_c('b-form-input',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required|confirmed:newPassword'),expression:\"'required|confirmed:newPassword'\"}],attrs:{\"id\":\"confirmNewPassword-input\",\"name\":\"confirmNewPassword-input\",\"type\":\"password\",\"data-vv-as\":\"\\\"Підтвердження пароля\\\"\",\"placeholder\":\"Підтвердження пароля\",\"state\":_vm.validateState('confirmNewPassword-input'),\"aria-describedby\":\"confirmNewPassword-input-feedback\"},model:{value:(_vm.confirmNewPassword),callback:function ($$v) {_vm.confirmNewPassword=$$v},expression:\"confirmNewPassword\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":\"confirmNewPassword-input-feedback\"}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('confirmNewPassword-input'))+\"\\n \")])],1)],1),_c('b-col',{staticClass:\"text-center\"},[_c('b-button',{attrs:{\"variant\":\"success\",\"disabled\":_vm.isButtonsDisabled || !_vm.validateForm},on:{\"click\":_vm.changePassword}},[_vm._v(\"\\n Змінити пароль\\n \")])],1)],1)],1)],1)])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport {Component, Prop, Vue, Watch} from 'vue-property-decorator'\nimport {IChangeUserPasswordPopup, SelectOption} from \"@/global\";\nimport * as enums from '@/global-enum'\nimport usersApi from '@/api/users'\n\n@Component({\n components: {\n }\n})\nexport default class ChangeUserPasswordPopup extends Vue implements IChangeUserPasswordPopup {\n isPopupVisible = false;\n isLoading = false;\n isButtonsDisabled = false;\n\n currentPassword = \"\";\n newPassword = \"\";\n confirmNewPassword = \"\";\n\n get validateForm(): boolean {\n return !this.veeErrors.any();\n }\n\n @Watch(\"currentPassword\")\n onCurrentPasswordUpdate(val: string, oldVal: string) {\n if (val === oldVal) return;\n this.currentPassword = this.$appUtils.specialUserPasswordTrim(this.currentPassword);\n }\n\n @Watch(\"newPassword\")\n onNewPasswordUpdate(val: string, oldVal: string) {\n if (val === oldVal) return;\n this.newPassword = this.$appUtils.specialUserPasswordTrim(this.newPassword);\n }\n\n showError(errorMessage?: string) {\n this.$bvToast.toast(errorMessage || \"Спробуйте пізніше\", {\n title: \"Помилка\",\n variant: \"danger\"\n })\n }\n\n isValidationScopeValid(scope: string) {\n return this.$appUtils.vvIsValidationScopeValid(this, scope);\n }\n\n validateState(ref: string, scope?: string) {\n return this.$appUtils.vvValidateState(this, ref, scope);\n }\n\n async openChangeUserPasswordPopup() {\n this.isPopupVisible = true;\n\n // this.isLoading = true;\n // this.isLoading = false;\n }\n\n onChangeUserPasswordPopupClosed() {\n // reset values\n this.isButtonsDisabled = false;\n\n this.currentPassword = \"\";\n this.newPassword = \"\";\n this.confirmNewPassword = \"\";\n }\n\n async changePassword() {\n let isValid = await this.$validator.validateAll('changeUserPasswordPopup-changePassword');\n\n if (isValid) {\n this.isButtonsDisabled = true;\n\n usersApi.changePassword(this.currentPassword, this.newPassword, data => {\n if (data.success) {\n this.$bvToast.toast(\"Пароль змінен успішно\", {\n title: \"Успіх\",\n variant: \"success\"\n });\n\n this.isPopupVisible = false;\n } else {\n this.$bvToast.toast(\"Не вдалося змінити пароль\", {\n title: \"Помилка\",\n variant: \"danger\"\n });\n }\n\n this.isButtonsDisabled = false;\n }, errorMessage => {\n this.isButtonsDisabled = false;\n\n this.showError(errorMessage)\n });\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChangeUserPasswordPopup.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--13-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ChangeUserPasswordPopup.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ChangeUserPasswordPopup.vue?vue&type=template&id=1f1a8e75&\"\nimport script from \"./ChangeUserPasswordPopup.vue?vue&type=script&lang=ts&\"\nexport * from \"./ChangeUserPasswordPopup.vue?vue&type=script&lang=ts&\"\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","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\nimport usersApi from '@/api/users'\nimport {\n IChangeUserPasswordPopup,\n IUserGeneralAndContactInfoSection,\n UserProfileDto\n} from \"@/global\";\nimport appUtils from '@/plugins/app-utils'\nimport * as enums from \"@/global-enum\";\nimport Helpers from \"@/helpers\";\nimport UserGeneralAndContactInfoSection from \"@/views/user/UserGeneralAndContactInfoSection.vue\";\nimport ChangeUserPasswordPopup from \"@/components/ChangeUserPasswordPopup.vue\";\nimport {AuthModule} from \"@/store/modules/auth\";\n\n@Component({\n components: {\n UserGeneralAndContactInfoSection, ChangeUserPasswordPopup\n }\n})\nexport default class UserProfile extends Vue {\n isLoading = true;\n isButtonsDisabled = false;\n user: UserProfileDto | null = null;\n\n mounted() {\n const thisInst = this;\n this.initData(() => {\n thisInst.$nextTick(async () => {\n const generalAndContactInfoSection = thisInst.$refs.generalAndContactInfoSection as unknown as IUserGeneralAndContactInfoSection;\n await generalAndContactInfoSection.afterDataInit();\n\n this.isLoading = false;\n });\n });\n }\n\n // computed\n get validateForm(): boolean {\n return !this.veeErrors.any();\n }\n\n get isAdminEdit() {\n const userInfo = AuthModule.obtainUserInfo();\n return this.$helpers.isExists(userInfo) &&\n this.$helpers.anyInArray(userInfo!.accesses, x =>\n x.type === enums.UserAccessType_SystemAdmin ||\n x.type === enums.UserAccessType_Users ||\n x.type === enums.UserAccessType_KnowledgeBase);\n }\n\n // methods\n validateState(ref: string) {\n if (this.veeFields[ref] &&\n (this.veeFields[ref].dirty || this.veeFields[ref].validated)) {\n return !this.veeErrors.has(ref);\n }\n\n return null\n }\n\n showError(errorMessage?: string) {\n this.$bvToast.toast(errorMessage || \"Спробуйте пізніше\", {\n title: \"Помилка\",\n variant: \"danger\"\n })\n }\n\n initData(afterUserInit: () => void) {\n this.isLoading = true;\n\n usersApi.getProfile(((u) => {\n this.user = u;\n\n afterUserInit();\n }), this.showError);\n }\n\n async changePassword() {\n const changeUserPasswordPopup = this.$refs.changeUserPasswordPopup as unknown as IChangeUserPasswordPopup;\n changeUserPasswordPopup.openChangeUserPasswordPopup();\n }\n\n async saveChanges() {\n this.isButtonsDisabled = true;\n\n const generalAndContactInfoSection = this.$refs.generalAndContactInfoSection as unknown as IUserGeneralAndContactInfoSection;\n\n let isValid = true;\n\n if (!await generalAndContactInfoSection.validateAll()) {\n isValid = false;\n }\n\n if (!await this.$validator.validateAll()) {\n isValid = false;\n }\n\n if (isValid) {\n usersApi.updateProfile(this.user!, (data) => {\n if (data.success){\n if (data.isAnyChanges) {\n this.$bvToast.toast(\"Зміни успішно збережені\", {\n title: \"Успіх\",\n variant: \"success\"\n });\n } else {\n this.$bvToast.toast(\"Зміни не потрібні, інформація в актуальному стані\", {\n title: \"Повідомлення\",\n variant: \"info\"\n });\n }\n } else {\n this.showError()\n }\n\n this.isButtonsDisabled = false;\n }, errorMessage => {\n this.isButtonsDisabled = false;\n\n this.showError(errorMessage)\n });\n } else {\n this.isButtonsDisabled = false;\n }\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserProfile.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserProfile.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UserProfile.vue?vue&type=template&id=653eecf4&\"\nimport script from \"./UserProfile.vue?vue&type=script&lang=ts&\"\nexport * from \"./UserProfile.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./UserProfile.vue?vue&type=style&index=0&lang=scss&\"\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","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./UserProfile.vue?vue&type=style&index=0&lang=scss&\""],"sourceRoot":""}