1 line
9.9 KiB
JavaScript

"use strict";(self.webpackChunkstaffdb=self.webpackChunkstaffdb||[]).push([[76],{49619:(S,m,t)=>{t.d(m,{l:()=>y});var e=t(54438),p=t(18498),_=t(44232),h=t(33570),i=t(19057),v=t(62560),M=t(45197),C=t(62855),E=t(53573),l=t(15113),g=t(60177),f=t(85956),I=t(99213),u=t(20962),P=t(43684),s=t(89417),D=t(21009),O=t(92),d=t(19664);const T=[[["","profile-settings",""]],[["","other-settings",""]],[["","admin-settings",""]]],A=["[profile-settings]","[other-settings]","[admin-settings]"];function F(o,R){if(1&o){const n=e.RV6();e.j41(0,"hensel-selection",14),e.nI1(1,"translate"),e.bIt("selectedItemsChange",function(a){e.eBV(n);const r=e.XpG();return e.Njj(r.setLangauge(a))}),e.k0s()}if(2&o){const n=e.XpG();e.FS9("placeholder",e.bMT(1,5,"core.caption.language")),e.Y8G("dataSource",n.usedLanguages)("multiSelect",!1)("canClear",!1)("selectedItems",n.localeService.currentLanguage)}}function L(o,R){if(1&o){const n=e.RV6();e.j41(0,"div",15)(1,"hensel-selection",16),e.nI1(2,"translate"),e.bIt("selectedItemsChange",function(a){e.eBV(n);const r=e.XpG();return e.Njj(r.setLocale(a))}),e.k0s(),e.j41(3,"div",17),e.EFF(4),e.nI1(5,"translate"),e.k0s(),e.j41(6,"div",18),e.EFF(7),e.nI1(8,"date"),e.k0s(),e.j41(9,"div",19),e.EFF(10),e.nI1(11,"translate"),e.k0s(),e.j41(12,"div",20),e.EFF(13),e.nI1(14,"number"),e.k0s(),e.j41(15,"div",21),e.EFF(16),e.nI1(17,"translate"),e.k0s(),e.j41(18,"div",22),e.EFF(19),e.nI1(20,"currency"),e.k0s()()}if(2&o){const n=e.XpG();e.R7$(),e.FS9("placeholder",e.bMT(2,11,"core.caption.regionformat")),e.Y8G("dataSource",n.usedCultures)("multiSelect",!1)("canClear",!1)("selectedItems",n.localeService.currentCulture),e.R7$(3),e.SpI("",e.bMT(5,13,"core.caption.date"),":"),e.R7$(3),e.JRh(e.i5U(8,15,n.today,"shortDate")),e.R7$(3),e.SpI("",e.bMT(11,18,"core.account.caption.weight"),":"),e.R7$(3),e.SpI("",e.i5U(14,20,.74,"1.3-3")," kg"),e.R7$(3),e.SpI("",e.bMT(17,23,"core.account.caption.price"),":"),e.R7$(3),e.JRh(e.ii3(20,25,44357,n.currencySymbol,"symbol","1.2-2"))}}function x(o,R){if(1&o){const n=e.RV6();e.j41(0,"mat-card",23)(1,"mat-card-header")(2,"mat-card-title"),e.EFF(3),e.nI1(4,"translate"),e.k0s()(),e.j41(5,"mat-card-content",24)(6,"div",25)(7,"div",26)(8,"mat-checkbox",27),e.mxI("ngModelChange",function(a){e.eBV(n);const r=e.XpG();return e.DH7(r.serverInfoService.serverInfoVisible,a)||(r.serverInfoService.serverInfoVisible=a),e.Njj(a)}),e.EFF(9),e.nI1(10,"translate"),e.k0s()(),e.j41(11,"div")(12,"mat-checkbox",28),e.mxI("ngModelChange",function(a){e.eBV(n);const r=e.XpG();return e.DH7(r.globals.showIds,a)||(r.globals.showIds=a),e.Njj(a)}),e.EFF(13),e.nI1(14,"translate"),e.k0s()()(),e.j41(15,"span",29),e.SdG(16,2),e.k0s()()()}if(2&o){const n=e.XpG();e.R7$(3),e.JRh(e.bMT(4,5,"core.caption.addsettings")),e.R7$(5),e.R50("ngModel",n.serverInfoService.serverInfoVisible),e.R7$(),e.JRh(e.bMT(10,7,"core.caption.showstatusbar")),e.R7$(3),e.R50("ngModel",n.globals.showIds),e.R7$(),e.JRh(e.bMT(14,9,"core.caption.showids"))}}let y=(()=>{class o{get user(){return this.authService.user}constructor(){this.noneCaption="core.dropdown-option.none",this.noneValue=-1,this.webAppIdList=[],this.globals=(0,e.WQX)(i.RV),this.router=(0,e.WQX)(p.Ix),this.authService=(0,e.WQX)(v.V),this.serverInfoService=(0,e.WQX)(E.z),this.localeService=(0,e.WQX)(C.i),this.repositoryService=(0,e.WQX)(M.U),this.APP_SUPPORTED_CULTURES=(0,e.WQX)(_.DG),this.APP_SUPPORTED_LANGUAGES=(0,e.WQX)(_.pj)}ngOnInit(){this.usedLanguages=h.Fc.filter(n=>l.Rh(n.langCode,this.APP_SUPPORTED_LANGUAGES)),this.usedCultures=h.j$.filter(n=>l.zH(n.culture,this.APP_SUPPORTED_CULTURES)),this.today=l.Ec(),this.currencySymbol=l.Qn(this.localeService.currentCulture)}logout(){this.authService.logout(!0)}setLocale(n){this.localeService.currentCulture=n,this.currencySymbol=l.Qn(this.localeService.currentCulture),this.saveCultureLanguage()}setLangauge(n){this.localeService.currentLanguage=n,this.saveCultureLanguage()}saveCultureLanguage(){this.user.culture=this.localeService.currentCulture,this.user.language=this.localeService.currentLanguage,this.user.save(this.repositoryService,null,null,null,"culture")}goHome(){this.router.navigate(["/"+this.globals.mainPage.path])}static#e=this.\u0275fac=function(c){return new(c||o)};static#t=this.\u0275cmp=e.VBU({type:o,selectors:[["app-account"]],ngContentSelectors:A,decls:26,vars:17,consts:[[1,"ConfigContainer"],[1,"profile","setting-card"],["mat-icon-button","",1,"mat-button-withoutcaption",3,"click"],[1,"icons"],["mat-raised-button","",1,"logout","url",3,"click"],[1,"logout-icon"],[1,"profile-content"],["disabled","true",1,"user-name",3,"placeholder","ngModel"],["disabled","true",1,"user-loginname",3,"placeholder","ngModel"],["class","language","keyExpr","langCode","displayExpr","languageName","sortField","*","requered","",3,"dataSource","placeholder","multiSelect","canClear","selectedItems","selectedItemsChange",4,"ngIf"],["class","culture_section",4,"ngIf"],[1,"profile-custom"],[1,"other-settings"],["class","admin-settings setting-card",4,"ngIf"],["keyExpr","langCode","displayExpr","languageName","sortField","*","requered","",1,"language",3,"selectedItemsChange","dataSource","placeholder","multiSelect","canClear","selectedItems"],[1,"culture_section"],["keyExpr","culture","displayExpr","country","sortField","*","requered","",1,"culture",3,"selectedItemsChange","dataSource","placeholder","multiSelect","canClear","selectedItems"],[1,"sample-date-capt"],[1,"sample-date"],[1,"sample-weight-capt"],[1,"sample-weight"],[1,"sample-price-capt"],[1,"sample-price"],[1,"admin-settings","setting-card"],[1,"admin-content"],[1,"admin-std"],[1,"abstand"],["name","cbFooter",3,"ngModelChange","ngModel"],["name","cbId",3,"ngModelChange","ngModel"],[1,"admin-custom"]],template:function(c,a){1&c&&(e.NAR(T),e.j41(0,"div",0)(1,"mat-card",1)(2,"mat-card-header")(3,"mat-card-title")(4,"button",2),e.bIt("click",function(){return a.goHome()}),e.j41(5,"mat-icon",3),e.EFF(6,"arrow_back_ios"),e.k0s()(),e.EFF(7),e.nI1(8,"translate"),e.k0s(),e.j41(9,"button",4),e.bIt("click",function(){return a.logout()}),e.j41(10,"mat-icon",5),e.EFF(11,"logout"),e.k0s(),e.EFF(12),e.nI1(13,"translate"),e.k0s()(),e.j41(14,"mat-card-content",6),e.nrm(15,"hensel-input",7),e.nI1(16,"translate"),e.nrm(17,"hensel-input",8),e.nI1(18,"translate"),e.DNE(19,F,2,7,"hensel-selection",9)(20,L,21,30,"div",10),e.j41(21,"span",11),e.SdG(22),e.k0s()()(),e.j41(23,"span",12),e.SdG(24,1),e.k0s(),e.DNE(25,x,17,11,"mat-card",13),e.k0s()),2&c&&(e.R7$(7),e.SpI(" ",e.bMT(8,9,"core.caption.myaccount")," "),e.R7$(5),e.SpI("",e.bMT(13,11,"core.caption.logout")," "),e.R7$(3),e.FS9("placeholder",e.bMT(16,13,"core.caption.name")),e.Y8G("ngModel",a.user.name),e.R7$(2),e.FS9("placeholder",e.bMT(18,15,"core.caption.userloginname")),e.Y8G("ngModel",a.user.loginName),e.R7$(2),e.Y8G("ngIf",a.usedLanguages.length>1),e.R7$(),e.Y8G("ngIf",a.usedCultures.length>1),e.R7$(5),e.Y8G("ngIf",a.user.isAdmin))},dependencies:[g.bT,f.iV,I.An,u._m,u.XB,u.Rm,u.YU,P.NZ,s.BC,s.vS,D.n,O.d,g.QX,g.oe,g.vh,d.D9],styles:['.ConfigContainer[_ngcontent-%COMP%]{width:100%;height:100%;display:grid;grid-template-rows:auto auto minmax(0,1fr);grid-template-columns:minmax(0,1fr);grid-template-areas:"profile" "other-settings" "admin-settings";overflow:hidden;grid-gap:.9em}.profile[_ngcontent-%COMP%]{grid-area:profile}.admin-settings[_ngcontent-%COMP%]{grid-area:admin-settings;height:-moz-fit-content;height:fit-content}.other-settings[_ngcontent-%COMP%]{grid-area:other-settings}.admin-content[_ngcontent-%COMP%]{display:grid;grid-template-columns:250px 1fr;grid-template-areas:"admin-std admin-custom";grid-gap:.5em;column-gap:2em;overflow:hidden}.admin-custom[_ngcontent-%COMP%]{grid-area:admin-custom}.setting-card[_ngcontent-%COMP%]{margin-left:1px;margin-right:2px!important;margin-top:1px;margin-bottom:1px}.abstand[_ngcontent-%COMP%]{margin-bottom:10px}.logout[_ngcontent-%COMP%]{margin-left:auto;font-size:large;padding-right:15px!important;padding-left:15px!important}.logout-icon[_ngcontent-%COMP%]{vertical-align:middle;margin-right:10px}.profile-content[_ngcontent-%COMP%]{width:100%;height:calc(100% - 38px);display:grid;grid-template-rows:auto auto auto;grid-template-columns:250px auto 1fr;grid-template-areas:"user-name culture_section profile-custom" "user-loginname culture_section profile-custom" "language culture_section profile-custom";overflow:hidden;grid-gap:.5em;column-gap:2em}.profile-custom[_ngcontent-%COMP%]{grid-area:profile-custom}.user-loginname[_ngcontent-%COMP%]{grid-area:user-loginname}.culture_section[_ngcontent-%COMP%]{grid-area:culture_section;width:100%;height:100%;display:grid;grid-template-rows:repeat(4,auto);grid-template-columns:1fr 1fr;grid-template-areas:"culture culture" "sample-date-capt sample-date" "sample-weight-capt sample-weight" "sample-price-capt sample-price";overflow:hidden;grid-gap:.5em;column-gap:1em}.culture[_ngcontent-%COMP%]{grid-area:culture;width:250px}.user-name[_ngcontent-%COMP%]{grid-area:user-name}.sample-date-capt[_ngcontent-%COMP%]{grid-area:sample-date-capt}.sample-date[_ngcontent-%COMP%]{grid-area:sample-date}.sample-weight-capt[_ngcontent-%COMP%]{grid-area:sample-weight-capt}.sample-weight[_ngcontent-%COMP%]{grid-area:sample-weight}.sample-price-capt[_ngcontent-%COMP%]{grid-area:sample-price-capt}.sample-price[_ngcontent-%COMP%]{grid-area:sample-price}.language[_ngcontent-%COMP%]{grid-area:language} .ConfigContainer .mat-card-header-text{margin-left:0}']})}return o})()},39655:(S,m,t)=>{t.r(m),t.d(m,{AccountModule:()=>P});var e=t(60177),p=t(18498),_=t(27938),h=t(49619),i=t(54438);const v=[{path:"",component:h.l,canActivate:[_.q]}];let M=(()=>{class s{static#e=this.\u0275fac=function(d){return new(d||s)};static#t=this.\u0275mod=i.$C({type:s});static#n=this.\u0275inj=i.G2t({imports:[p.iI.forChild(v),p.iI]})}return s})();var C=t(89417),E=t(94753),l=t(31837),g=t(19664),f=t(18406),I=t(21009),u=t(92);let P=(()=>{class s{static#e=this.\u0275fac=function(d){return new(d||s)};static#t=this.\u0275mod=i.$C({type:s});static#n=this.\u0275inj=i.G2t({imports:[e.MD,M,f.e,C.X1,C.YN,E.N,l.WC8,I.n,u.d,g.h]})}return s})()}}]);