1"use strict";(self.webpackChunkResponsiveApps=self.webpackChunkResponsiveApps||[]).push([[2403],{3353:(I,G,r)=>{r.d(G,{I:()=>m});class m{constructor(l){l&&(this.jsonObjectSids=l.jsonObjectSids,this.jsonObjectTypeSid=l.jsonObjectTypeSid)}getJson(){let l={};return this.jsonObjectSids&&(l.jsonObjectSids=this.jsonObjectSids),this.jsonObjectTypeSid&&(l.jsonObjectTypeSid=this.jsonObjectTypeSid),l}}},17931:(I,G,r)=>{r.d(G,{X:()=>d});var m=r(31725),C=r(3353),l=r(42209),v=r(2615),g=r(82249);let d=(()=>{class b extends m.N{constructor(p,A){super(A),this.s_commonGenericData=p,this.c_jsonObject=new l.m(!1,P=>P.sid)}getJsonObjects(p){return this.s_commonGenericData.getJsonObjects(p)}getJsonObjectsBySids(p){return this.runMethodOverCache(this.c_jsonObject,p,A=>this.getJsonObjects(new C.I({jsonObjectSids:A})))}saveContainers(p){return this.s_commonGenericData.saveContainers(p)}saveAndExecuteContainer(p){return this.s_commonGenericData.saveAndExecuteContainer(p)}static{this.\u0275fac=function(A){return new(A||b)(v.KVO(g.Y),v.KVO(v.zZn))}}static{this.\u0275prov=v.jDH({token:b,factory:b.\u0275fac,providedIn:"root"})}}return b})()},19103:(I,G,r)=>{r.d(G,{e:()=>l});var m=r(60461),C=r(91633);class l extends m.G{constructor(g){super(g),this.controlId=C.x.DefaultOutput,this.useHtml=!0,null!=g?.useHtml&&(this.useHtml=g.useHtml),null!=g?.iconClassBefore&&(this.iconClassBefore=g.iconClassBefore),null!=g?.iconClassAfter&&(this.iconClassAfter=g.iconClassAfter)}}},33409:(I,G,r)=>{r.d(G,{i:()=>v,n:()=>g});var m=r(73664),C=r(2615),l=r(45758);let v=(()=>{class d{constructor(_){this.s_formGroupsValidation=_,this.additionalInvalid=!1,this.validClick=new m.bkB}onClick(_){this.s_formGroupsValidation.checkFormGroupsValid(this.formGroups,this.additionalInvalid)&&this.validClick.next(_)}static{this.\u0275fac=function(p){return new(p||d)(m.rXU(l.F))}}static{this.\u0275dir=m.FsC({type:d,selectors:[["","invalidChecker",""]],hostBindings:function(p,A){1&p&&m.bIt("click",function(u){return A.onClick(u)})},inputs:{formGroups:[0,"invalidChecker","formGroups"],additionalInvalid:[0,"invalid","additionalInvalid"]},outputs:{validClick:"validClick"},standalone:!1})}}return d})(),g=(()=>{class d{static{this.\u0275fac=function(p){return new(p||d)}}static{this.\u0275mod=m.$C({type:d})}static{this.\u0275inj=C.G2t({})}}return d})()},34563:(I,G,r)=>{r.d(G,{C:()=>l});var m=r(49198),C=r(91633);class l extends m.f{constructor(g){super(g),this.controlId=C.x.MatSelect,null!=g?.panelClass&&(this.panelClass=g?.panelClass)}}},37309:(I,G,r)=>{r.r(G),r.d(G,{AddContractProductGroupsPComponent:()=>wt,AddContractProductGroupsPModule:()=>qt});var m=r(60801),C=r(68018),l=r(72200),v=r(66041),g=r(96864),d=r(84412),b=r(92771),_=r(84572),p=r(7673),A=r(27468),P=r(22254),u=r(96354),f=r(44668),D=r(56977),O=r(61594),y=r(25558),X=r(73703),$=r(63745),L=r(97282),K=r(53076),W=r(30198),Y=r(89386),H=r(97370),S=r(27951),z=r(93870),k=r(89253);let Q=new $.t([],[new S.Or("addContractProductGroupsP_save","").label(new z.W("button.save"),!0).visible(!0,!0),new S.XS("addContractProductGroupsP_submit_contactTemplateSid","text.logicalUIObjects.contactTemplateSid").execute(!1,!0).defaultValue("",!0)]).integrate("addContractProductGroupsP_jobBatches",L.r).integrate("addContractProductGroupsP_mainProductGroups",K.r).integrate("addContractProductGroupsP_articleDetails",W.r).integrate("addContractProductGroupsP_branchProductGroups",Y.r).integrate("addContractProductGroupsP_jobBGrpUsages",H.r).integrate("addContractProductGroupsP",k.r,[new S.XS("saveAsChangeSet","text.logicalUIObjects.saveAsChangeSet").execute(!0,!0)]);var V=r(33409),N=r(59325),J=r(26683),M=r(13175),R=r(88583),Z=r(20734),w=r(95816),x=r(41068),q=r(29196),tt=r(56618),et=r(2273),st=r(15047),rt=r(25037),ot=r(56174),nt=r(23928),it=r(85007),at=r(92166),ct=r(8037),t=r(73664),c=r(2615),lt=r(17705),dt=r(27491),ut=r(19209),pt=r(91029),ht=r(5718),mt=r(32784),Pt=r(94883),ft=r(16935),vt=r(58297),gt=r(42988),Gt=r(54065),Ct=r(16224),_t=r(80480),bt=r(17931),Ft=r(63935),jt=r(95206),Bt=r(23018),Et=r(79772),Tt=r(66221),At=r(23388),It=r(35539),yt=r(13337),Dt=r(79111);const Ot=["wizard"],Ut=["jobBatchesForm"],St=["mainProductGroupsForm"],Mt=["articleDetailsForm"],Rt=a=>[a],xt=a=>({hidden:a});function Vt(a,E){if(1&a){const e=t.RV6();t.j41(0,"button",9),t.nI1(1,"async"),t.bIt("validClick",function(){c.eBV(e);const o=t.XpG(2);return c.Njj(o.nextPage())}),t.EFF(2),t.nI1(3,"translate"),t.k0s()}if(2&a){const e=t.XpG(2);t.Y8G("invalidChecker",t.bMT(1,2,e.getMainProductGroupsFormGroups())),t.R7$(2),t.JRh(t.bMT(3,4,"button.next"))}}function Nt(a,E){if(1&a){const e=t.RV6();t.j41(0,"button",9),t.bIt("validClick",function(){c.eBV(e);const o=t.XpG(2);return c.Njj(o.nextPage())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}if(2&a){const e=t.XpG(2);t.Y8G("invalidChecker",e.getArticleDetailsFormGroups()),t.R7$(),t.JRh(t.bMT(2,2,"button.next"))}}function Jt(a,E){1&a&&t.nrm(0,"br")}function Xt(a,E){if(1&a){const e=t.RV6();t.j41(0,"div",18),t.nI1(1,"async"),t.EFF(2,"\n "),t.j41(3,"h3"),t.EFF(4),t.k0s(),t.EFF(5,"\n "),t.j41(6,"fab-product-group-search",19),t.nI1(7,"async"),t.nI1(8,"async"),t.bIt("selectedProductGroups",function(o){const n=c.eBV(e).$implicit,i=t.XpG().$implicit,h=t.XpG(2);return c.Njj(h.setBranchProductGroups(i.sidProperty.origValue||i.sid,n.sid,o))})("visible",function(o){const n=c.eBV(e).$implicit,i=t.XpG().$implicit,h=t.XpG(2);return c.Njj(h.setBranchProductGroupsFormsVisible(i.sidProperty.origValue||i.sid,n.sid,o))}),t.EFF(9,"\n "),t.k0s(),t.EFF(10,"\n "),t.j41(11,"fab-product-groups",20),t.nI1(12,"async"),t.bIt("jobBatchGrpUsages",function(o){const n=c.eBV(e).$implicit,i=t.XpG().$implicit,h=t.XpG(2);return c.Njj(h.setJobBGrpUsages(i.sidProperty.origValue||i.sid,n.sid,o))})("visible",function(o){const n=c.eBV(e).$implicit,i=t.XpG().$implicit,h=t.XpG(2);return c.Njj(h.setJobBGrpUsagesFormsVisible(i.sidProperty.origValue||i.sid,n.sid,o))}),t.EFF(13,"\n "),t.k0s(),t.EFF(14,"\n "),t.k0s()}if(2&a){let e;const s=E.$implicit,o=t.XpG().$implicit,n=t.XpG(2);t.Y8G("ngClass",t.eq3(14,xt,t.bMT(1,6,n.getBranchProductGroupsOrJobBGrpUsagesFormsHidden(o.sidProperty.origValue||o.sid,s.sid)))),t.R7$(4),t.JRh(s.caption),t.R7$(2),t.Y8G("additionalVisible",(null==(e=t.bMT(7,8,n.o_branches))?null:e.length)>1)("filteredProductGroups",t.bMT(8,10,n.getProductGroups(s.sid))),t.R7$(5),t.Y8G("jobBatch",s)("productGroups",t.bMT(12,12,n.getBranchProductGroups(o.sidProperty.origValue||o.sid,s.sid)))}}function $t(a,E){if(1&a&&(t.j41(0,"div"),t.EFF(1,"\n "),t.j41(2,"h2"),t.EFF(3),t.DNE(4,Jt,1,0,"br",16),t.EFF(5),t.k0s(),t.EFF(6,"\n "),t.DNE(7,Xt,15,16,"div",17),t.nI1(8,"async"),t.EFF(9,"\n "),t.k0s()),2&a){const e=E.$implicit,s=t.XpG(2);t.R7$(3),t.SpI("\n ",null==e||null==e.mainAddress?null:e.mainAddress.surName,"\n "),t.R7$(),t.Y8G("ngIf",null==e||null==e.mainAddress?null:e.mainAddress.surName),t.R7$(),t.Lme("\n ",(null==e||null==e.mainAddress?null:e.mainAddress.street)+" "+(null==e||null==e.mainAddress?null:e.mainAddress.houseNr),", ",(null==e||null==e.mainAddress?null:e.mainAddress.zipCode)+" "+(null==e||null==e.mainAddress?null:e.mainAddress.city),"\n "),t.R7$(2),t.Y8G("ngForOf",t.bMT(8,5,s.o_selectedJobBatches))}}function Lt(a,E){1&a&&t.eu8(0)}function Kt(a,E){if(1&a){const e=t.RV6();t.j41(0,"button",22),t.nI1(1,"async"),t.nI1(2,"async"),t.bIt("validClick",function(){c.eBV(e);const o=t.XpG(3);return c.Njj(o.save())}),t.EFF(3),t.nI1(4,"async"),t.k0s()}if(2&a){const e=E.o_label,s=t.XpG(3);t.Y8G("invalidChecker",t.bMT(1,4,s.getAllFormGroups()))("isRequesting",t.bMT(2,6,s.isRequestingAsObservable))("disabled",s.isSaved),t.R7$(3),t.SpI("\n ",t.bMT(4,8,e),"\n ")}}function Wt(a,E){1&a&&(t.EFF(0,"\n "),t.DNE(1,Kt,5,10,"button",21),t.EFF(2,"\n ")),2&a&&(t.R
17$(),t.Y8G("fabGuid","addContractProductGroupsP_save"))}function Yt(a,E){if(1&a){const e=t.RV6();t.EFF(0,"\n "),t.j41(1,"fab-wizard",6,0),t.EFF(3,"\n "),t.j41(4,"fab-step"),t.EFF(5,"\n "),t.j41(6,"fab-job-batch-form",7,1),t.nI1(8,"async"),t.bIt("jobBatches",function(o){c.eBV(e);const n=t.XpG();return c.Njj(n.selectedJobBatches=o)}),t.EFF(9,"\n "),t.k0s(),t.EFF(10,"\n "),t.j41(11,"div",8),t.EFF(12,"\n "),t.j41(13,"button",9),t.bIt("validClick",function(){c.eBV(e);const o=t.XpG();return c.Njj(o.nextPage())}),t.EFF(14),t.nI1(15,"translate"),t.k0s(),t.EFF(16,"\n "),t.k0s(),t.EFF(17,"\n "),t.k0s(),t.EFF(18,"\n "),t.j41(19,"fab-step"),t.EFF(20,"\n "),t.j41(21,"fab-job-batch-product-groups",10,2),t.nI1(23,"async"),t.nI1(24,"async"),t.bIt("productGroups",function(o){c.eBV(e);const n=t.XpG();return c.Njj(n.productGroups=o)}),t.EFF(25,"\n "),t.k0s(),t.EFF(26,"\n "),t.j41(27,"div",8),t.EFF(28,"\n "),t.j41(29,"button",11),t.bIt("click",function(){c.eBV(e);const o=t.XpG();return c.Njj(o.prevPage())}),t.EFF(30),t.nI1(31,"translate"),t.k0s(),t.EFF(32,"\n "),t.DNE(33,Vt,4,6,"button",12),t.EFF(34,"\n "),t.k0s(),t.EFF(35,"\n "),t.k0s(),t.EFF(36,"\n "),t.j41(37,"fab-step"),t.EFF(38,"\n "),t.j41(39,"fab-article-details",13,3),t.nI1(41,"async"),t.nI1(42,"async"),t.nI1(43,"async"),t.bIt("hidden",function(o){c.eBV(e);const n=t.XpG();return c.Njj(n.setSkipStep(3,o))}),t.EFF(44,"\n "),t.k0s(),t.EFF(45,"\n "),t.j41(46,"div",8),t.EFF(47,"\n "),t.j41(48,"button",11),t.bIt("click",function(){c.eBV(e);const o=t.XpG();return c.Njj(o.prevPage())}),t.EFF(49),t.nI1(50,"translate"),t.k0s(),t.EFF(51,"\n "),t.DNE(52,Nt,3,4,"button",12),t.EFF(53,"\n "),t.k0s(),t.EFF(54,"\n "),t.k0s(),t.EFF(55,"\n "),t.j41(56,"fab-step"),t.EFF(57,"\n "),t.DNE(58,$t,10,7,"div",14),t.nI1(59,"async"),t.EFF(60,"\n "),t.j41(61,"div",8),t.EFF(62,"\n "),t.j41(63,"button",11),t.bIt("click",function(){c.eBV(e);const o=t.XpG();return c.Njj(o.prevPage())}),t.EFF(64),t.nI1(65,"translate"),t.k0s(),t.EFF(66,"\n "),t.DNE(67,Lt,1,0,"ng-container",15),t.EFF(68,"\n "),t.k0s(),t.EFF(69,"\n "),t.k0s(),t.EFF(70,"\n "),t.k0s(),t.EFF(71,"\n "),t.DNE(72,Wt,3,1,"ng-template",null,4,t.C5r),t.EFF(74,"\n")}if(2&a){const e=t.sdS(73),s=t.XpG();t.R7$(),t.Y8G("step",s.step)("showHeader",!1),t.R7$(5),t.Y8G("optionJobBatches",t.bMT(8,19,s.o_optionJobBatches)),t.R7$(7),t.Y8G("invalidChecker",t.eq3(41,Rt,s.getJobBatchesFormGroup())),t.R7$(),t.JRh(t.bMT(15,21,"button.next")),t.R7$(7),t.Y8G("excludedProductGroupSids",t.bMT(23,23,s.o_excludedProductGroupsSids))("jobBatches",t.bMT(24,25,s.o_selectedJobBatches)),t.R7$(9),t.JRh(t.bMT(31,27,"button.back")),t.R7$(3),t.Y8G("ngIf",!s.isLastStep(2))("ngIfElse",e),t.R7$(6),t.Y8G("jobBatches",t.bMT(41,29,s.o_selectedJobBatches))("partnerTypeSids",t.bMT(42,31,s.o_partnerTypeSids))("productGroups",t.bMT(43,33,s.o_productGroups)),t.R7$(10),t.JRh(t.bMT(50,35,"button.back")),t.R7$(3),t.Y8G("ngIf",!s.isLastStep(3))("ngIfElse",e),t.R7$(6),t.Y8G("ngForOf",t.bMT(59,37,s.o_branches)),t.R7$(6),t.JRh(t.bMT(65,39,"button.back")),t.R7$(3),t.Y8G("ngTemplateOutlet",e)}}let wt=(()=>{class a extends m.I{constructor(e,s,o,n,i,h,j,T,B,F,U,te,ee,se,re,oe,ne,ie,ae,ce){super(e),this.s_userStore=n,this.router=i,this.s_employerContracts=h,this.s_employerArticles=j,this.s_employerBranches=T,this.cd=B,this.s_routing=F,this.s_cmsInfoNotification=U,this.s_employerStore=te,this.s_articleCore=ee,this.s_articlePartnerCore=se,this.s_container=re,this.s_commonGenericCore=oe,this.s_contactCore=ne,this.s_employer=ie,this.s_uiObjectHelper=ae,this.s_time=ce,this.step=new d.t(1),this.skipSteps=[],this._selectedJobBatches=new b.m(1),this._productGroups=new b.m(1),this._branchProductGroups=new d.t({}),this.jobBGrpUsages={},this.articleIndex=0,this.articlePartnerIndex=0,this.jobBGrpUsageIndex=0,this.isSaved=!1,this._branchProductGroupsFormsVisible=new d.t({}),this._jobBGrpUsagesFormsVisible=new d.t({}),this.uiConfigService=s,this.translateService=o,this.uiConfig=Q.generate(),this.setUserRequired(this.s_userStore,this.router),this.isLoaded=!1}setProperties(e,s){}ngOnInit(){this.initJobBatches(),this.initExcludedProductGroupSids(),this.initPartnerTypeSids(),this.initBranchProductGroupsAndJobBGrpUsagesSkipping()}initJobBatches(){this.o_optionJobBatches=this.s_employerContracts.o_contracts.pipe((0,u.T)(e=>(this.isLoaded=!0,x.Ay.flatten(e.map(s=>s.jobBatches)))),(0,f.t)(1))}initExcludedProductGroupSids(){this.o_excludedProductGroupsSids=this.s_employerArticles.o_articlesPerJobBatchSid.pipe((0,u.T)(e=>{let s={};for(let o in e)s[o]=e[o].map(n=>n.productGroupSid);return s}),(0,f.t)(1))}initPartnerTypeSids(){this.o_partnerTypeSids=this.s_employer.o_employerWithPartnerPartnerTypes.pipe((0,u.T)(e=>e?.partnerPartnerTypes.map(s=>s.partnerTypeSid)),(0,f.t)(1))}initBranchProductGroupsAndJobBGrpUsagesSkipping(){(0,_.z)([this.o_branches,this.o_selectedJobBatches,this._branchProductGroupsFormsVisible,this._jobBGrpUsagesFormsVisible]).pipe((0,D.Q)(this._destroyEvent)).subscribe(([e,s,o,n])=>{this.setSkipStep(4,!e.some(i=>s.some(h=>o[i.sid]&&o[i.sid][h.sid]||n[i.sid]&&n[i.sid][h.sid])))})}set selectedJobBatches(e){this._selectedJobBatches.next(e)}get o_selectedJobBatches(){return this._selectedJobBatches.asObservable()}set productGroups(e){this._productGroups.next(e),this.o_branches.pipe((0,O.$)(),(0,D.Q)(this._destroyEvent)).subscribe(s=>{if(1==s.length){let o={};o[s[0].sidProperty.origValue||s[0].sid]=e,this._branchProductGroups.next(o)}})}get o_productGroups(){return this._productGroups.asObservable()}getProductGroups(e){return this.o_productGroups.pipe((0,u.T)(s=>s&&s[e]))}setBranchProductGroups(e,s,o){let n=this._branchProductGroups.value;n[e]||(n[e]={}),n[e][s]=o,this._branchProductGroups.next(n)}setJobBGrpUsages(e,s,o){this.jobBGrpUsages[e]||(this.jobBGrpUsages[e]={}),this.jobBGrpUsages[e][s]||(this.jobBGrpUsages[e][s]={});for(let[n,i]of o.entries())this.jobBGrpUsages[e][s][n]=i}getBranchProductGroups(e,s){return this._branchProductGroups.pipe((0,u.T)(o=>o&&o[e]&&o[e][s]))}get o_branches(){return this.s_employerBranches.o_employerWithBranches}getJobBatchesFormGroup(){return this.jobBatchesForm?.formGroup.formGroup}getMainProductGroupsFormGroups(){return this.mainProductGroupsForm?.o_formGroups}getArticleDetailsFormGroups(){return this.articleDetailsForm?.formGroups}getAllFormGroups(){let e=this.jobBGrpUsagesForms?.map(n=>n.o_formGroups),s=this.getMainProductGroupsFormGroups(),o=[];return e&&o.push(...e),s&&o.push(s),o.length?(0,_.z)(o).pipe((0,u.T)(n=>[...this.branchProductGroupsForms?.map(h=>h.formGroup.formGroup),...this.getArticleDetailsFormGroups(),...x.Ay.flatten(n),this.getJobBatchesFormGroup()].filter(h=>!!h))):(0,p.of)([])}setSkipStep(e,s){this.skipSteps[e]=s}nextPage(){this.wizard.nextPage(),this.skipSteps[this.step.value]&&this.nextPage()}prevPage(){this.wizard.prevPage(),this.skipSteps[this.step.value]&&this.prevPage()}isLastStep(e){for(let s=4;e<s;s--)if(!this.skipSteps[s])return!1;return!0}save(){this.startRefreshing(this.cd),this.getArticles().pipe((0,y.n)(this.addContracts.bind(this)),(0,y.n)(e=>{let s=e.shift(),o=this.s_container.getContainers(s,this.uiConfig,"addContractProductGroupsP",e);return this.s_commonGenericCore.saveContainers(o).pipe((0,y.n)(n=>{let h=n?.filter(j=>j instanceof ct.W)?.map(j=>j.article);return this.sendContact(h)}))}),(0,y.n)(()=>this.s_employerContracts.reloadContracts()),(0,D.Q)(this._destroyEvent)).subscribe(()=>{this.isSaved=!0,this.showSuccessNotification(),this.routeOnComplete(),this.stopRefreshing(this.cd)},()=>{this.stopRefreshing(this.cd)})}
1getArticles(){return this.o_productGroups.pipe((0,O.$)(),(0,y.n)(e=>{let s=new et.G;return s.partnerSids=[this.s_employerStore.employer.sid],s.productGroupSids=x.Ay.union(...Object.values(e).map(o=>o.map(n=>n.sid))),s.loadOnlyValidAssFrom=!0,s.loadOnlyValidAssTo=!0,nt.B.combineInits(this.s_articleCore.getArticles(s),[this.s_articlePartnerCore.initArticlesWithArticlePartners])}),(0,y.n)(this.updateArticles.bind(this)))}sendContact(e){let s=this.uiConfig.logicalConfIndex.addContractProductGroupsP_submit_contactTemplateSid,o=s.execute.value&&+s.defaultValue.value;if(o){let n=new at.e;return n.templateSid=o,n.mailTokens={"#ARTICLE_SIDS#":e?.map(i=>i.sid).join(",")},this.s_contactCore.sendContacts(n).pipe((0,X.u)(void 0))}return(0,p.of)(void 0)}updateArticles(e){const s=[];let o=this._branchProductGroups.value;for(let n in o)for(let i in o[n])if(o[n][i])for(let h of o[n][i]){let j=e.find(B=>B.productGroupSid==h.sid);j||(j=this.getNewArticle(h),e.push(j));const T=this.addArticleDetails(j,+i,h.sid).pipe((0,u.T)(B=>{let F=B.articlePartner?.find(U=>U.partnerSid==+n);F||(F=this.getNewArticlePartner(+n),B.articlePartner.push(F)),F.jobBGrpUsages=this.jobBGrpUsages[n][i][h.sid];for(let U of F.jobBGrpUsages)U.setPlaceholder("sid","jobBGrpUsage_sid"+this.jobBGrpUsageIndex++);return B}));s.push(T)}return(0,A.p)(s).pipe((0,u.T)(()=>e))}getNewArticle(e){let s=q.e.empty();return s.setPlaceholder("sid","article_sid"+this.articleIndex++),s.name=e.name,s.productGroupSid=e.sid,s.enqPropUnitSid=e.unitSid,s.partnerSid=this.s_employerStore.employer.sid,s.articlePartner=[],s}addArticleDetails(e,s,o){if(!this.articleDetailsForm)return(0,p.of)(e);let n=this.articleDetailsForm.getArticleAmounts();return n&&n[s]&&n[s][o]&&(e.amount=n[s][o]),this.articleDetailsForm.getArticleAnswerContainers().pipe((0,O.$)(),(0,u.T)(i=>(i&&i[s]&&i[s][o]&&(e.answerContainer=i[s][o]),e)))}getNewArticlePartner(e){let s=tt.S.empty();return s.setPlaceholder("sid","articlePartner_sid"+this.articlePartnerIndex++),s.partnerSid=e,s}addContracts(e){return(0,_.z)([this.s_employerContracts.o_contracts,this.s_time.o_serverDateAsDate.pipe((0,O.$)())]).pipe((0,O.$)(),(0,u.T)(([s,o])=>{let n=[];for(let i of e)if(i.articlePartner)for(let h of i.articlePartner)for(let j of h.jobBGrpUsages){let T=s.find(F=>F.jobBatchSids.includes(j.jobBatchUsages[0].jobBatchSid));n.find(F=>F.sid==T.sid)||n.push(T),T.coPos||(T.coPos=[]);let B=T.coPos.find(F=>i.sid?F.articleSid==i.sid:F.getPlaceholder("articleSid")==i.getPlaceholder("sid"));B||(B=this.getNewCoPos(i),T.coPos.push(B)),B.coPosAPJBGUsages.push(this.getNewCoPosAPJBGUsage(h,j,o))}return[...e,...n]}))}getNewCoPos(e){let s=rt.u.empty();return e.sid?s.articleSid=e.sid:s.setPlaceholder("articleSid",e.getPlaceholder("sid")),s.coPosTypeSid=ot.u.COPOS_TYPE_SID_COPOS,s.amountAdmin=e.amount,s.coPosAPJBGUsages=[],s}getNewCoPosAPJBGUsage(e,s,o){let n=st.V.empty();return e.sid?n.articlePartnerSid=e.sid:n.setPlaceholder("articlePartnerSid",e.getPlaceholder("sid")),n.setPlaceholder("jobBGrpUsageSid",s.getPlaceholder("sid")),n.partnerSid=e.partnerSid,n.assFrom=o,n.updateRemark(this.s_uiObjectHelper.interpolateConfigString(this.uiConfig.logicalConfIndex.addContractProductGroupsP_articleDetails_coPos_coPosUsageRemarkChange,{0:this.translateService.instant("text.newlyAdded"),1:it.c.formatCurrentDate()})),n}showSuccessNotification(){this.s_cmsInfoNotification.setModuleParamAsNotification("successNotificationCmsInfoSid")}routeOnComplete(){this.s_routing.routeToCmsMenuDestByParamName("redirectCMSMenu")}setBranchProductGroupsFormsVisible(e,s,o){this.setFormsVisible(this._branchProductGroupsFormsVisible,e,s,o)}setJobBGrpUsagesFormsVisible(e,s,o){this.setFormsVisible(this._jobBGrpUsagesFormsVisible,e,s,o)}setFormsVisible(e,s,o,n){let i=e.value;i[s]||(i[s]={}),i[s][o]=n,e.next(i)}getBranchProductGroupsOrJobBGrpUsagesFormsHidden(e,s){return(0,_.z)([this._branchProductGroupsFormsVisible,this._jobBGrpUsagesFormsVisible]).pipe((0,u.T)(([o,n])=>!(o[e]&&o[e][s]||n[e]&&n[e][s])))}static{this.\u0275fac=function(s){return new(s||a)(t.rXU(c.zZn),t.rXU(dt.s),t.rXU(C.c$),t.rXU(ut.w),t.rXU(pt.Ix),t.rXU(ht.m),t.rXU(mt.A),t.rXU(Pt.Z),t.rXU(lt.gRc),t.rXU(ft.O),t.rXU(vt.d),t.rXU(gt.C),t.rXU(Gt.x),t.rXU(Ct.B),t.rXU(_t.J),t.rXU(bt.X),t.rXU(Ft.b),t.rXU(jt.h),t.rXU(Bt.Z),t.rXU(Et.v))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["fab-add-contract-productgroups"]],viewQuery:function(s,o){if(1&s&&(t.GBs(Ot,5),t.GBs(Ut,5),t.GBs(St,5),t.GBs(Mt,5),t.GBs(M.c,5),t.GBs(R.$,5)),2&s){let n;t.mGM(n=t.lsd())&&(o.wizard=n.first),t.mGM(n=t.lsd())&&(o.jobBatchesForm=n.first),t.mGM(n=t.lsd())&&(o.mainProductGroupsForm=n.first),t.mGM(n=t.lsd())&&(o.articleDetailsForm=n.first),t.mGM(n=t.lsd())&&(o.branchProductGroupsForms=n),t.mGM(n=t.lsd())&&(o.jobBGrpUsagesForms=n)}},standalone:!1,features:[t.Vt3],decls:2,vars:1,consts:[["wizard",""],["jobBatchesForm",""],["mainProductGroupsForm",""],["articleDetailsForm",""],["saveButton",""],[3,"fabUiConfigable"],[3,"step","showHeader"],["guid","addContractProductGroupsP_jobBatches",3,"jobBatches","optionJobBatches"],[1,"button-group"],["type","button",3,"validClick","invali
1dChecker"],["guid","addContractProductGroupsP_mainProductGroups",3,"productGroups","excludedProductGroupSids","jobBatches"],["type","button",1,"minor",3,"click"],["type","button",3,"invalidChecker","validClick",4,"ngIf","ngIfElse"],["guid","addContractProductGroupsP_articleDetails",3,"hidden","jobBatches","partnerTypeSids","productGroups"],[4,"ngFor","ngForOf"],[4,"ngTemplateOutlet"],[4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],["guid","addContractProductGroupsP_branchProductGroups",3,"selectedProductGroups","visible","additionalVisible","filteredProductGroups"],["guid","addContractProductGroupsP_jobBGrpUsages",3,"jobBatchGrpUsages","visible","jobBatch","productGroups"],["type","submit",3,"invalidChecker","isRequesting","disabled","validClick",4,"fabGuid"],["type","submit",3,"validClick","invalidChecker","isRequesting","disabled"]],template:function(s,o){1&s&&(t.DNE(0,Yt,75,43,"ng-template",5),t.EFF(1,"\n")),2&s&&t.Y8G("fabUiConfigable",o.uiConfig)},dependencies:[l.YU,l.Sq,l.bT,l.T3,Tt.c,At.X,It.U,P.x,V.i,N.c,J.Y,M.c,R.$,yt.B,Dt.l,l.Jj,C.D9],encapsulation:2,changeDetection:0})}}return a})(),qt=(()=>{class a{static{this.\u0275fac=function(s){return new(s||a)}}static{this.\u0275mod=t.$C({type:a})}static{this.\u0275inj=c.G2t({imports:[l.MD,v.F,g.H,P.W,V.n,C.h,N.n,J.D,M.L,R.E,Z.y,w.a]})}}return a})()},45758:(I,G,r)=>{r.d(G,{F:()=>l});var m=r(2615),C=r(82559);let l=(()=>{class v{constructor(d){this.s_invalidNotification=d}checkFormGroupsValid(d,b){if(b||d?.some(_=>_.invalid)){for(let _ of d)_.markAllAsTouched(),_.updateValueAndValidity();return this.s_invalidNotification.showNotification(),!1}return!0}static{this.\u0275fac=function(b){return new(b||v)(m.KVO(C.K))}}static{this.\u0275prov=m.jDH({token:v,factory:v.\u0275fac,providedIn:"root"})}}return v})()},84682:(I,G,r)=>{r.d(G,{f:()=>l});var m=r(60461),C=r(91633);class l extends m.G{constructor(){super(...arguments),this.controlId=C.x.Group,this.isGroupControl=!0}}},89332:(I,G,r)=>{r.d(G,{a:()=>_});var m=r(31725),C=r(7673),l=r(23928),v=r(42986),g=r(20166),d=r(2615),b=r(30767);let _=(()=>{class p extends m.N{constructor(P,u){super(u),this.s_commonPartnerData=P,this.c_commKinds=new v.P(!0,f=>f.sid),this.c_prelationDecl=new v.P(!0,f=>f.sid),this.c_prelationType=new v.P(!0,f=>f.sid),this.initPartnerHierarchiesWithPRelationTypes=this._initPartnerHierarchiesWithPRelationTypes.bind(this)}getCommKinds(P){return this.runMethodOverCache(this.c_commKinds,P,u=>this.s_commonPartnerData.getCommKinds(u))}getPartnerTypeGrps(P,u){return this.s_commonPartnerData.getPartnerTypeGrps(P,u)}getPartnerTypes(P){return this.s_commonPartnerData.getPartnerTypes(P)}getPrelationDeclsBySids(P){return this.runMethodOverCache(this.c_prelationDecl,P,u=>{const f=new g.I;return f.prelationsDeclSids=u,this.s_commonPartnerData.getPrelationDecl(f)})}getPrelationDecls(P){return this.s_commonPartnerData.getPrelationDecl(P)}getPrelationType(P){return this.runMethodOverCache(this.c_prelationType,P,u=>this.s_commonPartnerData.getPrelationType(u))}_initPartnerHierarchiesWithPRelationTypes(P,u){return l.B.initTWithU(P,u,f=>f.prelationTypeSid,f=>f.sid,f=>f&&f.length?this.getPrelationType(f):(0,C.of)([]),(f,D)=>{f.prelationType=D})}static{this.\u0275fac=function(u){return new(u||p)(d.KVO(b.V),d.KVO(d.zZn))}}static{this.\u0275prov=d.jDH({token:p,factory:p.\u0275fac,providedIn:"root"})}}return p})()}}]);
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.