{"version":3,"sources":["webpack:///./src/views/admin-access/UserAdminRightsSection.vue?d94c","webpack:///./src/views/admin-access/UserAdminRightsSection.vue?094e","webpack:///./src/views/admin-access/UserAdminRightsSection.vue?c791","webpack:///./src/views/admin-access/UserAdminRightsSection.vue","webpack:///./src/views/admin-access/UserAdminRightsSection.vue?08dd","webpack:///./src/api/users-a.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","$helpers","isExists","user","attrs","staticClass","_v","_l","rule","index","key","scopedSlots","_u","fn","class","validateState","allContactInfoVisibilityTypes","o","typeKey","on","onContactInfoVisibilityRulesChanged","_s","$const","selectNoOptionsText","proxy","model","value","callback","$$v","$set","expression","veeErrors","first","directives","name","rawName","$event","contactInfoVisibilityRules","splice","isAllAllowed","_e","searchOptions","search","loading","searchVisibilityRuleOptions","isNotEmpty","searchTerm","length","selectSearchTermMinLength","selectSearchNoResultsText","selectSearchNotStartedText","option","isReadonly","label","modifiers","userId","userAdditionalInfo","organizationFullName","availableContactInfoVisibilityTypes","addNewVisibilityRuleContext","isUserHasUsersAccess","toggleUsersAccess","organizations","x","id","onUsersAccessOrganizationIdsChanged","usersAccessOrganizationIds","isUserHasKnowledgeBaseAccess","toggleKnowledgeBaseAccess","staticRenderFns","type","getDisplayName","additionalPhone","additionalEmail","updateLabel","isFunction","Error","number","emailAddress","searchVisibilityRuleOptionsWithTimer","loadingCb","adminVisibilityRuleOptions","options","errorMessage","showErrorNotification","any","getUserFullName","anyInArray","accesses","userInfo","obtainUserInfo","mainPhoneNumber","username","additionalPhones","additionalEmails","updateContactInfoVisibilityTypesLookup","ref","$appUtils","vvValidateState","a","i","toString","additionalPhoneIndex","additionalEmailIndex","initUsersAccessOrganizations","getAvailableOrganizationOptions","availableOrganizations","thisInst","push","isArray","firstAvailableContactInfoVisibilityType","allowedOrganizationIds","allowedUserIds","allowedOptions","parts","split","toNumeric","usersAccess","findFirstInArray","organizationIds","val","removeInArray","$validator","validateAll","Object","Function","deep","components","component","cb","errorCb","_defaultGetResponse","params","email","organizationId","successCb","_defaultPostResponse","isDisabled","page","filters","userAccess","isNeedActive","fullName","mapRegionId","mapDistrictId","mapPointId","positionName"],"mappings":"oHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAQF,EAAIM,SAASC,SAASP,EAAIQ,MAAOJ,EAAG,SAAS,CAACK,MAAM,CAAC,MAAQ,oBAAoB,CAACL,EAAG,cAAc,CAACA,EAAG,cAAc,CAACA,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACK,MAAM,CAAC,KAAO,MAAM,CAACL,EAAG,KAAK,CAACM,YAAY,eAAe,CAACV,EAAIW,GAAG,eAAeX,EAAIY,GAAIZ,EAAIQ,KAA+B,4BAAE,SAASK,EAAKC,GAAO,OAAOV,EAAG,SAAS,CAACW,IAAID,EAAML,MAAM,CAAC,iBAAiB,WAAWO,YAAYhB,EAAIiB,GAAG,CAAC,CAACF,IAAI,SAASG,GAAG,WAAW,MAAO,CAACd,EAAG,MAAM,CAACM,YAAY,gBAAgB,CAACN,EAAG,MAAM,CAACM,YAAY,eAAe,CAACN,EAAG,WAAW,CAACW,IAAI,kCAAoCD,EAAMK,MAAM,CAAE,YAA8E,IAAlEnB,EAAIoB,cAAc,mCAAqCN,GAAiB,cAAgF,IAAlEd,EAAIoB,cAAc,mCAAqCN,IAAmBL,MAAM,CAAC,GAAK,mCAAqCK,EAAM,KAAO,kCAAoCA,EAAM,YAAc,MAAM,mBAAmB,4CAA8CA,EAAM,QAAUd,EAAIqB,8BAA8B,OAAS,SAAUC,GAAK,OAAOA,EAAEC,SAAW,WAAY,GAAOC,GAAG,CAAC,MAAQ,WAAc,OAAOxB,EAAIyB,oCAAoCZ,KAAUG,YAAYhB,EAAIiB,GAAG,CAAC,CAACF,IAAI,aAAaG,GAAG,WAAW,MAAO,CAAClB,EAAIW,GAAGX,EAAI0B,GAAG1B,EAAI2B,OAAO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CAGf,SAA6BI,EAAwBL,EAAqCC,GACtFtI,KAAKuI,oBAAoB,wCAAyC,CAC9DC,OAAQ,CAAEE,mBACXL,EAAIC,K,yBAGX,SAAmBlE,EAAYiE,EAAkCC,GAC7DtI,KAAKuI,oBAAoB,yBAA0B,CAC/CC,OAAQ,CAAEpE,OACXiE,EAAIC,K,4BAGX,SAAsB/H,EAAoBoI,EAAwEL,GAC9GtI,KAAK4I,qBAAqB,yBAA0BrI,EAAM,KAAMoI,EAAWL,K,+BAG/E,SAAyB3E,EAAgBkF,EAAqBF,EAAiDL,GAC3GtI,KAAKuI,oBAAoB,mCAAoC,CACzDC,OAAQ,CAAE7E,SAAQkF,eACnBF,EAAWL,K,2BAGlB,SAAqBQ,EAAcC,EAAoCV,EAAuDC,GAC1HtI,KAAKuI,oBAAoB,qBAAsB,CAC3CC,OAAQ,CACJM,OACAE,WAAYD,EAAQC,WACpBC,aAAcF,EAAQE,aACtBjD,SAAU+C,EAAQ/C,SAClBkD,SAAUH,EAAQG,SAClBC,YAAaJ,EAAQI,YACrBC,cAAeL,EAAQK,cACvBC,WAAYN,EAAQM,WACpBX,eAAgBK,EAAQL,eACxBY,aAAcP,EAAQO,eAE3BjB,EAAIC,K,kCAGX,SAA4BK,EAAyDL,GACjFtI,KAAKuI,oBAAoB,6BAA8B,KAAMI,EAAWL,K,mCAG5E,SAA6BS,EAAoCJ,EAAiDL,GAC9GtI,KAAK4I,qBAAqB,kCAAmCG,EAAS,KAAMJ,EAAWL,O,GA5DlE","file":"js/admin~user-actions.3ae0b533.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.$helpers.isExists(_vm.user))?_c('b-card',{attrs:{\"title\":\"Адміністрування\"}},[_c('b-card-text',[_c('b-container',[_c('b-row',[_c('b-col',{attrs:{\"cols\":\"6\"}},[_c('h5',{staticClass:\"text-center\"},[_vm._v(\"Видимість\")]),_vm._l((_vm.user.contactInfoVisibilityRules),function(rule,index){return _c('b-card',{key:index,attrs:{\"border-variant\":\"success\"},scopedSlots:_vm._u([{key:\"header\",fn:function(){return [_c('div',{staticClass:\"d-flex w-100\"},[_c('div',{staticClass:\"flex-grow-1\"},[_c('v-select',{key:'contactInfoVisibilityRule-input' + index,class:{ 'is-valid': _vm.validateState('contactInfoVisibilityRule-input-' + index) === true, 'is-invalid': _vm.validateState('contactInfoVisibilityRule-input-' + index) === false },attrs:{\"id\":'contactInfoVisibilityRule-input-' + index,\"name\":'contactInfoVisibilityRule-input' + index,\"placeholder\":\"Тип\",\"aria-describedby\":'contactInfoVisibilityRule-input-feedback-' + index,\"options\":_vm.allContactInfoVisibilityTypes,\"reduce\":function (o) { return o.typeKey; },\"clearable\":false},on:{\"input\":function () { return _vm.onContactInfoVisibilityRulesChanged(rule); }},scopedSlots:_vm._u([{key:\"no-options\",fn:function(){return [_vm._v(_vm._s(_vm.$const.selectNoOptionsText))]},proxy:true}],null,true),model:{value:(rule.typeKey),callback:function ($$v) {_vm.$set(rule, \"typeKey\", $$v)},expression:\"rule.typeKey\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":'contactInfoVisibilityRule-input-feedback-' + index}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('contactInfoVisibilityRule-input' + index))+\"\\n \")])],1),_c('b-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(index > 0),expression:\"index > 0\"}],staticClass:\"remove-rule-button btn-icon ml-1\",attrs:{\"variant\":\"outline-danger\",\"pill\":\"\"},on:{\"click\":function($event){return _vm.user.contactInfoVisibilityRules.splice(index, 1)}}},[_c('i',{staticClass:\"feather icon-x\"})])],1)]},proxy:true}],null,true)},[_c('b-card-text',[_c('div',[_c('h6',{staticClass:\"position-relative\"},[_vm._v(\"\\n Видимість для\\n\\n \"),_c('div',{staticClass:\"allow-all-switch-wrapper\"},[_c('b-form-checkbox',{class:{ 'text-muted': !rule.isAllAllowed },attrs:{\"switch\":\"\",\"size\":\"sm\"},model:{value:(rule.isAllAllowed),callback:function ($$v) {_vm.$set(rule, \"isAllAllowed\", $$v)},expression:\"rule.isAllAllowed\"}},[_vm._v(\"\\n всіх\\n \")])],1)]),(!rule.isAllAllowed)?_c('b-form-group',{staticClass:\"mb-0\"},[_c('v-select',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],key:'contactInfoVisibilityRuleOptions-input-' + index,class:{ 'is-valid': _vm.validateState('contactInfoVisibilityRuleOptions-input-' + index) === true, 'is-invalid': _vm.validateState('contactInfoVisibilityRuleOptions-input-' + index) === false },attrs:{\"id\":'contactInfoVisibilityRuleOptions-input-' + index,\"name\":'contactInfoVisibilityRuleOptions-input-' + index,\"data-vv-as\":\"\\\"Організації та абоненти\\\"\",\"placeholder\":\"Організації, абоненти\",\"aria-describedby\":'contactInfoVisibilityRuleOptions-input-feedback-' + index,\"options\":rule.searchOptions,\"multiple\":\"\",\"filterable\":false},on:{\"search\":function (search, loading) { return _vm.searchVisibilityRuleOptions(search, loading, rule); }},scopedSlots:_vm._u([{key:\"no-options\",fn:function(){return [_vm._v(\"\\n \"+_vm._s(_vm.$helpers.isNotEmpty(rule.searchTerm) && rule.searchTerm.length >= _vm.$const.selectSearchTermMinLength ? _vm.$const.selectSearchNoResultsText : _vm.$const.selectSearchNotStartedText)+\"\\n \")]},proxy:true},{key:\"selected-option\",fn:function(option){return [_c('span',{class:{ 'disable-deselect': option.isReadonly }},[_vm._v(_vm._s(option.label))])]}},{key:\"option\",fn:function(option){return [_c('div',{staticClass:\"d-flex\"},[_c('span',{staticClass:\"flex-grow-1\"},[_c('b-badge',{directives:[{name:\"b-tooltip\",rawName:\"v-b-tooltip.hover\",modifiers:{\"hover\":true}}],attrs:{\"pill\":\"\",\"variant\":\"primary\",\"title\":_vm.$helpers.isExists(option.userId) ? 'Абонент' : 'Організація'}},[_vm._v(\"\\n \"+_vm._s(_vm.$helpers.isExists(option.userId) ? 'Аб' : 'Орг')+\"\\n \")]),_vm._v(\"\\n \"+_vm._s(option.label)+\"\\n \")],1),_c('span',{staticClass:\"align-self-center font-small-2 font-italic text-muted\"},[_vm._v(\"\\n \"+_vm._s(_vm.$helpers.isExists(option.userId) ? option.userAdditionalInfo : option.organizationFullName)+\"\\n \")])])]}}],null,true),model:{value:(rule.allowedOptions),callback:function ($$v) {_vm.$set(rule, \"allowedOptions\", $$v)},expression:\"rule.allowedOptions\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":'contactInfoVisibilityRuleOptions-input-feedback-' + index}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('contactInfoVisibilityRuleOptions-input-' + index))+\"\\n \")])],1):_vm._e()],1)])],1)}),_c('b-button',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.availableContactInfoVisibilityTypes.length > 0),expression:\"availableContactInfoVisibilityTypes.length > 0\"}],staticClass:\"btn-icon\",attrs:{\"variant\":\"success\",\"block\":\"\",\"pill\":\"\"},on:{\"click\":_vm.addNewVisibilityRuleContext}},[_c('i',{staticClass:\"feather icon-plus\"}),_vm._v(\" Додати вийняток\\n \")])],2),(_vm.isRightsSettingsPanelVisible)?_c('b-col',{attrs:{\"cols\":\"6\"}},[(_vm.isUsersAccessRightsVisible)?_c('div',[_c('h5',{staticClass:\"text-center\"},[_vm._v(\"Налаштування прав\")]),_c('b-form-checkbox',{attrs:{\"checked\":_vm.isUserHasUsersAccess},on:{\"change\":_vm.toggleUsersAccess}},[_vm._v(\"\\n Адміністратор ВТМ / ВММ\\n \")]),(_vm.isUserHasUsersAccess)?_c('b-form-group',{staticClass:\"mt-50 ml-2\",attrs:{\"label\":\"В організаціях\",\"label-for\":\"usersAccess-organizationId-input\"}},[_c('v-select',{directives:[{name:\"validate\",rawName:\"v-validate\",value:('required'),expression:\"'required'\"}],key:\"usersAccess-organizationId-input\",class:{ 'is-valid': _vm.validateState('usersAccess-organizationId-input') === true, 'is-invalid': _vm.validateState('usersAccess-organizationId-input') === false },attrs:{\"id\":\"usersAccess-organizationId-input\",\"name\":\"usersAccess-organizationId-input\",\"data-vv-as\":\"\\\"Організації\\\"\",\"placeholder\":\"Організації\",\"aria-describedby\":\"usersAccess-organizationId-input-feedback\",\"options\":_vm.organizations,\"reduce\":function (x) { return x.id; },\"multiple\":\"\"},on:{\"input\":_vm.onUsersAccessOrganizationIdsChanged},scopedSlots:_vm._u([{key:\"no-options\",fn:function(){return [_vm._v(_vm._s(_vm.$const.selectNoOptionsText))]},proxy:true}],null,false,1880632583),model:{value:(_vm.usersAccessOrganizationIds),callback:function ($$v) {_vm.usersAccessOrganizationIds=$$v},expression:\"usersAccessOrganizationIds\"}}),_c('b-form-invalid-feedback',{attrs:{\"id\":\"usersAccess-organizationId-input-feedback\"}},[_vm._v(\"\\n \"+_vm._s(_vm.veeErrors.first('usersAccess-organizationId-input'))+\"\\n \")])],1):_vm._e()],1):_vm._e(),_c('b-form-checkbox',{staticClass:\"mt-1\",attrs:{\"checked\":_vm.isUserHasKnowledgeBaseAccess},on:{\"change\":_vm.toggleKnowledgeBaseAccess}},[_vm._v(\"\\n Доступ до редагування Бази знань\\n \")])],1):_vm._e()],1)],1)],1)],1):_vm._e()}\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\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\n\n\n\n\n\nimport {Component, Prop, Vue, Watch} from 'vue-property-decorator'\nimport usersAApi from '@/api/users-a'\nimport {\n SelectOption,\n UserAContactInfoVisibilityRuleDto,\n UserPhoneJson,\n UserEmailJson, IUserAdminRightsSectionUserModel, IUserAdminRightsSection\n} from \"@/global\";\nimport * as enums from \"@/global-enum\";\nimport Helpers from '../../helpers'\nimport appUtils from '@/plugins/app-utils'\n// @ts-ignore\nimport debounce from 'debounce';\nimport {AuthModule} from \"@/store/modules/auth\";\n\nclass ContactInfoVisibilityTypeContext {\n label = \"\";\n\n typeKey: string;\n type: number;\n\n getDisplayName: (() => string) | null = null;\n additionalPhone: UserPhoneJson | null = null;\n additionalEmail: UserEmailJson | null = null;\n\n constructor(typeKey: string, type: number, getDisplayName: (() => string) | null, additionalPhone: UserPhoneJson | null, additionalEmail: UserEmailJson | null) {\n this.typeKey = typeKey;\n this.type = type;\n this.getDisplayName = getDisplayName;\n\n if (Helpers.isExists(additionalPhone)) {\n this.additionalPhone = additionalPhone;\n } else if (Helpers.isNotEmpty(additionalEmail)) {\n this.additionalEmail = additionalEmail;\n }\n\n this.updateLabel();\n }\n\n updateLabel() {\n switch (this.type) {\n case enums.UserContactInfoVisibilityType_AllContactInfo:\n this.label = \"Вся інформація\";\n break;\n case enums.UserContactInfoVisibilityType_AllPhones:\n this.label = \"Всі телефони\";\n break;\n case enums.UserContactInfoVisibilityType_AllEmails:\n this.label = \"Всі email\";\n break;\n case enums.UserContactInfoVisibilityType_MainPhone:\n if (Helpers.isFunction(this.getDisplayName)) {\n this.label = `Основний телефон (${this.getDisplayName!()})`;\n } else {\n throw Error(\"phone is null\");\n }\n break;\n case enums.UserContactInfoVisibilityType_MainEmail:\n if (Helpers.isFunction(this.getDisplayName)) {\n this.label = `Основна пошта (${this.getDisplayName!()})`;\n } else {\n throw Error(\"email is null\");\n }\n break;\n case enums.UserContactInfoVisibilityType_AdditionalPhone:\n if (Helpers.isExists(this.additionalPhone)) {\n this.label = `Телефон ${Helpers.isNotEmpty(this.additionalPhone!.label) ? this.additionalPhone!.label : \"\"} (${this.additionalPhone!.number})`;\n } else {\n throw Error(\"phone is null\");\n }\n break;\n case enums.UserContactInfoVisibilityType_AdditionalEmail:\n if (Helpers.isExists(this.additionalEmail)) {\n this.label = `Пошта (${Helpers.isNotEmpty(this.additionalEmail!.emailAddress) ? this.additionalEmail!.emailAddress : \"\"})`;\n } else {\n throw Error(\"email is null\");\n }\n break;\n default:\n throw new Error(\"type is unknown\");\n }\n }\n}\n\n@Component({\n components: {\n }\n})\nexport default class UserAdminRightsSection extends Vue implements IUserAdminRightsSection {\n @Prop(Object) user: IUserAdminRightsSectionUserModel | undefined;\n @Prop(Function) showErrorNotification: ((errorMessage?: string) => void) | undefined;\n\n usersAccessOrganizationIds: number[] = [];\n\n organizations: SelectOption[] = [];\n\n allContactInfoVisibilityTypes: ContactInfoVisibilityTypeContext[] = [];\n availableContactInfoVisibilityTypes: ContactInfoVisibilityTypeContext[] = [];\n\n // computed\n get validateForm(): boolean {\n return !this.veeErrors.any();\n }\n\n get userFullName(): string {\n return appUtils.getUserFullName(this.user, true);\n }\n\n get isRightsSettingsPanelVisible() {\n return !this.$helpers.isExists(this.user) ||\n !this.$helpers.anyInArray(this.user!.accesses, x => x.type === enums.UserAccessType_SystemAdmin);\n }\n\n get isUsersAccessRightsVisible() {\n const userInfo = AuthModule.obtainUserInfo();\n return this.$helpers.isExists(userInfo) &&\n this.$helpers.anyInArray(userInfo!.accesses, x => x.type === enums.UserAccessType_SystemAdmin);\n }\n\n get isUserHasUsersAccess(): boolean {\n return this.$helpers.isExists(this.user) &&\n this.$helpers.anyInArray(this.user!.accesses, x => x.type === enums.UserAccessType_Users);\n }\n\n get isUserHasKnowledgeBaseAccess(): boolean {\n return this.$helpers.isExists(this.user) &&\n this.$helpers.anyInArray(this.user!.accesses, x => x.type === enums.UserAccessType_KnowledgeBase);\n }\n\n get visibilityTypesRecalculateWatch() {\n return this.$helpers.isExists(this.user) ? [this.user!.mainPhoneNumber, this.user!.username, this.user!.additionalPhones, this.user!.additionalEmails] : [];\n }\n\n @Watch(\"visibilityTypesRecalculateWatch\", { deep: true, })\n onAdditionalPhonesChanged() {\n this.updateContactInfoVisibilityTypesLookup();\n }\n\n // methods\n validateState(ref: string) {\n return this.$appUtils.vvValidateState(this, ref);\n }\n\n async afterDataInit() {\n if (!this.$helpers.isExists(this.user))\n throw new Error(\"user is null\");\n\n // set typeKey\n for (let i = 0; i < this.user!.contactInfoVisibilityRules.length; i++) {\n let rule = this.user!.contactInfoVisibilityRules[i];\n switch (rule.type) {\n case enums.UserContactInfoVisibilityType_AllContactInfo:\n case enums.UserContactInfoVisibilityType_AllPhones:\n case enums.UserContactInfoVisibilityType_AllEmails:\n case enums.UserContactInfoVisibilityType_MainPhone:\n case enums.UserContactInfoVisibilityType_MainEmail:\n rule.typeKey = rule.type.toString();\n break;\n case enums.UserContactInfoVisibilityType_AdditionalPhone:\n rule.typeKey = rule.type.toString() + \"-\" + rule.additionalPhoneIndex;\n break;\n case enums.UserContactInfoVisibilityType_AdditionalEmail:\n rule.typeKey = rule.type.toString() + \"-\" + rule.additionalEmailIndex;\n break;\n }\n }\n\n this.updateContactInfoVisibilityTypesLookup();\n this.initUsersAccessOrganizations();\n\n this.organizations = appUtils.getAvailableOrganizationOptions(this.user!.availableOrganizations);\n }\n\n updateContactInfoVisibilityTypesLookup() {\n let thisInst = this;\n\n this.allContactInfoVisibilityTypes = [];\n this.availableContactInfoVisibilityTypes = [];\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules, x => x.type === enums.UserContactInfoVisibilityType_AllContactInfo)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllContactInfo.toString(),\n enums.UserContactInfoVisibilityType_AllContactInfo, null, null, null));\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllContactInfo.toString(),\n enums.UserContactInfoVisibilityType_AllContactInfo, null, null, null));\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules, x => x.type === enums.UserContactInfoVisibilityType_AllPhones)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllPhones.toString(),\n enums.UserContactInfoVisibilityType_AllPhones, null, null, null));\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllPhones.toString(),\n enums.UserContactInfoVisibilityType_AllPhones, null, null, null));\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules, x => x.type === enums.UserContactInfoVisibilityType_AllEmails)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllEmails.toString(),\n enums.UserContactInfoVisibilityType_AllEmails, null, null, null));\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AllEmails.toString(),\n enums.UserContactInfoVisibilityType_AllEmails, null, null, null));\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules, x => x.type === enums.UserContactInfoVisibilityType_MainPhone)) {\n if (this.$helpers.isNotEmpty(this.user!.mainPhoneNumber)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_MainPhone.toString(),\n enums.UserContactInfoVisibilityType_MainPhone, () => thisInst.user!.mainPhoneNumber, null, null));\n }\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_MainPhone.toString(),\n enums.UserContactInfoVisibilityType_MainPhone, () => thisInst.user!.mainPhoneNumber, null, null));\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules, x => x.type === enums.UserContactInfoVisibilityType_MainEmail)) {\n if (this.$helpers.isNotEmpty(this.user!.username)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_MainEmail.toString(),\n enums.UserContactInfoVisibilityType_MainEmail, () => thisInst.user!.username, null, null));\n }\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_MainEmail.toString(),\n enums.UserContactInfoVisibilityType_MainEmail, () => thisInst.user!.username, null, null));\n\n if (this.$helpers.isArray(this.user!.additionalPhones)) {\n for (let i = 0; i < this.user!.additionalPhones.length; i++) {\n const additionalPhone = this.user!.additionalPhones[i];\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules,\n x => x.type === enums.UserContactInfoVisibilityType_AdditionalPhone && x.additionalPhoneIndex === i)) {\n if (this.$helpers.isNotEmpty(additionalPhone.label) && this.$helpers.isNotEmpty(additionalPhone.number)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AdditionalPhone.toString() + \"-\" + i,\n enums.UserContactInfoVisibilityType_AdditionalPhone, null, additionalPhone, null));\n }\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AdditionalPhone.toString() + \"-\" + i,\n enums.UserContactInfoVisibilityType_AdditionalPhone, null, additionalPhone, null));\n }\n }\n\n if (this.$helpers.isArray(this.user!.additionalEmails)) {\n for (let i = 0; i < this.user!.additionalEmails.length; i++) {\n const additionalEmail = this.user!.additionalEmails[i];\n\n if (!this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules,\n x => x.type === enums.UserContactInfoVisibilityType_AdditionalEmail && x.additionalEmailIndex === i)) {\n if (this.$helpers.isNotEmpty(additionalEmail.emailAddress)) {\n this.availableContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AdditionalEmail.toString() + \"-\" + i,\n enums.UserContactInfoVisibilityType_AdditionalEmail, null, null, additionalEmail));\n }\n }\n this.allContactInfoVisibilityTypes.push(new ContactInfoVisibilityTypeContext(enums.UserContactInfoVisibilityType_AdditionalEmail.toString() + \"-\" + i,\n enums.UserContactInfoVisibilityType_AdditionalEmail, null, null, additionalEmail));\n }\n }\n }\n\n addNewVisibilityRuleContext() {\n if (this.availableContactInfoVisibilityTypes.length === 0) return;\n\n let firstAvailableContactInfoVisibilityType = this.availableContactInfoVisibilityTypes.splice(0, 1)[0];\n\n switch (firstAvailableContactInfoVisibilityType.type) {\n case enums.UserContactInfoVisibilityType_AllContactInfo:\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_AllContactInfo,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_AllContactInfo.toString()\n });\n break;\n case enums.UserContactInfoVisibilityType_AllPhones:\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_AllPhones,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_AllPhones.toString()\n });\n break;\n case enums.UserContactInfoVisibilityType_AllEmails:\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_AllEmails,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_AllEmails.toString()\n });\n break;\n case enums.UserContactInfoVisibilityType_MainPhone:\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_MainPhone,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_MainPhone.toString()\n });\n break;\n case enums.UserContactInfoVisibilityType_MainEmail:\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_MainEmail,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_MainEmail.toString()\n });\n break;\n case enums.UserContactInfoVisibilityType_AdditionalPhone:\n for (let i = 0; i < this.user!.additionalPhones.length; i++) {\n const additionalPhone = this.user!.additionalPhones[i];\n\n if (this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules,\n x => x.type === enums.UserContactInfoVisibilityType_AdditionalPhone && x.additionalPhoneIndex === i)) {\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_AdditionalPhone,\n isAllAllowed: true,\n additionalPhoneIndex: i,\n additionalEmailIndex: null,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_AdditionalPhone.toString() + \"-\" + i\n });\n }\n }\n break;\n case enums.UserContactInfoVisibilityType_AdditionalEmail:\n for (let i = 0; i < this.user!.additionalEmails.length; i++) {\n const additionalEmail = this.user!.additionalEmails[i];\n\n if (this.$helpers.anyInArray(this.user!.contactInfoVisibilityRules,\n x => x.type === enums.UserContactInfoVisibilityType_AdditionalEmail && x.additionalEmailIndex === i)) {\n this.user!.contactInfoVisibilityRules.push({\n id: 0,\n type: enums.UserContactInfoVisibilityType_AdditionalEmail,\n isAllAllowed: true,\n additionalPhoneIndex: null,\n additionalEmailIndex: i,\n allowedOrganizationIds: [],\n allowedUserIds: [],\n allowedOptions: [],\n searchTerm: \"\",\n searchOptions: [],\n typeKey: enums.UserContactInfoVisibilityType_AdditionalEmail.toString() + \"-\" + i\n });\n }\n }\n default:\n throw new Error(\"type is unknown\");\n }\n\n this.updateContactInfoVisibilityTypesLookup();\n }\n\n onContactInfoVisibilityRulesChanged(rule: UserAContactInfoVisibilityRuleDto) {\n let parts = rule.typeKey.split(\"-\");\n rule.type = this.$helpers.toNumeric(parts[0]);\n\n switch (rule.type) {\n case enums.UserContactInfoVisibilityType_AdditionalPhone:\n rule.additionalPhoneIndex = this.$helpers.toNumeric(parts[1]);\n break;\n case enums.UserContactInfoVisibilityType_AdditionalEmail:\n rule.additionalEmailIndex = this.$helpers.toNumeric(parts[1]);\n break;\n }\n }\n\n searchVisibilityRuleOptions(searchTerm: string, loadingCb: (isLoading: boolean) => void, rule: UserAContactInfoVisibilityRuleDto) {\n rule.searchTerm = searchTerm;\n\n if (!Helpers.isNotEmpty(rule.searchTerm) || rule.searchTerm.length < this.$const.selectSearchTermMinLength) {\n rule.searchOptions = [];\n } else {\n loadingCb(true);\n this.searchVisibilityRuleOptionsWithTimer(loadingCb, rule);\n }\n }\n\n searchVisibilityRuleOptionsWithTimer = debounce((loadingCb: (isLoading: boolean) => void, rule: UserAContactInfoVisibilityRuleDto) => {\n usersAApi.adminVisibilityRuleOptions(rule.searchTerm, options => {\n rule.searchOptions = options;\n\n loadingCb(false);\n }, errorMessage => {\n if (this.$helpers.isFunction(this.showErrorNotification)) {\n this.showErrorNotification!(errorMessage);\n }\n loadingCb(false);\n })\n }, 750);\n\n initUsersAccessOrganizations() {\n let usersAccess = this.$helpers.findFirstInArray(this.user!.accesses, x => x.type === enums.UserAccessType_Users);\n\n if (this.$helpers.isExists(usersAccess)) {\n this.usersAccessOrganizationIds = usersAccess!.organizationIds;\n }\n }\n\n onUsersAccessOrganizationIdsChanged(val: number[]) {\n if (this.$helpers.isExists(this.user)) {\n let usersAccess = this.$helpers.findFirstInArray(this.user!.accesses, x => x.type === enums.UserAccessType_Users);\n\n if (this.$helpers.isExists(usersAccess)) {\n usersAccess!.organizationIds = val;\n }\n }\n }\n\n toggleUsersAccess() {\n if (this.$helpers.isExists(this.user)) {\n if (this.isUserHasUsersAccess) {\n this.$helpers.removeInArray(this.user!.accesses, x => x.type === enums.UserAccessType_Users);\n } else {\n this.user!.accesses.push({\n type: enums.UserAccessType_Users,\n organizationIds: []\n });\n }\n }\n }\n\n toggleKnowledgeBaseAccess() {\n if (this.$helpers.isExists(this.user)) {\n if (this.isUserHasKnowledgeBaseAccess) {\n this.$helpers.removeInArray(this.user!.accesses, x => x.type === enums.UserAccessType_KnowledgeBase);\n } else {\n this.user!.accesses.push({\n type: enums.UserAccessType_KnowledgeBase,\n organizationIds: []\n });\n }\n }\n }\n\n validateAll() {\n return this.$validator.validateAll();\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!./UserAdminRightsSection.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!./UserAdminRightsSection.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./UserAdminRightsSection.vue?vue&type=template&id=4fa1f41c&scoped=true&\"\nimport script from \"./UserAdminRightsSection.vue?vue&type=script&lang=ts&\"\nexport * from \"./UserAdminRightsSection.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./UserAdminRightsSection.vue?vue&type=style&index=0&id=4fa1f41c&lang=scss&scoped=true&\"\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 \"4fa1f41c\",\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!./UserAdminRightsSection.vue?vue&type=style&index=0&id=4fa1f41c&lang=scss&scoped=true&\"","\r\nimport {\r\n TableResult,\r\n UserATableDto,\r\n UserAEditDto, OrganizationDto, OrganizationOrUserSelectOption, UserAdminTableFiltersJson\r\n} from '@/global'\r\nimport ApiBase from \"@/api/api-base\";\r\n\r\nexport default class extends ApiBase {\r\n static adminAvailableOrganizations(cb: (organizations: OrganizationDto[]) => void, errorCb: (errorMessage?: string) => void) {\r\n return this._defaultGetResponse('/api/users-a/admin-available-organizations', null, cb, errorCb);\r\n }\r\n static adminVisibilityRuleOptions(searchTerm: string, cb: (options: OrganizationOrUserSelectOption[]) => void, errorCb: (errorMessage?: string) => void) {\r\n return this._defaultGetResponse('/api/users-a/admin-visibility-rule-options', {\r\n params: { searchTerm }\r\n }, cb, errorCb);\r\n }\r\n\r\n static sendUserInvite(email: string, organizationId: number, cb: (data: { success: boolean }) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/send-user-invite', {\r\n params: { email, organizationId }\r\n }, cb, errorCb);\r\n }\r\n\r\n static generateUserInviteKey(organizationId: number, cb: (data: { key: string }) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/generate-user-invite-key', {\r\n params: { organizationId }\r\n }, cb, errorCb);\r\n }\r\n\r\n static getUserEdit(id: number, cb: (user: UserAEditDto) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/edit-user', {\r\n params: { id }\r\n }, cb, errorCb);\r\n }\r\n\r\n static updateUserEdit(user: UserAEditDto, successCb: (data: { success: boolean, isAnyChanges: boolean }) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultPostResponse('/api/users-a/edit-user', user, null, successCb, errorCb);\r\n }\r\n\r\n static disableEnableUser(userId: number, isDisabled: boolean, successCb: (data: { success: boolean }) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/disable-enable-user', {\r\n params: { userId, isDisabled }\r\n }, successCb, errorCb);\r\n }\r\n\r\n static usersForTable(page: number, filters: UserAdminTableFiltersJson, cb: (usersResult: TableResult) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/table', {\r\n params: {\r\n page,\r\n userAccess: filters.userAccess,\r\n isNeedActive: filters.isNeedActive,\r\n username: filters.username,\r\n fullName: filters.fullName,\r\n mapRegionId: filters.mapRegionId,\r\n mapDistrictId: filters.mapDistrictId,\r\n mapPointId: filters.mapPointId,\r\n organizationId: filters.organizationId,\r\n positionName: filters.positionName,\r\n }\r\n }, cb, errorCb);\r\n }\r\n\r\n static getUsersTableFilters(successCb: (filters: UserAdminTableFiltersJson) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultGetResponse('/api/users-a/table-filters', null, successCb, errorCb);\r\n }\r\n\r\n static usersTableFiltersSave(filters: UserAdminTableFiltersJson, successCb: (data: { success: boolean }) => void, errorCb: (errorMessage?: string) => void) {\r\n this._defaultPostResponse('/api/users-a/table-filters-save', filters, null, successCb, errorCb);\r\n }\r\n}\r\n"],"sourceRoot":""}