PageSourceSearch

https://cdn.webbres.com/ui/pro/1899.da8ce82ea5f68e92.js

js webbres.com collected 2026-10-02 15:27:21 UTC 53,985 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkWebbRes=self.webpackChunkWebbRes||[]).push([[1899],{91375:(T,F,o)=>{o.d(F,{i:()=>D});var v=o(40136),g=o(23815),y=o(89724),P=o(11576),I=o(18657);let D=(()=>{class f{constructor(a,r,l){this.router=a,this.route=r,this.layoutService=l,this.componentDetailVarName="items",this.componentPaginateMethodName="paginate",this.isFiltersbarOpen=!1,this.activeListType=v.DoR,this.defaultPagePerRecords=v.LU}getObjectValue(a,r,l=""){return a.hasOwnProperty(r)&&a[r]?a[r]:l}getFilterValue(a,r=""){return a&&(Array.isArray(a)?a=a.map(l=>"string"==typeof l?l:l.hasOwnProperty("value")?l.value:l._id).join():"object"==typeof a&&(a.hasOwnProperty("_id")?a=a._id:a.hasOwnProperty("value")&&(a=a.value))),a||"completed_order"!=r&&""}getComponentDetailVar(){return this.componentInstance?this.componentInstance[this.componentDetailVarName]:null}setFilterFromQueryParams(){this.clearVariable();const a=this.getQueryParams();if(a.hasOwnProperty("list_type")&&(this.activeListType=a.list_type),a.hasOwnProperty("page")&&this.getComponentDetailVar().hasOwnProperty("paginate")&&(this.getComponentDetailVar().paginate.page=a.page),a.hasOwnProperty("search")&&(this.getComponentDetailVar().filters.search=a.search),this.getComponentDetailVar().hasOwnProperty("sort")&&(a.hasOwnProperty("order")&&(this.getComponentDetailVar().sort.order=a.order),a.hasOwnProperty("order_by")&&(this.getComponentDetailVar().sort.order_by=a.order_by)),a.hasOwnProperty("per_page")?this.getComponentDetailVar().perPage=parseInt(a.per_page):this.getComponentDetailVar().perPage=this.layoutService.recordesPerPage?this.layoutService.recordesPerPage:v.LU,"function"==typeof this.componentInstance.setFilterFromQueryParams){let r=a;this.getComponentDetailVar().hasOwnProperty("isFilterClearAfterSave")&&(r=Object.assign(Object.assign({},a),{ft:this.getComponentDetailVar().isFilterClearAfterSave?"params":"saved"})),this.componentInstance.setFilterFromQueryParams(r)}this.componentInstance.applyFilters()}callPaginateMethod(a=0){this.componentInstance[this.componentPaginateMethodName](a)}init(a,r={}){this.componentInstance=a,r.hasOwnProperty("componentDetailVarName")&&(this.componentDetailVarName=r.componentDetailVarName),r.hasOwnProperty("componentPaginateMethodName")&&(this.componentPaginateMethodName=r.componentPaginateMethodName),this.setFilterFromQueryParams()}setActiveListType(a,r=!1){this.activeListType=a,this.setQueryParamsFromFilters("list_type"),r&&this.componentInstance.setActiveListType()}isActiveListType(a){return this.activeListType==a}toggleFiltersbar(){this.isFiltersbarOpen=!this.isFiltersbarOpen,this.isFiltersbarOpen||this.getComponentDetailVar().hasOwnProperty("filtersErrors")&&(this.getComponentDetailVar().filters.hasOwnProperty("date_range")?this.getComponentDetailVar().filters.date_range=(0,g.cloneDeep)(this.getComponentDetailVar().filters.date_range):this.getComponentDetailVar().filters.hasOwnProperty("from_date")&&(this.getComponentDetailVar().filters=(0,g.cloneDeep)(this.getComponentDetailVar().filters)),this.getComponentDetailVar().filtersErrors=[])}isAppliedFilters(){var a;return((null===(a=this.getComponentDetailVar())||void 0===a?void 0:a.appliedFilters)||[]).length>0}applyFiltersHandler(a=!0,r=!1){var l;!this.getComponentDetailVar()||((null===(l=this.getComponentDetailVar())||void 0===l?void 0:l.filtersErrors)||[]).length>0||(this.getComponentDetailVar().appliedFilters=[],r||this.componentInstance.applyFilters(),a&&this.toggleFiltersbar(),this.setQueryParamsFromFilters("filters").then(()=>{r||this.callPaginateMethod(1)}))}clearFilter(a,r=!1){r||this.componentInstance.clearFilter(a),"object"==typeof a&&(a=a.type),this.clearVariable(a),this.componentInstance.applyFilters();let l=this.getQueryParams();"search"==a&&l.hasOwnProperty("sortingStatus")&&"stop"==l.sortingStatus?this.router.navigate([],{relativeTo:this.route,queryParams:{sortingStatus:""},queryParamsHandling:"merge"}).then(e=>{this.setQueryParamsFromFilters("filters").then(()=>{r||this.callPaginateMethod(1)})}):this.setQueryParamsFromFilters("filters").then(()=>{r||this.callPaginateMethod(1)})}clearFilters(a=!1,r=!0){this.clearVariable(),a||this.componentInstance.clearFilters(),r&&this.toggleFiltersbar();let l=this.getQueryParams();l.hasOwnProperty("sortingStatus")&&"stop"==l.sortingStatus?this.router.navigate([],{relativeTo:this.route,queryParams:{sortingStatus:""},queryParamsHandling:"merge"}).then(e=>{this.setQueryParamsFromFilters("filters").then(()=>{a||this.callPaginateMethod(1)})}):this.setQueryParamsFromFilters("filters").then(()=>{a||this.callPaginateMethod(1)})}sorting(a,r=!1){this.getComponentDetailVar().sort=a,this.setQueryParamsFromFilters("sorting").then(()=>{r||this.callPaginateMethod()})}setQueryParamsFromFilters(a){let r={};switch(a){case"list_type":r[a]=this.activeListType;break;case"page":this.getComponentDetailVar().hasOwnProperty("paginate")&&(r[a]=this.getComponentDetailVar().paginate.page);break;case"search":r[a]=this.getComponentDetailVar().filters.search;break;case"sorting":this.getComponentDetailVar().hasOwnProperty("sort")&&(r.order=this.getComponentDetailVar().sort.order,r.order_by=this.getComponentDetailVar().sort.order_by);break;case"per_page":r.per_page=this.getComponentDetailVar().perPage;break;case"filters":Object.entries(this.getComponentDetailVar().filters).forEac
1h(([l,e])=>{"date_range"===l?(r.from_date=(null==e?void 0:e.from_date)||null,r.to_date=(null==e?void 0:e.to_date)||null):r[l]=(Array.isArray(e)?e.length>0:e)?this.getFilterValue(e,l):null}),this.getComponentDetailVar().hasOwnProperty("isFilterClearAfterSave")&&(r.ft=this.getComponentDetailVar().isFilterClearAfterSave?"params":"saved")}return r.navigate_by="filter",this.router.navigate([],{relativeTo:this.route,queryParams:r,queryParamsHandling:"merge"})}getFilters(a={}){const r=this.getQueryParams();let l={};return this.getComponentDetailVar().hasOwnProperty("paginate")&&(l.page=this.getObjectValue(a,"page",this.getComponentDetailVar().paginate.page)),this.getComponentDetailVar().hasOwnProperty("perPage")&&(l.per_page=this.getObjectValue(a,"per_page",this.getComponentDetailVar().perPage)),l.search=this.getObjectValue(r,"search"),l.order=this.getObjectValue(r,"order"),l.order_by=this.getObjectValue(r,"order_by"),a.hasOwnProperty("extraParams")&&(l=Object.assign({},l,a.extraParams)),l}perPageRecord(a,r=!1){r||this.componentInstance.perPageRecords(a),this.setQueryParamsFromFilters("per_page").then(()=>{r||this.callPaginateMethod(1)})}getQueryParams(){return this.route.snapshot.queryParams}navigate(a,r=null,l=[]){let e=this.getQueryParams();l.length>0&&(e=(0,g.omit)(e,l)),r&&(e=Object.assign(Object.assign({},e),r));const u=window.event;if(u&&!0===u.ctrlKey){const E=this.router.serializeUrl(this.router.createUrlTree(a,{queryParams:e}));window.open(E,"_blank")}else this.router.navigate(a,{queryParams:e})}updateFilterValidationError(a,r,l=null){if(!this.getComponentDetailVar())return;let e=this.getComponentDetailVar().filtersErrors.findIndex(u=>u.field==a);r?-1!=e&&this.getComponentDetailVar().filtersErrors.splice(e,1):-1==e&&this.getComponentDetailVar().filtersErrors.push({field:a,is_valid:r}),r&&l&&l()}clearVariable(a=null){var r;((null===(r=this.getComponentDetailVar())||void 0===r?void 0:r.filtersErrors)||[]).length>0&&(a?this.updateFilterValidationError(a,!0):this.getComponentDetailVar().filtersErrors=[]),this.getComponentDetailVar().appliedFilters=[]}}return f.\u0275fac=function(a){return new(a||f)(y.\u0275\u0275inject(P.F0),y.\u0275\u0275inject(P.gz),y.\u0275\u0275inject(I.P))},f.\u0275prov=y.\u0275\u0275defineInjectable({token:f,factory:f.\u0275fac,providedIn:"any"}),f})()},11899:(T,F,o)=>{o.r(F),o.d(F,{UserDetailModule:()=>Pe});var v=o(11048),g=o(11576),x=o(58117),y=o(36701),P=o(11520),I=o(19394),D=o(7222),f=o(22134),w=o(40136),a=o(98990),r=o.n(a),l=o(4429),e=o(89724),u=o(14531),E=o(16454),M=o(50690),U=o(34716),A=o(78726),O=o(36312),V=o(91375),B=o(50384),k=o(6969),L=o(7585),R=o(73755),j=o(50234),N=o(408),b=o(1659),Q=o(29573),z=o(36198),$=o(4817);const G=["changePasswordModal"],W=["twoFAModal"];function H(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"app-profile-image",28),e.\u0275\u0275listener("profilePicChanged",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).profilePicChanged(s)}),e.\u0275\u0275elementEnd()}if(2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("imageSrc",t.loginUserData.image)}}function K(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span",29),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2("(",e.\u0275\u0275pipeBind1(2,2,"id"),":",null==t.contents.item?null:t.contents.item.unique_id,")")}}function J(n,c){if(1&n&&e.\u0275\u0275element(0,"app-view-layout-column",33),2&n){const t=c.$implicit,i=e.\u0275\u0275nextContext(4);e.\u0275\u0275property("layout",t)("contents",i.contents)("isMainColumn",!0)}}function Z(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"div",31),e.\u0275\u0275template(1,J,1,3,"app-view-layout-column",32),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(1),e.\u0275\u0275property("ngForOf",t.content)}}function X(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"li",30)(1,"a",24),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(4,Z,2,1,"ng-template",25),e.\u0275\u0275elementEnd()),2&n){const t=c.$implicit;e.\u0275\u0275property("ngbNavItem",t.label),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,2,"user.tabs."+t.label))}}function Y(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span"),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275pipe(3,"date"),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(4);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind1(2,2,"profile.lest_modified")," ",e.\u0275\u0275pipeBind2(3,4,t.loginUserData.password_modified_date,"MMM d, y h:mm a"),"")}}function q(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",52),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(4).open2FAModal()}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()}2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"profile.2fa_reset")))}function ee(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",40)(1,"div",36)(2,"div",41)(3,"div",42)(4,"h5",43),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(7,"small"),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",44)(11,"div",37)(12,"div")(13,"i",16),e.\u0275\u0275text(14,"lock"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(15,Y,4,7,"span",45),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(16,"button",38),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(3).openChangePasswordModal()}),e.\u0275\u0275text(17),e.\u0275\u0275pipe(18,"translate"),e.\u0275\u0275elementEnd()()()()(),e.\u0275\u0275elementStart(19,"div",36)(20,"div",41)(21,"div",42)(22,"h5",43),e.\u0275\u0275text(23),e.\u0275\u0275pipe(24,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(25,"div",44)(26,"div",46)(27,"div")(28,"i",16),e.\u0275\u0275text(29,"lock"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(30,"div",47)(31,"label"),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(34,"label",48),e.\u0275\u0275pipe(35,"translate"),e.\u0275\u0275elementStart(36,"input",49),e.\u0275\u0275listener("ngModelChange",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(3).loginUserData.two_factor_authentication=s})("change",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(3).chang2FA(s)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(37,"span",50),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(38,q,3,3,"a",51),e.\u0275\u0275elementEnd()()()()()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(6,11,"profile.password")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(9,13,"profile.sub_tagline")),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngIf",t.loginUserData.password_modified_date),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(18,15,"buttons.change_password")),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(24,17,"profile.2fa_authentication")),e.\u0275\u0275advance(9),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(33,19,"profile.2fa_enable")),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("disabled",t.loadingTwoFA||t.companyTwoFactorAuthentication),e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(35,21,"tooltips.enable_disable_2fa")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngModel",t.loginUserData.two_factor_authentication),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.loginUserData.two_factor_authentication)}}function te(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",36)(1,"div",37)(2,"div")(3,"i",16),e.\u0275\u0275text(4,"lock_reset"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(5,"button",38),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(3).sendReset2FaLink()}),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()()()}if(2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(5),e.\u0275\u0275classProp("loading",t.twofaloading),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,3,"user.send_reset_two_factor_link"))}}function ne(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275template(0,ee,39,23,"div",34),e.\u0275\u0275elementStart(1,"div",35)(2,"div",36)(3,"div",37)(4,"div")(5,"i",16),e.\u0275\u0275text(6,"lock_reset"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"button",38),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).send
1ResetPasswordLink()}),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275template(10,te,8,5,"div",39),e.\u0275\u0275elementEnd()}if(2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("ngIf",t.userID===t.loginUserData._id),e.\u0275\u0275advance(7),e.\u0275\u0275classProp("loading",t.pwdloading),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(9,5,"user.send_reset_password_link")," "),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.loginUserData.two_factor_authentication)}}function ae(n,c){if(1&n&&e.\u0275\u0275element(0,"app-activity",53),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275property("id",t.userID)}}function ie(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"img",8),e.\u0275\u0275listener("error",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().utils.onImgError(s)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(5,H,1,1,"app-profile-image",9),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"div",10)(7,"h3",11),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(10,K,3,4,"span",12),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",13)(12,"app-permission",14)(13,"a",15),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().editItem()}),e.\u0275\u0275elementStart(14,"i",16),e.\u0275\u0275text(15,"edit"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(18,"span",17),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().back()}),e.\u0275\u0275pipe(19,"translate"),e.\u0275\u0275elementStart(20,"i",16),e.\u0275\u0275text(21,"chevron_left"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(22),e.\u0275\u0275pipe(23,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(24,"div",18)(25,"div",19)(26,"ul",20,21),e.\u0275\u0275listener("activeIdChange",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().contents.activeTab=s}),e.\u0275\u0275template(28,X,5,4,"li",22),e.\u0275\u0275elementStart(29,"li",23)(30,"a",24),e.\u0275\u0275text(31),e.\u0275\u0275pipe(32,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(33,ne,11,7,"ng-template",25),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(34,"li",26)(35,"a",24),e.\u0275\u0275text(36),e.\u0275\u0275pipe(37,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(38,ae,1,1,"ng-template",25),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(39,"div",27),e.\u0275\u0275elementEnd()()()}if(2&n){const t=e.\u0275\u0275reference(27),i=e.\u0275\u0275nextContext();e.\u0275\u0275classProp("loading",i.pageLoading),e.\u0275\u0275advance(4),e.\u0275\u0275property("src",i.loginUserData.image?i.loginUserData.thumbnail_url:"assets/images/nightmode/user.png",e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",i.userID===i.loginUserData._id),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate2("",e.\u0275\u0275pipeBind1(9,17,"user.detail_title")," ",i.itemName,""),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",null==i.contents.item?null:i.contents.item.unique_id),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(17,19,"edit_information")),e.\u0275\u0275advance(2),e.\u0275\u0275propertyInterpolate("ngbTooltip",e.\u0275\u0275pipeBind1(19,21,"user.detail_title")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(23,23,"back")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("activeId",i.contents.activeTab),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",i.layout.content),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(32,25,"security")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(37,27,"timeline")),e.\u0275\u0275advance(3),e.\u0275\u0275classMap(i.tabContentClass),e.\u0275\u0275property("ngbNavOutlet",t)}}function se(n,c){1&n&&e.\u0275\u0275element(0,"div",54)}function re(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"a",52),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).send
1ResetPassLink()}),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()}2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"profile.forgot_password_q")))}function oe(n,c){1&n&&(e.\u0275\u0275elementStart(0,"div",76)(1,"span",77),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd()()),2&n&&(e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,1,"loading_dots")))}function le(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span",78),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.resetPasswordForm.controls.current_password.errorMessage)}}function de(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span",78),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.resetPasswordForm.controls.new_password.errorMessage)}}function ce(n,c){1&n&&(e.\u0275\u0275elementStart(0,"span",78),e.\u0275\u0275text(1),e.\u0275\u0275pipe(2,"translate"),e.\u0275\u0275elementEnd()),2&n&&(e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(2,1,"profile.please_enter_strong_password")))}function pe(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span",78),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.resetPasswordForm.controls.new_confirm_password.errorMessage)}}function me(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",55)(1,"div",56)(2,"div",57)(3,"h5",58),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(6,"small"),e.\u0275\u0275text(7),e.\u0275\u0275pipe(8,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(9,"i",59),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t).$implicit.dismiss()}),e.\u0275\u0275text(10,"close"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(11,"div",60)(12,"form",61),e.\u0275\u0275listener("ngSubmit",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().resetPasswordSubmit()}),e.\u0275\u0275elementStart(13,"div",62)(14,"label"),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"translate"),e.\u0275\u0275elementStart(17,"span",63),e.\u0275\u0275text(18,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(19,"div",64),e.\u0275\u0275element(20,"input",65),e.\u0275\u0275elementStart(21,"div",66),e.\u0275\u0275template(22,re,3,3,"a",51),e.\u0275\u0275template(23,oe,4,3,"div",67),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(24,"div",68),e.\u0275\u0275template(25,le,2,1,"span",69),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(26,"div",62)(27,"label"),e.\u0275\u0275text(28),e.\u0275\u0275pipe(29,"translate"),e.\u0275\u0275elementStart(30,"span",63),e.\u0275\u0275text(31,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(32,"input",70),e.\u0275\u0275listener("ngModelChange",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().newPasswordChangeTouchedEventset()}),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(33,"app-password-strength-bar",71),e.\u0275\u0275listener("passwordStrength",function(s){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().passwordStrength(s)}),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(34,de,2,1,"span",69),e.\u0275\u0275template(35,ce,3,3,"span",69),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(36,"div",62)(37,"label"),e.\u0275\u0275text(38),e.\u0275\u0275pipe(39,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275element(40,"input",72),e.\u0275\u0275template(41,pe,2,1,"span",69),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(42,"div",73)(43,"button",74),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t).$implicit.dismiss()}),e.\u0275\u0275text(44),e.\u0275\u0275pipe(45,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(46,"button",75),e.\u0275\u0275text(47),e.\u0275\u0275pipe(48,"translate"),e.\u0275\u0275elementEnd()()()()()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(5,18,"profile.password")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(8,20,"profile.strong_password")),e.\u0275\u0275advance(5),e.\u0275\u0275property("formGroup",t.resetPasswordForm),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(16,22,"fields.current_password")," "),e.\u0275\u0275advance(7),e.\u0275\u0275property("ngIf",!t.reserPassLoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.reserPassLoading),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngIf",t.resetPasswordForm.controls.current_password.touched&&t.resetPasswordForm.controls.current_password.errors),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(29,24,"fields.new_password")," "),e.\u0275\u0275advance(5),e.\u0275\u0275property("passwordToCheck",t.resetPasswordForm.controls.new_password.value),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.resetPasswordForm.controls.new_password.touched&&(null==t.resetPasswordForm.controls||null==t.resetPasswordForm.controls.new_password?null:t.resetPasswordForm.controls.new_password.errors)),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.passwordIsValid&&t.resetPasswordForm.controls.new_password.touched),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(39,26,"fields.new_confirm_password")),e.\u0275\u0275advance(3),e.\u0275\u0275property("ngIf",t.resetPasswordForm.controls.new_confirm_password.touched&&t.resetPasswordForm.controls.new_confirm_password.errors),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(45,28,"buttons.cancel")),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("loading",t.loadingChangePassword),e.\u0275\u0275property("disabled",!t.passwordIsValid||t.loadingChangePassword),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(48,30,"buttons.change_password"))}}function _e(n,c){1&n&&(e.\u0275\u0275elementStart(0,"div",83)(1,"div",84)(2,"div",85)(3,"span",77),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"translate"),e.\u0275\u0275elementEnd()()()()),2&n&&(e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(5,1,"loading_dots")))}function ue(n,c){if(1&n&&(e.\u0275\u0275elementStart(0,"span",78),e.\u0275\u0275text(1),e.\u0275\u0275elementEnd()),2&n){const t=e.\u0275\u0275nextContext(3);e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(t.twoFactorAuthenticationForm.controls.verification_code.errorMessage)}}function he(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",86)(1,"small"),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"label",87)(5,"b"),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"small",88)(9,"ol")(10,"li"),e.\u0275\u0275text(11),e.\u0275\u0275pipe(12,"translate"),e.\u0275\u0275elementStart(13,"a",89),e.\u0275\u0275text(14),e.\u0275\u0275pipe(15,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(16),e.\u0275\u0275pipe(17,"translate"),e.\u0275\u0275elementStart(18,"a",90),e.\u0275\u0275text(19),e.\u0275\u0275pipe(20,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275text(2
11,"."),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(22,"li"),e.\u0275\u0275text(23),e.\u0275\u0275pipe(24,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(25,"li"),e.\u0275\u0275text(26),e.\u0275\u0275pipe(27,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(28,"small",91),e.\u0275\u0275text(29),e.\u0275\u0275pipe(30,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(31,"div",92),e.\u0275\u0275text(32),e.\u0275\u0275pipe(33,"translate"),e.\u0275\u0275elementStart(34,"b"),e.\u0275\u0275text(35),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(36,"div",93),e.\u0275\u0275element(37,"img",94),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(38,"label",87)(39,"b"),e.\u0275\u0275text(40),e.\u0275\u0275pipe(41,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(42,"form",61),e.\u0275\u0275listener("ngSubmit",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext(2).enableTwoFASubmit()}),e.\u0275\u0275elementStart(43,"div",62)(44,"label"),e.\u0275\u0275text(45),e.\u0275\u0275pipe(46,"translate"),e.\u0275\u0275elementStart(47,"span",63),e.\u0275\u0275text(48,"*"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275element(49,"input",95),e.\u0275\u0275template(50,ue,2,1,"span",69),e.\u0275\u0275elementStart(51,"small",96),e.\u0275\u0275text(52),e.\u0275\u0275pipe(53,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(54,"div",73)(55,"button",74),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t),e.\u0275\u0275nextContext().$implicit.dismiss()}),e.\u0275\u0275text(56),e.\u0275\u0275pipe(57,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(58,"button",75),e.\u0275\u0275text(59),e.\u0275\u0275pipe(60,"translate"),e.\u0275\u0275elementEnd()()()()}if(2&n){const t=e.\u0275\u0275nextContext(2);e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,22,"auth.2fa.configure_2fa")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(7,24,"auth.2fa.step1.title")),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(12,26,"auth.2fa.step1.install_google_auth_app")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(15,28,"auth.2fa.step1.android")),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(17,30,"auth.or")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(20,32,"auth.2fa.step1.ios")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(24,34,"auth.2fa.step1.add_account")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(27,36,"auth.2fa.step1.scan_image")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(30,38,"auth.2fa.step1.note")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(33,40,"auth.2fa.step1.code")," : "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(t.twoFactorAuthenticationForm.controls.secret_key.value),e.\u0275\u0275advance(2),e.\u0275\u0275property("src",t.QRCode,e.\u0275\u0275sanitizeUrl),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(41,42,"auth.2fa.step2.title")),e.\u0275\u0275advance(2),e.\u0275\u0275property("formGroup",t.twoFactorAuthenticationForm),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1("",e.\u0275\u0275pipeBind1(46,44,"fields.verification_code")," "),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",t.twoFactorAuthenticationForm.controls.verification_code.touched&&t.twoFactorAuthenticationForm.controls.verification_code.errors),e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(53,46,"profile.display_six_digit_code")),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(57,48,"buttons.cancel")),e.\u0275\u0275advance(2),e.\u0275\u0275classProp("loading",t.loadingTwoFA),e.\u0275\u0275property("disabled",t.loadingTwoFA),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(60,50,"buttons.enable"))}}function fe(n,c){if(1&n){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",79)(1,"div",80)(2,"h5",58),e.\u0275\u0275text(3),e.\u0275\u0275pipe(4,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(5,"i",59),e.\u0275\u0275listener("click",function(){return e.\u0275\u0275restoreView(t).$implicit.dismiss()}),e.\u0275\u0275text(6,"close"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(7,"div",60),e.\u0275\u0275template(8,_e,6,3,"div",81),e.\u0275\u0275template(9,he,61,52,"div",82),e.\u0275\u0275elementEnd()()}if(2&n){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(4,3,"profile.2fa_enable")),e.\u0275\u0275advance(5),e.\u0275\u0275property("ngIf",t.getTwoFALoading),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",!t.getTwoFALoading)}}const ge=[{path:"",component:(()=>
1{class n{constructor(t,i,s,p,m,h,d,_,C,Ie,De,Ee,Se){this.modalService=t,this.item=i,this.common=s,this.route=p,this.router=m,this.formBuilder=h,this.breadcrumbService=d,this.historyService=_,this.confirm=C,this.filterService=Ie,this.ref=De,this.auth=Ee,this.profileService=Se,this.userID="",this.userEmail="",this.layout={is_tab:!0,content:[{label:"general_detail",content:[{layout_type:"column",content:[[{layout_type:"column",content:[[{layout_type:"component",content:"permission-view"}]]},{layout_type:"column",content:[[{is_field:!0,content:{name:"first_name",label:"First Name",type:"text",display_in_tab:"general_detail",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_deleted:!1,options:[]}}],[{is_field:!0,content:{name:"last_name",label:"Last Name",type:"text",display_in_tab:"general_detail",placeholder:"",default_value:"",is_require:!0,is_system_define_field:!0,is_deleted:!1,options:[]}}]]},{is_field:!0,content:{name:"email",label:"Email",type:"email",display_in_tab:"general_detail",placeholder:"",default_value:"",is_require:!0,is_system_define_field:!0,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"phone",label:"Phone",type:"phone",display_in_tab:"general_detail",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_deleted:!1,options:[]}}],[{is_field:!0,content:{name:"location_ids",label:"Location",type:"multiple-location",display_in_tab:"general_detail",placeholder:"",default_value:"",is_require:!0,is_system_define_field:!0,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"is_technician",label:"Make this person a technician",type:"switch",display_in_tab:"general_detail",placeholder:"",default_value:"",default_label:"active_inactive",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"status",label:"Status",type:"switch",display_in_tab:"general_detail",placeholder:"",default_value:"",default_label:"active_inactive",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}}]]}]},{label:"employment",content:[{layout_type:"column",content:[[{is_field:!0,content:{name:"department",label:"Department",type:"text",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"employee_title",label:"Employee Title",type:"text",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"manager_id",label:"Manager",type:"manager",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"description",label:"Description",type:"textarea",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}}],[{is_field:!0,content:{name:"hire_date",label:"Hire Date",type:"date",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}},{is_field:!0,content:{name:"terminated_date",label:"Terminated Date",type:"date",display_in_tab:"employment",placeholder:"",default_value:"",is_require:!1,is_system_define_field:!0,is_allow_delete:!1,is_allow_edit:!1,is_deleted:!1,options:[]}}]]}]}]},this.loading=!0,this.pageLoading=!1,this.pwdloading=!1,this.twofaloading=!1,this.technicianId=null,this.contents={phoneCodes:[],userGroup:[],location:[],manager:[],fieldsErrorsArr:{},form:null,item:null,fields:[],event:(Ue,S,...Te)=>this[S]?this[S](...Te):"",editFields:["group_id","first_name","last_name","email","phone","location_ids","status","department","employee_title","manager_id","description","hire_date","terminated_date","is_technician","about","language"],editField:null,permission:"edit_user",activeTab:"general_detail",page:"user"},this.loadingChangePassword=!1,this.resetPasswordForm=this.formBuilder.group({current_password:["",x.CM.notEmpty()],new_password:["",[x.CM.minLength({value:12}),x.CM.notEmpty()]],new_confirm_password:["",[x.CM.compare({fieldName:"new_password"})]]}),this.reserPassLoading=!1,this.passwordIsValid=!1,this.twoFactorAuthenticationForm=this.formBuilder.group({is_enable:[!1],secret_key:["",x.CM.notEmpty()],verification_code:["",x.CM.notEmpty()]}),this.getTwoFALoading=!0,this.loadingTwoFA=!1,this.QRCode="",this.currentUrl="",this.loginUserData=null,this.companyTwoFactorAuthentication=!1,this.utils=f.Z}ngOnInit(){this.loginUserData=this.auth.getUser(),this.userID=this.route.
1snapshot.params.id,this.getItemDetail(),this.currentUrl=this.historyService.currentUrl(this.userID)}get isFirstTab(){return"general_detail"==this.contents.activeTab}get itemName(){return this.contents.item?` : ${this.contents.item.name}`:""}get tabContentClass(){return["general_detail"].includes(this.contents.activeTab)?"layout-content":""}get isTabIsWithoutForm(){return[""].includes(this.contents.activeTab)}getItemDetail(){this.item.getByID(this.userID).subscribe(t=>{t.technician_id&&(this.technicianId=t.technician_id),this.userEmail=t.email,this.breadcrumbService.changeBreadcrumb(this.route.snapshot,t.name),this.contents.item=t,this.setFormContents(["location:only:active",`user:${this.userID}`,"user_group","phone_code"],()=>{if(this.contents.form=this.formBuilder.formGroup(new D.n(t)),t.is_first_owner){const i=this.getTabControls("general_detail");i.removeControl("group_id"),i.removeControl("status"),i.controls.email.disable()}this.loading=!1})},t=>{this.router.navigate(["/system/account/users"])})}getTabControls(t){return this.contents.form.controls[t]}setFormContents(t,i=null){this.common.getFormContents(t).subscribe(s=>{s.location&&(this.contents.location=s.location),s.user&&(this.contents.manager=s.user),s.user_group&&(this.contents.userGroup=s.user_group),s.phone_code&&(this.contents.phoneCodes=s.phone_code),"superadmin"!=this.loginUserData.role&&(this.contents.userGroup=this.contents.userGroup.filter(p=>!p.is_account_owner)),i&&i()},s=>{this.loading=!1})}openModalForCreateItem(t,i=""){switch(t){case"multiple-location":{const p=h=>{var d;this.setFormContents(["location:only:active"]);let _=null===(d=this.getTabControls(this.contents.activeTab).get("location_ids"))||void 0===d?void 0:d.value;_=Array.isArray(_)?[..._,h]:[h],this.patchFormDetail({location_ids:_})},m=this.modalService.open(y.M,{keyboard:!1,backdrop:"static",size:"xl",scrollable:!1});m.componentInstance.is_quick_add=!0,i&&(m.componentInstance.quickData={name:i}),m.dismissed.subscribe(()=>{m.componentInstance.itemID&&p(m.componentInstance.itemID)}),m.componentInstance.refreshItems.subscribe(h=>{p(h.location_id)})}break;case"user_group":{const p=this.modalService.open(P.d,{keyboard:!1,backdrop:"static",size:"xl",scrollable:!1});p.componentInstance.is_quick_add=!0,i&&(p.componentInstance.quickData={name:i}),p.componentInstance.refreshUserGroups.subscribe(m=>{this.setFormContents(["user_group"]),this.patchFormDetail({group_id:m.user_group_id})})}break;case"manager":const s=this.modalService.open(I.p,{keyboard:!1,backdrop:"static",size:"xl",scrollable:!1});s.componentInstance.is_quick_add=!0,i&&(s.componentInstance.quickData={last_name:i}),s.dismissed.subscribe(()=>{s.componentInstance.userID&&(this.setFormContents([`user:${this.userID}`]),this.patchFormDetail({manager_id:s.componentInstance.userID}))}),s.componentInstance.refreshUsers.subscribe(p=>{this.setFormContents([`user:${this.userID}`]),this.patchFormDetail({manager_id:p.user_id})})}}patchFormDetail(t){this.getTabControls(this.contents.activeTab).patchModelValue(t)}setEditField(t=null){this.contents.editField=t||null}cancelField(){const t=this.contents.editField;if(t){const s=this.getTabControls(t.display_in_tab).controls[t.name];this.contents.fieldsErrorsArr.hasOwnProperty(t.name)&&delete this.contents.fieldsErrorsArr[t.name],s.reset(),this.setEditField()}}saveField(){const t=this.contents.editField,i=this.getTabControls(t.display_in_tab),s=i.controls[t.name],p=f.Z.convertToFormData({[t.name]:s.value});if("phone"==t.type){var m=i.controls[`${t.name}_code`];p.append(`${t.name}_code`,m.value)}s.valid&&!this.contents.fieldsErrorsArr.hasOwnProperty(t.name)&&(this.pageLoading=!0,this.item.storeAndUpdate(p,this.userID).subscribe(h=>{switch(s.commit(),this.setEditField(),t.type){case"phone":this.contents.item[t.name]=s.value,this.contents.item[`${t.name}_code`]=m.value;break;case"manager":{const d=r()(this.contents.manager,{_id:s.value});this.contents.item.manager_name=null==d?void 0:d.name,this.contents.item.manager_id=null==d?void 0:d._id}break;case"user_group":{const d=r()(this.contents.userGroup,{_id:s.value});this.contents.item.group_name=null==d?void 0:d.name,this.contents.item.group_id=null==d?void 0:d._id}break;case"multiple-location":{let d=[];this.contents.location.forEach(_=>{s.value.includes(_._id)&&d.push(null==_?void 0:_.name)}),this.contents.item.location_ids=s.value,this.contents.item.location_names=d}break;case"email":this.contents.item[t.name]=(s.value||"").toLowerCase();break;default:this.contents.item[t.name]=s.value,("first_name"==t.name||"last_name"==t.name)&&(this.contents.item.name=this.contents.item.first_name+" "+this.contents.item.last_name)}this.pageLoading=!1},h=>{this.pageLoading=!1}))}editItem(){const t=this.modalService.open(I.p,{keyboard:!1,backdrop:"static",size:"xl",scrollable:!1,beforeDismiss:()=>!t.componentInstance.needToAskUnsavedChanges||new Promise(i=>{this.confirm.open(w.QPM),this.confirm.confirmModalRef.closed.subscribe(()=>{i(!0)})})});t.componentInstance.refreshUsers.subscribe(()=>{this.getItemDetail(),this.contents.activeTab=t.componentInstance.activeTab}),t.componentInstance.mode="edit",["general_detail","employment"].includes(this.contents.activeTab)&&(t.componentInstance.activeTab=this.contents.activeTab),t.componentInstance.editUser(this.userID)}sendResetPasswordLink(){this.pwdloading=!0,this.item.ResetPasswordLink(this.userID).subscribe(t=>{this.pwdloading=!1},t=>{this.pwdloading=!1})}sendReset2FaLink(){this.twofaloading=!0,this.item.Reset2FaLink(this.userEmail).subscribe(t=>{this.twofaloading=!1},t=>{this.twofaloading=!1})}changeField(t,i){var s,p,m,h;if("is_technician"==t.name&&!this.technicianId&&i.target.checked){const d=this.modalService.open(l.k,{size:"lg",keyboard:!1,backdrop:"static",scrollable:!1});d.componentInstance.userID=this.userID;let _=this.getTabControls("general_detail");
1d.componentInstance.quickData={first_name:null===(s=_.get("first_name"))||void 0===s?void 0:s.value,last_name:null===(p=_.get("last_name"))||void 0===p?void 0:p.value,phone:null===(m=_.get("phone"))||void 0===m?void 0:m.value,phone_code:f.Z.phoneCodeFormat(null===(h=_.get("phone_code"))||void 0===h?void 0:h.value)},d.dismissed.subscribe(()=>{var C;d.componentInstance.itemID?this.technicianId=d.componentInstance.itemID:(this.ref.detectChanges(),null===(C=this.getTabControls("general_detail").get("is_technician"))||void 0===C||C.setValue(!1))}),d.closed.subscribe(()=>{this.technicianId=d.componentInstance.itemID,this.router.navigate(["/system/settings/service/technician",this.technicianId])})}else"is_technician"==t.name&&(i.target.checked?(this.confirm.open(w.Vno),this.confirm.confirmModalRef.closed.subscribe(()=>{}),this.confirm.confirmModalRef.dismissed.subscribe(()=>{const d=this.getTabControls(t.display_in_tab);d&&d.patchValue({is_technician:!1}),this.ref.detectChanges()})):(this.confirm.open(w.isl),this.confirm.confirmModalRef.closed.subscribe(()=>{}),this.confirm.confirmModalRef.dismissed.subscribe(()=>{const d=this.getTabControls(t.display_in_tab);d&&d.patchValue({is_technician:!0}),this.ref.detectChanges()})))}openChangePasswordModal(){this.resetPasswordForm.markAsUntouched(),this.changePasswordModalRef=this.modalService.open(this.changePasswordModal,{modalDialogClass:"change-password-modal"}),this.changePasswordModalRef.result.then(t=>{this.resetPasswordForm.resetForm(),this.resetPasswordForm.submitted=!1},t=>{this.resetPasswordForm.resetForm(),this.resetPasswordForm.markAsUntouched(),this.resetPasswordForm.submitted=!1})}sendResetPassLink(){this.reserPassLoading=!0,this.auth.forgot(this.loginUserData.email).subscribe(t=>{this.reserPassLoading=!1},t=>{this.reserPassLoading=!1})}resetPasswordSubmit(){this.resetPasswordForm.markAllAsTouched(),this.resetPasswordForm.submitted=!0,this.resetPasswordForm.valid&&(this.loadingChangePassword||(this.loadingChangePassword=!0,this.profileService.changePassword(this.resetPasswordForm.value).subscribe(t=>{this.loadingChangePassword=!1,this.changePasswordModalRef.close(),this.router.navigate(["/auth/logout"],{queryParams:{isResetPassword:!0}})},t=>{this.loadingChangePassword=!1},()=>{this.loadingChangePassword=!1})))}newPasswordChangeTouchedEventset(){this.resetPasswordForm.controls.new_password.markAsTouched()}chang2FA(t){t.target.checked?this.open2FAModal():(this.loadingTwoFA=!0,this.twoFactorAuthenticationForm.patchValue({secret_key:"",verification_code:"",is_enable:!1}),this.profileService.update2FA(this.twoFactorAuthenticationForm.value).subscribe(i=>{this.loadingTwoFA=!1,this.loginUserData.two_factor_authentication=!1},i=>{this.loadingTwoFA=!1},()=>{this.loadingTwoFA=!1}))}open2FAModal(){this.getTwoFALoading=!0,this.profileService.get2FA().subscribe(t=>{this.loadingChangePassword=!1,this.QRCode=t.qrcode,this.twoFactorAuthenticationForm.patchValue({secret_key:t.secret_key,verification_code:"",is_enable:!0}),this.getTwoFALoading=!1},t=>{this.getTwoFALoading=!1}),this.twoFAModalRef=this.modalService.open(this.twoFAModal,{modalDialogClass:"2fa-modal"}),this.twoFAModalRef.result.then(t=>{this.twoFactorAuthenticationForm.resetForm(),this.twoFactorAuthenticationForm.markAsUntouched(),this.twoFactorAuthenticationForm.submitted=!1,"done"!==t&&!this.companyTwoFactorAuthentication&&(this.loginUserData.two_factor_authentication=!1)},t=>{this.twoFactorAuthenticationForm.resetForm(),this.twoFactorAuthenticationForm.markAsUntouched(),this.twoFactorAuthenticationForm.submitted=!1,this.companyTwoFactorAuthentication||(this.loginUserData.two_factor_authentication=!1)})}enableTwoFASubmit(){this.twoFactorAuthenticationForm.markAllAsTouched(),this.twoFactorAuthenticationForm.submitted=!0,this.twoFactorAuthenticationForm.valid&&(this.loadingTwoFA||(this.loadingTwoFA=!0,this.profileService.update2FA(this.twoFactorAuthenticationForm.value).subscribe(t=>{this.loadingTwoFA=!1,this.loginUserData.two_factor_authentication=!0,this.twoFAModalRef.close("done")},t=>{this.loadingTwoFA=!1},()=>{this.loadingTwoFA=!1})))}passwordStrength(t){this.passwordIsValid=t}profilePicChanged(t){t?(this.loginUserData.image="base64img",this.loginUserData.thumbnail_url=t):(this.loginUserData.image="",this.loginUserData.thumbnail_url="");const i=Object.assign(this.auth.getUser(),this.loginUserData);this.auth.setUser(i)}back(){this.filterService.navigate(["/system/account/users"])}ngOnDestroy(){var t,i;this.historyService.setHistory({url:this.currentUrl,title:"user_detail",item_id:this.userID,item_name:(null===(t=this.contents.item)||void 0===t?void 0:t.name)?null===(i=this.contents.item)||void 0===i?void 0:i.name:"",iconType:"icon",iconName:"account_circle"})}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(u.FF),e.\u0275\u0275directiveInject(E.K),e.\u0275\u0275directiveInject(M.v),e.\u0275\u0275directiveInject(g.gz),e.\u0275\u0275directiveInject(g.F0),e.\u0275\u0275directiveInject(x.GW),e.\u0275\u0275directiveInject(U.p),e.\u0275\u0275directiveInject(A.q),e.\u0275\u0275directiveInject(O.H),e.\u0275\u0275directiveInject(V.i),e.\u0275\u0275directiveInject(e.ChangeDetectorRef),e.\u0275\u0275directiveInject(B.e),e.\u0275\u0275directiveInject(k.H))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-user-detail"]],viewQuery:function(t,i){if(1&t&&(e.\u0275\u0275viewQuery(G,5),e.\u0275\u0275viewQuery(W,5)),2&t){let s;e.\u0275\u0275queryRefresh(s=e.\u0275\u0275loadQuery())&&(i.changePasswordModal=s.first),e.\u0275\u0275queryRefresh(s=e.\u0275\u0275loadQuery())&&(i.twoFAModal=s.first)}},decls:7,vars:2,consts:[["class","page",3,"loading",4,"ngIf","ngIfElse"],["elseBlock",""],["changePasswordModal",""],["twoFAModal",""],[1,"page"],[1,"header","justify-content-between"],[1,"profile"],[1,"imageBox"],[1,"profile-pic",3,"src","error"],[3,"imageSrc","profilePicChanged",4,"ngIf"],[1,"detail"],[1,"title"],["class","wr-id ms-2",4,"ngIf"],[1,"right_box"],["permission","edit_user","tooltip","tooltips.edit"],[1,"btn","btn-primary","edit-information-btn",3,"click"],[1,"material-icons"],[1,"back-page-system","btn","btn-secondary",3,"ngbTooltip","click"],[1,"body"],[1,"tab"],["ngbNav","",3,"activeId","activeIdChange"],["nav","ngbNav"],[3,"ngbNavItem",4,"ngFor","ngForOf"],["ngbNavItem","security","appPermission","","permission","edit_user"],["ngbNavLink",""],["ngbNavContent",""],["ngbNavItem","activities"],[3,"ngbNavOutlet"],[3,"imageSrc","profilePicChanged"],[1,"wr-id","ms-2"],[3,"ngbNavItem"],[1,"view-page"],[3,"layout","contents","isMainColumn",4,"ngFor","ngForOf"],[3,"layout","contents","isMainColumn"],["class","row",4,"ngIf"],[1,"row","resetPassword"],[1,"col-md-6"],[1,"password-box"],[1,"btn","btn-primary",3,"click"],["class","col-md-6",4,"ngIf"],[1,"row"],[1,"box"],[1,"box-header"],[1,"box-title"],[1,"box-body"],[4,"ngIf"],[1,"password-box",2,"margin-top","45px"],[1,"form-group","inline"],[1,"switchBox",3,"ngbTooltip"],["type","checkbox",3,"ngModel","ngModelChange","change"],[1,"switch"],[3,"click",4,"ngIf"],[3,"click"],["type","user",3,"id"],[1,"loading-page","full-screen"],[1,"change-password-modal"],[1,"modal-header","flex-nowrap"],[1,"modal-title-wrapper"],[1,"modal-title"],[1,"material-icons","close",3,"click"],[1,"modal-body"],[3,"formGroup","ngSubmit"],[1,"form-group"],[1,"text-danger"],[1,"current_password"],["type","password","formControlName","current_password","ngbAutofocus","",1,"form-control"],[1,"forgot-pass-link"],["class","spinner-border spinner-border-sm text-light",4,"ngIf"],[1,"clearfix"],["class","error",4,"ngIf"],["type","password","formControlName","new_password",1,"form-control",3,"ngModelChange"],[3,"passwordToCheck","passwordStrength"],["type","password","formControlName","new_confirm_password",1,"form-control"],[1,"footer"],["type","button",1,"btn","btn-secondary",3,"click"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"spinner-border","spinner-border-sm","text-light"],[1,"visually-hidden"],[1,"error"],[1,"two-fa-modal-wrapper"],[1,"modal-header"],["class","loadingAuthenticationBox",4,"ngIf"],["class","detail-box",4,"ngIf"],[1,"loadingAuthenticationBox"],[1,"d-flex","justify-content-center"],["role","status",1,"spinner-border","m-5",2,"width","3rem","height","3rem"],[1,"detail-box"],[1,"text-bold","my-2","d-block"],[1,"mb-2"],["href","https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&hl=en"],["href","https://apps.apple.com/us/app/google-authenticator/id388497605"],[1,"mb-2","d-block"],[1,"s-code"],[1,"d-block","text-center","m-3"],[3,"src"],["type","password","formControlName","verification_code","autocomplete","off","ngbAutofocus","",1,"form-control"],[1,"mt-2"]],template:function(t,i){if(1&t&&(e.\u0275\u0275template(0,ie,40,29,"div",0),e.\u0275\u0275template(1,se,1,0,"ng-template",null,1,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(3,me,49,32,"ng-template",null,2,e.\u0275\u0275templateRefExtractor),e.\u0275\u0275template(5,fe,10,5,"ng-template",null,3,e.\u0275\u0275templateRefExtractor)),2&t){const s=e.\u0275\u0275reference(2);e.\u0275\u0275property("ngIf",!i.loading)("ngIfElse",s)}}
1,directives:[v.NgIf,L.e,R.i,u._L,u.Pz,v.NgForOf,u.nv,u.Vx,u.uN,j.i,N.l,b.Wl,b.JJ,b.On,Q.y,u.tO,b._Y,b.JL,b.sg,b.Fj,b.u,z.I],pipes:[$.X$,v.DatePipe],styles:[".edit[_ngcontent-%COMP%]{display:flex;align-items:center}.edit[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{margin-right:5px;font-size:17px}.resetPassword[_ngcontent-%COMP%]{margin-top:50px;min-height:100px}.password-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center}.password-box[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]{margin-bottom:20px}.password-box[_ngcontent-%COMP%]   div[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:50px;border:3px dotted var(--password-box-icon-border-color);border-radius:50%;height:80px;width:80px;display:flex;align-items:center;justify-content:center;margin:auto;box-shadow:0 2px 20px var(--password-box-icon-box-shadow-color)}.profile[_ngcontent-%COMP%]{display:flex;align-items:center}.profile[_ngcontent-%COMP%]   .imageBox[_ngcontent-%COMP%]{width:60px;height:60px;border-radius:50%;margin-right:10px;position:relative;border:1px solid var(--profile-imageBox-border-color);padding:8px;display:flex;align-items:center;justify-content:center}.profile[_ngcontent-%COMP%]   .imageBox[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{border-radius:50%}.profile[_ngcontent-%COMP%]   .imageBox[_ngcontent-%COMP%]:hover   img[_ngcontent-%COMP%]{opacity:.5}.profile[_ngcontent-%COMP%]   .detail[_ngcontent-%COMP%]{display:flex;align-items:baseline}.profile[_ngcontent-%COMP%]   .detail[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{font-size:16px;font-weight:400;color:var(--profile-detail-color)}.profile[_ngcontent-%COMP%]   .detail[_ngcontent-%COMP%]   .wr-id[_ngcontent-%COMP%]{font-size:12px;color:var(--inventory-detail-header-right-id-color)}"]}),n})(),data:{breadcrumb:!1}}];let ve=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[[g.Bz.forChild(ge)],g.Bz]}),n})();var xe=o(44466),be=o(1126),ye=o(51919),we=o(25583),Ce=o(70821),Fe=o(1155);let Pe=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[[v.CommonModule,ve,xe.m,be.a,ye.o,we.G,Ce.V,Fe.ProfileModule]]}),n})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.