PageSourceSearch

https://www.progold.eu/chunk-NPQ5BQ4Y.js

js progold.eu collected 2026-10-09 21:52:53 UTC 32,851 bytes, 1 lines download raw bytes

1import{a as Vt,b as Ut}from"./chunk-IIEYZ3IJ.js";import{a as Z,c as qe}from"./chunk-XHB4UAIT.js";import"./chunk-P3CYRW4W.js";import{a as U}from"./chunk-QFLKR7AV.js";import{a as k}from"./chunk-Q22WCJC5.js";import"./chunk-3OGXCAV2.js";import"./chunk-6UMFXTLI.js";import{e as O}from"./chunk-NENT3XC3.js";import"./chunk-WG7JFK7H.js";import{a as Le,c as V}from"./chunk-ZDRPI3JU.js";import{a as Me}from"./chunk-FPHPRB3P.js";import{b as $,c as Rt}from"./chunk-6VKQ4C4B.js";import{H as Oe,Ib as Pt,J as Be,K as we,N as Pe,Rb as Lt,Sb as Ft,j as Re,la as Fe,n as Ne,qb as Nt,rb as Ve,sb as Mt,tb as Ot,ub as Bt,xb as wt}from"./chunk-2EGU7YKH.js";import"./chunk-XXJ5KP6J.js";import{a as xt}from"./chunk-CAQC7JX5.js";import"./chunk-OQSEJWXG.js";import"./chunk-LB2SIPUX.js";import"./chunk-YU5IEYKE.js";import"./chunk-TNG3WTDY.js";import"./chunk-DBPN64ZI.js";import{a as It}from"./chunk-PXIE55XG.js";import"./chunk-76J53O4D.js";import{a as St,b as At,e as yt}from"./chunk-7IEHGNLB.js";import{h as Tt}from"./chunk-P5CCJ2SN.js";import"./chunk-NEQO7ITA.js";import"./chunk-ILIGNJRC.js";import{a as Dt}from"./chunk-GT7BSWBO.js";import{a as Ae,c as Ct}from"./chunk-FM5MQBX4.js";import"./chunk-KJ2DTZTE.js";import{a as y}from"./chunk-3RKFVFMW.js";import"./chunk-6LRNCJRQ.js";import"./chunk-BYUXZABT.js";import{l as ht,n as Ie,o as xe}from"./chunk-CSKO464Y.js";import{f as gt,g as vt,h as bt,i as Et,z as De}from"./chunk-RFZ65DFT.js";import{q as Se}from"./chunk-ZAELU3GP.js";import"./chunk-KCBWTIVH.js";import{b as z}from"./chunk-Q7LOV5U2.js";import"./chunk-GSJIPMUW.js";import"./chunk-2D6KGTZB.js";import"./chunk-ZS7OWNSY.js";import"./chunk-DIZWDXBB.js";import{Q as Y,_ as ye,aa as _t}from"./chunk-Q4MTVQC2.js";import"./chunk-RRAYDVNW.js";import{Fc as L,Id as ut,Jd as dt,Kd as ft,Md as G,_c as ct,a as ue,bb as lt,da as mt,dd as fe,fd as F,hd as Ce,id as _e,ja as pt,ne as E,od as he,oe as Te,pe as W,qe as x,rd as ge,sd as ve,td as be,uc as P,wd as Ee}from"./chunk-WGWIBZ2L.js";import{$b as T,$c as K,Cc as et,Ce as at,D as te,Dc as tt,Fa as v,Fc as M,Ga as b,Gb as R,Gc as me,Hc as it,Ib as s,Ka as ne,La as ae,Ob as B,Oc as m,Oe as J,Pc as p,Pe as st,Qc as ot,Rb as Qe,Sb as Xe,Ta as ze,Tb as a,Ub as n,Vb as _,Wc as pe,Z as H,Zb as N,ac as c,ad as le,db as He,dc as g,ec as Ge,g as Je,gf as $e,hb as r,jd as ce,lb as f,ma as ie,md as w,pc as u,qa as oe,qc as S,qd as rt,rc as A,sc as Ze,tb as I,td as nt,ua as We,ub as se,va as re,xb as Ye,ya as h,ye as de,zb as C}from"./chunk-6LP6WHZQ.js";import{e as ee}from"./chunk-5KTCK5IS.js";function ni(e,l){if(e&1){let t=N();a(0,"div",2)(1,"h1",3),u(2),m(3,"transloco"),n(),a(4,"div",4)(5,"span",5),u(6,"*"),n(),u(7),m(8,"transloco"),n(),a(9,"form",6)(10,"p-card",7)(11,"div",8)(12,"div")(13,"ppg-input-group",9),_(14,"input",10),n()(),a(15,"div",11)(16,"ppg-input-group",12),_(17,"input",13),n()(),a(18,"div",11),_(19,"app-phone-number-input",14),n(),a(20,"div",11)(21,"ppg-input-group",15),_(22,"input",16),m(23,"async"),n()()()()(),a(24,"p-fluid")(25,"div",17)(26,"div",18)(27,"p-button",19),T("onClick",function(){v(t);let o=c();return b(o.cancelHandler())}),n()(),a(28,"div",18)(29,"p-button",20),T("onClick",function(){v(t);let o=c();return b(o.submitHandler())}),n()()()()()}if(e&2){let t,i=l.$implicit,o=c();r(2),S(p(3,23,"CUSTOMER.ADD_NEW")),r(5),A(" ",p(8,25,"CUSTOMER.REQUIRED_HEADER")," "),r(2),s("formGroup",o.customerForm),r(),s("header",i("CUSTOMER_INFO_TITLE")),r(),R("aria-label",i("CUSTOMER_INFO_TITLE")),r(2),s("label",i("NAME"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.CustomerName),r(2),s("label",i("EMAIL"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.Email),r(2),s("formGroup",o.customerForm)("phoneControl","phoneNumber")("label",i("PHONE_NUMBER")),r(2),s("label",i("PARENT_ACCOUNT"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.ParentAccountNumber),R("maxlength",(t=p(23,27,o.accountNumberRules$))==null?null:t.maxLength),r(5),s("label",i("CANCEL")),r(2),s("label",i("SUBMIT"))}}var Gt=(()=>{class e{#e;#t;constructor(t,i,o,d,D,j){this.customerService=t,this.changeDetectorRef=i,this.formBuilder=o,this.router=d,this.notificationService=D,this.injector=j,this.#e=h(z),this.#t=h(L),this.ERROR_FIELD_TYPE=Re,this.deactivateDialogTranslationPrefix="CUSTOMER.CANCEL_ADD_MODAL",this.isFormSaved=!1,this.accountNumberRules$=this.#e.accountNumberValidationRules$.pipe(H(1)),this.customerForm=this.formBuilder.group({name:["",[F.required,$.notOnlyWhiteSpaces()]],email:["",[F.required,$.email()]],phoneNumber:[""],ppgParentAccountNumber:["",[F.required],[Rt.alreadyExists(this.customerService.validateIfParentAccountNumberAlreadyExists)]],isTradeElite:[!1]});let X=h(Se).minDigitLengthValidator;le(()=>{let je=X();this.customerForm.controls.phoneNumber.setValidators([Me.customPhone(),je])})}get ppgParentAccountNumber(){return this.customerForm.controls.ppgParentAccountNumber}ngOnInit(){$.applyAccountNumberValidators(this.ppgParentAccountNumber,this.injector)}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}isDeactivationAllowed(){return this.customerForm.pristine||this.isFormSaved}submitHandler(){if(!this.customerForm.valid){Ne(this.customerForm,!0);return}let t=ee(this.customerForm.getRawValue(),[]),i=new Ut(t);this.customerService.post(i).pipe(this.notificationService.message("ADD_CUSTOMER")).subscribe(()=>this.navigateToCustomers()),Z(this.customerForm),this.isFormSaved=!0}
1cancelHandler(){Z(this.customerForm),this.navigateToCustomers()}navigateToCustomers(){this.router.navigate([this.#t.getPathByAppRouteFeatureModule(P.Customer)])}static{this.\u0275fac=function(i){return new(i||e)(f(V),f(pe),f(Ee),f(J),f(Tt),f(ne))}}static{this.\u0275cmp=I({type:e,selectors:[["app-add-customer"]],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","AddCustomer.Header"],["data-test-id","AddCustomer.RequiredHeader",1,"mt-0","pb-4"],[1,"required"],[3,"formGroup"],["styleClass","ppg-form-card",3,"header"],["role","group"],["labelFor","customer-name","data-test-id","AddCustomer.CustomerNameLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","name","id","customer-name","name","name","data-test-id","AddCustomer.CustomerNameInput","ppgValidator","","autocomplete","off",1,"w-full",3,"fieldType"],[1,"mt-4"],["labelFor","email","data-test-id","AddCustomer.CustomerEmailLabel",3,"label","required","displaySuffix"],["pInputText","","type","email","formControlName","email","id","email","name","email","data-test-id","AddCustomer.CustomerEmailInput","ppgValidator","","required","true","autocomplete","off",1,"w-full",3,"fieldType"],["styleModifier","w-full","data-test-id","AddCustomer.CustomerPhoneNumber","id","phoneNumber","name","phoneNumber",3,"formGroup","phoneControl","label"],["labelFor","ppgParentAccountNumber","data-test-id","AddCustomer.AccountNumberLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","ppgParentAccountNumber","id","ppgParentAccountNumber","name","ppgParentAccountNumber","data-test-id","AddCustomer.AccountNumberInput","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","AddCustomer.cancelButton","styleClass","font-bold","outlined","true",1,"flex-1",3,"onClick","label"],["styleClass","font-bold","data-test-id","AddCustomer.submitButton",3,"onClick","label"]],template:function(i,o){i&1&&(a(0,"div",0),C(1,ni,30,29,"div",1),n()),i&2&&(r(),s("translocoRead","CUSTOMER.FORM"))},dependencies:[he,fe,Ce,_e,be,ge,ve,Oe,W,we,Y,ye,De,Pe,Be,w,x],encapsulation:2})}}return e})();var $t=(()=>{class e{constructor(){this._customer=new Je(null),this.customer=this._customer.asObservable()}update(t){this._customer.next(t)}getValue(){return this._customer.getValue()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=We({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var li=e=>({label:e,routerLink:"/",automationId:"customersDetailsPage.breadcrumbHome"}),ci=(e,l)=>({label:e,routerLink:l,automationId:"customersDetailsPage.breadcrumbCustomers"}),ui=e=>({label:e,automationId:"customersDetailsPage.breadcrumbCustomer"}),di=(e,l,t)=>[e,l,t],fi=(e,l)=>l.routerLink;function Ci(e,l){if(e&1&&(_(0,"ppg-cdp-breadcrumbs",18),m(1,"transloco"),m(2,"transloco"),m(3,"transloco")),e&2){let t=c().ngIf,i=c();s("model",it(14,di,M(7,li,p(1,1,"NAV.HOME")),me(9,ci,p(2,3,"NAV.CUSTOMERS"),i.customerBaseUrl()),M(12,ui,p(3,5,t.name))))}}function _i(e,l){e&1&&(a(0,"h5",14),u(1),m(2,"transloco"),m(3,"transloco"),n()),e&2&&(r(),Ze(" ",p(2,2,"CUSTOMER.DETAILS.STATUS"),": ",p(3,4,"CUSTOMER.DETAILS.TRADE_ELITE")," "))}function hi(e,l){if(e&1&&(a(0,"p-tab",17),u(1),n()),e&2){let t=l.$implicit;s("value",t.label)("routerLink",t.routerLink),R("data-test-id",t.automationId),r(),A(" ",t.label," ")}}function gi(e,l){if(e&1&&(a(0,"div",1),C(1,Ci,4,18,"ppg-cdp-breadcrumbs",2),a(2,"h1",3),u(3),n(),a(4,"p-accordion"),m(5,"transloco"),a(6,"p-accordion-panel",4),m(7,"transloco"),a(8,"p-accordion-header"),u(9),m(10,"transloco"),n(),a(11,"p-accordion-content")(12,"h5",5),u(13),m(14,"transloco"),n(),a(15,"div",6),_(16,"i",7),a(17,"span",8),u(18),m(19,"transloco"),n(),a(20,"a",9),u(21),n()(),a(22,"div",10),_(23,"i",11),a(24,"span",12),u(25),m(26,"transloco"),n(),a(27,"a",13),u(28),n()(),C(29,_i,4,6,"h5",14),n()()(),a(30,"div",15)(31,"p-tabs",16)(32,"p-tablist"),Qe(33,hi,2,4,"p-tab",17,fi),n()(),_(35,"router-outlet"),n()()),e&2){let t=l.ngIf,i=c();r(3),S(t.name),r(),R("aria-label",p(5,16,"CUSTOMER.DETAILS.VIEW_DETAILS_PANEL_TITLE")),r(2),s("value",0),R("aria-label",p(7,18,"CUSTOMER.DETAILS.VIEW_DETAILS_PANEL_TITLE")),r(3),S(p(10,20,"CUSTOMER.DETAILS.VIEW_DETAILS_PANEL_TITLE")),r(4),A(" ",p(14,22,"CUSTOMER.DETAILS.ADMINISTRATIVE_INFO")," "),r(5),A("",p(19,24,"CUSTOMER.DETAILS.PHONE"),":"),r(2),Ge("href","tel:+",t.phoneNumber,"",He),r(),A(" ",t.phoneNumber," "),r(4),A("",p(26,26,"CUSTOMER.DETAILS.EMAIL"),":"),r(2),Ge("href","mailto:",t.email,"",He),r(),A(" ",t.email," "),r(),B(i.isTradeEliteVisible&&t.isTradeElite?29:-1),r(2),s("scrollable",!0),r(2),
1Xe(i.item)}}var qt=(()=>{class e{#e;constructor(t,i,o,d,D,j){this.customerPubSubService=t,this.customerService=i,this.route=o,this.permissionsService=d,this.translocoService=D,this.destroyRef=j,this.#e=h(L),this.customerBaseUrl=K(()=>this.#e.getPathByAppRouteFeatureModule(P.Customer)),this.item=[]}ngOnInit(){this.initRoutingTable();let{customerKey:t}=this.route.snapshot.params;this.translocoService.langChanges$.pipe(ie(()=>this.translocoService.selectTranslate("")),ue(this.destroyRef)).subscribe(()=>{this.initRoutingTable()}),this.customer$=this.customerService.getByKey(t).pipe(oe(i=>this.customerPubSubService.update(i)))}initRoutingTable(){this.item=[];let t=this.permissionsService.getPermissions();t.view_jobs&&this.item.push({label:E("CUSTOMER.DETAILS.JOBS_TAB_TITLE"),routerLink:[O.CustomerDetailsJobs],automationId:"customerDetails.tabJobs"}),t.view_orders&&this.item.push({label:E("CUSTOMER.DETAILS.ORDERS_TAB_TITLE"),routerLink:[O.CustomerOrders],automationId:"customerDetails.tabOrders"}),t.view_all_users&&this.item.push({label:E("CUSTOMER.DETAILS.USERS_TAB_TITLE"),routerLink:[O.CustomerUsers],automationId:"customerDetails.tabUsers"})}static{this.\u0275fac=function(i){return new(i||e)(f($t),f(V),f(de),f(dt),f(Te),f(ae))}}static{this.\u0275cmp=I({type:e,selectors:[["app-customer-details"]],standalone:!1,decls:2,vars:3,consts:[["class","layout-container",4,"ngIf"],[1,"layout-container"],["data-test-id","customersDetailsPage.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],["id","customer-details-title","data-test-id","customer.name",1,"pb-1","pt-5"],["data-test-id","customerDetails.tabMenu",3,"value"],["data-test-id","customer.administrativeInfo.title"],["data-test-id","customer.phoneNumber",1,"flex"],["data-test-id","customer.phoneNumber.icon",1,"pi","pi-phone","mr-2"],["data-test-id","customer.phoneNumber.label",1,"mr-2"],["data-test-id","customer.phoneNumber.link",1,"p-button","p-button-link","p-0",3,"href"],["data-test-id","customer.email",1,"flex","mt-2"],["data-test-id","customer.email.icon",1,"pi","pi-envelope","mr-2"],["data-test-id","customer.email.label",1,"mr-2"],["data-test-id","customer.email.link",1,"p-button","p-button-link","p-0",3,"href"],["data-test-id","customer.tradeElite.status"],[1,"mt-5"],["aria-labelledby","customer-details-title",3,"scrollable"],[3,"value","routerLink"],["data-test-id","customersDetailsPage.breadcrumbs",3,"model"]],template:function(i,o){i&1&&(C(0,gi,36,28,"div",0),m(1,"async")),i&2&&s("ngIf",p(1,1,o.customer$))},dependencies:[ce,at,st,Fe,yt,St,At,Et,gt,vt,bt,Ae,w,x],styles:["[_nghost-%COMP%]   .p-tabs-nav-button[_ngcontent-%COMP%]{width:25px;box-shadow:none}"]})}}return e})();var ke=class{constructor(l,t,i,o,d,D,j,X=!1){this.key=l,this.name=t,this.phoneNumber=i,this.email=o,this.createdOn=d,this.isTradeElite=D,this.isActive=j,this.isNew=X}};var vi=e=>({label:e,routerLink:"/",automationId:"customersPage.breadcrumbHome"}),bi=e=>({label:e,automationId:"customersPage.breadcrumbCustomers"}),Ei=(e,l)=>[e,l];function Ti(e,l){e&1&&(_(0,"ppg-cdp-breadcrumbs",8),m(1,"transloco"),m(2,"transloco")),e&2&&s("model",me(9,Ei,M(5,vi,p(1,1,"NAV.HOME")),M(7,bi,p(2,3,"NAV.CUSTOMERS"))))}var Q=(()=>{class e{constructor(){this.showInactiveEntities=!1,this.switchLabel="switchLabel"}onToggleSwitch(t){this.showInactiveEntities=t.checked}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=I({type:e,selectors:[["app-customers-page"]],standalone:!1,decls:12,vars:9,consts:[[1,"layout-container"],["data-test-id","customersPage.breadcrumbs",3,"model",4,"ppgHideOnMobileAppView"],[1,"flex","justify-content-between","flex-column","sm:flex-row","gap-4","mb-4"],["data-test-id","customersPage.title",1,"p-0"],[1,"flex","align-items-center","gap-2"],["data-test-id","customersPage.showInactiveText",3,"id"],["data-test-id","customersPage.showInactiveSwitch","styleClass","flex align-items-center",3,"onChange","ariaLabelledBy"],[3,"showInactiveEntities"],["data-test-id","customersPage.breadcrumbs",3,"model"]],template:function(i,o){i&1&&(a(0,"div",0),C(1,Ti,3,12,"ppg-cdp-breadcrumbs",1),a(2,"div",2)(3,"h1",3),u(4),m(5,"transloco"),n(),a(6,"div",4)(7,"span",5),u(8),m(9,"transloco"),n(),a(10,"p-toggleswitch",6),T("onChange",function(D){return o.onToggleSwitch(D)}),n()()(),_(11,"app-customers",7),n()),i&2&&(r(4),S(p(5,5,"ADMIN.CUSTOMERS.TITLE")),r(3),s("id",o.switchLabel),r(),S(p(9,7,"CUSTOMER.SHOW_INACTIVE")),r(2),s("ariaLabelledBy",o.switchLabel),r(),s("showInactiveEntities",o.showInactiveEntities))},encapsulation:2})}}return e})();var Kt=e=>[e];function Ai(e,l){if(e&1){let t=N();a(0,"p-button",12),T("onClick",function(){v(t);let o=c().row,d=c(2);return b(d.navigate(o))}),n()}if(e&2){let t=c().cell;g("label",t),s("link",!0)}}function yi(e,l){if(e&1&&u(0),e&2){let t=c().cell;A(" ",t," ")}}function Ii(e,l){if(e&1&&C(0,Ai,1,2,"p-button",11)(1,yi,1,1),e&2){let t=l.row;B(t.isActive?0:1)}}function xi(e,l){if(e&1&&(a(0,"span",13),u(1),n()),e&2){let t=l.cell;r(),S(t)}}function Di(e,l){e&1&&(a(0,"i",15),m(1,"transloco"),u(2," monetization_on "),n()),e&2&&g("title",p(1,1,"DASHBOARD.TABLE_COLUMN.IS_TRADE_ELITE"))}function Ri(e,l){if(e&1&&(a(0,"span",14),C(1,Di,3,3,"i",15),n()),e&2){let t=l.cell;r(),B(t?1:-1)}}function Ni(e,l){e&1&&(a(0,"ppg-table-column",7),m(1,"transloco"),C(2,Ri,2,1,"ng-template",4),n()),e&2&&(g("title",p(1,2,"DASHBOARD.TABLE_COLUMN.IS_TRADE_ELITE")),s("sortable",!0))}function Mi(e,l){e&1&&(_(0,"p-tag",18),m(1,"transloco")),e&2&&g("value",p(1,1,"SHARED.TABLE.NEW"))}function Oi(e,l){if(e&1&&(a(0,"div",16)(1,"span",17),u(2),m(3,"transloco"),m(4,"date"),n(),C(5,Mi,2,3,"p-tag",18),n()),e&2){let t=l.cell,i=l.row;r(2),S(ot(4,4,t,p(3,2,"DATE_FORMAT"))),r(3),B(i.isNew?5:-1)}}function Bi(e,l){if(e&1){let t=N();a(0,"p-splitbutton",22),m(1,"transloco"),m(2,"transloco"),T("onClick",function(){v(t);let o=c().row,d=c(3);return b(d.edit(o))})("onDropdownClick",function(){v(t);let o=c().row,d=c(3);return b(d.handleActionsClick(o))}),n()}if(e&2){let t=c(4);g("label",p(1,4,"SHARED.BUTTON.EDIT")),g("expandAriaLabel",p(2,6,"SHARED.BUTTON.ACTIONS_MENU")),s("model",t.items)("outlined",!0)}}function wi(e,l){if(e&1){let t=N();a(0,"p-button",23),m(1,"transloco"),T("click",function(){v(t);let o=c().row,d=c(3);return b(d.activate(o))}),n()}if(e&2){let t=c(3).$implicit;g("label",p(1,4,"SHARED.BUTTON.REACTIVATE")),s("outlined",!0)("pTooltip",t("REACTIVATE_TOOLTIP"))("escape",!1)}}function Pi(e,l){if(e&1&&C(0,Bi,3,8,"p-splitbutton",20)(1,wi,2,6,"p-button",21),e&2){let t=l.row;B(t.isActive?0:1)}}function Li(e,l){e&1&&(a(0,"ppg-table-column",19),m(1,"transloco"),C(2,Pi,2,1,"ng-template",4),n()),e&2&&(g("title",p(1,2,"SHARED.TABLE.ACTIONS")),s("showColumnTitleOnMobile",!1))}function Fi(e,l){if(e&1){let t=N();a(0,"div")(1,"ppg-table",1),m(2,"async"),m(3,"async"),m(4,"async"),T("pageSizeChange",function(o){v(t);let d=c();return b(d.pageSizeHandler(o))})("pageNumberChange",function(o){v(t);let d=c();return b(d.changePageHandler(o))})("sortChange",function(o){v(t);let d=c();return b(d.sortHandler(o))}),a(5,"ppg-table-header",2),m(6,"transloco"),m(7,"transloco"),T("searchChange",function(o){v(t);let d=c();return b(d.searchHandler(o))})("actionButtonClick",function(){v(t);let o=c();return b(o.addCustomer())}),n(),a(8,"ppg-table-column",3),m(9,"transloco"),C(10,Ii,2,1,"ng-template",4),n(),_(11,"ppg-table-column",5),m(12,"transloco"),a(13,"ppg-table-column",6),m(14,"transloco"),C(15,xi,2,1,"ng-template",4),n(),C(16,Ni,3,4,"ppg-table-column",7),a(17,"ppg-table-column",8),m(18,"transloco"),C(19,Oi,6,7,"ng-template",4),n(),C(20,Li,3,4,"ppg-table-column",9),n(),_(21,"ppg-confirmation-dialog",10),n()}if(e&2){let t=c();r(),s("paginatorPhoneVersion",p(2,18,t.isSmallPhoneView$))("data",p(3,20,t.data$))("loading",p(4,22,t.loading$)),r(4),g("searchPlaceholder",p(6,24,"DASHBOARD.SEARCH_PLACEHOLDER")),g("actionButtonLabel",p(7,26,"DASHBOARD.ADD_CUSTOMER")),s("actionButtonPermissions",M(36,Kt,t.permissions.MANAGE_CUSTOMERS)),r(3),g("title",p(9,28,"DASHBOARD.TABLE_COLUMN.CUSTOMER_NAME")),s("sortable",!0),r(3),g("title",p(12,30,"DASHBOARD.TABLE_COLUMN.PHONE")),s("sortable",!0),r(2),g("title",p(14,32,"DASHBOARD.TABLE_COLUMN.EMAIL")),s("sortable",!0),r(3),B(t.isTradeEliteVisible?16:-1),r(),g("title",p(18,34,"USERS.TABLE_COLUMN.DATE_REGISTERED")),s("sortable",!0),r(3),s("ngxPermissionsOnly",M(38,Kt,t.permissions.MANAGE_CUSTOMERS)),r(),s("config",t.currentDialogConfig())("key",t.dialogKey)}}var Jt=(()=>{class e extends Nt{#e;#t;#i;#r;#a;#s;#o;#m;#n;#p;constructor(t){super(t),this.tableDateFacade=t,this.firstPageNumber=0,this.permissions=y,this.#e=h(Ie),this.#t=h(J),this.#i=h(V),this.#r=h(Te),this.#a=h(ae),this.#s=h(Ct),this.#o=h(Le),this.#m=h(L),this.customerUrl=K(()=>this.#m.getPathByAppRouteFeatureModule(P.Customer)),this.actionType=lt,this.dialogResources={deactivate:{header:E("CUSTOMER.DEACTIVATION_MODAL.HEADER"),body:E("CUSTOMER.DEACTIVATION_MODAL.BODY"),continueButton:E("CUSTOMER.DEACTIVATION_MODAL.CONTINUE_BUTTON"),cancelButton:E("CUSTOMER.DEACTIVATION_MODAL.CANCEL_BUTTON"),closeAriaLabel:E("SHARED.BUTTON.CANCEL")},activate:{header:E("CUSTOMER.ACTIVATION_MODAL.HEADER"),body:E("CUSTOMER.ACTIVATION_MODAL.BODY"),continueButton:E("CUSTOMER.ACTIVATION_MODAL.CONTINUE_BUTTON"),cancelButton:E("CUSTOMER.ACTIVATION_MODAL.CANCEL_BUTTON"),closeAriaLabel:E("SHARED.BUTTON.CANCEL")}},this.dialogKey="customersActivationDeactivationDialog",this.#n={message:this.dialogResources.deactivate.body,header:this.dialogResources.deactivate.header,acceptLabel:this.dialogResources.deactivate.continueButton,rejectLabel:this.dialogResources.deactivate.cancelButton,closeAriaLabel:this.dialogResources.deactivate.closeAriaLabel,accept:()=>this.confirmDeactivation()},this.#p={message:this.dialogResources.activate.body,header:this.dialogResources.activate.header,acceptLabel:this.dialogResources.activate.continueButton,rejectLabel:this.dialogResources.activate.cancelButton,closeAriaLabel:this.dialogResources.activate.closeAriaLabel,accept:()=>this.confirmActivation()},this.currentDialogConfig=ze(this.#n),this.getCustomersSource=i=>this.#i.getAll(i,this.showInactive).pipe(te(o=>this.mapResponse(o)))}ngOnInit(){this.isSmallPhoneView$=this.#s.observePrimeNgBreakpoint(Mt.Phone),this.tableDateFacade.updateSource(this.getCustomersSource),this.#r.langChanges$.pipe(ie(()=>this.#r.selectTranslate("")),ue(this.#a)).subscribe(()=>{this.initButtonActions()})}initButtonActions(){this.items=[{label:E("SHARED.BUTTON.DEACTIVATE"),icon:pt.TRASH,styleClass:"p-menuitem-error",command:()=>{this.deactivate()}}]}set showInactiveEntities(t){this.showInactive=t,this.tableDateFacade.updatePageNumber(this.firstPageNumber),this.refreshData()}addCustomer(){this.#o.addCustomerGA(),this.#t.navigateByUrl(`${this.customerUrl()}/${this.actionType.NEW}`)}handleActionsClick(t){this.selectedRowkey=t.key}navigate(t){this.#t.navigate([`${this.customerUrl()}/${t.key}`])}edit(t){this.#o.editCustomerGA(),this.#t.navigate([`${this.customerUrl()}/${this.actionType.EDIT}/${t.key}`])}deactivate(){this.currentDialogConfig.set(this.#n),this.#e.showBasicDialog(this.dialogKey,this.currentDialogConfig().header,this.currentDialogConfig().message)}confirmDeactivation(){this.#i.deactivate(this.selectedRowkey).pipe(H(1)).subscribe(()=>{this.#o.deleteCustomerGA(),this.tableDataFacade.refreshSourceData(),this.#e.closeBasicDialog()})}activate(t){this.selectedRowkey=t.key,this.currentDialogConfig.set(this.#p),this.#e.showBasicDialog(this.dialogKey,this.currentDialogConfig().header,this.currentDialogConfig().message)}confirmActivation(){this.#i.activateCustomer(this.selectedRowkey).pipe(H(1)).subscribe(()=>{this.#o.pushActivateCustomerGTMTag(),this.tableDateFacade.refreshSourceData(),this.#e.closeBasicDialog()})}mapResponse(t){return{items:t.items.map(o=>new ke(o.key,o.name,o.phoneNumber,o.email,o.createdOn,o.isTradeElite,o.isActive,ct(o.createdOn,7))),pageNumber:t.pageNumber,pageSize:t.pageSize,pagesCount:t.pagesCount,totalItemsCount:t.totalItemsCount}}refreshData(){this.tableDataFacade.refreshSourceData()}static{this.\u0275fac=function(i){return new(i||e)(f(Ve))}}static{this.\u0275cmp=I({type:e,selectors:[["app-customers"]],inputs:{showInactiveEntities:"showInactiveEntities"},standalone:!1,features:[et([Ve,Q]),Ye],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["behavior","card-to-table","itemActivePredicate","isActive",3,"pageSizeChange","pageNumberChange","sortChange","paginatorPhoneVersion","data","loading"],["actionButtonIconName","pi pi-plus-circle","actionButtonIconPosition","left","data-test-id","customers.tableHeader",3,"searchChange","actionButtonClick","searchPlaceholder","actionButtonLabel","actionButtonPermissions"],["data-test-id","customers.nameColumn","field","name",3,"title","sortable"],["appColumnTemplate",""],["data-test-id","customers.phoneColumn","field","phoneNumber",3,"title","sortable"],["data-test-id","customers.emailColumn","field","email",3,"title","sortable"],["data-test-id","customers.tradeEliteColumn","field","isTradeElite",3,"title","sortable"],["data-test-id","customers.dateRegisteredColumn","field","createdOn",3,"title","sortable"],["data-test-id","customers.actionsColumn",3,"title","showColumnTitleOnMobile",4,"ngxPermissionsOnly"],[3,"config","key"],["data-test-id","customers.activeName","size","small","styleClass","border-noround",3,"label","link"],["data-test-id","customers.activeName","size","small","styleClass","border-noround",3,"onClick","label","link"],["data-test-id","customers.email",1,"u-break-word"],["data-test-id","customers.tradeElite"],[3,"title"],[1,"flex","align-items-center"],["data-test-id","customers.dateRegistered"],["data-test-id","customers.newTag","severity","info","styleClass","ml-2",3,"value"],["data-test-id","customers.actionsColumn",3,"title","showColumnTitleOnMobile"],["data-test-id","customers.editSplitButton","icon","pi pi-pencil","styleClass","w-full",1,"w-full",3,"label","model","outlined","expandAriaLabel"],["data-test-id","customers.reactivateButton","icon","pi pi-refresh","styleClass","w-full","tooltipPosition","top","showDelay","100","outlined","true",1,"w-full",3,"label","outlined","pTooltip","escape"],["data-test-id","customers.editSplitButton","icon","pi pi-pencil","styleClass","w-full",1,"w-full",3,"onClick","onDropdownClick","label","model","outlined","expandAriaLabel"],["data-test-id","customers.reactivateButton","icon","pi pi-refresh","styleClass","w-full","tooltipPosition","top","showDelay","100","outlined","true",1,"w-full",3,"click","label","outlined","pTooltip","escape"]],template:function(i,o){i&1&&C(0,Fi,22,40,"div",0),i&2&&s("translocoRead","CUSTOMER")},dependencies:[W,wt,Bt,Pt,ft,Ot,Y,Lt,It,_t,xe,w,rt,x],encapsulation:2})}}return e})();function Vi(e,l){if(e&1){let t=N();a(0,"div",3)(1,"h1",4),u(2),m(3,"transloco"),n(),a(4,"div",5)(5,"span",6),u(6,"*"),n(),u(7),m(8,"transloco"),n(),a(9,"form",7)(10,"p-card",8)(11,"div")(12,"ppg-input-group",9),_(13,"input",10),n()(),a(14,"div",11)(15,"ppg-input-group",12),_(16,"input",13),n()(),a(17,"div",11),_(18,"app-phone-number-input",14),n(),a(19,"div",11)(20,"ppg-input-group",15),_(21,"input",16),m(22,"async"),n()()()(),a(23,"p-fluid")(24,"div",17)(25,"div",18)(26,"p-button",19),m(27,"transloco"),T("click",function(){v(t);let o=c(2);return b(o.cancelHandler())}),n()(),a(28,"div",18)(29,"p-button",20),m(30,"transloco"),T("click",function(){v(t);let o=c(2);return b(o.submitHandler())}),n()()()()()}if(e&2){let t,i=c().$implicit,o=c();r(2),S(p(3,23,"CUSTOMER.EDIT")),r(5),A(" ",p(8,25,"CUSTOMER.REQUIRED_HEADER")," "),r(2),s("formGroup",o.customerForm),r(),s("header",i("CUSTOMER_INFO_TITLE")),r(2),s("label",i("NAME"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.CustomerName),r(2),s("label",i("EMAIL"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.Email),r(2),s("formGroup",o.customerForm)("phoneControl","phoneNumber")("label",i("PHONE_NUMBER")),r(2),s("label",i("PARENT_ACCOUNT"))("required",!0)("displaySuffix",!0),r(),s("fieldType",o.ERROR_FIELD_TYPE.ParentAccountNumber),R("maxlength",(t=p(22,27,o.accountNumberRules$))==null?null:t.maxLength),r(5),g("label",p(27,29,"SHARED.BUTTON.CANCEL")),r(3),g("label",p(30,31,"SHARED.BUTTON.SUBMIT")),s("fluid",!0)}}function Ui(e,l){if(e&1&&(a(0,"div",1),C(1,Vi,31,33,"div",2),m(2,"async"),n()),e&2){let t=c();r(),s("ngIf",p(2,1,t.customer$))}}var Wt=(()=>{class e{#e;#t;#i
1;constructor(t,i,o,d,D,j,X){this.customerService=t,this.changeDetectorRef=i,this.formBuilder=o,this.router=d,this.route=D,this.customerGtmService=j,this.injector=X,this.#e=h(z),this.#t=h(L),this.#i=h(Se),this.customerUrl=K(()=>this.#t.getPathByAppRouteFeatureModule(P.Customer)),this.ERROR_FIELD_TYPE=Re,this.deactivateDialogTranslationPrefix="CUSTOMER.CANCEL_EDIT_MODAL",this.isFormSaved=!1,this.accountNumberRules$=this.#e.accountNumberValidationRules$.pipe(H(1)),this.customerKey=this.route.snapshot.params.customerKey,this.customerForm=this.formBuilder.group({name:["",[F.required]],email:["",[F.required,$.email()]],phoneNumber:[""],ppgParentAccountNumber:["",[F.required]],isTradeElite:[!1]});let je=this.#i.minDigitLengthValidator;le(()=>{let Qt=je();this.customerForm.controls.phoneNumber.setValidators([Me.customPhone(),Qt])})}get ppgParentAccountNumber(){return this.customerForm.controls.ppgParentAccountNumber}ngOnInit(){this.customer$=this.customerService.getByKey(this.customerKey).pipe(oe(t=>this.initForm(t)))}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}initForm(t){this.customerForm.patchValue({name:t.name,email:t.email,phoneNumber:this.#i.unmask(t.phoneNumber),ppgParentAccountNumber:t.ppgParentAccountNumber,isTradeElite:t.isTradeElite}),$.applyAccountNumberValidators(this.ppgParentAccountNumber,this.injector)}isDeactivationAllowed(){return this.customerForm.pristine||this.isFormSaved}submitHandler(){if(!this.customerForm.valid){Ne(this.customerForm,!0);return}let t=ee(this.customerForm.getRawValue(),[]),i=new Vt(t);this.customerService.put(i,this.customerKey).subscribe(()=>{this.router.navigate([this.customerUrl()])}),this.customerGtmService.submitDataGA(this.customerKey),Z(this.customerForm),this.isFormSaved=!0}cancelHandler(){this.router.navigate([this.customerUrl()]),this.customerGtmService.cancelSubmitGA()}static{this.\u0275fac=function(i){return new(i||e)(f(V),f(pe),f(Ee),f(J),f(de),f(Le),f(ne))}}static{this.\u0275cmp=I({type:e,selectors:[["app-edit-customer"]],standalone:!1,decls:1,vars:1,consts:[["class","flex flex-column justify-content-center align-items-center pb-2",4,"transloco","translocoRead"],[1,"flex","flex-column","justify-content-center","align-items-center","pb-2"],["class","form-container",4,"ngIf"],[1,"form-container"],["data-test-id","EditCustomer.Header"],["data-test-id","AddCustomer.RequiredHeader",1,"mt-0","pb-4"],[1,"required"],[3,"formGroup"],["styleClass","ppg-form-card",3,"header"],["labelFor","customer-name","data-test-id","EditCustomer.CustomerNameLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","name","id","customer-name","name","name","data-test-id","EditCustomer.CustomerNameInput","ppgValidator","",1,"w-full",3,"fieldType"],[1,"mt-4"],["labelFor","email","data-test-id","EditCustomer.CustomerEmailLabel",3,"label","required","displaySuffix"],["pInputText","","type","email","formControlName","email","id","email","name","email","data-test-id","EditCustomer.CustomerEmailInput","ppgValidator","","required","true",1,"w-full",3,"fieldType"],["data-test-id","EditCustomer.CustomerPhoneNumber","styleModifier","w-full","id","phoneNumber","name","phoneNumber",3,"formGroup","phoneControl","label"],["labelFor","ppgParentAccountNumber","data-test-id","EditCustomer.AccountNumberLabel",3,"label","required","displaySuffix"],["pInputText","","type","text","formControlName","ppgParentAccountNumber","id","ppgParentAccountNumber","name","ppgParentAccountNumber","data-test-id","EditCustomer.AccountNumberInput","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"],["type","button","styleClass","font-bold","outlined","true","data-test-id","EditCustomer.CancleButton",1,"flex-1",3,"click","label"],["type","submit","styleClass","font-bold","data-test-id","EditCustomer.SubmitButton",3,"click","label","fluid"]],template:function(i,o){i&1&&C(0,Ui,3,3,"div",0),i&2&&s("translocoRead","CUSTOMER.FORM")},dependencies:[ce,he,fe,Ce,_e,be,ge,ve,Oe,W,we,Y,ye,De,Pe,Be,w,x],encapsulation:2})}}return e})();var zt=()=>h(z).jobAccountValidationEnabledFeatureFlag$.pipe(te(l=>l?[y.MANAGE_JOBS,y.MANAGE_ALL_JOBS,y.MANAGE_CUSTOMER_JOBS]:[y.MANAGE_JOBS,y.MANAGE_ALL_JOBS])),ki=[{path:"",component:Q,canActivate:[G],data:{permissions:{only:[y.VIEW_CUSTOMERS],redirectTo:"/"}}},{path:`:${k.CustomerKey}/jobs/:${k.JobKey}/edit`,component:qe,loadChildren:()=>import("./chunk-WIMUQKPK.js").then(e=>e.JobModule),pathMatch:"full",canDeactivate:[U],canActivate:[G],data:{permissions:{only:()=>zt(),redirectTo:"/"},gtm:{pageTitle:"Edit Job"}}},{path:`:${k.CustomerKey}/jobs/new`,component:qe,loadChildren:()=>import("./chunk-WIMUQKPK.js").then(e=>e.JobModule),pathMatch:"full",canDeactivate:[U],canActivate:[G],data:{permissions:{only:()=>zt(),redirectTo:"/"},gtm:{pageTitle:"Add Job"}}},{path:"new",component:Gt,canDeactivate:[U],canActivate:[G],data:{permissions:{only:[y.MANAGE_CUSTOMERS],redirectTo:"/"}}},{path:`edit/:${k.CustomerKey}`,component:Wt,canDeactivate:[U],canActivate:[G],data:{permissions:{only:[y.MANAGE_CUSTOMERS],redirectTo:"/"}}},{path:`:${k.CustomerKey}`,redirectTo:`:${k.CustomerKey}/${O.CustomerDetailsJobs}`,pathMatch:"full"},{path:`:${k.CustomerKey}`,component:qt,canActivate:[G],data:{permissions:{only:[y.VIEW_CUSTOMERS],redirectTo:"/"}},children:[{path:O.CustomerDetailsJobs,loadChildren:()=>import("./chunk-WIMUQKPK.js").then(e=>e.JobModule)},{path:O.CustomerOrders,loadChildren:()=>import("./chunk-IWMVMVCP.js").then(e=>e.OrderModule)},{path:O.CustomerUsers,loadChildren:()=>import("./chunk-F5NPOZ2N.js").then(e=>e.UserModule),data:{onPage:Dt.CustomerDetailsPage}}]}],Yt=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=se({type:e})}static{this.\u0275inj=re({providers:[U],imports:[$e.forChild(ut(ki)),$e]})}}return e})();
1var Cn=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=se({type:e})}static{this.\u0275inj=re({providers:[U,mt,Ie],imports:[ht,nt,Yt,Ft,xe]})}}return e})();tt(Q,[Fe,xt,Ae,Jt],[x]);export{Cn as CustomerModule};

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.