1import{a as Zt,b as we}from"./chunk-WNMTBKAQ.js";import{a as Jo}from"./chunk-QJJ7SIR7.js";import{b as pt}from"./chunk-XHB4UAIT.js";import"./chunk-P3CYRW4W.js";import{a as Ie}from"./chunk-QFLKR7AV.js";import{a as ie}from"./chunk-Q22WCJC5.js";import"./chunk-3OGXCAV2.js";import{a as Co}from"./chunk-6UMFXTLI.js";import{e as _t,f as Qt,g as me}from"./chunk-NENT3XC3.js";import"./chunk-WG7JFK7H.js";import"./chunk-ZDRPI3JU.js";import{a as _o}from"./chunk-FPHPRB3P.js";import{b as Q}from"./chunk-6VKQ4C4B.js";import{a as Po,b as Bo}from"./chunk-XQYRSRZ6.js";import"./chunk-4IVYZC6C.js";import{A as ut,B as uo,D as Kt,E as bo,Ea as So,Eb as Yt,Fa as yo,H as et,Ia as To,Ib as lt,J as tt,K as fo,Ka as mi,N as Wt,Rb as wo,Sb as Xt,T as ho,Xa as xo,bb as Eo,cb as it,eb as Do,gb as Ao,ha as ce,j as Xe,k as $t,l as so,la as qt,n as Qe,nb as de,o as lo,oa as vo,ob as Oo,p as Ut,pa as zt,q as Gt,qb as ot,r as Ht,rb as Z,s as Ze,sb as nt,tb as rt,u as po,ub as at,v as co,w as mo,xa as go,xb as st,z as K,zb as Io}from"./chunk-2EGU7YKH.js";import"./chunk-XXJ5KP6J.js";import{a as ao}from"./chunk-CAQC7JX5.js";import"./chunk-OQSEJWXG.js";import{h as no,o as ro}from"./chunk-LB2SIPUX.js";import"./chunk-YU5IEYKE.js";import"./chunk-TNG3WTDY.js";import"./chunk-DBPN64ZI.js";import{a as Mt}from"./chunk-PXIE55XG.js";import"./chunk-76J53O4D.js";import{a as Zi,b as eo,c as to,d as io,e as oo}from"./chunk-7IEHGNLB.js";import{f as mt,h as Oe,j as M,k as Xi,r as kt}from"./chunk-P5CCJ2SN.js";import{a as Qi}from"./chunk-NEQO7ITA.js";import"./chunk-ILIGNJRC.js";import{a as Rt,c as Ee,d as Nt,h as Ui,m as Gi}from"./chunk-FM5MQBX4.js";import"./chunk-KJ2DTZTE.js";import{a as E}from"./chunk-3RKFVFMW.js";import"./chunk-6LRNCJRQ.js";import"./chunk-BYUXZABT.js";import{d as jt,e as Lt,k as De,o as Mi,r as $i}from"./chunk-CSKO464Y.js";import{B as zi,D as Yi,f as Hi,g as Ki,h as Wi,i as qi,z as Ae}from"./chunk-RFZ65DFT.js";import{m as ze,q as Vi}from"./chunk-ZAELU3GP.js";import{e as ki}from"./chunk-KCBWTIVH.js";import{b as H}from"./chunk-Q7LOV5U2.js";import"./chunk-GSJIPMUW.js";import"./chunk-2D6KGTZB.js";import"./chunk-ZS7OWNSY.js";import{b as Ft}from"./chunk-DIZWDXBB.js";import{E as Fi,Q as F,_ as Ye,aa as Vt}from"./chunk-Q4MTVQC2.js";import"./chunk-RRAYDVNW.js";import{Cb as Ot,Fc as j,Id as Li,Kd as pe,Md as ve,Zd as We,_c as Ni,a as ae,bb as he,c as Ce,dd as $e,fd as $,hd as le,id as Ue,ja as ci,lc as It,ld as di,nd as wt,ne as O,od as Ge,oe as qe,pe as X,qe as G,rd as He,sd as Ke,td as Pt,uc as J,wd as Bt,xe as Jt,yd as ji}from"./chunk-WGWIBZ2L.js";import{$ as yi,$b as g,$c as B,Cc as Te,D as R,Dc as Oi,E as Y,Ea as Ei,Ec as xe,Fa as f,Fc as P,Ga as C,Gb as ne,Gc as yt,Ib as c,La as oe,Lb as vt,Na as Ct,Ob as v,Oc as d,Oe as se,Pc as m,Pe as At,Q as Se,Qc as k,Rb as Di,Rc as Tt,Sb as Ai,Tb as a,Tc as te,Ub as r,Vb as x,Wb as Je,X as Si,Xb as Re,Yb as ye,Z as ee,Zb as y,_c as Ii,a as bt,ac as s,ad as wi,db as ht,dc as T,ec as gt,f as ft,fc as St,fd as Pi,g as vi,gd as Bi,gf as pi,hb as n,id as xt,ja as Fe,jd as re,l as gi,lb as h,ld as Et,ma as w,md as L,oa as Ti,oc as ue,pc as _,qa as V,qc as D,qd as Ji,rc as S,sc as dt,sd as Ri,tb as N,td as Dt,ua as xi,ub as ke,va as Ve,w as si,wc as _e,xb as Me,xc as be,ya as b,yc as fe,ye as U,zb as u,zc as li}from"./chunk-6LP6WHZQ.js";import{a as je,b as Le}from"./chunk-5KTCK5IS.js";function pn(t,p){if(t&1){let e=y();a(0,"div",3)(1,"h1",4),_(2),r(),a(3,"div",5)(4,"span",6),_(5,"*"),r(),_(6),r(),a(7,"form",7)(8,"p-card",8)(9,"ppg-input-group",9),x(10,"input",10),r(),a(11,"ppg-input-group",11),x(12,"input",12),r(),a(13,"ppg-input-group",13),x(14,"input",14),r(),a(15,"ppg-input-group",15),x(16,"input",16),r(),x(17,"ppg-state-dropdown",17),a(18,"ppg-input-group",18),x(19,"input",19),r()()(),a(20,"p-fluid")(21,"div",20)(22,"div",21)(23,"p-button",22),g("onClick",function(){f(e);let o=s(2);return C(o.cancelHandler())}),r()(),a(24,"div",21)(25,"p-button",23),g("onClick",function(){f(e);let o=s(2);return C(o.submitHandler())}),r()()()()()}if(t&2){let e=p.$implicit,i=s(2);n(2),S(" ",(i.addressKey==null?null:i.addressKey.length)>0?e("EDIT_DELIVERY_LOCATION"):e("ADD_NEW_LOCATION")," "),n(4),S(" ",e("REQUIRED_FIELDS")," "),n(),c("formGroup",i.addEditDeliveryform),n(),c("header",e("DELIVERY_LOCATION")),n(),c("label",e("ADDRESS_NAME"))("required",!0)("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.AddressName),n(),c("label",e("ADDRESS1"))("required",!0)("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.AddressName),n(),c("label",e("ADDRESS2"))("displaySuffix",!0),n(2),c("label",e("CITY"))("required",!0)("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.CityMax),n(),c("stateGroup",i.addEditDeliveryform)("stateControl","stateCode")("countryCode",i.countryCode())("clearable",!1)("required",!0),n(),c("label",e("POSTCODE"))("required",!0)("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.PostCo
1de),n(4),c("label",e("CANCEL")),n(2),c("label",e("SAVE"))}}function cn(t,p){t&1&&(a(0,"div",1),u(1,pn,26,29,"div",2),r()),t&2&&(n(),c("translocoRead","ORDERS.REVIEW_ORDER"))}var bi=(()=>{class t{#e;#t;#i;constructor(e,i,o,l,A,I,W,z){this.formBuilder=e,this.errorMessageTranslations=i,this.route=o,this.permissionsService=l,this.jobsService=A,this.addressService=I,this.router=W,this.jobActionPermissionsService=z,this.TEXT_MAX_LENGTH=254,this.ERROR_FIELD_TYPE=Xe,this.deactivateDialogTranslationPrefix="ORDERS.REVIEW_ORDER.CANCEL_ADD_EDIT_MODAL",this.#e=b(j),this.#t=b(Jt),this.#i=B(()=>this.#e.getPathByAppRouteFeatureModule(J.Job)),this.permissions=E,this.isFormSaved=!1,this.countryCode=this.#t.countryCode,this.addEditDeliveryform=this.formBuilder.group({addressName:[this.address?.name,[$.required,$.maxLength(this.TEXT_MAX_LENGTH),Q.notOnlyWhiteSpaces()]],address1:[this.address?.address1,[$.required,Q.notOnlyWhiteSpaces()]],address2:[this.address?.address2],city:[this.address?.city,[$.required,$.maxLength(this.TEXT_MAX_LENGTH),Q.notOnlyWhiteSpaces()]],stateCode:[this.address?.state?.code,[$.required]],postcode:[this.address?.postcode],apartment:[this.address?.apartment]}),this.jobKey=this.route.snapshot.params?.jobKey,this.addressKey=this.route.snapshot.params?.addressKey}ngOnInit(){this.jobDetails$=Y([this.permissionsService.hasPermission(this.permissions.MANAGE_JOBS),this.permissionsService.hasPermission(this.permissions.MANAGE_ALL_JOBS)]).pipe(w(([e,i])=>this.jobsService.getJobDetails(this.jobKey,e||i)),w(e=>this.jobActionPermissionsService.getDeliveryAddressActions(e).pipe(R(i=>({job:e,permissions:i})))),V(({permissions:e})=>{this.addressKey?e?.edit?.visible||this.router.navigate(["/"]):e.add.visible||this.router.navigate(["/"])}),R(({job:e})=>(this.address=e.deliveryAddresses.find(i=>i.key===this.addressKey),this.postcode?.setValidators([$.required,Q.notOnlyWhiteSpaces(),Q.postcodeForCountry(this.countryCode())]),this.address&&this.initForm(this.address),e)),Fe(1))}initForm(e){this.addEditDeliveryform.patchValue({addressName:e.name,address1:e.address1,address2:e.address2,city:e.city,stateCode:e?.state?.code,postcode:e.postcode})}get postcode(){return this.addEditDeliveryform.controls.postcode}cancelHandler(){this.router.navigate([`${this.#i()}/${this.jobKey}`])}submitHandler(){if(!this.addEditDeliveryform.valid){Qe(this.addEditDeliveryform,!0);return}let{address1:e,address2:i,city:o,apartment:l,stateCode:A,postcode:I,addressName:W}=this.addEditDeliveryform.getRawValue(),z={name:W,address1:e,address2:i,city:o,stateCode:A,postcode:I.toLocaleString(),key:this.address?.key,apartment:l};this.addressKey?this.addressService.editAddress(z).subscribe(()=>{this.isFormSaved=!0,this.router.navigate([`${this.#i()}/${this.jobKey}`])}):this.addressService.addAddress(z,this.jobKey).subscribe(()=>{this.isFormSaved=!0,this.router.navigate([`${this.#i()}/${this.jobKey}`])})}isDeactivationAllowed(){return this.addEditDeliveryform.pristine||this.isFormSaved}static{this.\u0275fac=function(i){return new(i||t)(h(Bt),h($t),h(U),h(M),h(de),h(Zt),h(se),h(we))}}static{this.\u0275cmp=N({type:t,selectors:[["app-add-edit-delivery-location"]],standalone:!1,decls:2,vars:3,consts:[["class","flex flex-column justify-content-center align-items-center pb-2",4,"ngIf"],[1,"flex","flex-column","justify-content-center","align-items-center","pb-2"],["class","form-container",4,"transloco","translocoRead"],[1,"form-container"],["data-test-id","AddEditDeliveryLocation.pageHeader"],["data-test-id","AddEditDeliveryLocation.requiredFields",1,"mt-0","pb-4"],[1,"required"],[3,"formGroup"],["data-test-id","AddEditDeliveryLocation.addEditDeliveryCardTitle",3,"header"],["data-test-id","AddEditDeliveryLocation.AddressName","labelFor","delivery-location-address-name","styleModifier","mt-4",3,"label","required","displaySuffix"],["id","delivery-location-address-name","pInputText","","type","text","formControlName","addressName","name","addressName","data-test-id","AddEditDeliveryLocation.AddressNameInput","ppgValidator","",1,"w-full",3,"fieldType"],["data-test-id","AddEditDeliveryLocation.Address1","labelFor","delivery-location-address-1","styleModifier","mt-4",3,"label","required","displaySuffix"],["id","delivery-location-address-1","pInputText","","type","text","formControlName","address1","name","address1","data-test-id","AddEditDeliveryLocation.Address1Input","ppgValidator","",1,"w-full",3,"fieldType"],["data-test-id","AddEditDeliveryLocation.Address2","labelFor","delivery-location-address-2","styleModifier","mt-4",3,"label","displaySuffix"],["id","delivery-location-address-2","pInputText","","type","text","formControlName","address2","name","address2","data-test-id","AddEditDeliveryLocation.Address2Input",1,"w-full"],["data-test-id","AddEditDeliveryLocation.City","labelFor","delivery-location-city","styleModifier","mt-4",3,"label","required","displaySuffix"],["id","delivery-location-city","pInputText","","type","text","formControlName","city","name","city","data-test-id","AddEditDeliveryLocation.CityInput","ppgValidator","",1,"w-full",3,"fieldType"],["data-test-id","AddEditDeliveryLocation.stateDropdown","i
1d","stateCode","styleModifier","mt-4",3,"stateGroup","stateControl","countryCode","clearable","required"],["labelFor","postcode","styleModifier","mt-4","data-test-id","AddEditDeliveryLocation.PostCodeLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","postcode","id","postcode","name","postcode","data-test-id","AddEditDeliveryLocation.PostCodeInput","ppgValidator","","required","true",1,"w-full",3,"fieldType"],[1,"mt-3","grid","align-items-center","flex-column-reverse","sm:flex-row"],[1,"col-12","sm:col"],["data-test-id","AddEditDeliveryLocation.cancelButton","styleClass","font-bold","outlined","true",1,"flex-1",3,"onClick","label"],["styleClass","font-bold","data-test-id","AddEditDeliveryLocation.submitButton",3,"onClick","label"]],template:function(i,o){i&1&&(u(0,cn,2,1,"div",0),d(1,"async")),i&2&&c("ngIf",m(1,1,o.jobDetails$))},dependencies:[re,Ge,$e,le,Ue,Pt,He,Ke,et,X,ho,F,Ye,Ae,Wt,tt,L],encapsulation:2})}}return t})();function dn(t,p){if(t&1){let e=y();a(0,"div",2)(1,"h1",3),_(2),r(),a(3,"div",4)(4,"span",5),_(5,"*"),r(),_(6),r(),a(7,"form",6)(8,"p-card",7)(9,"ppg-input-group",8),x(10,"input",9),r(),a(11,"div",10),x(12,"app-phone-number-input",11),r(),a(13,"ppg-input-group",12),x(14,"input",13),r()()(),a(15,"p-fluid")(16,"div",14)(17,"div",15)(18,"p-button",16),g("onClick",function(){f(e);let o=s();return C(o.cancelHandler())}),r()(),a(19,"div",15)(20,"p-button",17),g("onClick",function(){f(e);let o=s();return C(o.submitHandler())}),r()()()()()}if(t&2){let e=p.$implicit,i=s();n(2),S(" ",(i.key==null?null:i.key.length)>0?e("EDIT"):e("ADD")," "),n(4),S(" ",e("REQUIRED_FIELDS")," "),n(),c("formGroup",i.addEditFulfillmentForm),n(),c("header",e("CONTACT_DETAILS")),n(),c("label",e("CONTACT_NAME"))("required",!0)("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.ContactName),n(2),c("formGroup",i.addEditFulfillmentForm)("phoneControl","phoneNumber")("label",e("PHONE_NUMBER"))("required",!0),n(),c("label",e("EMAIL_ADDRESS"))("displaySuffix",!0),n(),c("fieldType",i.ERROR_FIELD_TYPE.Email),n(4),c("label",e("CLOSE")),n(2),c("label",e("SUBMIT"))}}var fi=(()=>{class t{#e;#t;#i;constructor(e,i,o,l,A,I,W){this.formBuilder=e,this.errorMessageTranslations=i,this.route=o,this.permissionsService=l,this.jobsService=A,this.router=I,this.jobActionPermissionsService=W,this.ERROR_FIELD_TYPE=Xe,this.deactivateDialogTranslationPrefix="JOBS.FULFILLMENT_NEW_CONTACT.CANCEL_ADD_EDIT_MODAL",this.#e=b(j),this.#t=b(Vi),this.#i=B(()=>this.#e.getPathByAppRouteFeatureModule(J.Job)),this.permissions=E,this.isFormSaved=!1,this.addEditFulfillmentForm=this.formBuilder.group({contactName:["",[$.required,Q.notOnlyWhiteSpaces()]],phoneNumber:[""],emailAddress:[""]}),this.jobKey=this.route.snapshot.params?.jobKey,this.key=this.route.snapshot.params?.key;let z=this.#t.minDigitLengthValidator;wi(()=>this.addEditFulfillmentForm.controls.phoneNumber.setValidators([$.required,_o.customPhone(),z()]))}ngOnInit(){Y([this.permissionsService.hasPermission(this.permissions.MANAGE_JOBS),this.permissionsService.hasPermission(this.permissions.MANAGE_ALL_JOBS)]).pipe(w(([e,i])=>this.jobsService.getJobDetails(this.jobKey,e||i)),w(e=>this.jobActionPermissionsService.getDeliveryAddressActions(e).pipe(R(i=>({job:e,permissions:i})))),V(({permissions:e})=>{this.key?e?.edit?.visible||this.router.navigate(["/"]):e.add.visible||this.router.navigate(["/"])}),R(({job:e})=>(this.countryCode=e.country?.code,this.fulfillmentContact=e.fulfillmentContacts.find(i=>i.key===this.key),this.existingEmails=e.fulfillmentContacts.map(i=>i.email).filter(i=>i!==this.fulfillmentContact?.email),this.addEditFulfillmentForm.controls.emailAddress?.setValidators([Q.email(),Q.fulfillmentContactEmailAlreadyExists(this.existingEmails)]),this.fulfillmentContact&&this.initForm(this.fulfillmentContact),e)),Fe(1)).subscribe()}initForm(e){this.addEditFulfillmentForm.patchValue({contactName:e.name,phoneNumber:this.#t.unmask(e.phoneNumber),emailAddress:e.email})}cancelHandler(){this.router.navigate([`${this.#i()}/${this.jobKey}`])}submitHandler(){if(!this.addEditFulfillmentForm.valid){Qe(this.addEditFulfillmentForm,!0);return}let{contactName:e,phoneNumber:i,emailAddress:o}=this.addEditFulfillmentForm.getRawValue(),l={name:e,phoneNumber:i,email:o,key:this.key};this.key?this.jobsService.editFulfillmentContact(l).subscribe(()=>{this.isFormSaved=!0,this.router.navigate([`${this.#i()}/${this.jobKey}`])}):this.jobsService.addFulfillmentContact(l,this.jobKey).subscribe(()=>{this.isFormSaved=!0,this.router.navigate([`${this.#i()}/${this.jobKey}`])})}isDeactivationAllowed(){return this.addEditFulfillmentForm.pristine||this.isFormSaved}static{this.\u0275fac=function(i){return new(i||t)(h(Bt),h($t),h(U),h(M),h(de),h(se),h(we))}}static{this.\u0275cmp=N({type:t,selectors:[["app-add-edit-fulfillment-contact"]],standalone:!1,decls:2,vars:1,consts:[[1,"flex","flex-column","justify-content-center","align-items-center","pb-2"],["class","form-container",4,"transloco","translocoRead"],[1,"form-container"],["data-test-id","addEditFulfillmentContact.pageHeader"],["data-test-id","addEditFulfillmentContact.requiredFields",1,"mt-0","pb-4"],[1,"required"],[3,"formGroup"],["data-test-id","addEditFulfillmentContact.addEditFulfillmentCardTitle",3,"header"],["data-test-id","addEditFulfillmentContact.contactName","labelFor","fulfillment-contact-name",3,"label","required","displaySuffix"],["id","fulfillment-contact-name","pInputText","","type","text","formControlName","contactName","name","contactName","data-test-id","addEditFulfillmentContact.contactNameInput","ppgValidator","",1,"w-full",3,"fieldType"],[1,"mt-4"],["styleModifier","w-full","data-test-id","AddCustomer.LocationPhoneNumber","id","phoneNumber1","name","phoneNumber1",3,"formGroup","phoneControl","label","required"],["data-test-id","addEditFulfillmentContact.emailAddress","labelFor","fulfillment-contact-email","styleModifier","mt-4",3,"label","displaySuffix"],["id","fulfillment-contact-email","pInputText","","type","text","formControlName","emailAddress","name","emailAddress","ppgValidator","","data-test-id","addEditFulfillmentContact.emailAddressInput",1,"w-full",3,"fieldType"],[1,"mt-3","grid","align-items-center","flex-column-reverse","sm:flex-row"],[1,"col-12","sm:col"],["data-test-id","addEditFulfillmentContact.cancelButton","styleClass","font-bold","outlined","true",1,"flex-1",3,"onClick","label"],["styleClass","font-bold","data-test-id","addEditFulfillmentContact.submitButton",3,"onClick","label"]],template:function(i,o){i&1&&(a(0,"div",0),u(1,dn,21,17,"div",1),r()),i&2&&(n(),c("translocoRead","JOBS.FULFILLMENT_NEW_CONTACT"))},dependencies:[Ge,$e,le,Ue,He,Ke,et,X,fo,F,Ye,Ae,Wt,tt],encapsulation:2})}}return t})();var ti=(()=>{class t{#e=b(ki);onProductSortingGA(e){this.#e.pushTagToGtm(mt.TrackEvent,"sort","product catalog","alphabetical",e)}pushEcommerceTagToGtm(e,i,o,l){this.#e.pushTag(Le(je({event:e},l),{ecommerce:Le(je({},o),{items:[...i]})}))}onOpenProductDialogGA(e,i){this.#e.pushEcommerceTagToGtm(mt.SelectItem,[{item_name:e.nameInEnglish??e.specifiedJobItem?.storeOrderItemProductName,index:i.index,item_brand:e.brand??"",item_category:e.topLevelCategory??"",item_list_name:i.itemListName,item_list_id:i.itemListId,affiliation:e.id?Ze.ONLINE:Ze.IN_STORE}])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=xi({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var mn=t=>t?.specifiedJobItem?.specifiedJobItemType===Eo.CatalogItem,Vo=t=>t.products?.map((p,e)=>({item_name:p.nameInEnglish??p.specifiedJobItem?.storeOrderItemProductName,index:e,item_brand:p.brand??"",item_category:p.topLevelCategory??"",item_list_id:Gt.JobProductCatalogList,item_list_name:Ht.JobProductCatalogList,affiliation:mn(p)?Ze.ONLINE:Ze.IN_STORE}))??[];var hn=t=>[t],vn=t=>({canDeleteSpecifiedJobItem:t}),gn=t=>({searchTerm:t}),Sn=t=>({width:t});function yn(t,p){if(t&1&&(a(0,"div",5),_(1),d(2,"transloco"),r()),t&2){let e=s(2);n(),S(" ",k(2,1,e.searchTextLength>0?"JOB_PRODUCTS.SEARCH_NO_RESULTS":"SHARED.PRODUCTS.NO_RESULTS",P(4,gn,e.searchTextLength))," ")}}function Tn(t,p){if(t&1&&x(0,"ppg-color-swatch",15),t&2){let e=s(2).$implicit;c("height",13.33)("width",13.33)("hex",e.color.hex)}}function xn(t,p){if(t&1&&(a(0,"div",13),_(1),d(2,"transloco"),r(),a(3,"div",14)(4,"span"),_(5),d(6,"colorName"),r(),u(7,Tn,1,3,"ppg-color-swatch",15),r()),t&2){let e=s().$implicit;n(),S(" ",m(2,3,"JOB_PRODUCTS.COLOR")," "),n(4),D((e.specifiedJobItem==null?null:e.specifiedJobItem.customColorDescription)||m(6,5,e.color)),n(2),v(e.color.hex?7:-1)}}function En(t,p){if(t&1&&(a(0,"div",12)(1,"div",13),_(2),d(3,"transloco"),r(),a(4,"div"),_(5),r()()),t&2){let e=s().$implicit;n(2),S(" ",m(3,2,"JOB_PRODUCTS.SHEEN")," "),n(3),S(" ",e.sheen," ")}}function Dn(t,p){if(t&1){let e=y();a(0,"div",9)(1,"app-product-card",10),d(2,"transloco"),g("datasheetLinkClicked",function(){let o=f(e).$implicit,l=s(3);return C(l.openDataSheetDialog(o))})("secondaryButtonClicked",function(){let o=f(e).$implicit,l=s(3);return C(l.openDeleteSpecifiedJobItemDialog(o))})("modalOpened",function(){let o=f(e),l=o.$implicit,A=o.index,I=s(3);return C(I.openProductDialog(l,A+1))}),a(3,"div",11),u(4,xn,8,7),r(),u(5,En,6,4,"div",12),r()()}if(t&2){let e=p.$implicit,i=s().ngIf,o=s(2);n(),c("id",e.id)("imgSrc",e.imgSrc)("imgAlt",e.imgAlt)("title",e.jobItemName)("showDatasheet",!0)("subTitle",o.getItemSubtitle(e))("showSecondaryButton",i.canDeleteSpecifiedJobItem)("secondaryButtonLabel",m(2,12,"SHARED.PRODUCTS.DELETE"))("secondaryButtonIcon","pi pi-minus-circle")("isNotInCatalog",!e.key),n(3),v(e.specifiedJobItem!=null&&e.specifiedJobItem.customColorDescription||e.color.name||e.color.code?4:-1),n(),v(e.sheen&&e.productType==="Paint"?5:-1)}}function An(t,p){if(t&1&&(a(0,"div",7),u(1,Dn,6,14,"div",8),r()),t&2){let e=s(2);n(),c("ngForOf",e.jobProducts.products)}}function On(t,p){if(t&1){let e=y();a(0,"div")(1,"ppg-table-header",3),d(2,"transloco"),d(3,"transloco"),g("searchChange",function(o){f(e);let l=s();return C(l.search(o))})("actionButtonClick",function(){f(e);let o=s();return C(o.openAddSpecifiedJobProductInfoModal())}),r(),a(4,"p-card")(5,"div")(6,"h2",4),_(7),d(8,"transloco"),r(),u(9,yn,3,6,"div",5),r(),u(10,An,2,1,"div",6),d(11,"async"),r()()}if(t&2){let e=s();n(),T("searchPlaceholder",m(2,7,"JOB_PRODUCTS.SEARCH_PLACEHOLDER")),T("actionButtonLabel",m(3,9,"JOB_PRODUCTS.ADD_SPECIFIED_JOB_PRODUCT")),c("actionButtonPermissions",P(15,hn,e.permissions.MANAGE_CUSTOMERS)),n(6),dt("",m(8,11,"SHARED.PRODUCTS.RESULTS")," (",e.jobProducts.total,")"),n(2),v(e.jobProducts.total===0?9:-1),n(),c("ngIf",P(17,vn,m(11,13,e.canDeleteSpecifiedJobItem$)))}}function In(t,p){if(t&1){let e=y();a(0,"div",20)(1,"p-button",21),g("click",function(){f(e);let o=s(2);return C(o.showSpecifiedProductDialog=!1)}),r()()}if(t&2){let e=s().$implicit;n(),T("label",e("GOT_IT"))}}function wn(t,p){if(t&1){let e=y();a(0,"div")(1,"p-dialog",16),fe("visibleChange",function(o){f(e);let l=s();return be(l.showSpecifiedProductDialog,o)||(l.showSpecifiedProductDialog=o),C(o)}),a(2,"div",17)(3,"h5",18),_(4),r(),a(5,"div"),_(6),r(),a(7,"div",19),_(8),r(),a(9,"div",19),_(10),r()(),u(11,In,2,1,"ng-template",null,0,te),r()()}if(t&2){let e=p.$implicit,i=s();n(),vt(P(12,Sn,i.dialogSize)),c("header",e("HEADER"))("modal",!0),_e("visible",i.showSpecifiedProductDialog),c("draggable",!1)("resizable",!1)("dismissableMask",!0),n(3),D(e("INSTRUCTIONS_HEADER")),n(2),D(e("INSTRUCTION_1")),n(2),D(e("INSTRUCTION_2")),n(2),D(e("INSTRUCTION_3"))}}var $o=(()=>{class t{#e;constructor(e,i,o,l,A,I,W,z,ai,nn){this.cartService=e,this.favoritesService=i,this.configurationService=o,this.destroyRef=l,this.languageService=A,this.permissionsService=I,this.productsListService=W,this.jobProductsStateService=z,this.notificationService=ai,this.userService=nn,this.dialogService=b(De),this.#e=b(ti),this.searchResult=new Ct,this.searchTermChanged=new ft,this.permissions=E,this.showSpecifiedProductDialog=!1,this.searchTextLength=0}ngOnInit(){this.searchSubscription=this.searchTermChanged.pipe(Si(500),yi()).subscribe(e=>this.searchResult.emit(e)),this.loadFavorites(),this.userService.isB2BUser()?this.cartService.refreshCartJob():this.cartService.refreshCart(),this.languageService.currentLanguage$.subscribe(e=>this.locale=e),this.canDeleteSpecifiedJobItem$=this.permissionsService.hasPermission(E.MANAGE_SPECIFIED_JOB_ITEMS),this.dialogSize=K.Medium}openProductDialog(e,i){let o={index:i,itemListId:Gt.JobProductCatalogList,itemListName:Ht.JobProductCatalogList};this.#e.onOpenProductDialogGA(e,o),this.openDialog(e,mi.ProductConfiguration,o)}openDataSheetDialog(e){this.openDialog(e,mi.ProductDataSheets)}openDialog(e,i,o){let l={product:{id:e.specifiedJobItem.storeOrderItemId??e.id,key:e.key,productGroupID:e.groupId,name:e.specifiedJobItem.storeOrderItemProductName??e.name,nameInEnglish:e.nameInEnglish??e.specifiedJobItem.storeOrderItemProductName,description:null,frontImage:e.imgSrc,productType:e.productType,itemTypes:e.itemTypes,colourbankProductCode:e.colourbankProductCode,productSellable:!0},locale:this.locale,init:{job:{key:this.jobDetails.key,accountNumber:this.jobDetails.accountNumber,name:this.jobDetails.name,isActive:this.jobDetails.isActive,jobType:this.jobDetails.jobType,salesRep:this.jobDetails.salesRep,secondarySalesRep:this.jobDetails.secondarySalesRep},countryCode:this.jobDetails.country.code,jobSpecifiedItemName:e.jobItemName??e.specifiedJobItem.name,quoteId:this.cart?.quoteId??null,quoteName:this.cart?.quoteName??null,sku:e.sku,exportCatalogSku:e.specifiedJobItem.exportCatalogSku,color:e.color,sheen:e.sheen,netVolume:e.netVolume,volumeUOM:e.volumeUOM,isCartEmpty:!this.cart},dialogView:i,openDialogTagData:o,storeOrderNumber:e.specifiedJobItem.sourceStoreOrderNumber};e.key?this.dialogService.open(Io,{data:l,closable:!0}):this.dialogService.open(Po,{data:l,closable:!0})}search(e){this.searchTextLength=e.length,this.searchTermChanged.next(e)}openAddSpecifiedJobProductInfoModal(){this.showSpecifiedProductDialog=!0}openDeleteSpecifiedJobItemDialog(e){this.specifiedJobItem=e.jobItemKey,this.showDeleteSpecifiedProductDialog()}onDelete(){this.productsListService.deleteSpecifiedJobItem({jobKe
1y:this.jobDetails.key,specifiedJobItemKey:this.specifiedJobItem}).pipe(V(()=>this.jobProductsStateService.deleteJobProduct())).subscribe({error:()=>{this.notificationService.error("JOB_PRODUCTS.DELETE_SPECIFIED_JOB_PRODUCT_DIALOG.ERROR")}})}ngOnDestroy(){this.searchSubscription.unsubscribe()}showDeleteSpecifiedProductDialog(){this.dialogService.open(ce,{width:K.Medium,data:{translationPrefix:"JOB_PRODUCTS.DELETE_SPECIFIED_JOB_PRODUCT_DIALOG"},closable:!0}).onClose.pipe(ee(1)).subscribe(e=>{e&&this.onDelete()})}getItemSubtitle(e){return e.name??e.specifiedJobItem?.storeOrderItemProductName}loadFavorites(){this.configurationService.showFavoritesFeatureFlag$.pipe(ee(1),Se(Boolean),V(()=>this.favoritesService.loadFavoriteProductsGroupsIdsWhenNullOrEmpty()),ae(this.destroyRef)).subscribe()}static{this.\u0275fac=function(i){return new(i||t)(h(kt),h(To),h(H),h(oe),h(Xi),h(M),h(Do),h(it),h(Oe),h(We))}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-products-grid"]],inputs:{jobProducts:"jobProducts",jobDetails:"jobDetails",cart:"cart",dataSheetsEnabled:"dataSheetsEnabled"},outputs:{searchResult:"searchResult"},standalone:!1,decls:2,vars:2,consts:[["footer",""],[4,"ngIf"],[4,"transloco","translocoRead"],["actionButtonIconName","pi pi-plus-circle","actionButtonIconPosition","left",3,"searchChange","actionButtonClick","searchPlaceholder","actionButtonLabel","actionButtonPermissions"],[1,"pt-0"],["data-test-id","jobProductGrid.noResultsLabel",1,"pb-3"],["class","grid",4,"ngIf"],[1,"grid"],["class","col-12 lg:col-4",4,"ngFor","ngForOf"],[1,"col-12","lg:col-4"],["headerIconName","trash-can-outline",3,"datasheetLinkClicked","secondaryButtonClicked","modalOpened","id","imgSrc","imgAlt","title","showDatasheet","subTitle","showSecondaryButton","secondaryButtonLabel","secondaryButtonIcon","isNotInCatalog"],[1,"mt-1"],[1,"mt-2"],[1,"text-500"],[1,"flex","md:flex-wrap","md:justify-content-between","md:justify-content-center","gap-1"],[1,"mt-1",3,"height","width","hex"],[3,"visibleChange","header","modal","visible","draggable","resizable","dismissableMask"],[1,"mt-0","mb-0","pt-0"],[1,"mt-0","pt-0","pb-0"],[1,""],[1,"flex","flex-column-reverse","sm:flex-row","justify-content-end","row-gap-2"],["styleClass","sm:w-auto min-w-4rem ","data-test-id","jobProductGrid.specifiedProductDialogButton",3,"click","label"]],template:function(i,o){i&1&&u(0,On,12,19,"div",1)(1,wn,13,14,"div",2),i&2&&(c("ngIf",o.jobProducts),n(),c("translocoRead","JOB_PRODUCTS.SPECIFIED_JOB_PRODUCT_INFO_MODAL"))},dependencies:[xt,re,X,lt,So,F,Ft,Ae,vo,L,G,Ao],encapsulation:2})}}return t})();var Bn=(t,p)=>p.name;function Jn(t,p){t&1&&(a(0,"h5",12),_(1),d(2,"transloco"),r()),t&2&&(n(),D(m(2,1,"SHARED.SORTING.SORT_BY")))}function Rn(t,p){t&1&&ye(0)}function Nn(t,p){if(t&1&&(x(0,"p-divider"),u(1,Rn,1,0,"ng-container",13)),t&2){s(3);let e=ue(3);n(),c("ngTemplateOutlet",e)}}function jn(t,p){if(t&1){let e=y();a(0,"p-drawer",10),fe("visibleChange",function(o){f(e);let l=s(2);return be(l.toggleSortList,o)||(l.toggleSortList=o),C(o)}),u(1,Jn,3,3,"ng-template",null,1,te)(3,Nn,2,1,"ng-template",null,2,te),r(),a(5,"p-button",11),d(6,"transloco"),g("click",function(){f(e);let o=s(2);return C(o.toggleSortList=!0)}),r()}if(t&2){let e=s(2);_e("visible",e.toggleSortList),c("blockScroll",!0),n(5),T("label",m(6,4,"SHARED.SORTING.SORT_BY")),c("outlined",!0)}}function Ln(t,p){t&1&&ye(0)}function Fn(t,p){if(t&1&&(a(0,"p-accordion",7),d(1,"transloco"),a(2,"p-accordion-panel",14),d(3,"transloco"),a(4,"p-accordion-header"),_(5),d(6,"transloco"),r(),a(7,"p-accordion-content"),u(8,Ln,1,0,"ng-container",13),r()()()),t&2){s(2);let e=ue(3);c("value",0),ne("aria-label",m(1,6,"SHARED.SORTING.SORT_BY")),n(2),c("value",0),ne("aria-label",m(3,8,"SHARED.SORTING.SORT_BY")),n(3),D(m(6,10,"SHARED.SORTING.SORT_BY")),n(3),c("ngTemplateOutlet",e)}}function Vn(t,p){if(t&1){let e=y();a(0,"app-job-products-grid",15),d(1,"async"),d(2,"async"),g("searchResult",function(o){f(e);let l=s(2);return C(l.filterProducts(o))}),r()}if(t&2){let e=s(2);c("jobProducts",p)("jobDetails",e.jobDetails)("cart",m(1,4,e.cart$))("dataSheetsEnabled",m(2,6,e.dataSheetsEnabled$))}}function kn(t,p){if(t&1&&(a(0,"div",3)(1,"div",4)(2,"div",5),x(3,"app-product-categories",6),d(4,"async"),d(5,"async"),r(),a(6,"div",5),u(7,jn,7,6),d(8,"async"),u(9,Fn,9,12,"p-accordion",7),r()(),a(10,"div",8),u(11,Vn,3,8,"app-job-products-grid",9),d(12,"async"),r()()),t&2){let e,i=s();n(3),c("isSubCategories",m(4,5,i.isRootCategory$)===!1)("categories",m(5,7,i.categories$))("route",i.categoryPath),n(4),v(m(8,9,i.deviceService.isMobileView)?7:9),n(4),v((e=m(12,11,i.jobProducts$))?11:-1,e)}}function Mn(t,p){if(t&1){let e=y();a(0,"div",16)(1,"p-radioButton",17),g("onClick",function(){let o=f(e).$implicit,l=s(2);return C(l.onSortChange(o.key))}),fe("ngModelChange",function(o){f(e);let l=s(2);return be(l.selected,o)||(l.selected=o),C(o)}),r(),a(2,"label",18),_(3),d(4,"transloco"),r()()}if(t&2){let e=p.$implicit,i=s(2);n(),c("name",e.name)("inputId",e.id)("value",e.checked),_e("ngModel",i.selected),n(),c("for",e.id),n(),D(m(4,6,e.text))}}function $n(t,p){if(t&1&&Di(0,Mn,5,8,"div",16,Bn),t&2){let e=s();Ai(e.sortOptions)}}var Uo=(()=>{class t{#e;constructor(e,i,o,l,A){this.jobProductsStateService=e,this.route=i,this.cartService=o,this.configurationService=l,this.userService=A,this.deviceService=b(Ee),this.#e=b(ti),this.sortByDefaultKey="asc",this.toggleSortList=!1,this.appRoutesService=b(j),this.selected=!0,this.sortOptions=[{name:"sort-radio",id:"sort
1-radio-ascending",key:"asc",text:"SHARED.SORTING.ASCENDING",checked:!0},{name:"sort-radio",id:"sort-radio-descending",key:"desc",text:"SHARED.SORTING.DESCENDING"}]}ngOnInit(){this.dataSheetsEnabled$=this.configurationService.showDataSheetsFeatureFlag$;let e=this.appRoutesService.getPathByAppRouteFeatureModule(J.Job);this.categoryPath=`${e}/${this.jobKey}`,this.parentCategory$=this.jobProductsStateService.parentCategory$,this.isRootCategory$=this.jobProductsStateService.isRootCategory$,this.categories$=this.jobProductsStateService.categories$,this.jobProducts$=this.jobProductsStateService.jobProducts$.pipe(V(i=>{let o=Vo(i);this.#e.pushEcommerceTagToGtm(mt.ViewItemList,o)})),this.userService.isB2BUser()?this.cart$=this.cartService.getCartJob():this.mycart$=this.cartService.getMyCart(),this.categoriesAndProducts$=this.route.queryParams.pipe(w(i=>this.jobProductsStateService.loadCategoriesAndProducts(i.categoryKey,this.countryCode,this.jobKey)))}onSortChange(e){this.#e.onProductSortingGA(e===this.sortByDefaultKey?"A-Z":"Z-A"),this.jobProductsStateService.sortProducts(e)}filterProducts(e){this.jobProductsStateService.searchProducts(e)}static{this.\u0275fac=function(i){return new(i||t)(h(it),h(U),h(kt),h(H),h(We))}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-products"]],inputs:{countryCode:"countryCode",jobKey:"jobKey",jobDetails:"jobDetails"},standalone:!1,features:[Te([it])],decls:4,vars:3,consts:[["sortList",""],["header",""],["content",""],[1,"grid"],[1,"col-12","lg:col-3"],[1,"col-12"],[3,"isSubCategories","categories","route"],["expandIcon","''","collapseIcon","''",3,"value"],[1,"col-12","lg:col-9","mt-2"],[3,"jobProducts","jobDetails","cart","dataSheetsEnabled"],["position","bottom","styleClass","h-auto","aria-labelledby","drawerHeader",3,"visibleChange","visible","blockScroll"],["styleClass","font-bold w-full flex justify-content-between","icon","pi pi-chevron-down","iconPos","right","data-test-id","JobProduct.sortButton",3,"click","outlined","label"],["id","drawerHeader",1,"m-0","p-0","text-sm"],[4,"ngTemplateOutlet"],[3,"value"],[3,"searchResult","jobProducts","jobDetails","cart","dataSheetsEnabled"],[1,"field-checkbox"],["data-test-id","JobProduct.sortRadioButton",1,"mt-2","mr-2",3,"onClick","ngModelChange","name","inputId","value","ngModel"],[3,"for"]],template:function(i,o){i&1&&(u(0,kn,13,13,"div",3),d(1,"async"),u(2,$n,2,0,"ng-template",null,0,te)),i&2&&v(m(1,1,o.categoriesAndProducts$)?0:-1)},dependencies:[Et,le,wt,yo,F,$i,qi,Hi,Ki,Wi,Yi,zi,$o,L,G],encapsulation:2})}}return t})();var Hn=t=>[t],Kn=()=>({dateStyle:"medium"});function Wn(t,p){if(t&1&&(a(0,"a",9),_(1),d(2,"translocoDate"),r()),t&2){let e=p.row,i=s(2);St("routerLink","",i.onlineOrdersBasePath(),"/",e.orderNumber,""),n(),S(" ",k(2,4,e.createdAt,xe(7,Kn))," ")}}function qn(t,p){if(t&1){let e=y();a(0,"p-button",12),d(1,"translocoCurrency"),g("onClick",function(){f(e);let o=s().row,l=s(3);return C(l.viewInvoice(o.orderNumber,o.invoiceNumber))}),r()}if(t&2){let e=s().row;T("label",k(1,2,e.taxedPrice==null?null:e.taxedPrice.totalGross.amount,"symbol")),c("link",!0)}}function zn(t,p){if(t&1&&(_(0),d(1,"translocoCurrency")),t&2){let e=s().row;S(" ",k(1,1,e.taxedPrice==null?null:e.taxedPrice.totalGross.amount,"symbol")," ")}}function Yn(t,p){if(t&1&&u(0,qn,2,5,"p-button",11)(1,zn,2,4),t&2){let e=p.row,i=s(3);v(e.invoiceNumber!=null&&e.invoiceNumber!==""&&i.showInvoiceLink()?0:1)}}function Xn(t,p){t&1&&(a(0,"ppg-table-column",10),d(1,"transloco"),u(2,Yn,2,1,"ng-template",5),r()),t&2&&(T("title",m(1,2,"JOBS.ORDERS.TABLE_COLUMN.ORDER_TOTAL")),c("sortable",!1))}function Qn(t,p){if(t&1&&x(0,"ppg-order-status-column-data",14),t&2){let e=p.row;c("currentStatus",e.currentStatus)("currentStatusReason",e.currentStatusReason)}}function Zn(t,p){t&1&&(a(0,"ppg-table-column",13),d(1,"transloco"),u(2,Qn,1,2,"ng-template",5),r()),t&2&&(T("title",m(1,2,"JOBS.ORDERS.TABLE_COLUMN.ORDER_STATUS")),c("sortable",!1))}function er(t,p){if(t&1){let e=y();a(0,"ppg-table",1),d(1,"async"),d(2,"async"),d(3,"async"),g("pageSizeChange",function(o){f(e);let l=s();return C(l.pageSizeHandler(o))})("pageNumberChange",function(o){f(e);let l=s();return C(l.changePageHandler(o))})("sortChange",function(o){f(e);let l=s();return C(l.sortHandler(o))}),a(4,"ppg-table-header",2),d(5,"transloco"),g("searchChange",function(o){f(e);let l=s();return C(l.searchHandler(o))}),r(),x(6,"ppg-table-column",3),d(7,"transloco"),a(8,"ppg-table-column",4),d(9,"transloco"),u(10,Wn,3,8,"ng-template",5),r(),x(11,"ppg-table-column",6),d(12,"transloco"),u(13,Xn,3,4,"ppg-table-column",7)(14,Zn,3,4,"ppg-table-column",8),d(15,"async"),r()}if(t&2){let e=s();c("paginatorPhoneVersion",m(1,12,e.isSmallPhoneView$))("data",m(2,14,e.data$))("loading",m(3,16,e.loading$)),n(4),T("searchPlaceholder",m(5,18,"JOBS.ORDERS.SEARCH_PLACEHOLDER")),n(2),T("title",m(7,20,"JOBS.ORDERS.TABLE_COLUMN.ORDER_NUMBER")),c("sortable",!0),n(2),T("title",m(9,22,"JOBS.ORDERS.TABLE_COLUMN.ORDER_DATE")),c("sortable",!0),n(3),T("title",m(12,24,"JOBS.ORDERS.TABLE_COLUMN.PURCHASE_ORDER")),c("sortable",!0),n(2),c("ngxPermissionsOnly",P(28,Hn,e.permissions.VIEW_PRICES)),n(),c("ngIf",m(15,26,e.isShowOrderStatusEnabled$))}}var qo=(()=>{class t extends ot{#e;#t;#i;#o;#n;#a;#s;#r;#l;#c;#d;#p;constructor(e){super(e),this.tableDateFacade=e,this.#e=b(j),this.#t=b(de),this.#i=b(U),this.#o=b(M),this.#n=b(H),this.#a=b(Ut),this.#s=b(Ee),this.#r=b(Kt),this.#l=b(ze),this.#c=b(Oe),this.#d=b(mo),this.#p=b(oe),this.window=b(Ot),this.sendBackToProductsTabEvent=ne
1w Ct,this.onlineOrdersBasePath=B(()=>`${this.#e.getPathByAppRouteFeatureModule(J.Order)}/${Qt.OrdersOnline}`),this.permissions=E,this.isExportButtonDisable=!1,this.isShowOrderStatusEnabled$=this.#n.showOrderStatusFeatureFlag$,this.showInvoiceLink=Ce(Y([this.#o.hasPermission(E.VIEW_INVOICE),this.#n.onlineOrderInvoiceFeatureFlag$,this.#l.isMobileApplication()]).pipe(R(([i,o,l])=>i&&o&&!l))),this.subscription=new bt}ngOnInit(){this.#s.observePrimeNgBreakpoint(nt.Phone),this.subscription.add(this.#a.exportButtonStatus$.subscribe(i=>{i?.requestModel.exportType===ut.JOB&&(this.isExportButtonDisable=i.requestModel.isExportGoingOn)}));let{jobKey:e}=this.#i.snapshot.params;this.tableDataFacade.updateSource(i=>this.#o.canViewPrices().pipe(w(o=>this.#t.getJobOrders(i,e,o))))}ngOnDestroy(){this.subscription.unsubscribe()}viewInvoice(e,i){this.#r.getOnlineOrderInvoiceByKey(e,i).pipe(ae(this.#p)).subscribe(o=>{this.invoiceBlobUri=o?.data?.onlineOrderInvoice?.invoiceUrl,Yt(this.invoiceBlobUri)&&this.invoiceBlobUri!==""?this.window.open(this.invoiceBlobUri,"_blank"):this.#r.ShowUnexpectedDelayPopup(),this.#c.info("NOTIFICATION.INFO.INVOICE_MSG",null,"NOTIFICATION.INFO.INVOICE_TITLE"),this.#d.exportCustomerOrderHistoryGA(po.ViewInvoiceOnline,co.ViewInvoiceOnline)})}static{this.\u0275fac=function(i){return new(i||t)(h(Z))}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-online-orders"]],inputs:{jobName:"jobName",jobKey:"jobKey"},outputs:{sendBackToProductsTabEvent:"sendBackToProductsTabEvent"},standalone:!1,features:[Te([Z]),Me],decls:1,vars:1,consts:[["behavior","card-to-table",3,"paginatorPhoneVersion","data","loading","pageSizeChange","pageNumberChange","sortChange",4,"transloco","translocoRead"],["behavior","card-to-table",3,"pageSizeChange","pageNumberChange","sortChange","paginatorPhoneVersion","data","loading"],[3,"searchChange","searchPlaceholder"],["field","orderNumber",3,"title","sortable"],["field","createdAt",3,"title","sortable"],["appColumnTemplate",""],["field","purchaseOrder",3,"title","sortable"],["field","taxedPrice",3,"title","sortable",4,"ngxPermissionsOnly"],["field","orderStatus",3,"title","sortable",4,"ngIf"],["rel","noopener noreferrer",3,"routerLink"],["field","taxedPrice",3,"title","sortable"],["styleClass","border-noround","data-test-id","jobOnlineOrders.orderTotalLinkButton",3,"link","label"],["styleClass","border-noround","data-test-id","jobOnlineOrders.orderTotalLinkButton",3,"onClick","link","label"],["field","orderStatus",3,"title","sortable"],[3,"currentStatus","currentStatusReason"]],template:function(i,o){i&1&&u(0,er,16,30,"ppg-table",0),i&2&&c("translocoRead","ORDERS")},dependencies:[re,At,X,st,at,lt,pe,rt,go,F,L,G,jt,Lt],encapsulation:2})}}return t})();var oi=class{constructor(p,e,i,o,l,A,I,W,z){this.orderNumber=p,this.transactionNumber=e,this.invoiceNumber=i,this.orderDate=o,this.jobName=l,this.orderTotal=A,this.currencyCode=I,this.purchaseOrder=W,this.fulfillmentDateTime=z}};var ir=t=>[t],Ci=()=>({dateStyle:"medium"});function or(t,p){if(t&1&&_(0),t&2){let e=p.row;S(" ",e.orderNumber||e.transactionNumber," ")}}function nr(t,p){if(t&1&&(a(0,"a",9),_(1),d(2,"translocoDate"),r()),t&2){let e=s().row,i=s(2);St("routerLink","",i.storeOrdersBasePath(),"/",e.transactionNumber,""),n(),S(" ",k(2,4,e.orderDate,xe(7,Ci))," ")}}function rr(t,p){if(t&1&&(_(0),d(1,"translocoDate")),t&2){let e=s().row;S(" ",k(1,1,e.orderDate,xe(4,Ci))," ")}}function ar(t,p){if(t&1&&u(0,nr,3,8,"a",9)(1,rr,2,5),t&2){let e=p.row;v(e!=null&&e.orderNumber||e!=null&&e.transactionNumber?0:1)}}function sr(t,p){if(t&1&&x(0,"ppg-table-column",6),t&2){let e=s().$implicit;T("title",e("TABLE_COLUMN.JOB_NAME")),c("sortable",!1)}}function lr(t,p){if(t&1){let e=y();a(0,"p-button",12),d(1,"translocoCurrency"),g("onClick",function(){f(e);let o=s().row,l=s(3);return C(l.viewInvoice(o.orderNumber,o.invoiceNumber))}),r()}if(t&2){let e=s().row;T("label",k(1,2,e.orderTotal,"symbol")),c("link",!0)}}function pr(t,p){if(t&1&&(_(0),d(1,"translocoCurrency")),t&2){let e=s().row;S(" ",k(1,1,e.orderTotal,"symbol")," ")}}function cr(t,p){if(t&1&&u(0,lr,2,5,"p-button",11)(1,pr,2,4),t&2){let e=p.row,i=s(3);v(e.invoiceNumber!=null&&e.invoiceNumber!==""&&i.showInvoiceLink()?0:1)}}function dr(t,p){if(t&1&&(a(0,"ppg-table-column",10),u(1,cr,2,1,"ng-template",3),r()),t&2){let e=s().$implicit;T("title",e("TABLE_COLUMN.ORDER_TOTAL")),c("sortable",!1)}}function mr(t,p){if(t&1&&(_(0),d(1,"translocoDate")),t&2){let e=p.row;S(" ",k(1,1,e.fulfillmentDateTime,xe(4,Ci))," ")}}function ur(t,p){if(t&1){let e=y();a(0,"ppg-table",1),d(1,"async"),d(2,"async"),d(3,"async"),g("pageSizeChange",function(o){f(e);let l=s();return C(l.pageSizeHandler(o))})("pageNumberChange",function(o){f(e);let l=s();return C(l.changePageHandler(o))}),a(4,"ppg-table-column",2),u(5,or,1,1,"ng-template",3),r(),a(6,"ppg-table-column",4),u(7,ar,2,1,"ng-template",3),r(),x(8,"ppg-table-column",5),u(9,sr,1,2,"ppg-table-column",6)(10,dr,2,2,"ppg-table-column",7),a(11,"ppg-table-column",8),u(12,mr,2,5,"ng-template",3),r()()}if(t&2){let e=p.$implicit,i=s();c("paginatorPhoneVersion",m(1,13,i.isSmallPhoneView$))("data",m(2,15,i.data$))("loading",m(3,17,i.loading$)),n(4),T("title",e("TABLE_COLUMN.ORDER_NUMBER")),c("sortable",!1),n(2),T("title",e("TABLE_COLUMN.ORDER_DATE")),c("sortable",!1),n(2),T("title",e("TABLE_COLUMN.PO_NUMBER")),c("sortable",!1),n(),v(i.hideJobName()?-1:9),n(),c("ngxPermissionsOnly",P(19,ir,i.permissions.VIEW_PRICES)),n(),T("title",e("TABLE_COLUMN.FULFILLMENT_DATETIME")),c("sortable",!1)}}var zo=(()=>{class t extends ot{#e;#t;#i;#o;#n;#a;#s;#r;#l;#c;#d;#p;#m;constructor(e){super(e),this.tableDateFacade=e,this.#e=b(j),this.#t=b(Kt),this.#i=b(Jo),this.#o=b(U),this.#n=b(Nt),this.#a=b(Gi),this.#s=b(H),this.#r=b(It),this.#l=b(M),this.#c=b(Ee),this.#d=b(ze),this.#p=b(oe),this.#m=b(Jt),this.permissions=E,this.window=b(Ot),this.storeOrdersBasePath=B(()=>`${this.#e.getPathByAppRouteFeatureModule(J.Order)}/${Qt.OrdersStore}`),this.showInvoiceLink=Ce(Y([this.#l.hasPermission(E.VIEW_INVOICE),this.#s.inStoreOrderInvoiceFeatureFlag$,this.#d.isMobileApplication()]).pipe(R(([i,o,l])=>i&&o&&!l))),this.hideJobName=B(()=>this.#r.eCommerceECommerceAllOrderHistoryHideJobNameEnabled())}ngOnInit(){this.isSmallPhoneView$=this.#c.observePrimeNgBreakpoint(nt.Phone);let{jobKey:e}=this.#o.snapshot.params,o=this.#n.getUserInfo().pipe(R(A=>A.permissions.includes(this.permissions.VIEW_PRICES))),l=this.#m.countryCode$.pipe(Se(A=>!!A),R(A=>this.#a.getMarket(A)),R(A=>A.key));this.tableDataFacade.updateSource(A=>Y([o,l]).pipe(w(([I,W])=>this.#i.getStoreOrders(A.pageSize,A.pageNumber*A.pageSize,e,I,W)),R(I=>this.mapToTableRow(I?.storeOrders,A))))}
1mapToTableRow(e,i){return e?{items:e.items.map(l=>new oi(l.orderNumber,l.transactionNumber,l.invoiceNumber,l.orderDate,l.jobName??"-",l.totalPrice?.amount,l.totalPrice?.currencyCode,l.purchaseOrder??"-",l.fulfillmentDateTime)),pageNumber:i.pageNumber,pageSize:i.pageSize,pagesCount:Math.ceil(e.totalCount/i.pageSize),totalItemsCount:e.totalCount}:{items:[],pageNumber:0,pageSize:0,pagesCount:0,totalItemsCount:0}}viewInvoice(e,i){this.#t.getStoreOrderInvoiceByKey(e,i).pipe(ae(this.#p)).subscribe(o=>{this.invoiceBlobUri=o?.data?.storeOrderInvoice?.invoiceUrl,Yt(this.invoiceBlobUri)&&this.invoiceBlobUri!==""?this.window.open(this.invoiceBlobUri,"_blank"):this.#t.ShowUnexpectedDelayPopup()})}static{this.\u0275fac=function(i){return new(i||t)(h(Z))}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-store-orders"]],standalone:!1,features:[Te([Z]),Me],decls:1,vars:1,consts:[["behavior","card-to-table",3,"paginatorPhoneVersion","data","loading","pageSizeChange","pageNumberChange",4,"transloco","translocoRead"],["behavior","card-to-table",3,"pageSizeChange","pageNumberChange","paginatorPhoneVersion","data","loading"],["field","orderNumber",3,"title","sortable"],["appColumnTemplate",""],["field","orderDate",3,"title","sortable"],["field","purchaseOrder",3,"title","sortable"],["field","jobName",3,"title","sortable"],["field","orderTotal",3,"title","sortable",4,"ngxPermissionsOnly"],["field","fulfillmentDateTime",3,"title","sortable"],["rel","noopener noreferrer","data-test-id","jobStoreOrders.orderDateLink",1,"p-button","p-button-link","border-noround","align-self-start",3,"routerLink"],["field","orderTotal",3,"title","sortable"],["styleClass","border-noround","data-test-id","jobStoreOrders.orderTotalLinkButton",3,"link","label"],["styleClass","border-noround","data-test-id","jobStoreOrders.orderTotalLinkButton",3,"onClick","link","label"]],template:function(i,o){i&1&&u(0,ur,13,21,"ppg-table",0),i&2&&c("translocoRead","ORDERS")},dependencies:[At,X,st,at,pe,rt,F,L,jt,Lt],encapsulation:2})}}return t})();function br(t,p){if(t&1){let e=y();a(0,"div")(1,"p-button",5),d(2,"transloco"),g("onClick",function(){f(e);let o=s(2);return C(o.openExportOrderDialog())}),r()()}if(t&2){let e=s(2);n(),c("label",m(2,4,"ORDERS.EXPORT_ORDER_HISTORY"))("outlined",!0)("icon","pi pi-file-import")("disabled",e.isExportButtonDisable)}}function fr(t,p){if(t&1&&x(0,"app-job-online-orders",0),t&2){let e=s(2);
1c("jobName",e.jobName)("jobKey",e.jobKey)}}function Cr(t,p){t&1&&x(0,"app-job-store-orders")}function hr(t,p){if(t&1){let e=y();a(0,"div",1)(1,"p-selectButton",2),fe("ngModelChange",function(o){f(e);let l=s();return be(l.selectedHistoryButton,o)||(l.selectedHistoryButton=o),C(o)}),g("onChange",function(o){f(e);let l=s();return C(l.orderHistoryOptionChanged(o))}),r(),a(2,"div",3),u(3,br,3,6,"div",4),d(4,"async"),d(5,"async"),r()(),a(6,"div"),u(7,fr,1,2,"app-job-online-orders",0)(8,Cr,1,0,"app-job-store-orders"),r()}if(t&2){let e=s();n(),c("options",e.orderHistoryOptions),_e("ngModel",e.selectedHistoryButton),n(2),c("ngIf",m(4,4,e.hasViewExportOrderHistoryPermission$)&&m(5,6,e.isMobileApp$)===!1&&e.isOnlineOrderTab===!0),n(4),v(e.isOnlineOrderTab?7:8)}}function vr(t,p){if(t&1&&x(0,"app-job-online-orders",0),t&2){let e=s();c("jobName",e.jobName)("jobKey",e.jobKey)}}var Yo=(()=>{class t{constructor(){this.permissions=E,this.isExportButtonDisable=!1,this.subscription=new bt,this.orderHistoryOptions=[{label:O("ORDERS.ORDERS"),value:O("ORDERS.ORDERS")},{label:O("ORDERS.STORE_ORDERS"),value:O("ORDERS.STORE_ORDERS")}],this.#e=b(M),this.#t=b(H),this.#i=b(ze),this.#o=b(Ut),this.#n=b(De),this.#a=b(qe),this.#s=b(oe),this.#r=b(pt)}#e;#t;#i;#o;#n;#a;#s;#r;ngOnInit(){this.#a.langChanges$.pipe(w(()=>this.#a.selectTranslate("")),ae(this.#s)).subscribe(()=>{this.updateOrderHistoryOptions()}),this.selectedHistoryButton=O("ORDERS.ORDERS"),this.subscription.add(this.#o.exportButtonStatus$.subscribe(e=>{e?.requestModel.exportType===ut.JOB&&(this.isExportButtonDisable=e.requestModel.isExportGoingOn)})),this.storeOrdersEnabled$=this.#t.canShowStoreOrdersFeatureFlag$,this.isOnlineOrderTab=!0,this.hasViewStoreOrderDetailsPermission$=this.#e.hasPermission(this.permissions.VIEW_STORE_ORDER_DETAILS),this.hasViewExportOrderHistoryPermission$=this.#e.hasPermission(this.permissions.VIEW_EXPORT_ORDER_HISTORY),this.isMobileApp$=this.#i.isMobileApplication()}ngOnChanges(){this.selectedHistoryButton=O("ORDERS.ORDERS"),this.isOnlineOrderTab=!0}orderHistoryOptionChanged(e){this.isOnlineOrderTab=e.value?e.value===O("ORDERS.ORDERS"):this.isOnlineOrderTab}updateOrderHistoryOptions(){this.orderHistoryOptions=[{label:O("ORDERS.ORDERS"),value:O("ORDERS.ORDERS")},{label:O("ORDERS.STORE_ORDERS"),value:O("ORDERS.STORE_ORDERS")}],this.isOnlineOrderTab?this.selectedHistoryButton=O("ORDERS.ORDERS"):this.selectedHistoryButton=O("ORDERS.STORE_ORDERS")}openExportOrderDialog(){this.#r.openExportOrderDialogGA(this.jobName),this.#n.open(zt,{header:O("JOBS.EXPORT_MODAL.TAB_TITLE"),width:K.Medium,data:{key:this.jobKey,name:this.jobName,exportModuleType:ut.JOB},closable:!0})}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-orders"]],inputs:{jobKey:"jobKey",jobName:"jobName",activeTab:"activeTab"},standalone:!1,features:[Ei],decls:4,vars:5,consts:[[3,"jobName","jobKey"],[1,"flex","justify-content-between","flex-column","sm:flex-row","gap-4","mb-4"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","options","ngModel"],[1,"flex","align-items-center","gap-2"],[4,"ngIf"],["styleClass","w-full md:w-max font-bold","iconPos","right","data-test-id","JobOrders.ExportButton",1,"w-full","md:w-max",3,"onClick","label","outlined","icon","disabled"]],template:function(i,o){i&1&&(u(0,hr,9,8),d(1,"async"),d(2,"async"),u(3,vr,1,2,"app-job-online-orders",0)),i&2&&v(m(1,1,o.storeOrdersEnabled$)&&m(2,3,o.hasViewStoreOrderDetailsPermission$)?0:3)},dependencies:[re,le,wt,F,Qi,qo,zo,L,G],encapsulation:2})}}return t})();var Xo=t=>({salesRep:t}),Er=(t,p)=>[t,p],Qo=t=>({deliveryAddress:t});function Dr(t,p){if(t&1&&x(0,"ppg-cdp-breadcrumbs",24),t&2){let e=s(2);c("model",e.breadcrumbs)}}function Ar(t,p){t&1&&(a(0,"p-tab",8),_(1),d(2,"transloco"),r()),t&2&&(n(),D(m(2,1,"JOBS.PRODUCTS.TAB_TITLE")))}function Or(t,p){if(t&1&&(a(0,"p-tabpanel",11),x(1,"app-job-products",25),r()),t&2){let e=s();n(),c("countryCode",e==null||e.country==null?null:e.country.code)("jobDetails",e)("jobKey",e.key)}}function Ir(t,p){if(t&1){let e=y();a(0,"p-button",31),d(1,"transloco"),g("onClick",function(){f(e);let o=s(4);return C(o.edit())}),r()}t&2&&(T("label",m(1,2,"JOBS.EDIT_JOB")),c("outlined",!0))}function wr(t,p){if(t&1){let e=y();a(0,"p-button",32),d(1,"transloco"),g("onClick",function(){f(e);let o=s(4);return C(o.deactivate())}),r()}t&2&&(T("label",m(1,2,"JOBS.DEACTIVATE_JOB")),c("outlined",!0))}function Pr(t,p){if(t&1){let e=y();a(0,"p-button",34),d(1,"transloco"),g("onClick",function(){f(e);let o=s(3),l=s(2);return C(l.requestAccess(o))}),r()}t&2&&(T("label",m(1,2,"JOBS.REQUEST_ACCESS")),c("outlined",!0))}function Br(t,p){t&1&&(_(0),d(1,"transloco")),t&2&&S(" ",m(1,1,"JOBS.REQUEST_SENT")," ")}function Jr(t,p){if(t&1&&u(0,Pr,2,4,"p-button",33)(1,Br,2,3),t&2){let e=s(2);v(e.requestAccess.disabled?1:0)}}function Rr(t,p){if(t&1&&(Je(0),a(1,"div",27)(2,"div",28),u(3,Ir,2,4,"p-button",29),r(),a(4,"div",28),u(5,wr,2,4,"p-button",30),r(),a(6,"div",28),u(7,Jr,2,1),r()(),Re()),t&2){let e=s();n(3),v(e.edit.visible?3:-1),n(2),v(e.deactivate.visible?5:-1),n(2),v(e.requestAccess.visible?7:-1)}}function Nr(t,p){if(t&1&&(a(0,"div",18),u(1,Rr,8,3,"ng-container",26),r()),t&2){let e=s(2);n(),c("ngxPermissionsOnly",yt(1,Er,e.permissions.MANAGE_JOBS,e.permissions.MANAGE_ALL_JOBS))}}function jr(t,p){if(t&1){let e=y();a(0,"p-button",46),d(1,"transloco"),g("onClick",function(o){f(e);let l=s(3);return l.showAllFContacts=!l.showAllFContacts,C(o.preventDefault())}),r()}if(t&2){let e=s(3);T("label",m(1,2,"SHARED.BUTTON."+(e.showAllFContacts?"SHOW_LESS":"SHOW_ALL"))),c("outlined",!0)}}function Lr(t,p){if(t&1){let e=y();a(0,"p-button",55),d(1,"transloco"),g("onClick",function(){f(e);let o=s().$implicit,l=s(3);return C(l.openEditFulfillmentContactDialog(o))}),a(2,"span",56),_(3),d(4,"transloco"),r()()}t&2&&(c("text",!0),ne("aria-label",m(1,3,"SHARED.BUTTON.EDIT")),n(3),D(m(4,5,"SHARED.BUTTON.EDIT")))}function Fr(t,p){if(t&1){let e=y();a(0,"p-button",57),d(1,"transloco"),g("onClick",function(){f(e);let o=s().$implicit,l=s(3);return C(l.deleteFulfillmentContact(o))}),a(2,"span",56),_(3),d(4,"transloco"),r()()}t&2&&(c("text",!0),ne("aria-label",m(1,3,"SHARED.BUTTON.DELETE")),n(3),D(m(4,5,"SHARED.BUTTON.DELETE")))}function Vr(t,p){if(t&1&&(Je(0),a(1,"div",38)(2,"div",39)(3,"p-card",40)(4,"div",15)(5,"div",47)(6,"div",48)(7,"h5",49,1),_(9),r()(),a(10,"div",50),_(11),d(12,"mask"),r(),a(13,"a",51),_(14),r()(),a(15,"div",52),u(16,Lr,5,7,"p-button",53),r(),a(17,"div",52),u(18,Fr,5,7,"p-button",54),r()()()()(),Re()),t&2){let e=p.$implicit,i=ue(8),o=s(),l=s(2);n(7),c("pTooltip",e.name)("tooltipDisabled",i.offsetWidth>=i.scrollWidth),n(2),S(" ",e.name," "),n(2),S(" ",k(12,9,e.phoneNumber,l.MASKS.PHONE_NUMBER)," "),n(2),gt("href","mailto:",e.email,"",ht),n(),S(" ",e.email," "),n(2),v(o.edit.visible?16:-1),n(2),v(o.delete.visible?18:-1)}}function kr(t,p){if(t&1){let e=y();a(0,"p-button",58),d(1,"transloco"),g("onClick",function(){f(e);let o=s(3);return C(o.openAddFulfillmentContactDialog())}),r()}t&2&&(T("label",m(1,2,"JOBS.DETAILS.ADD_FULFILLMENT_CONTACT")),c("outlined",!0))}function Mr(t,p){if(t&1&&(a(0,"div",35)(1,"h2",36),_(2),d(3,"transloco"),r(),a(4,"div",28),u(5,jr,2,4,"p-button",37),r()(),a(6,"div",15)(7,"div",38)(8,"div",39)(9,"p-card",40)(10,"h5",41),_(11),r(),a(12,"div",42),_(13),r(),x(14,"p-tag",43),d(15,"transloco"),r()()(),u(16,Vr,19,12,"ng-container",44),d(17,"slice"),r(),u(18,kr,2,4,"p-button",45)),t&2){let e=s(),i=s();n(2),S(" ",m(3,8,"JOBS.DETAILS.FULFILLMENT_CONTACTS")," "),n(3),v(i.fulfillmentContacts.length>i.SHOW_DEFAULT_FCONTACTS_AMOUNT?5:-1),n(6),dt(" ",e.pointOfContact.firstName," ",e.pointOfContact.lastName," "),n(2),S(" ",e.pointOfContact.phoneNumber," "),n(),T("value",m(15,10,"JOBS.DETAILS.DEFAULT_FULFILLMENT_CONTACT")),n(2),c("ngForOf",Tt(17,12,i.fulfillmentContacts,0,i.showAllFContacts?i.fulfillmentContacts.length:i.SHOW_DEFAULT_FCONTACTS_AMOUNT)),n(2),v(p.add.visible?18:-1)}}function $r(t,p){t&1&&ye(0)}function Ur(t,p){t&1&&ye(0)}function Gr(t,p){if(t&1&&u(0,Ur,1,0,"ng-container",22),t&2){let e=s(),i=ue(40);c("ngTemplateOutlet",i)("ngTemplateOutletContext",P(2,Xo,e.secondarySalesRep))}}function Hr(t,p){if(t&1&&(a(0,"div",38)(1,"div",39)(2,"p-card",40)(3,"h5",59),_(4),r(),a(5,"div",60),_(6),r(),a(7,"div",61)(8,"a",62),_(9),r()()()()()),t&2){let e=p.salesRep;n(4),dt(" ",e.firstName," ",e.lastName," "),n(2),S(" ",e.phoneNumber," "),n(2),gt("href","mailto:",e.email,"",ht),n(),D(e.email)}}function Kr(t,p){if(t&1){let e=y();a(0,"p-button",67),d(1,"transloco"),g("onClick",function(){f(e);let o=s(4);return C(o.showDeliveryAddress=!o.showDeliveryAddress)}),r()}if(t&2){let e=s(4);T("label",m(1,2,"SHARED.BUTTON."+(e.showDeliveryAddress?"SHOW_LESS":"SHOW_ALL"))),c("outlined",!0)}}function Wr(t,p){t&1&&ye(0)}function qr(t,p){if(t&1&&(Je(0),u(1,Wr,1,0,"ng-container",22),Re()),t&2){let e=p.$implicit;s();let i=ue(12);n(),c("ngTemplateOutlet",i)("ngTemplateOutletContext",P(2,Qo,e))}}function zr(t,p){t&1&&ye(0)}function Yr(t,p){if(t&1&&(Je(0),u(1,zr,1,0,"ng-container",22),Re()),t&2){let e=p.$implicit;s(2);let i=ue(12);n(),c("ngTemplateOutlet",i)("ngTemplateOutletContext",P(2,Qo,e))}}function Xr(t,p){if(t&1&&(u(0,Yr,2,4,"ng-container",44),d(1,"slice")),t&2){let e=s(4);c("ngForOf",Tt(1,1,e.deliveryAddresses,e.displayedDeliveryAddress,e.deliveryAddresses.length))}}function Qr(t,p){if(t&1){let e=y();a(0,"div",52)(1,"p-button",74),d(2,"transloco"),g("onClick",function(){f(e);let o=s(2).deliveryAddress,l=s(4);return C(l.editDeliveryLocation(o))}),a(3,"span",56),_(4),d(5,"transloco"),r()()()}t&2&&(n(),c("text",!0),ne("aria-label",m(2,3,"SHARED.BUTTON.EDIT")),n(3),D(m(5,5,"SHARED.BUTTON.EDIT")))}function Zr(t,p){if(t&1){let e=y();a(0,"div",52)(1,"p-button",75),d(2,"transloco"),g("onClick",function(){f(e);let o=s(2).deliveryAddress,l=s(4);return C(l.deleteDeliveryLocation(o))}),a(3,"span",56),_(4),d(5,"transloco"),r()()()}t&2&&(n(),c("text",!0),ne("aria-label",m(2,3,"SHARED.BUTTON.DELETE")),n(3),D(m(5,5,"SHARED.BUTTON.DELETE")))}function ea(t,p){if(t&1&&u(0,Qr,6,7,"div",52)(1,Zr,6,7,"div",52),t&2){let e=s(2);v(e.edit.visible?0:-1),n(),v(e.delete.visible?1:-1)}}function ta(t,p){t&1&&(x(0,"p-tag",73),d(1,"transloco")),t&2&&T("value",m(1,1,"JOBS.DETAILS.DEFAULT_DELIVERY_LOCATION"))}function ia(t,p){if(t&1&&(a(0,"div",38)(1,"div",39)(2,"p-card",40)(3,"div",15)(4,"div",47)(5,"h5",68),_(6),r(),a(7,"div")(8,"div",69),_(9),r(),a(10,"div",70),_(11),r(),a(12,"div",71),_(13),r(),a(14,"div",72),_(15),r()()(),u(16,ea,2,2),r(),u(17,ta,2,3,"p-tag",73),r()()()),t&2){let e=p.deliveryAddress;n(6),S(" ",e.address1," "),n(3),S(" ",e.address2," "),n(2),S(" ",e.city," "),n(2),S(" ",e==null||e.state==null?null:e.state.name," "),n(2),S(" ",e.postcode," "),n(),v(e.isPrimaryDeliveryAddress?-1:16),n(),v(e.isPrimaryDeliveryAddress?17:-1)}}function oa(t,p){if(t&1){let e=y();a(0,"p-button",76),d(1,"transloco"),g("onClick",function(){f(e);let o=s(4);return C(o.addDeliveryLocation())}),r()}t&2&&(T("label",m(1,2,"JOBS.DETAILS.ADD_DELIVERY_LOCATION")),c("outlined",!0))}function na(t,p){if(t&1&&(a(0,"div",63)(1,"div",64)(2,"h2"),_(3),d(4,"transloco"),r()(),a(5,"div",28),u(6,Kr,2,4,"p-button",65),r()(),a(7,"div",15),u(8,qr,2,4,"ng-container",44),d(9,"slice"),u(10,Xr,2,5,"ng-container")(11,ia,18,7,"ng-template",null,2,te)(13,oa,2,4,"p-button",66),r()),t&2){let e=s(3);n(3),D(m(4,5,"JOBS.DETAILS.DELIVERY_LOCATION")),n(3),v(e.deliveryAddresses.length>
1e.displayedDeliveryAddress?6:-1),n(2),c("ngForOf",Tt(9,7,e.deliveryAddresses,0,e.displayedDeliveryAddress)),n(2),v(e.showDeliveryAddress?10:-1),n(3),v(p.add.visible?13:-1)}}function ra(t,p){if(t&1&&(a(0,"div",23),u(1,na,14,11),d(2,"async"),r()),t&2){let e,i=s(2);n(),v((e=m(2,1,i.deliveryAddressActions$))?1:-1,e)}}function aa(t,p){if(t&1&&(a(0,"h2",77),_(1),d(2,"transloco"),r(),a(3,"div",21)(4,"div",38)(5,"div",39)(6,"p-card",40)(7,"h5",78),_(8),r(),a(9,"div",79),_(10),r(),a(11,"div",80),_(12),r(),a(13,"div",81),_(14),r(),a(15,"div",82),_(16),r(),a(17,"div",83),_(18),r(),a(19,"div",23)(20,"a",84),_(21),r()()()()()()),t&2){let e=s();n(),D(m(2,10,"JOBS.DETAILS.PRIMARY_STORE")),n(7),S(" ",e.pickupAddressDetails.name," "),n(2),S(" ",e.pickupAddressDetails.address1," "),n(2),S(" ",e.pickupAddressDetails.address2," "),n(2),S(" ",e.pickupAddressDetails.city," "),n(2),S(" ",e.pickupAddressDetails.state," "),n(2),S(" ",e.pickupAddressDetails.postcode," "),n(2),gt("href","mailto:",e.pickupAddressDetails==null?null:e.pickupAddressDetails.email,"",ht),n(),S(" ",e.pickupAddressDetails==null?null:e.pickupAddressDetails.email," ")}}function sa(t,p){if(t&1){let e=y();a(0,"div",3),u(1,Dr,1,1,"ppg-cdp-breadcrumbs",4),a(2,"h2",5),_(3),d(4,"transloco"),r(),a(5,"h1",6),_(6),r(),a(7,"p-tabs",7),g("valueChange",function(o){f(e);let l=s();return C(l.tabViewChange(o))}),a(8,"p-tablist"),u(9,Ar,3,3,"p-tab",8),a(10,"p-tab",9),_(11),d(12,"transloco"),r(),a(13,"p-tab",10),_(14),d(15,"transloco"),r()(),a(16,"p-tabpanels"),u(17,Or,2,3,"p-tabpanel",11),a(18,"p-tabpanel",12),x(19,"app-job-orders",13),r(),a(20,"p-tabpanel",14)(21,"div",15)(22,"div",16)(23,"span",17),_(24),d(25,"transloco"),r(),a(26,"h5"),_(27),r()(),u(28,Nr,2,4,"div",18),d(29,"async"),r(),u(30,Mr,19,16),d(31,"async"),a(32,"div",19)(33,"h2",20),_(34),d(35,"transloco"),r(),a(36,"div",21),u(37,$r,1,0,"ng-container",22)(38,Gr,1,4,"ng-container")(39,Hr,10,6,"ng-template",null,0,te),r()(),u(41,ra,3,3,"div",23),d(42,"async"),a(43,"div",19),u(44,aa,22,12),r()()()()()}
1if(t&2){let e,i,o,l=p,A=ue(40),I=s();n(3),D(m(4,21,"JOBS.DETAILS.KICKER")),n(3),D(l.name),n(),c("value",I.activeTabValue)("scrollable",!0),n(2),v(I.showProductsTab?9:-1),n(2),D(m(12,23,"JOBS.ORDERS.TAB_TITLE")),n(3),D(m(15,25,"JOBS.DETAILS.TAB_TITLE")),n(3),v(I.showProductsTab?17:-1),n(2),c("activeTab",I.activeTabName)("jobKey",I.jobKey)("jobName",I.jobName),n(5),S(" ",m(25,27,"JOBS.DETAILS.ACCOUNT_NUMBER"),""),n(3),D(l.accountNumber),n(),v((e=m(29,29,I.jobActions$))?28:-1,e),n(2),v((i=m(31,31,I.jobContactActions$))?30:-1,i),n(4),D(m(35,33,"JOBS.DETAILS.SALES_REPS")),n(3),c("ngTemplateOutlet",A)("ngTemplateOutletContext",P(37,Xo,l.salesRep)),n(),v(l.secondarySalesRep?38:-1),n(3),v((o=m(42,35,I.country$))?41:-1,o),n(3),v(l.pickupAddressDetails?44:-1)}}var Zo=(()=>{class t{#e;#t;#i;#o;#n;constructor(e,i,o,l,A,I,W,z,ai){this.route=e,this.jobsService=i,this.router=o,this.location=l,this.permissionsService=A,this.translocoService=I,this.jobActionPermissionsService=W,this.addressService=z,this.countryStore=ai,this.permissions=E,this.showAllFContacts=!1,this.showDeliveryAddress=!1,this.SHOW_DEFAULT_FCONTACTS_AMOUNT=3,this.MASKS=Co,this.displayedDeliveryAddress=4,this.navigateBackToProductTab=!0,this.breadcrumbs=[],this.currentJobDetails=null,this.destroy$=new ft,this.activeTab$=new vi(""),this.#e=b(De),this.#t=b(pt),this.#i=b(j),this.#o=b(It),this.#n=b(Oe),this.jobsPath=B(()=>this.#i.getPathByAppRouteFeatureModule(J.Job)),this.customerUrl=B(()=>this.#i.getPathByAppRouteFeatureModule(J.Customer)),this.actionType=he}
1ngOnInit(){this.showProductsTab=Ii(()=>!this.#o.eCommerceJobsHideProducts()),this.activeTabValue=this.showProductsTab?"products":"orders",this.locationSubscription=this.location.subscribe(()=>{this.navigateBackToProductTab===!0&&this.activeTab$.value!==O("JOBS.PRODUCTS.TAB_TITLE")&&this.activeTab$.next(O("JOBS.PRODUCTS.TAB_TITLE"))}),this.translateTabLabels(),this.subscribeToActiveTab(),this.jobKey=this.route.snapshot.params.jobKey,this.jobDetails$=Y([this.permissionsService.hasPermission(this.permissions.MANAGE_JOBS),this.permissionsService.hasPermission(this.permissions.MANAGE_ALL_JOBS)]).pipe(w(([i,o])=>this.jobsService.getJobDetails(this.jobKey,i||o)),w(i=>i?si(i):(this.#n.error("NOTIFICATION.FAILURE.NOT_FOUND"),this.router.navigateByUrl(this.jobsPath()),gi)),V(i=>{this.customerKey=i.customerKey,this.jobName=i.name,this.fulfillmentContacts=i.fulfillmentContacts,this.deliveryAddresses=i.deliveryAddresses,this.currentJobDetails=i,this.updateBreadcrumbs()}),Fe(1)),this.jobContactActions$=this.jobDetails$.pipe(w(i=>this.jobActionPermissionsService.getJobContactActions(i))),this.jobActions$=this.jobDetails$.pipe(w(i=>this.jobActionPermissionsService.getJobActions(i))),this.deliveryAddressActions$=this.jobDetails$.pipe(w(i=>this.jobActionPermissionsService.getDeliveryAddressActions(i)));let e=O("JOBS.PRODUCTS.TAB_TITLE");this.activeTab$.next(e),this.country$=Y([this.countryStore.countries$,this.jobDetails$]).pipe(R(([i,o])=>i?.find(l=>l.code===o?.country?.code)))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete(),this.locationSubscription.unsubscribe()}edit(){this.router.navigate([`${this.customerUrl()}/${this.customerKey}/${_t.CustomerDetailsJobs}/${this.jobKey}/${this.actionType.EDIT}`],{queryParams:{step:1}})}deactivate(){this.navigateBackToProductTab=!1,this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"JOBS.DEACTIVATION_MODAL"},closable:!0}).onClose.pipe(ee(1),Se(Boolean),w(()=>this.jobsService.deactivateJob(this.jobKey)),V(()=>{this.navigateBackToProductTab=!0,this.location.back()})).subscribe()}requestAccess(e){this.jobsService.requestJobSalesRepAssignment(this.jobKey,this.jobName).pipe(V(()=>e.requestAccess.disabled=!0),V(()=>this.#t.pushRequestAccessGTMTag())).subscribe()}deleteFulfillmentContact(e){let i=()=>{this.fulfillmentContacts=this.fulfillmentContacts.filter(o=>o.key!==e.key)};this.navigateBackToProductTab=!1,this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"FULFILLMENT_CONTACT.DELETE_MODAL"},closable:!0}).onClose.pipe(ee(1),Se(Boolean),w(()=>this.jobsService.deleteFulfillmentContact(e.key)),V(i),V(()=>{this.#t.deleteFulfillmentContactGA()})).subscribe()}openEditFulfillmentContactDialog(e){this.navigateBackToProductTab=!1,this.router.navigate([`${this.jobsPath()}/${this.jobKey}/${me.FulfillmentContact}/${e.key}/${this.actionType.EDIT}`])}openAddFulfillmentContactDialog(){this.navigateBackToProductTab=!1,this.router.navigate([`${this.jobsPath()}/${this.jobKey}/${me.FulfillmentContact}/${this.actionType.ADD}`])}editDeliveryLocation(e){this.navigateBackToProductTab=!1,this.router.navigate([`${this.jobsPath()}/${this.jobKey}/${me.DeliveryLocation}/${e.key}/${this.actionType.EDIT}`])}addDeliveryLocation(){this.navigateBackToProductTab=!1,this.router.navigate([`${this.jobsPath()}/${this.jobKey}/${me.DeliveryLocation}/${this.actionType.ADD}`])}deleteDeliveryLocation(e){this.navigateBackToProductTab=!1;let i=()=>{this.deliveryAddresses=this.deliveryAddresses.filter(o=>o.key!==e.key)};this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"ORDERS.DELIVERY_LOCATION.DELETE_MODAL"},closable:!0}).onClose.pipe(ee(1),Se(Boolean),w(()=>this.addressService.deleteAddress(e.key)),V(i)).subscribe()}tabViewChange(e){this.activeTabValue=e;let i={products:O("JOBS.PRODUCTS.TAB_TITLE"),orders:O("JOBS.ORDERS.TAB_TITLE"),details:O("JOBS.DETAILS.TAB_TITLE")};this.activeTabName=i[e]||e}updateBreadcrumbs(){this.currentJobDetails&&(this.breadcrumbs=[{label:this.translocoService.translate("NAV.HOME"),routerLink:"/",automationId:"jobDetails.breadcrumbHome"},{label:this.translocoService.translate("NAV.JOBS"),routerLink:[this.jobsPath()],automationId:"jobDetails.breadcrumbJobs"},{label:this.currentJobDetails.name,routerLink:this.showProductsTab?[this.jobsPath(),this.currentJobDetails.key]:void 0,automationId:"jobDetails.breadcrumbActiveJob"}],this.showProductsTab&&this.breadcrumbs.push({label:this.activeTabName,automationId:"jobDetails.breadcrumbActiveTab"}))}translateTabLabels(){this.ordersTabLabel$=this.translocoService.selectTranslate("JOBS.ORDERS.TAB_TITLE"),this.detailsTabLabel$=this.translocoService.selectTranslate("JOBS.DETAILS.TAB_TITLE"),this.productsTabLabel$=this.translocoService.selectTranslate("JOBS.PRODUCTS.TAB_TITLE")}
1subscribeToActiveTab(){this.activeTab$.pipe(Ti(this.destroy$),w(e=>this.getTranslatedLabel(e))).subscribe(e=>{this.activeTabName=e,this.updateBreadcrumbs()})}getTranslatedLabel(e){let i=si(e);return e===O("JOBS.PRODUCTS.TAB_TITLE")?i=this.productsTabLabel$:e===O("JOBS.DETAILS.TAB_TITLE")?i=this.detailsTabLabel$:e===O("JOBS.ORDERS.TAB_TITLE")&&(i=this.ordersTabLabel$),i}static{this.\u0275fac=function(i){return new(i||t)(h(U),h(de),h(se),h(Pi),h(M),h(qe),h(we),h(Zt),h(uo))}}static{this.\u0275cmp=N({type:t,selectors:[["app-job-details"]],standalone:!1,decls:2,vars:3,consts:[["salesRepCard",""],["text",""],["deliveryLocationCard",""],[1,"layout-container"],["data-test-id","jobDetails.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],[1,"mt-5","pt-0","pb-0","mb-0"],[1,"mt-0","pt-0","u-break-word"],[3,"valueChange","value","scrollable"],["value","products","data-test-id","jobDetails.ProductTabPanel"],["value","orders","data-test-id","jobDetails.ordersTabPanel"],["value","details","data-test-id","jobDetails.detailsTabPanel"],["value","products"],["value","orders"],[3,"activeTab","jobKey","jobName"],["value","details"],[1,"grid"],["data-test-id","jobDetails.accountNumber",1,"col-12","lg:col-2"],["data-test-id","jobDetails.accountNumber.label"],[1,"col-12","lg:col-2"],[1,"mt-5"],["data-test-id","jobDetail.salesRepTitle"],[1,"grid","mt-2"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"mt-2"],["data-test-id","jobDetails.breadcrumbs",3,"model"],[3,"countryCode","jobDetails","jobKey"],[4,"ngxPermissionsOnly"],[1,"d-flex","flex"],[1,"p-2"],["data-test-id","jobDetail.editButton",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.deactivateButton","styleClass","w-full",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.editButton",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.deactivateButton","styleClass","w-full",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.requestAccess","styleClass","w-full",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.requestAccess","styleClass","w-full",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.fulfillmentContacts",1,"flex-wrap","flex","align-items-center"],["data-test-id","jobDetail.fulfillmentContacts.label",1,"p-2"],["data-test-id","jobDetail.showFulfillmentContacts",1,"w-full",3,"label","outlined"],[1,"col-12","lg:col-3","md:col-6"],[1,"h-full"],["styleClass","h-full"],["data-test-id","jobDetail.fulfillmentContactName",1,"mb-3"],["data-test-id","jobDetail.fulfillmentContactPhoneNumber",1,"mb-2"],["icon","pi pi-check-circle","severity","success","data-test-id","jobDetail.fulfillmentContactDefaultTag",3,"value"],[4,"ngFor","ngForOf"],["data-test-id","jobDetail.addFulfillmentContactButton","icon","pi pi-plus-circle","text","true",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.showFulfillmentContacts",1,"w-full",3,"onClick","label","outlined"],[1,"col-8"],[1,"text-truncate"],["data-test-id","jobDetail.fulfillmentContactAdditionalName","tooltipPosition","top",1,"mb-3","overflow-hidden","text-overflow-ellipsis",3,"pTooltip","tooltipDisabled"],["data-test-id","jobDetail.fulfillmentContactAdditionalPhoneNumber",1,"mb-2"],["data-test-id","jobDetail.fulfillmentContactAdditionalEmail",1,"text-decoration-none",3,"href"],[1,"col-md-2"],["data-test-id","jobDetail.fulfillmentContactEditButton","icon"," pi pi-pencil",3,"text"],["data-test-id","jobDetail.fulfillmentContactDeleteButton","icon","pi pi-trash p-hint-error",3,"text"],["data-test-id","jobDetail.fulfillmentContactEditButton","icon"," pi pi-pencil",3,"onClick","text"],[1,"sr-only"],["data-test-id","jobDetail.fulfillmentContactDeleteButton","icon","pi pi-trash p-hint-error",3,"onClick","text"],["data-test-id","jobDetail.addFulfillmentContactButton","icon","pi pi-plus-circle","text","true",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.salesRepName",1,"mb-3"],["data-test-id","jobDetail.salesRepPhoneNumber",1,"mb-2"],["data-test-id","jobDetail.salesRepEmail",1,"text-decoration-none"],[3,"href"],[1,"flex-wrap","flex","align-items-center"],["data-test-id","jobDetail.deliveryLocationTitle",1,"p-2"],["data-test-id","jobDetail.showDeliveryLocationButton",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.addDeliveryLocationButton","icon","pi pi-plus-circle","text","true",1,"w-full",3,"label","outlined"],["data-test-id","jobDetail.showDeliveryLocationButton",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.deliveryLocationAddress1",1,"mb-3"],["data-test-id","jobDetail.deliveryLocationAddress2"],["data-test-id","jobDetail.deliveryLocationAddressCity"],["data-test-id","jobDetail.deliveryLocationAddressState"],["data-test-id","jobDetail.deliveryLocationAddressPostCode"],["data-test-id","jobDetail.deliveryLocationDefaultTag","icon","pi pi-check-circle","severity","success",3,"value"],["data-test-id","jobDetail.deliveryLocationEditButton","icon"," pi pi-pencil",3,"onClick","text"],["data-test-id","jobDetail.deliveryLocationDeleteButton","icon","pi pi-trash p-hint-error",3,"onClick","text"],["data-test-id","jobDetail.addDeliveryLocationButton","icon","pi pi-plus-circle","text","true",1,"w-full",3,"onClick","label","outlined"],["data-test-id","jobDetail.primaryStoreTitle"],["data-test-id","jobDetail.primaryStoreAddressName",1,"mb-3"],["data-test-id","jobDetail.primaryStoreAddress1"],["data-test-id","jobDetail.primaryStoreAddress2"],["data-test-id","jobDetail.primaryStoreAddressCity"],["data-test-id","jobDetail.primaryStoreAddressState"],["data-test-id","jobDetail.primaryStoreAddressPostCode"],["data-test-id","jobDetail.primaryStoreAddressEmail",1,"text-decoration-none",3,"href"]],template:function(i,o){if(i&1&&(u(0,sa,45,39,"div",3),d(1,"async")),i&2){let l;
1v((l=m(1,1,o.jobDetails$))?0:-1,l)}},dependencies:[xt,Et,pe,qt,F,oo,io,to,Zi,eo,Ae,Mt,Vt,Rt,Uo,Yo,L,Ri,G,Ui],encapsulation:2})}}return t})();var ri=class{constructor(p,e){this.newJobName=p,this.existingJobKey=e}};var la=t=>({label:t,routerLink:"/",automationId:"jobsPage.breadcrumbHome"}),pa=t=>({label:t,automationId:"jobsPage.breadcrumbJobs"}),ca=(t,p)=>[t,p];function da(t,p){t&1&&(x(0,"ppg-cdp-breadcrumbs",1),d(1,"transloco"),d(2,"transloco")),t&2&&c("model",yt(9,ca,P(5,la,m(1,1,"NAV.HOME")),P(7,pa,m(2,3,"NAV.JOBS"))))}function ma(t,p){t&1&&u(0,da,3,12,"ppg-cdp-breadcrumbs",7)}function ua(t,p){if(t&1){let e=y();li(0),a(1,"span",8),_(2),d(3,"transloco"),r(),a(4,"p-toggleswitch",9),g("onChange",function(o){f(e);let l=s();return C(l.onToggleSwitchShowAll(o))}),r()}if(t&2){let e="showAllJobsLabel";n(),c("id",e),n(),D(m(3,3,"JOBS.SHOW_ALL_JOBS")),n(2),c("ariaLabelledBy",e)}}function _a(t,p){if(t&1){let e=y();Je(0),li(1),a(2,"span",10),_(3),d(4,"transloco"),r(),a(5,"p-toggleswitch",11),g("onChange",function(o){f(e);let l=s();return C(l.onToggleSwitch(o))}),r(),Re()}if(t&2){let e="showInactiveJobsLabel";n(2),c("id",e),n(),S(" ",m(4,3,"JOBS.SHOW_INACTIVE")," "),n(2),c("ariaLabelledBy",e)}}var Ne=(()=>{class t{#e;constructor(e,i,o){this.userInfoService=e,this.configurationService=i,this.router=o,this.showInactiveEntities=!1,this.showAll=null,this.permissions=E,this.addAccountEnabled$=this.configurationService.addAccountFeatureFlag$,this.showAllToggleVisible$=this.userInfoService.getUserInfo().pipe(R(l=>l.roleName===bo.PPG_MANAGER)),this.#e=b(j),this.jobAccountValidationEnabled=Ce(this.configurationService.jobAccountValidationEnabledFeatureFlag$,{initialValue:!1}),this.inactiveJobsTogglePermissions=B(()=>this.jobAccountValidationEnabled()?[E.VIEW_CUSTOMER_INACTIVE_JOBS,E.VIEW_INACTIVE_JOBS]:[E.VIEW_INACTIVE_JOBS])}ngOnInit(){this.router.url.startsWith(this.#e.getPathByAppRouteFeatureModule(J.Job))&&(this.showBreadCrumb=!0)}onToggleSwitch(e){this.showInactiveEntities=e.checked}onToggleSwitchShowAll(e){this.showAll=e.checked}static{this.\u0275fac=function(i){return new(i||t)(h(Nt),h(H),h(se))}}static{this.\u0275cmp=N({type:t,selectors:[["app-jobs-page"]],standalone:!1,decls:12,vars:13,consts:[[1,"layout-container"],["data-test-id","jobsPage.breadcrumbs",3,"model"],[1,"flex","justify-content-between","flex-column","sm:flex-row","gap-4","mb-4"],["data-test-id","jobsPage.jobTitle",1,"p-0"],[1,"flex","align-items-center","gap-2"],[4,"ngxPermissionsOnly"],[3,"isAddAccountEnabled","showInactiveEntities","showAll"],["data-test-id","jobsPage.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["data-test-id","jobsPage.showAllJobs",3,"id"],["styleClass","flex align-items-center","data-test-id","jobsPage.toggleShowAllSwitch",3,"onChange","ariaLabelledBy"],["data-test-id","jobsPage.showInactive",3,"id"],["styleClass"," flex flex-row align-items-center","data-test-id","jobsPage.toggleShowInactiveSwitch",3,"onChange","ariaLabelledBy"]],template:function(i,o){i&1&&(a(0,"div",0),u(1,ma,1,0,"ppg-cdp-breadcrumbs",1),a(2,"div",2)(3,"h1",3),_(4),d(5,"transloco"),r(),a(6,"div",4),u(7,ua,5,5),d(8,"async"),u(9,_a,6,5,"ng-container",5),r()(),x(10,"app-jobs",6),d(11,"async"),r()),i&2&&(n(),v(o.showBreadCrumb?1:-1),n(3),D(m(5,7,"DASHBOARD.JOBS_TITLE")),n(3),v(m(8,9,o.showAllToggleVisible$)?7:-1),n(2),c("ngxPermissionsOnly",o.inactiveJobsTogglePermissions()),n(),c("isAddAccountEnabled",m(11,11,o.addAccountEnabled$))("showInactiveEntities",o.showInactiveEntities)("showAll",o.showAll))},encapsulation:2})}}return t})();var hi=t=>[t],fa=()=>[""],Ca=t=>({width:t}),ha=t=>({"ng-invalid ng-dirty":t});function va(t,p){if(t&1){let e=y();a(0,"p-button",11),g("onClick",function(){f(e);let o=s().row,l=s(2);return C(l.navigate(o))}),r()}if(t&2){let e=s().cell;T("label",e),c("link",!0)}}function ga(t,p){if(t&1&&_(0),t&2){let e=s().cell;S(" ",e," ")}}function Sa(t,p){if(t&1&&u(0,va,1,2,"p-button",10)(1,ga,1,1),t&2){let e=p.row;v(e.isActive?0:1)}}function ya(t,p){t&1&&(x(0,"p-tag",14),d(1,"transloco")),t&2&&T("value",m(1,1,"SHARED.TABLE.NEW"))}function Ta(t,p){if(t&1&&(a(0,"div",12)(1,"span",13),_(2),d(3,"transloco"),d(4,"date"),r(),u(5,ya,2,3,"p-tag",14),r()),t&2){let e=p.cell,i=p.row,o=s(2);n(2),D(k(4,4,e,m(3,2,"DATE_FORMAT"))),n(3),v(o.isDesktop&&i.isNew?5:-1)}}function xa(t,p){if(t&1){let e=y();a(0,"p-splitbutton",20),d(1,"transloco"),g("onClick",function(){f(e);let o=s().row,l=s(3);return C(l.edit(o))})("onDropdownClick",function(){f(e);let o=s().row,l=s(3);return C(l.handleActionsClick(o))}),r()}if(t&2){let e=s(4);T("label",m(1,3,"SHARED.BUTTON.EDIT")),c("model",e.items)("outlined",!0)}}function Ea(t,p){if(t&1){let e=y();a(0,"p-button",21),d(1,"transloco"),g("click",function(){f(e);let o=s().row,l=s(3);return C(l.activate(o))}),r()}if(t&2){let e=s(3).$implicit;T("label",m(1,3,"SHARED.BUTTON.REACTIVATE")),c("pTooltip",e("REACTIVATE_TOOLTIP"))("outlined",!0)}}function Da(t,p){if(t&1){let e=y();a(0,"p-button",22),d(1,"transloco"),g("click",function(){f(e);let o=s().row,l=s(3);return C(l.requestAccess(o))}),r()}if(t&2){let e=s(3).$implicit;T("label",m(1,3,"JOBS.REQUEST_ACCESS")),c("pTooltip",e("REACTIVATE_TOOLTIP"))("outlined",!0)}}function Aa(t,p){t&1&&(a(0,"span",19),_(1),d(2,"transloco"),r()),t&2&&(n(),S(" ",m(2,1,"JOBS.REQUEST_SENT")," "))}function Oa(t,p){if(t&1&&u(0,xa,2,5,"p-splitbutton",16)(1,Ea,2,5,"p-button",17)(2,Da,2,5,"p-button",18)(3,Aa,3,3,"span",19),t&2){let e=p.row;v(e.actions.edit.visible?0:e.actions.reactivate.visible?1:e.actions.requestAccess.visible&&!e.actions.requestAccess.disabled?2:e.actions.requestAccess.disabled?3:-1)}}function Ia(t,p){t&1&&(a(0,"ppg-table-column",15),d(1,"transloco"),u(2,Oa,4,1,"ng-template",5),r()),t&2&&(T("title",m(1,2,"JOBS.TABLE_COLUMN.ACTIONS")),c("showColumnTitleOnMobile",!1))}function wa(t,p){if(t&1&&(a(0,"div",33)(1,"p-message",37),_(2),r()()),t&2){let e=s(4);n(2),S(" ",e.addJobErrorMessage," ")}}function Pa(t,p){if(t&1&&(a(0,"small",36),_(1),r()),t&2){let e=s().$implicit;n(),S(" ",e("INFO_CREATING_NEW_JOB")," ")}}function Ba(t,p){if(t&1){let e=y();a(0,"div",38)(1,"p-button",39),g("click",function(){f(e);let o=s(4);return C(o.showAddJobDialog=!1)}),r(),a(2,"p-button",40),g("onClick",function(){f(e);let o=s(4);return C(o.addNewJob())}),r()()}if(t&2){let e=s().$implicit;n(),T("label",e("CANCEL_BUTTON")),n(),T("label",e("TITLE"))}}function Ja(t,p){if(t&1){let e=y();a(0,"div",9)(1,"p-dialog",24),fe("visibleChange",function(o){f(e);let l=s(3);return be(l.showAddJobDialog,o)||(l.showAddJobDialog=o),C(o)}),a(2,"form",25),_(3),a(4,"ul",26)(5,"li",27),_(6),r(),a(7,"li",28),_(8),r(),a(9,"li",29),_(10),r()(),a(11,"div",30)(12,"ppg-select-autocomplete",31),g("selectedJob",function(o){f(e);let l=s(3);return C(l.selectedJob=o)}),r()(),u(13,wa,3,1,"div",32),a(14,"div",33)(15,"ppg-input-group",34)(16,"input",35),g("blur",function(){f(e);let o=s(3);return C(o.jobformWrapper.onControlBlur("newJobName"))})("valueChange",function(o){f(e);let l=s(3);return C(l.jobformWrapper.onControlChangeValue("newJobName",o))}),r()(),u(17,Pa,2,1,"small",36),r()(),u(18,Ba,3,2,"ng-template",null,0,te),r()()}if(t&2){let e=p.$implicit,i=s(3);
1n(),vt(P(31,Ca,i.dialogSize)),c("header",e("TITLE"))("closeAriaLabel",e("CANCEL_BUTTON")),_e("visible",i.showAddJobDialog),c("modal",!0)("draggable",!1)("resizable",!1)("dismissableMask",!0)("focusOnShow",!1),ne("aria-label",e("TITLE")),n(),c("formGroup",i.jobForm),n(),S(" ",e("INFO_HEADER")," "),n(3),D(e("INFO_1")),n(2),D(e("INFO_2")),n(2),D(e("INFO_3")),n(2),c("label",e("SELECT_BILLED_TO_JOB"))("required",!0)("controlFormGroup",i.jobForm)("controlFormControlName","jobs")("errorFieldType",i.ERROR_FIELD_TYPE.BilledToJob)("source",i.jobsAutocomplete$)("display",i.jobsAutocompleteDisplay),n(),c("ngIf",i.showDuplicate),n(2),c("label",e("NEW_JOB_NAME"))("required",!0)("displaySuffix",!0),n(),c("ngClass",P(33,ha,i.jobformWrapper.isControlInvalid("newJobName")))("fieldType",i.ERROR_FIELD_TYPE.NewJobName)("ppgValidator",i.jobformWrapper.getFormControlBy("newJobName")),n(),v(i.jobForm.dirty&&i.jobForm.valid?17:-1)}}function Ra(t,p){t&1&&u(0,Ja,20,35,"div",23),t&2&&c("translocoRead","JOBS.ADD_NEW_JOB_MODAL")}function Na(t,p){if(t&1){let e=y();a(0,"div")(1,"ppg-table",2),d(2,"async"),d(3,"async"),d(4,"async"),g("pageSizeChange",function(o){f(e);let l=s();return C(l.pageSizeHandler(o))})("pageNumberChange",function(o){f(e);let l=s();return C(l.changePageHandler(o))})("sortChange",function(o){f(e);let l=s();return C(l.sortHandler(o))}),a(5,"ppg-table-header",3),d(6,"transloco"),d(7,"transloco"),d(8,"transloco"),g("actionButtonClick",function(){f(e);let o=s();return C(o.openAddNewJob())})("secondaryActionButtonClick",function(){f(e);let o=s();return C(o.navigateToPage(o.addAccountPath()))})("searchChange",function(o){f(e);let l=s();return C(l.searchHandler(o))}),r(),a(9,"ppg-table-column",4),d(10,"transloco"),u(11,Sa,2,1,"ng-template",5),r(),x(12,"ppg-table-column",6),d(13,"transloco"),a(14,"ppg-table-column",7),d(15,"transloco"),u(16,Ta,6,7,"ng-template",5),r(),u(17,Ia,3,4,"ppg-table-column",8),r(),u(18,Ra,1,1,"div",9),r()}if(t&2){let e=s();n(),c("paginatorPhoneVersion",m(2,16,e.isSmallPhoneView$))("data",m(3,18,e.data$))("loading",m(4,20,e.loading$)),n(4),T("searchPlaceholder",m(6,22,"JOBS.SEARCH_PLACEHOLDER")),c("actionButtonLabel",m(7,24,e.effectiveCustomerKey()?"JOBS.ADD_NEW_JOB":e.oneJobPerCustomerEnabled()===!1?"JOBS.COPY_JOB":null))("actionButtonPermissions",e.effectiveCustomerKey()?P(34,hi,e.permissions.CREATE_JOBS):P(36,hi,e.permissions.COPY_JOBS))("secondaryActionButtonLabel",e.isAddAccountEnabled?m(8,26,"NAV.ADD_ACCOUNT"):null)("secondaryActionButtonPermissions",e.effectiveCustomerKey()?xe(38,fa):P(39,hi,e.permissions.VIEW_EXTERNAL_ACCOUNTS)),n(4),T("title",m(10,28,"JOBS.TABLE_COLUMN.JOB_NAME")),c("sortable",!0),n(3),T("title",m(13,30,"JOBS.TABLE_COLUMN.ACCOUNT")),c("sortable",!0),n(2),T("title",m(15,32,"USERS.TABLE_COLUMN.DATE_REGISTERED")),c("sortable",!0),n(3),c("ngxPermissionsOnly",e.jobActionsColumnPermissions()),n(),v(e.showAddJobDialog?18:-1)}}var en=(()=>{class t extends ot{#e;#t;#i;set showInactiveEntities(e){this._showInactive=e,this.refresh()}set showAll(e){this._showAll=e,this.refresh()}#o;#n;#a;#s;#r;#l;#c;#d;#p;#m;#u;#_;constructor(e,i){super(e),this.tableDateFacade=e,this.translocoService=i,this.firstPageNumber=0,this.showAddJobDialog=!1,this.showDuplicate=!1,this.permissions=E,this.ERROR_FIELD_TYPE=Xe,this.#e=b(De),this.#t=b(pt),this.appRoutesService=b(j),this.addAccountPath=B(()=>this.appRoutesService.getPathByAppRouteFeatureModule(J.ImportAccounts)),this.#i=B(()=>this.appRoutesService.getPathByAppRouteFeatureModule(J.Customer)),this.isAddAccountEnabled=!1,this.#o=b(de),this.#n=b(Ee),this.#a=b(M),this.#s=b(we),this.#r=b(Oe),this.#l=b(se),this.#c=b(U),this.#d=b(ji),this.#p=b(j),this.#m=b(oe),this.#u=b(H),this.#_=b(We),this.oneJobPerCustomerEnabled=Ce(this.#u.oneJobPerCustomerFeatureFlag$),this.jobAccountValidationEnabled=Ce(this.#u.jobAccountValidationEnabledFeatureFlag$),this.customerUrl=B(()=>this.#p.getPathByAppRouteFeatureModule(J.Customer)),this.jobUrl=B(()=>this.#p.getPathByAppRouteFeatureModule(J.Job)),this.actionType=he,this.userCustomerKey=B(()=>this.#_.user()?.customerKey??null),this.effectiveCustomerKey=B(()=>
1{if(this.customerKey)return this.customerKey;let o=this.userCustomerKey();return this.jobAccountValidationEnabled()&&o?o:null}),this.jobActionsColumnPermissions=B(()=>this.jobAccountValidationEnabled()?[E.MANAGE_CUSTOMER_JOBS,E.MANAGE_JOBS,E.MANAGE_ALL_JOBS]:[E.MANAGE_JOBS,E.MANAGE_ALL_JOBS]),this.customerKey=null,this.jobsAutocomplete$=o=>this.#o.getJobsByName(o),this.jobsAutocompleteDisplay=o=>o?`${o.name} - ${o.accountNumber}`:null,this.getJobsSource=o=>this.#a.hasPermission(E.VIEW_CUSTOMERS).pipe(w(l=>this.#o.getAll({paginatedListRequest:o,customerKey:this.customerKey,includeInactive:this._showInactive,includeAll:this._showAll,includeCustomer:l})),w(l=>this.getJobsWithActions(l.items).pipe(R(A=>Le(je({},l),{items:A})))))}ngOnInit(){this.isSmallPhoneView$=this.#n.observePrimeNgBreakpoint(nt.Phone),this.customerKey=this.#c.snapshot.params[ie.CustomerKey],this.tableDataFacade.updateSource(this.getJobsSource),this.dialogSize=K.Medium,this.checkIfDesktop()}refresh(){this.tableDateFacade.updatePageNumber(this.firstPageNumber),this.tableDataFacade.refreshSourceData()}checkIfDesktop(){this.#n.isMobileTableView.subscribe(e=>this.isDesktop=!e)}navigateToPage(e){this.#l.navigate([e])}getJobsWithActions(e){return this.#s.getJobsActions(e).pipe(R(i=>e.map((o,l)=>Le(je({},o),{actions:i[l],isNew:Ni(o.createdOn,7)}))))}submitDeactivation(){this.#o.deactivateJob(this.selectedRowkey).subscribe(()=>{this.tableDateFacade.refreshSourceData()})}activate(e){let{name:i,isActive:o}=e.customer||{name:"",isActive:!0};this.selectedRow=e,o?this.showActivationDialog():(this.showCustomerActivationDialog(),this.translocoService.selectTranslate("JOBS.ACTIVATION_MODAL_WITH_CUSTOMER.BODY",{customerName:i}).subscribe(l=>{this.customerActivationBody=l}))}submitActivation(){this.#o.activateJob(this.selectedRow.key).subscribe(()=>{this.#t.pushActivateJobGTMTag(),this.tableDateFacade.refreshSourceData()})}requestAccess(e){e.actions.requestAccess.disabled||(e.actions.requestAccess.disabled=!0,this.#o.requestJobSalesRepAssignment(e.key,e.name).pipe(ae(this.#m)).subscribe({next:()=>{this.#t.pushRequestAccessGTMTag()},error:()=>{e.actions.requestAccess.disabled=!1,this.#r.error()}}))}edit(e){this.#l.navigate([`${this.customerUrl()}/${e.customerKey}/${_t.CustomerDetailsJobs}/${e.key}/${this.actionType.EDIT}`],{queryParams:{step:1}})}navigate(e){this.#l.navigate([`${this.jobUrl()}/${e.key}`])}handleActionsClick(e){this.selectedRowkey=e.key,this.items=[],e.actions.deactivate.visible&&(this.selectedRow=e,this.items=[{label:O("SHARED.BUTTON.DEACTIVATE"),icon:ci.TRASH,styleClass:"p-menuitem-error",command:()=>{this.showDeactivationDialog()}}]),e.actions.reactivate.visible&&(this.items=[{label:O("SHARED.BUTTON.REACTIVATE"),icon:ci.REFRESH,command:()=>{this.activate(e)}}])}openAddNewJob(){let e=this.effectiveCustomerKey();e?this.#l.navigate([`${this.customerUrl()}/${e}/${_t.CustomerDetailsJobs}/${this.actionType.NEW}`],{queryParams:{step:1},state:{isFromCustomerContext:!!this.customerKey}}):(this.jobForm=this.#d.group({jobs:new di("",{validators:[$.required,xo()]}),newJobName:new di("",{validators:[$.required,$.maxLength(so.AddNewJobNameMaxLength),Q.notOnlyWhiteSpaces()]})}),this.jobformWrapper=new lo(this.jobForm),this.selectedJob=null,this.showDuplicate=!1,this.showAddJobDialog=!0,this.#t.addNewJobNameOpenedGTMTag())}addNewJob(){Qe(this.jobForm,!0),this.jobForm.valid&&(this.#t.addNewJobNameInitiatedGTMTag(),this.#o.copyJob(new ri(this.jobForm.controls.newJobName.value,this.selectedJob.key)).subscribe({next:()=>this.onAddJobComplete(),error:e=>this.onAddJobError(e)}))}onAddJobError(e){this.#t.addNewJobNameSubmitFailedGTMTag();let i=`${this.jobForm.controls.newJobName.value} and ${this.selectedJob?.accountNumber}`;e?.message===`Job with name ${i} already exists`?(this.showDuplicate=!0,this.addJobErrorMessage=O("NOTIFICATION.FAILURE.COPY_JOB_DUPLICATE_NAME")):this.#r.error()}onAddJobComplete(){this.showDuplicate=!1,this.showAddJobDialog=!1,this.#t.addNewJobNameSubmitSuccessGTMTag(),this.#r.success("JOBS.ADD_NEW_JOB_MODAL.SUCCESS")}showActivationDialog(){this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"JOBS.ACTIVATION_MODAL"},closable:!0}).onClose.pipe(ee(1)).subscribe(e=>{e&&this.submitActivation()})}showDeactivationDialog(){this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"JOBS.DEACTIVATION_MODAL"},closable:!0}).onClose.pipe(ee(1)).subscribe(e=>{e&&this.submitDeactivation()})}showCustomerActivationDialog(){this.#e.open(ce,{width:K.Medium,data:{translationPrefix:"JOBS.ACTIVATION_MODAL_WITH_CUSTOMER"},closable:!0}).onClose.pipe(ee(1)).subscribe(e=>{e&&this.submitActivation()})}static{this.\u0275fac=function(i){return new(i||t)(h(Z),h(qe))}}static{this.\u0275cmp=N({type:t,selectors:[["app-jobs"]],inputs:{isAddAccountEnabled:"isAddAccountEnabled",showInactiveEntities:"showInactiveEntities",showAll:"showAll"},standalone:!1,features:[Te([Z,Ne]),Me],decls:1,vars:1,consts:[["footer",""],[4,"transloco","translocoRead"],["behavior","card-to-table","actionButtonDataT","cta","actionButtonDataD1","add new job","actionButtonDataD2","open job creation modal","itemActivePredicate","isActive",3,"pageSizeChange","pageNumberChange","sortChange","paginatorPhoneVersion","data","loading"],["actionButtonIconName","pi pi-plus-circle","actionButtonIconPosition","left","actionButtonDataTestId","job.addNewJobButton","secondaryActionButtonIconName","pi pi-plus-circle","secondaryActionButtonIconPosition","left","actionButtonDataT","cta","actionButtonDataD1","add new job","actionButtonDataD2","open job creation modal",3,"actionButtonClick","secondaryActionButtonClick","searchChange","searchPlaceholder","actionButtonLabel","actionButtonPermissions","secondaryActionButtonLabel","secondaryActionButtonPermissions"],["data-test-id","job.tableName","field","name",3,"title","sortable"],["appColumnTemplate",""],["data-test-id","job.accountColumn","field","accountNumber",3,"title","sortable"],["data-test-id","job.dateRegisteredColumn","field","createdOn",3,"title","sortable"],["data-test-id","job.actionsColumn","styleClass","w-1",3,"title","showColumnTitleOnMobile",4,"ngxPermissionsOnly"],[1,"w-full"],["data-test-id","job.activeName","size","small","styleClass","border-noround",3,"label","link"],["data-test-id","job.activeName","size","small","styleClass","border-noround",3,"onClick","label","link"],[1,"flex","align-items-center"],["data-test-id","job.dateRegistered"],["data-test-id","job.newTag","severity","info","styleClass","ml-2",3,"value"],["data-test-id","job.actionsColumn","styleClass","w-1",3,"title","showColumnTitleOnMobile"],["data-test-id","job.editSplitButton","icon","pi pi-pencil","styleClass","w-full",1,"inline-block","h-full","w-full",3,"label","model","outlined"],["data-test-id","job.reActivateButton","tooltipPosition","top","styleClass","w-full",1,"inline-block","h-full","w-full",3,"pTooltip","label","outlined"],["data-test-id","job.requestAccessButton","tooltipPosition","top","styleClass","w-full",1,"inline-block","h-full","w-full",3,"pTooltip","label","outlined"],["data-test-id","job.requestSent",1,"text-500"],["data-test-id","job.editSplitButton","icon","pi pi-pencil","styleClass","w-full",1,"inline-block","h-full","w-full",3,"onClick","onDropdownClick","label","model","outlined"],["data-test-id","job.reActivateButton","tooltipPosition","top","styleClass","w-full",1,"inline-block","h-full","w-full",3,"click","pTooltip","label","outlined"],["data-test-id","job.requestAccessButton","tooltipPosition","top","styleClass","w-full",1,"inline-block","h-full","w-full",3,"click","pTooltip","label","outlined"],["class","w-full",4,"transloco","translocoRead"],["contentStyleClass","pb-0 overflow-y-visible","data-test-id","job.dialogTitle",3,"visibleChange","header","closeAriaLabel","visible","modal","draggable","resizable","dismissableMask","focusOnShow"],[3,"formGroup"],[1,"pt-2","ml-4","list-disc","line-height-3"],["data-test-id","job.dialogInfo1"],["data-test-id","job.dialogInfo2"],["data-test-id","job.dialogInfo3"],[1,"pt-0"],["id","jobs","data-test-id","addJobDialog.BilledToJobInput",3,"selectedJob","label","required","controlFormGroup","controlFormControlName","errorFieldType","source","display"],["class","pt-2",4,"ngIf"],[1,"pt-2"],["labelFor","newJobName","data-test-id","addJobDialog.NewJobNameLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","newJobName","
1id","newJobName","name","newJobName","data-test-id","addJobDialog.newJobNameInput","required","true","autocomplete","off",1,"w-full",3,"blur","valueChange","ngClass","fieldType","ppgValidator"],["id","jobForm-progress","data-test-id","job.infoCreatingNewJob"],["data-test-id","job.addJobErrorMessage","severity","error","icon","pi pi-times-circle"],[1,"pt-2","flex","flex-column-reverse","gap-2","justify-content-end","sm:flex-row"],["outlined","true","styleClass","w-full min-w-max","data-test-id","addJobDialog.cancel",3,"click","label"],["styleClass","w-full","data-test-id","addJobDialog.submit",3,"onClick","label"]],template:function(i,o){i&1&&u(0,Na,19,41,"div",1),i&2&&c("translocoRead","JOBS")},dependencies:[Bi,re,Ge,$e,le,Ue,Pt,He,Ke,et,X,st,at,lt,pe,rt,Oo,F,Ft,Ye,Fi,wo,Mt,Vt,tt,L,Ji,G],encapsulation:2})}}return t})();var ja=[{path:"",component:Ne,canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},gtm:{pageTitle:"Jobs"}}},{path:"all",component:Ne,canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:()=>({navigationCommands:[b(j).getPathByAppRouteFeatureModule(J.Job)]})},gtm:{pageTitle:"Jobs"}}},{path:`:${ie.JobKey}`,component:Zo,canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Job Details"}}},{path:`:${ie.JobKey}`,component:zt,canActivate:[ve],data:{permissions:{only:[E.VIEW_EXPORT_ORDER_HISTORY],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Job Details"}}},{path:`:${ie.JobKey}/${me.DeliveryLocation}/:${ie.AddressKey}/${he.EDIT}`,component:bi,canDeactivate:[Ie],canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Edit Delivery Location"}}},{path:`:${ie.JobKey}/${me.DeliveryLocation}/${he.ADD}`,component:bi,canDeactivate:[Ie],canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Add Delivery Location"}}},{path:`:${ie.JobKey}/${me.FulfillmentContact}/:${ie.Key}/${he.EDIT}`,component:fi,canDeactivate:[Ie],canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Edit Fulfillment Contact"}}},{path:`:${ie.JobKey}/${me.FulfillmentContact}/${he.ADD}`,component:fi,canDeactivate:[Ie],canActivate:[ve],data:{permissions:{only:[E.VIEW_JOBS],redirectTo:"/"},pathMatch:"full",gtm:{pageTitle:"Add Fulfillment Contact"}}}],tn=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ke({type:t})}static{this.\u0275inj=Ve({providers:[Ie],imports:[pi.forChild(Li(ja)),pi]})}}return t})();var on=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ke({type:t})}static{this.\u0275inj=Ve({imports:[Dt,Xt,Bo]})}}return t})();var l0=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ke({type:t})}static{this.\u0275inj=Ve({providers:[Ie],imports:[Dt,tn,Xt,on,no,ro,Mi]})}}return t})();Oi(Ne,[pe,qt,ao,Rt,en],[L,G]);export{l0 as JobModule};
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.