1import{a as et}from"./chunk-LN463WAN.js";import{a as Be}from"./chunk-UIPJHJST.js";import{a as tt}from"./chunk-4CWYKGRF.js";import{d as Ve,e as Ge}from"./chunk-FKKOMKID.js";import{a as Wt,b as Le,c as jt,e as Ke}from"./chunk-4FYLN3EW.js";import{a as Pt,b as Ae,c as De,d as Re,e as Fe}from"./chunk-3ITSBXZF.js";import{a as we,b as bt,c as Mt}from"./chunk-253IOM5U.js";import{a as pt}from"./chunk-L5NOZEDN.js";import{a as dt}from"./chunk-JXN2BAVI.js";import{a as X}from"./chunk-52Q4K3RH.js";import"./chunk-7LWUR6CO.js";import{a as O}from"./chunk-3NGNHTEJ.js";import{ka as Ne}from"./chunk-A7CCHMQF.js";import"./chunk-XESYSQVG.js";import"./chunk-7EEKWAXL.js";import"./chunk-VUZE4AON.js";import"./chunk-35CFJI2N.js";import"./chunk-MLPC6EGR.js";import"./chunk-5SVP2Z4V.js";import"./chunk-GMHDSBFT.js";import"./chunk-MBEIUUW7.js";import"./chunk-LBQHZSLG.js";import"./chunk-BFWHXLW2.js";import"./chunk-7IKM4WMI.js";import"./chunk-2DHVDLXD.js";import"./chunk-BFKIBDNW.js";import"./chunk-BXASK2N6.js";import{j as Me,n as Pe}from"./chunk-ZGGJ5MG6.js";import{e as fe,o as F,r as ge}from"./chunk-X62WHP5Z.js";import{A as Se,B as ve,E as vt,c as Ot,e as A,g as St,h as he,l as ke,o as Ee,q as ye,r as Ie,u as Oe}from"./chunk-YSGVXHIU.js";import"./chunk-IMJAHIKL.js";import"./chunk-BYXBJQAS.js";import"./chunk-CCV6OVMJ.js";import{a as L,b as J,d as I,e as w,p as N,r as K,t as xe,v as k,w as Z}from"./chunk-KLYOBZOA.js";import{A as B,y as be}from"./chunk-OM6QTLCJ.js";import"./chunk-UZTVXZLN.js";import{a as lt}from"./chunk-6IAPTY77.js";import{U as Ce,da as Te,ea as It,ua as Q}from"./chunk-MZOABDWB.js";import"./chunk-NCVWH7ZC.js";import"./chunk-2XLJO22W.js";import"./chunk-QFZW7UBI.js";import{$ as z,Ab as oe,Ad as p,Bc as P,Bd as m,Ca as E,Cd as yt,Da as y,Ea as W,Fa as j,Fd as $,G as Xt,Ia as q,Jd as _e,K as Bt,Ld as ue,Ma as ie,Mc as h,Oc as _,Pb as D,Qb as re,Sb as ae,Sc as Gt,Tb as ht,Tc as Yt,U as Vt,Uc as zt,Vb as G,W as te,Yc as U,ad as kt,bd as u,cd as M,dd as T,hc as H,kc as g,lc as x,nc as ce,o as gt,oc as se,od as me,pb as st,pc as le,qa as xt,qb as ne,qc as C,ra as ee,rc as r,sc as s,tc as l,td as Et,u as V,ud as R,va as f,vb as a,vd as rt,xc as pe,yc as de,zc as ot}from"./chunk-3XAJQCT5.js";import"./chunk-Y5YY55GC.js";import{a as S,b as v}from"./chunk-7UXVQ3GW.js";var mt=I("[MyTickets Module] getTreeOptions",w()),_t=I("[MyTickets Module] successGetTreeOptions",w()),Nt=I("[MyTickets Module] failureGetTreeOptions"),wt=I("[MyTickets Module] resetTreeOptions"),ut=I("[MyTickets Module] selectedTreeOption",w());var Ti=t=>t.myTickets,Ye=K(Ti,t=>t.treeOptions),fi=[],ze=Z(fi,k(_t,(t,i)=>[...i.treeOptions]),k(Nt,()=>[]),k(wt,()=>[]),k(ut,(t,i)=>[...i.categories]));var Y=I("[MyTickets Module] getTickets",w()),at=I("[MyTickets Module] successGetTickets",w()),At=I("[MyTickets Module] failureGetTickets"),We=I("[MyTickets Module] failureGetTickets");var Dt=I("[MyTickets Module] sentDataToInfoPage",w()),Rt=I("[MyTickets Module] resetDataToInfoPage");var Ut=t=>t.myTickets,qe=K(Ut,t=>t.ui.treeOptionsLoading),He=K(Ut,t=>t.ui.infoPage),Ue=K(Ut,t=>t.ui.ticketsLoading),gi={treeOptionsLoading:!1,ticketsLoading:!1,infoPage:{}},$e=Z(gi,k(mt,t=>v(S({},t),{treeOptionsLoading:!0})),k(_t,t=>v(S({},t),{treeOptionsLoading:!1})),k(Dt,(t,i)=>v(S({},t),{infoPage:S({},i.dataPage)})),k(Rt,t=>v(S({},t),{infoPage:{}})),k(Y,t=>v(S({},t),{ticketsLoading:!0})),k(at,t=>v(S({},t),{ticketsLoading:!1})));var Ft=(()=>{let i=class i{constructor(){this.http=f(fe),this.apiService=f(Ne)}getTickets(e){let o=this.apiService.parseUrl(`clients/${e}/support-ticket`,"serverUrlPublic","");return this.http.get(o).pipe(V(c=>c.data))}getTreeOptionsData(e){let o=this.apiService.parseUrl(`clients/${e}/support-ticket/options`,"serverUrlPublic","");return this.http.get(o).pipe(V(c=>c.data))}createNewTicket(e,o){let c=this.apiService.parseUrl(`clients/${o}/support-ticket`,"serverUrlPublic","");return this.http.post(c,e).pipe(V(d=>d.data))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=xt({token:i,factory:i.\u0275fac,providedIn:"root"});let t=i;return t})();var Qe={icon:"chapita-fail",gradientColor:"#FFDDDD",titlePage:"MY_TICKETS.ERROR_PAGE_INFO.TITLE_PAGE",textInfo:"MY_TICKETS.ERROR_PAGE_INFO.TEXT_INFO",btnPrimary:{text:"MY_TICKETS.ERROR_PAGE_INFO.BTN_PRIMARY",url:"main/my-tickets"},btnSecondary:{text:"MY_TICKETS.ERROR_PAGE_INFO.BTN_SECONDARY",url:"main/home"}},Je={icon:"chapita-fail",gradientColor:"#FFDDDD",titlePage:"MY_TICKETS.NEW_TICKET.ERROR_LOAD_TREE_OPTIONS.TITLE_PAGE",textInfo:"MY_TICKETS.NEW_TICKET.ERROR_LOAD_TREE_OPTIONS.TEXT_INFO",btnPrimary:{text:"MY_TICKETS.NEW_TICKET.ERROR_LOAD_TREE_OPTIONS.BTN_PRIMARY",url:"main/my-tickets/new-ticket"},btnSecondary:{text:"MY_TICKETS.NEW_TICKET.ERROR_LOAD_TREE_OPTIONS.BTN_SECONDARY",url:"main/my-tickets"}},$t={icon:"chapita-success",gradientColor:"#DBFFDF",titlePage:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.SUCCESS_TITLE",textInfo:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.SUCCESS_INFO",textInfoId:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.SUCCESS_INFO_ID",btnPrimary:{text:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.BTN_FINISH",url:"main/my-tickets/"},btnSecondary:{text:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.BTN_DETAIL",url:"main/my-tickets/ticket-detail"}},Ze={icon:"chapita-fail",gradientColor:"#FFDDDD",titlePage:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.FAILURE_TITLE",textInfo:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.FAILURE_INFO",btnPrimary:{text:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.BTN_FINISH",url:"main/my-tickets"},btnSecondary:{text:"MY_TICKETS.NEW_TICKET.STATUS_TICKET.BTN_NEW_TICKET",url:"main/my-tickets/new-ticket"}};var xi=t=>t.myTickets,Tt=K(xi,t=>t.tickets),hi=[],Xe=Z(hi,k(at,(t,i)=>[...i.tickets]),k(At,()=>[]),k(We,()=>[]));var ki=(t,i)=>({"title-success":t,"title-fail":i}),Ei=(t,i)=>({card:!0,"card-success":t,"card-fail":i}),yi=(t,i)=>({btnPrimary:t,btnSecondary:i});function Ii(t,i){if(t&1&&(r(0,"span",12),l(1,"app-icon",13),u(2),s()),t&2){let n=_(2);a(2),T(" ",n==null?null:n.disclaimer)}}function Oi(t,i){if(t&1&&(l(0,"span",8),p(1,"translate"),l(2,"hr"),g(3,Ii,3,1,"span",12)),t&2){let n=_();C("innerHTML",m(1,2,n==null?null:n.textInfoId),st),a(3),x(n!=null&&n.disclaimer?3:-1)}}function Si(t,i){t&1&&ot(0)}function vi(t,i){if(t&1&&(r(0,"app-page-structure",1)(1,"div",2),l(2,"img",3),r(3,"div",4),l(4,"h5",5),p(5,"translate"),l(6,"div",6),r(7,"div",7),l(8,"span",8),p(9,"translate"),l(10,"div",9),g(11,Oi,4,4),r(12,"div",10),G(13,Si,1,0,"ng-container",11),s()()()()()),t&2){let n=i;_();let e=U(2);C("useLinearGradient",!0)("gradientColor",n==null?null:n.gradientColor),a(2),C("src",me("assets/icons/chapita/",n==null?null:n.icon,".svg"),ne),a(2),C("ngClass",rt(15,ki,(n==null?null:n.icon)==="chapita-success",(n==null?null:n.icon)==="chapita-fail"))("innerHTML",m(5,11,n==null?null:n.titlePage),st),a(3),C("ngClass",rt(18,Ei,(n==null?null:n.icon)==="chapita-success",(n==null?null:n.icon)==="chapita-fail")),a(),C("innerHTML",m(9,13,n==null?null:n.textInfo),st),a(3),x(n!=null&&n.textInfoId?11:-1),a(2),C("ngTemplateOutlet",e)("ngTemplateOutletContext",rt(21,yi,n==null?null:n.btnPrimary,n==null?null:n.btnSecondary))}}function bi(t,i){if(t&1){let n=P();r(0,"app-button",14),p(1,"translate"),h("clickEvent",function(){let o=E(n).btnSecondary,c=_();return y(c.goToRoute(o==null?null:o.url))}),s(),r(2,"app-button",15),p(3,"translate"),h("clickEvent",function(){let o=E(n).btnPrimary,c=_();return y(c.goToRoute(o==null?null:o.url))}),s()}if(t&2){let n=i.btnPrimary,e=i.btnSecondary;C("text",m(1,2,e==null?null:e.text)),a(2),C("text",m(3,4,n==null?null:n.text))}}var nt="MyTicketsPageInfo",Qt=(()=>{let i=class i{constructor(){this.destroyRef=f(q),this.TICKET_DETAIL="main/my-tickets/ticket-detail",this.router=f(F),this.myTicketsStore=f(N),this.appStore=f(N),this.client=this.appStore.selectSignal(X),this.pageInfoData=this.myTicketsStore.selectSignal(He),this.tickets=this.myTicketsStore.selectSignal(Tt),this.newClientSelected()}ngOnInit(){this.initializePageInfo()}initializePageInfo(){if(this.pageInfo=JSON.parse(O.get(nt)),!this.pageInfo){this.router.navigate(["main/my-tickets"]);return}this.myTicketsStore.dispatch(Dt({dataPage:this.pageInfo})),this.getTicketsByClient()}ngOnDestroy(){O.remove(nt),this.myTicketsStore.dispatch(Rt())}getTicketsByClient(){let e=this.client().clientId;this.myTicketsStore.dispatch(Y({clientId:e}))}newClientSelected(){J(this.client).pipe(z(),L(this.destroyRef)).subscribe({next:([e,o])=>{e.clientId!==o.clientId&&this.router.navigate(["main/my-tickets"])}})}goToRoute(e){this.requiresTicketData(e)?this.navigateToDetail(e):this.router.navigate([e])}requiresTicketData(e){return e===this.TICKET_DETAIL}navigateToDetail(e){let o=this.pageInfo?.ticketId,c=this.pageInfo?.disclaimer;this.myTicketsStore.select(Tt).pipe(L(this.destroyRef),V(d=>d.find(ct=>ct.objectId===o)),Xt(d=>!!d),te()).subscribe(d=>{O.set("ticketDetailInfo",v(S({},d),{disclaimer:c})),this.router.navigate([e])})}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=D({type:i,selectors:[["app-page-info"]],decls:3,vars:1,consts:[["buttonsTemplate",""],[3,"useLinearGradient","gradientColor"],["body","",1,"body-load"],["alt","chapita-icon",1,"chapita-style",3,"src"],[1,"info"],[3,"ngClass","innerHTML"],[1,"separator-24"],[3,"ngClass"],[1,"text",3,"innerHTML"],[1,"separator-4"],[1,"buttons-desktop"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text"],["icon","tabler-info-circle","size","24"],["buttonStyle","secondaryOutlined",3,"clickEvent","text"],["buttonStyle","primaryFilled",3,"clickEvent","text"]],template:function(o,c){if(o&1&&(g(0,vi,14,24,"app-page-structure",1),G(1,bi,4,6,"ng-template",null,0,$)),o&2){let d;x((d=c.pageInfoData())?0:-1,d)}},dependencies:[Q,Ce,It,tt,lt,Be,B],styles:["[_nghost-%COMP%]{width:100%;height:calc(100vh - 40px);position:relative}@media(min-width:992px){[_nghost-%COMP%]{height:100vh}}h5[_ngcontent-%COMP%]{color:var(--gray-4);font-size:24px}.body-load[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.body-load[_ngcontent-%COMP%] .chapita-style[_ngcontent-%COMP%]{margin-bottom:2rem}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{min-width:auto;display:flex;align-items:center;flex-direction:column;justify-content:center;padding:0 16px}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .title-success[_ngcontent-%COMP%]{color:var(--feedback-succes)}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .title-fail[_ngcontent-%COMP%]{color:var(--red-5)}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .card[_ngcontent-%COMP%]{width:100%;padding:16px;box-sizing:border-box;border-radius:8px;border:1px solid var(--gray-1);background:var(--white)}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .card-success[_ngcontent-%COMP%]{border-top:10px solid var(--feedback-succes)}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .card-fail[_ngcontent-%COMP%]{border-top:10px solid var(--red-5)}.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--gray-4);font-size:16px}@media(min-width:992px){.body-load[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{min-width:740px}}.buttons-desktop[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-top:16px}@media(min-width:992px){.buttons-desktop[_ngcontent-%COMP%]{justify-content:flex-end;flex-direction:row}.buttons-desktop[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:180px}}.separator-4[_ngcontent-%COMP%]{margin-bottom:4px}.separator-24[_ngcontent-%COMP%]{margin-bottom:24px}
1.container-button[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column}"],changeDetection:0});let t=i;return t})();var b=(function(t){return t.TREE_SELECTION="tree-selection",t.CONTACT_INFORMATION="contact-information",t.DESCRIPTION="description",t})(b||{});var Ni=["stepBystep"],wi=["btnCreate"],Ai=t=>({text:t,icon:"arrow-left",showIcon:!0}),Di=()=>({key:"description"}),Ri=t=>({items:t,key:"description",iconKey:"icon"}),ei=()=>({id:"more-details",name:"my-ticket-detail",minLength:0,maxLength:250}),ii=(t,i)=>({label:t,input:i}),Fi=t=>({requiredField:t});function Li(t,i){t&1&&ot(0)}function Ki(t,i){if(t&1&&G(0,Li,1,0,"ng-container",12),t&2){_();let n=U(10);C("ngTemplateOutlet",n)}}function Bi(t,i){t&1&&ot(0)}function Vi(t,i){if(t&1&&G(0,Bi,1,0,"ng-container",12),t&2){_();let n=U(18);C("ngTemplateOutlet",n)}}function Gi(t,i){t&1&&l(0,"div",14)}function Yi(t,i){t&1&&(r(0,"div",16),u(1),p(2,"translate"),s()),t&2&&(a(),T(" ",m(2,1,"MY_TICKETS.NEW_TICKET.CONTACT_INFO_MESSAGE")," "))}function zi(t,i){if(t&1){let n=P();r(0,"h6"),u(1),p(2,"translate"),s(),l(3,"div",14),r(4,"app-list",13),h("clickItemEvent",function(o){E(n);let c=_(2);return y(c.selectedTreeOption(o))}),s(),l(5,"div",14),g(6,Yi,3,3,"div",16)}if(t&2){let n=_(2);a(),M(m(2,3,n.getTreeOptionsTitleKey())),a(3),C("config",R(5,Ri,n.treeOptions())),a(2),x(n.shouldShowContactInfoMessage(n.treeOptions())?6:-1)}}function Wi(t,i){t&1&&ot(0)}function ji(t,i){if(t&1){let n=P();r(0,"form",15)(1,"h6"),u(2),p(3,"translate"),s(),l(4,"div",14),r(5,"div",17)(6,"label",18),u(7),p(8,"translate"),s(),r(9,"input",19),h("blur",function(o){E(n);let c=_(2);return y(c.trimValue(o))}),s()(),r(10,"div",17),l(11,"app-phone-input",20),p(12,"translate"),s(),r(13,"div",17)(14,"label",21),u(15),p(16,"translate"),s(),r(17,"input",22),h("blur",function(o){E(n);let c=_(2);return y(c.trimValue(o))}),s()(),r(18,"div",17)(19,"label",23),u(20),p(21,"translate"),s(),r(22,"input",24),h("blur",function(o){E(n);let c=_(2);return y(c.trimValue(o))}),s()(),r(23,"div",17)(24,"label",25),u(25),p(26,"translate"),s(),r(27,"input",26),h("blur",function(o){E(n);let c=_(2);return y(c.trimValue(o))}),s()(),l(28,"app-text-area",27),p(29,"translate"),r(30,"div",17)(31,"label",28),u(32),p(33,"translate"),s(),r(34,"input",29),h("blur",function(o){E(n);let c=_(2);return y(c.trimValue(o))}),s()(),l(35,"div",14),r(36,"div",30),G(37,Wi,1,0,"ng-container",12),s()()}if(t&2){let n=_(2),e=U(14);C("formGroup",n.contactInformation),a(2),M(m(3,12,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_TITLE")),a(5),T(" ",m(8,14,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.NAME")," "),a(4),C("placeholder",m(12,16,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.PHONE"))("showLabel",!1)("maxCharacters",11),a(4),T(" ",m(16,18,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.FANTASY_NAME")," "),a(5),T(" ",m(21,20,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.ADDRESS")," "),a(5),T(" ",m(26,22,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.COMMUNE")," "),a(3),C("config",rt(29,ii,m(29,24,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.LOCAL_REFERENCE"),Et(28,ei))),a(4),T(" ",m(33,26,"MY_TICKETS.NEW_TICKET.CONTACT_INFORMATION_FORM.BUSINESS_HOURS")," "),a(5),C("ngTemplateOutlet",e)}}function qi(t,i){if(t&1&&(l(0,"div",33),r(1,"p",34),u(2),p(3,"translate"),p(4,"titleCaseFirstWord"),s()),t&2){let n=_(3);a(2),T(" ",m(4,4,yt(3,1,"MY_TICKETS.NEW_TICKET.DONT_FORGET_SERIE_NUMBER",R(6,Fi,n.treeOptionRequiredField)))," ")}}function Hi(t,i){t&1&&ot(0)}function Ui(t,i){if(t&1&&(r(0,"h6"),u(1),p(2,"translate"),s(),g(3,qi,5,8),l(4,"div",14),r(5,"app-card",15),l(6,"app-text-area",31),p(7,"translate"),r(8,"p",32),u(9),p(10,"translate"),s()(),l(11,"div",14),r(12,"div",30),G(13,Hi,1,0,"ng-container",12),s()),t&2){let n=_(2),e=U(12);a(),M(m(2,7,"MY_TICKETS.NEW_TICKET.DESCRIPTION_TITLE")),a(2),x(n.treeOptionRequiredField?3:-1),a(2),C("formGroup",n.formNewTicket),a(),C("formControlName","description")("config",rt(14,ii,m(7,9,"MY_TICKETS.NEW_TICKET.DESCRIPTION_LABEL"),Et(13,ei))),a(3),T(" ",m(10,11,"MY_TICKETS.NEW_TICKET.DESCRIPTION_INFO")," "),a(4),C("ngTemplateOutlet",e)}}function $i(t,i){if(t&1){let n=P();r(0,"app-step-by-step",13,5),h("clickItemEvent",function(o){E(n);let c=_();return y(c.selectedTreeOption(o))}),s(),g(2,Gi,1,0,"div",14),g(3,zi,7,7),g(4,ji,38,32,"form",15),g(5,Ui,14,17)}if(t&2){let n=U(1),e=_();C("config",Et(5,Di)),a(2),x(!(n==null||n.steps==null)&&n.steps.length?2:-1),a(),x(e.isTreeSelectionStep()?3:-1),a(),x(e.isContactInformationStep()?4:-1),a(),x(e.isDescriptionStep()?5:-1)}}function Qi(t,i){if(t&1){let n=P();r(0,"app-button",35,6),p(2,"translate"),h("clickEvent",function(){E(n);let o=_();return y(o.onNewTicket())}),s()}t&2&&C("text",m(2,1,"MY_TICKETS.NEW_TICKET.BTN_CREATE"))}function Ji(t,i){if(t&1){let n=P();r(0,"app-button",36),p(1,"translate"),h("clickEvent",function(){E(n);let o=_();return y(o.onContactInfoSubmit())}),s()}if(t&2){let n=_();C("text",m(1,2,"MY_TICKETS.NEW_TICKET.BTN_FINISH"))("disabled",n.isSubmitting())}}function Zi(t,i){if(t&1){let n=P();r(0,"app-button",35,6),p(2,"translate"),h("clickEvent",function(){E(n);let o=_();return y(o.onNewTicket())}),s()}t&2&&C("text",m(2,1,"MY_TICKETS.NEW_TICKET.BTN_CREATE"))}function Xi(t,i){t&1&&(r(0,"app-card"),l(1,"app-text-skeleton"),s(),l(2,"div",37),r(3,"app-card"),l(4,"app-text-skeleton")(5,"div",37)(6,"app-text-skeleton")(7,"div",37)(8,"a
1pp-text-skeleton")(9,"div",37)(10,"app-text-skeleton"),s(),r(11,"div",38),l(12,"div",37),r(13,"app-card"),l(14,"app-button-skeleton"),s()())}var ni=(()=>{let i=class i{constructor(){this.destroyRef=f(q),this.router=f(F),this.appStore=f(N),this.myTicketsStore=f(N),this.formBuilder=f(ve),this.myTicketsService=f(Ft),this.translateService=f(be),this.phoneValidationService=f(Ve),this.client=this.appStore.selectSignal(X),this.userCellphone=this.appStore.selectSignal(Me),this.userFullName=this.appStore.selectSignal(Pe),this.treeOptions=this.myTicketsStore.selectSignal(Ye),this.getTreeOptionsLoading=this.myTicketsStore.selectSignal(qe),this.currentStep=b.TREE_SELECTION,this.TicketStepType=b,this.AllTreeOptions=[],this.endsInContactInfo=!1,this.isSubmitting=ie(!1),this.newClientSelected(),ue(()=>{let e=this.treeOptions();e.length>0&&this.AllTreeOptions.length===0&&_e(()=>{this.AllTreeOptions=e})})}ngOnInit(){this.getTreeOptionsByClient(),this.initNewTicketForm(),this.initContactInformationForm()}isTreeSelectionStep(){return this.currentStep===b.TREE_SELECTION}isContactInformationStep(){return this.currentStep===b.CONTACT_INFORMATION}isDescriptionStep(){return this.currentStep===b.DESCRIPTION}getTreeOptionsByClient(){let e=this.client().clientId;this.myTicketsStore.dispatch(mt({clientId:e}))}newClientSelected(){J(this.client).pipe(z(),L(this.destroyRef)).subscribe({next:([e,o])=>{e.clientId!==o.clientId&&this.router.navigate(["main/my-tickets"])}})}initNewTicketForm(){this.formNewTicket=this.formBuilder.group({description:["",[A.maxLength(250),A.minLength(0)]],code:["",[A.required]],group:["",[A.required]]})}initContactInformationForm(){this.contactInformation=this.formBuilder.group({name:["",[A.required]],phone:["",[A.required]],fantasyName:[{value:"",disabled:!0},[A.required]],address:[{value:"",disabled:!0},[A.required]],commune:["",[A.required]],localReference:[""],businessHours:["",[A.required]]})}preloadContactInformation(){let e=this.client(),o=`${e.street||""} ${e.doorNumber||""}`.trim();this.erpClientId=e.erpClientId,this.fiscalName=e.fiscalName,this.contactInformation.patchValue({fantasyName:e.fantasyName,address:o}),this.contactInformation.patchValue({phone:this.userCellphone(),name:this.userFullName()})}selectedTreeOption(e){this.addTreeOptionToStepByStep(e),this.handleTreeOptionSubCategories(e)}addTreeOptionToStepByStep(e){this.stepBystep.addStep(e,"description")}
1isEquipmentContext(e){return this.isEdfTicket()||e.some(o=>o.defaultSubCategory==="coolerEquipment")}getTreeOptionsTitleKey(){let e=this.stepBystep?.steps??[];return this.isEdfTicket()?e.length>1?"MY_TICKETS.NEW_TICKET.TREE_OPTIONS_TITLE_EDF_PROBLEM":"MY_TICKETS.NEW_TICKET.TREE_OPTIONS_TITLE_EDF_EQUIPMENT":"MY_TICKETS.NEW_TICKET.TREE_OPTIONS_TITLE"}isCoolerEquipmentSectionNode(e){return e.defaultSubCategory==="coolerEquipment"&&e.postForm!=="contactInfo"&&!e.brand&&!e.model&&!e.typeName&&!e.serie}shouldShowContactInfoMessage(e){return!e||e.length===0?this.isEdfTicket():e.every(c=>c.subCategories?.length&&c.subCategories.every(d=>!d.subCategories||d.subCategories.length===0))&&this.isEquipmentContext(e)}buildEquipmentDescription(e){let o=e.typeName?this.translateService.instant(`MY_TICKETS.NEW_TICKET.OPTION_TYPE_EQUIPMENT.${e.typeName.trim().toUpperCase()}`).toUpperCase():"",c=e.brand?.trim().toUpperCase()??"",d=e.serie?.trim()?e.serie.replace(/^0+/,""):"";return[o,c,d].filter(Boolean).join(" - ")}handleTreeOptionSubCategories(e){if(e.subCategories?.length){let c=e.subCategories.some(d=>d.brand||d.model||d.typeName)?e.subCategories.map(d=>v(S({},d),{defaultSubCategory:e.defaultSubCategory??d.defaultSubCategory,description:this.buildEquipmentDescription(d)})):e.subCategories.map(d=>v(S({},d),{defaultSubCategory:e.defaultSubCategory??d.defaultSubCategory}));this.currentStep=b.TREE_SELECTION,this.myTicketsStore.dispatch(ut({categories:c}))}else if(this.isCoolerEquipmentSectionNode(e))this.currentStep=b.TREE_SELECTION,this.myTicketsStore.dispatch(ut({categories:[]}));else{let o=e.postForm==="contactInfo";this.endsInContactInfo=o,o?(this.preloadContactInformation(),this.currentStep=b.CONTACT_INFORMATION):this.currentStep=b.DESCRIPTION,this.treeOptionRequiredField=e.requiredField,this.formNewTicket.get("
1code").setValue(e.code),this.formNewTicket.get("group").setValue(e.group),this.disclaimerTreeOption=e.disclaimer,this.needContactInformation=o}}equipmentFromSteps(){return(this.stepBystep?.steps??[]).reduce((o,c)=>({brand:c.brand??o.brand,model:c.typeName??o.model,serie:c.serie??o.serie}),{})}failureFromSteps(){let e=this.stepBystep?.steps??[];return e[e.length-1]?.description}isEdfTicket(){return(this.stepBystep?.steps??[]).some(o=>o.defaultSubCategory==="coolerEquipment")}normalizeSerie(e){return e&&(e.replace(/^0+/,"")||"0")}goBack(){this.stepBystep?.steps?.length>=1?(this.myTicketsStore.dispatch(ut({categories:this.AllTreeOptions})),this.currentStep=b.TREE_SELECTION,this.resetStepsAndForm()):this.router.navigate(["main/my-tickets"])}proceedToNextStep(){this.currentStep===b.CONTACT_INFORMATION&&(this.contactInformation.markAllAsTouched(),(this.contactInformation.valid||this.contactInformation.disabled)&&(this.currentStep=b.DESCRIPTION))}resetStepsAndForm(){this.stepBystep?.resetSteps([]),this.formNewTicket.reset({description:"",code:"",group:""}),this.contactInformation.reset({localReference:"",businessHours:""})}trimValue(e){let o=e.target.getAttribute("formControlName"),c=this.contactInformation.get(o);c.value&&typeof c.value=="string"&&(e.target.value=e.target.value.trim(),c.setValue(e.target.value))}onNewTicket(){this.formNewTicket.invalid||(this.setDisabledStatusToButton(!0),this.createNewTicket())}onContactInfoSubmit(){this.contactInformation.markAllAsTouched(),!this.contactInformation.invalid&&(this.setDisabledStatusToButton(!0),this.createNewTicket())}setDisabledStatusToButton(e){this.isSubmitting.set(e)}createNewTicket(){let e=this.client(),o=this.prepareTicketData();this.myTicketsService.createNewTicket(o,e.clientId).pipe(L(this.destroyRef)).subscribe({next:c=>{O.set(nt,v(S({},$t),{textInfoId:this.translateService.instant($t.textInfoId,{id:c.objectId}),ticketId:c.objectId,disclaimer:this.disclaimerTreeOption})),this.goToInfoPage()},error:()=>{O.set(nt,Ze),this.goToInfoPage()}})}prepareTicketData(){let e=this.equipmentFromSteps(),o=this.isEdfTicket(),c=this.formNewTicket.get("description")?.value,d=this.contactInformation.getRawValue();
1return v(S({code:this.formNewTicket.get("code")?.value,group:this.formNewTicket.get("group")?.value},o?{failureDescription:this.failureFromSteps()}:{description:c}),{client:{fiscalName:this.fiscalName,fantasyName:d.fantasyName},contact:{name:d.name,phone:d.phone},location:{address:d.address,commune:d.commune,reference:d.localReference},businessHours:d.businessHours,equipment:{brand:e.brand,model:e.model,serial:this.normalizeSerie(e.serie)}})}goToInfoPage(){this.setDisabledStatusToButton(!1),this.router.navigate(["main/my-tickets/new-ticket/page-info"])}phoneValidator(e,o){return this.phoneValidationService.createPhoneValidator(e,o)}ngOnDestroy(){this.myTicketsStore.dispatch(wt())}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=D({type:i,selectors:[["app-new-ticket"]],viewQuery:function(o,c){if(o&1&&(Gt(Ni,5),Gt(wi,5)),o&2){let d;Yt(d=zt())&&(c.stepBystep=d.first),Yt(d=zt())&&(c.btnCreate=d.first)}},decls:19,vars:8,consts:[["bodyContentTemplate",""],["btnCreateTemplate",""],["btnProceedToFinish",""],["btnAddContactInformation",""],["bodyLoadingTemplate",""],["stepBystep",""],["btnCreate",""],["header",""],[3,"clickEvent","config"],[3,"active"],["body","",1,"body-new-ticket"],[1,"content-body-new-ticket"],[4,"ngTemplateOutlet"],[3,"clickItemEvent","config"],[1,"mb-24"],[3,"formGroup"],[1,"info-message","mb-24"],[1,"mb-3"],["for","name"],["id","name","formControlName","name","type","text","maxlength","48","autocomplete","name",1,"form-control",3,"blur"],["formControlName","phone",3,"placeholder","showLabel","maxCharacters"],["for","fantasyName"],["id","fantasyName","formControlName","fantasyName","type","text","maxlength","48","autocomplete","fantasyName",1,"form-control",3,"blur"],["for","address"],["id","address","formControlName","address","type","text","maxlength","48","autocomplete","address",1,"form-control",3,"blur"],["for","commune"],["id","commune","formControlName","commune","type","text","maxlength","48","autocomplete","commune",1,"form-control",3,"blur"],["formControlName","localReference",1,"mb-3",3,"config"],["for","businessHours"],["id","businessHours","formControlName","businessHours","type","text","maxlength","48","autocomplete","businessHours",1,"form-control",3,"blur"],[1,"footer-desktop"],[3,"formControlName","config"],[1,"info-text"],[1,"mt-8"],[1,"label-info"],["buttonStyle","primaryFilled","icon","tabler-sprite.svg#tabler-ticket","iconPosition","left",3,"clickEvent","text"],["buttonStyle","primaryFilled",3,"clickEvent","text","disabled"],[1,"mb-16"],[1,"button-loading-container-desktop"]],template:function(o,c){if(o&1){let d=P();r(0,"app-page-structure"),pe(1,7),r(2,"app-title-page",8),p(3,"translate"),h("clickEvent",function(){return E(d),y(c.goBack())}),s(),l(4,"app-progress-bar",9),de(),r(5,"div",10)(6,"div",11),g(7,Ki,1,1,"ng-container"),g(8,Vi,1,1,"ng-container"),s()()(),G(9,$i,6,6,"ng-template",null,0,$)(11,Qi,3,3,"ng-template",null,1,$)(13,Ji,2,4,"ng-template",null,2,$)(15,Zi,3,3,"ng-template",null,3,$)(17,Xi,15,0,"ng-template",null,4,$)}o&2&&(a(2),C("config",R(6,Ai,m(3,4,"MY_TICKETS.NEW_TICKET.TITLE_PAGE"))),a(2),C("active",c.isSubmitting()),a(3),x(c.getTreeOptionsLoading()===!1?7:-1),a(),x(c.getTreeOptionsLoading()===!0?8:-1))},dependencies:[Q,It,vt,Ee,Ot,St,he,Se,Ie,Oe,tt,dt,De,Re,Ae,Ge,Fe,lt,et,Mt,bt,we,B,pt],styles:["[_nghost-%COMP%]{width:100%;height:100%;position:relative}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%]{width:100%}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font-size:20px;margin:0}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .info-text[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;color:var(--gray-3);font-size:12px;margin-top:4px}@media(min-width:992px){.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%]{width:75%}}@media(min-width:992px){.body-new-ticket[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex-direction:column}}.footer-desktop[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:24px}@media(min-width:992px){.footer-desktop[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.footer-desktop[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:300px}}.button-loading-container-desktop[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%;margin-top:24px}@media(min-width:992px){.button-loading-container-desktop[_ngcontent-%COMP%]{display:block}.button-loading-container-desktop[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] app-button-skeleton[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}}.label-info[_ngcontent-%COMP%]{color:var(--gray-4);font-family:var(--font-gotham-book);font-size:16px}.container-button[_ngcontent-%COMP%]{display:flex;justify-content:center;background:var(--white);padding:24px 16px;box-sizing:border-box;border-radius:10px 10px 0 0;
1box-shadow:7px 4px 20px 0 var(--box-shadow-1);border:1px solid var(--gray-1);position:relative;z-index:1}.container-button[_ngcontent-%COMP%] app-button-skeleton[_ngcontent-%COMP%]{width:100%}label[_ngcontent-%COMP%]{font-size:14px;margin-bottom:16px;color:var(--gray-4)}input[_ngcontent-%COMP%]{font-size:14px!important;border:1px solid var(--gray-1);border-radius:8px;height:40px;color:var(--gray-4);padding:8px}input[_ngcontent-%COMP%]:focus{background-color:#fff;box-shadow:none}.info-message[_ngcontent-%COMP%]{width:100%;background-color:#e4e7eb;color:#3c3c3c;border-radius:12px;padding:16px 20px;font-size:14px;line-height:20px}"],changeDetection:0});let t=i;return t})();var Jt=(function(t){return t["En Proceso"]="warning",t.Escalado="warning",t.Liberado="",t.Nuevo="",t.Cancelado="success",t["Cerrado CSC"]="success",t.Conclu\u00EDdo="success",t.Finalizado="success",t["Acci\xF3n de Cliente"]="danger",t["SN Fallado"]="danger",t["SLA expirado"]="danger",t})(Jt||{}),Zt=(function(t){return t["En Proceso"]="En Proceso",t.Escalado="Escalado",t.Liberado="Liberado",t.Nuevo="Nuevo",t["Acci\xF3n de Cliente"]="Acci\xF3n de Cliente",t["SN Fallado"]="SN Fallado",t["SLA expirado"]="SLA expirado",t})(Zt||{});var Ct=class{setStatusTxt(i){this.statusTxt=i}getClassByStatusTxt(){return Jt[this.statusTxt]}isOpenStatus(){return!!Zt[this.statusTxt]}};function tn(t,i){if(t&1&&(r(0,"p",7),u(1),p(2,"translate"),s(),r(3,"p",8),u(4),p(5,"titleCaseFirstWord"),s()),t&2){let n=_();a(),T(" ",m(2,2,"MY_TICKETS.TICKET_DETAIL.MOTIVE_LABEL")," "),a(3),T(" ",m(5,4,n.ticket.codeTxt||n.ticket.processTypeTxt||n.ticket.description)," ")}}function en(t,i){if(t&1&&(r(0,"p",9),u(1),p(2,"translate"),s(),r(3,"p",10),u(4),s()),t&2){let n=_();a(),T(" ",m(2,2,"MY_TICKETS.TICKET_DETAIL.NUMBER_TICKET_LABEL")," "),a(3),M(n.ticket.objectId)}}var oi=(()=>{let i=class i extends Ct{constructor(){super(),this.clickEvent=new oe}ngOnInit(){this.setStatusTxt(this.ticket.statusTxt),this.classByStatusTxt=this.getClassByStatusTxt()}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=D({type:i,selectors:[["app-card-ticket"]],inputs:{ticket:"ticket"},outputs:{clickEvent:"clickEvent"},features:[ht],decls:13,vars:9,consts:[[3,"click"],[1,"card-my-tickets-header"],[1,"date-ticket"],[1,"status-ticket"],[3,"text"],[1,"card-my-tickets-body"],[1,"card-my-tickets-footer"],[1,"title"],[1,"description"],[1,"info"],[1,"id-ticket"]],template:function(o,c){o&1&&(r(0,"app-card",0),h("click",function(){return c.clickEvent.emit(c.ticket)}),r(1,"div",1)(2,"p",2),u(3),s(),r(4,"div",3),l(5,"app-label",4),p(6,"translate"),W(),r(7,"svg"),l(8,"use"),s()()(),j(),r(9,"div",5),g(10,tn,6,6),s(),r(11,"div",6),g(12,en,5,4),s()()),o&2&&(a(3),M(c.ticket.fechaSrvStart),a(2),kt(c.classByStatusTxt),C("text",m(6,7,c.ticket==null?null:c.ticket.statusTxt)),a(3),H("href","./assets/icons/tabler-sprite.svg#tabler-chevron-right",null,"xlink"),a(2),x(c.ticket.codeTxt||c.ticket.processTypeTxt||c.ticket.description?10:-1),a(2),x(c.ticket.objectId?12:-1))},dependencies:[et,Pt,B,pt],styles:["app-card[_ngcontent-%COMP%]{cursor:pointer}app-card[_ngcontent-%COMP%] .card-my-tickets-header[_ngcontent-%COMP%]{width:100%;height:auto;display:flex;justify-content:space-between;align-items:center;flex-direction:row}app-card[_ngcontent-%COMP%] .card-my-tickets-header[_ngcontent-%COMP%] .date-ticket[_ngcontent-%COMP%]{color:var(--gray-3);font-family:var(--font-gotham-book);font-size:14px}app-card[_ngcontent-%COMP%] .card-my-tickets-header[_ngcontent-%COMP%] .status-ticket[_ngcontent-%COMP%]{display:flex;align-items:center}app-card[_ngcontent-%COMP%] .card-my-tickets-header[_ngcontent-%COMP%] .status-ticket[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{cursor:pointer;height:24px;width:24px;color:var(--gray-4)}app-card[_ngcontent-%COMP%] .card-my-tickets-body[_ngcontent-%COMP%]{padding-bottom:8px;border-bottom:1px solid var(--gray-1)}app-card[_ngcontent-%COMP%] .card-my-tickets-body[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:var(--gray-3);font-family:var(--font-gotham-book);font-size:14px}app-card[_ngcontent-%COMP%] .card-my-tickets-body[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:var(--gray-5);font-family:var(--font-gotham-book);font-size:16px}app-card[_ngcontent-%COMP%] .card-my-tickets-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;padding-top:8px}app-card[_ngcontent-%COMP%] .card-my-tickets-footer[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{position:relative;top:1.2px;color:var(--gray-3);font-family:var(--font-gotham-book);font-size:12px;margin-right:8px}app-card[_ngcontent-%COMP%] .card-my-tickets-footer[_ngcontent-%COMP%] .id-ticket[_ngcontent-%COMP%]{color:var(--gray-4);font-family:var(--font-gotham-book);font-size:14px}"],changeDetection:0});let t=i;return t})();var ri=(()=>{let i=class i{transform(e,o){return!e||!o?e:(o=o.toLowerCase(),e.filter(c=>c.objectId.toString().includes(o)||c.codeTxt?.toLowerCase().includes(o)))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275pipe=ae({name:"ticketsFilterPipe",type:i,pure:!0});let t=i;return t})();var nn=t=>({text:t,icon:"arrow-left",showIcon:!0}),ai=t=>
1({height:t});function on(t,i){if(t&1){let n=P();r(0,"app-card-ticket",11),h("clickEvent",function(o){E(n);let c=_(3);return y(c.goToTicketDetail(o))}),s(),l(1,"div",10)}if(t&2){let n=i.$implicit;C("ticket",n)}}function rn(t,i){if(t&1&&(r(0,"div",7),l(1,"input",8),p(2,"translate"),r(3,"div",9),W(),r(4,"svg"),l(5,"use"),s()()(),j(),l(6,"div",10),se(7,on,2,1,null,null,ce),p(9,"ticketsFilterPipe")),t&2){let n=_(2);a(),C("formControl",n.inputControl)("placeholder",m(2,3,"MY_TICKETS.SEARCH_TICKET")),a(4),H("href","./assets/icons/tabler-sprite.svg#tabler-search",null,"xlink"),a(2),le(yt(9,5,n.tickets(),n.inputControl.value))}}function an(t,i){t&1&&(r(0,"div",6),l(1,"img",12),r(2,"h5"),u(3),p(4,"translate"),s(),r(5,"p",13),u(6),p(7,"translate"),s()()),t&2&&(a(3),M(m(4,2,"MY_TICKETS.HAS_NO_TICKETS.TITLE")),a(3),T(" ",m(7,4,"MY_TICKETS.HAS_NO_TICKETS.INFO")," "))}function cn(t,i){if(t&1&&g(0,rn,10,8)(1,an,8,6,"div",6),t&2){let n,e=_();x(((n=e.tickets())==null?null:n.length)!==0?0:1)}}function sn(t,i){t&1&&(r(0,"app-card"),l(1,"app-text-skeleton"),s(),l(2,"div",10),r(3,"app-card"),l(4,"app-text-skeleton")(5,"div",14)(6,"app-text-skeleton")(7,"div",14)(8,"app-text-skeleton")(9,"div",14)(10,"app-text-skeleton"),s(),l(11,"div",10),r(12,"app-card"),l(13,"app-text-skeleton")(14,"div",14)(15,"app-text-skeleton")(16,"div",14)(17,"app-text-skeleton")(18,"div",14)(19,"app-text-skeleton"),s())}var ft="ticketDetailInfo",ci=(()=>{let i=class i{constructor(){this.inputControl=new ke(""),this.destroyRef=f(q),this.router=f(F),this.appStore=f(N),this.myTicketsStore=f(N),this.client=this.appStore.selectSignal(X),this.tickets=this.myTicketsStore.selectSignal(Tt),this.ticketsLoading=this.myTicketsStore.selectSignal(Ue),this.newClientSelected()}ngOnInit(){this.getTicketsByClient()}getTicketsByClient(){let e=this.client().clientId;this.myTicketsStore.dispatch(Y({clientId:e}))}newClientSelected(){J(this.client).pipe(z(),L(this.destroyRef)).subscribe({next:([e,o])=>{if(e.clientId!==o.clientId){let c=o.clientId;this.myTicketsStore.dispatch(Y({clientId:c}))}}})}goToNewTicket(){this.router.navigate(["main/my-tickets/new-ticket"])}goToHome(){this.router.navigate(["main/home"])}goToTicketDetail(e){O.set(ft,e),this.router.navigate(["main/my-tickets/ticket-detail"])}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=D({type:i,selectors:[["app-my-tickets"]],decls:11,vars:15,consts:[["header","",3,"clickEvent","config"],["body","",1,"body-new-ticket",3,"ngStyle"],[1,"content-body-new-ticket",3,"ngStyle"],["footer",""],[1,"container-button"],["buttonStyle","primaryFilled","icon","tabler-sprite.svg#tabler-ticket","iconPosition","left",3,"clickEvent","text"],[1,"has-no-tickets-container"],[1,"search-input"],["type","text",1,"input-my-tickets",3,"formControl","placeholder"],[1,"icon"],[1,"separator-24"],[3,"clickEvent","ticket"],["src","/assets/media/emojis/confirm-order.webp","alt","",1,"responsive-chapita-icon"],[1,"text"],[1,"separator-8"]],template:function(o,c){if(o&1&&(r(0,"app-page-structure")(1,"app-title-page",0),p(2,"translate"),h("clickEvent",function(){return c.goToHome()}),s(),r(3,"div",1)(4,"div",2),g(5,cn,2,1)(6,sn,20,0),s()(),r(7,"div",3)(8,"div",4)(9,"app-button",5),p(10,"translate"),h("clickEvent",function(){return c.goToNewTicket()}),s()()()()),o&2){let d,ct;a(),C("config",R(9,nn,m(2,5,"MY_TICKETS.TITLE_PAGE"))),a(2),C("ngStyle",R(11,ai,((d=c.tickets())==null?null:d.length)!==0?"auto":"100%")),a(),C("ngStyle",R(13,ai,((ct=c.tickets())==null?null:ct.length)!==0?"auto":"100%")),a(),x(c.ticketsLoading()===!1?5:6),a(4),C("text",m(10,7,"MY_TICKETS.CREATE_NEW_TICKET"))}},dependencies:[Q,Te,vt,Ot,St,ye,tt,dt,lt,et,Mt,bt,oi,B,ri],styles:["[_nghost-%COMP%]{width:100%;height:100%;position:relative}.has-no-tickets-container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column}h5[_ngcontent-%COMP%]{color:var(--gray-4);font-size:24px}.text[_ngcontent-%COMP%]{color:var(--gray-4);font-size:16px;text-align:center}.separator-24[_ngcontent-%COMP%]{margin-bottom:24px}.separator-16[_ngcontent-%COMP%]{margin-bottom:16px}.separator-8[_ngcontent-%COMP%]{margin-bottom:8px}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%]{width:100%}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{display:flex}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%] .input-my-tickets[_ngcontent-%COMP%]{height:48px;width:100%;border-radius:6px 0 0 6px;border:1px solid var(--gray-1);background:var(--white);padding:8px;box-sizing:border-box;outline:none;color:var(--gray-4);font-family:var(--font-gotham-book);font-size:14px!important}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{display:flex;align-items:center;margin-left:2px;padding:8px;box-sizing:border-box;height:48px;border:1px solid var(--gray-1);background:var(--white);border-radius:0 6px 6px 0}.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--gray-4);cursor:pointer}@media(min-width:992px){.body-new-ticket[_ngcontent-%COMP%] .content-body-new-ticket[_ngcontent-%COMP%]{width:75%}}@media(min-width:992px){.body-new-ticket[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex-direction:column}}.container-button[_ngcontent-%COMP%]{display:flex;justify-content:center;background:var(--white);padding:24px 16px;box-sizing:border-box;border-radius:10px 10px 0 0;
1box-shadow:7px 4px 20px 0 var(--box-shadow-1);border:1px solid var(--gray-1);position:relative;z-index:1}@media(min-width:992px){.container-button[_ngcontent-%COMP%]{justify-content:flex-end;background:var(--white);padding:24px 16px;box-sizing:border-box;border-radius:0 10px 0 0;box-shadow:7px 4px 20px 0 var(--box-shadow-1);border:1px solid var(--gray-1);position:relative;z-index:1}}.container-button[_ngcontent-%COMP%] app-button[_ngcontent-%COMP%]{width:300px;display:block}"],changeDetection:0});let t=i;return t})();var Lt=I("[MyTickets Module] sentTicketDetail",w()),Kt=I("[MyTickets Module] resetTicketDetail");var ln=t=>t.myTickets,pi=K(ln,t=>t.ticketDetail),li={},di=Z(li,k(Lt,(t,i)=>i.ticket),k(Kt,()=>li));var pn=t=>({text:t,icon:"arrow-left",showIcon:!0});function dn(t,i){if(t&1&&(r(0,"div",12),W(),r(1,"svg"),l(2,"use"),s(),j(),r(3,"div",13)(4,"p",14),u(5),p(6,"translate"),s(),r(7,"p"),u(8),s()()(),l(9,"div",15)),t&2){let n=_();a(2),H("href","./assets/icons/tabler-sprite.svg#tabler-clock",null,"xlink"),a(3),T(" ",m(6,3,"MY_TICKETS.TICKET_DETAIL.UPDATE_DATE")," "),a(3),M(n.fechaSrvRReady)}}function mn(t,i){t&1&&u(0," - ")}function _n(t,i){if(t&1&&(r(0,"p",6),u(1),p(2,"translate"),s(),r(3,"p",9),u(4),g(5,mn,1,0),u(6),s(),l(7,"div",15)),t&2){let n=_(2);a(),T(" ",m(2,4,"MY_TICKETS.TICKET_DETAIL.EQUIPMENT_LABEL")," "),a(3),T(" ",n.equipmentBrand??""," "),a(),x(n.equipmentBrand&&n.equipmentSerial?5:-1),a(),T(" ",n.equipmentSerial??""," ")}}function un(t,i){if(t&1&&(r(0,"p",6),u(1),p(2,"translate"),s(),r(3,"p",9),u(4),p(5,"titleCaseFirstWord"),s(),l(6,"div",15)),t&2){let n=_(2);a(),T(" ",m(2,2,"MY_TICKETS.TICKET_DETAIL.MOTIVE_LABEL")," "),a(3),T(" ",m(5,4,n.codeTxt||n.processTypeTxt||n.description)," ")}}function Cn(t,i){if(t&1&&(g(0,_n,8,6),g(1,un,7,6)),t&2){let n=_();x(n.equipmentBrand||n.equipmentSerial?0:-1),a(),x(n.codeTxt||n.processTypeTxt||n.description?1:-1)}}function Tn(t,i){if(t&1&&(r(0,"p",6),u(1),p(2,"translate"),s(),r(3,"p",9),u(4),p(5,"titleCaseFirstWord"),s(),l(6,"div",15)),t&2){let n=_(2);a(),T(" ",m(2,2,"MY_TICKETS.TICKET_DETAIL.MOTIVE_LABEL")," "),a(3),T(" ",m(5,4,n.codeTxt||n.processTypeTxt||n.description)," ")}}function fn(t,i){t&1&&(r(0,"p",6),u(1),p(2,"translate"),s(),r(3,"p",9),u(4),p(5,"translate"),s(),l(6,"div",15)),t&2&&(a(),T(" ",m(2,2,"MY_TICKETS.TICKET_DETAIL.REMAINING_TIME_LABEL")," "),a(3),T(" ",m(5,4,"MY_TICKETS.TICKET_DETAIL.CHECKING_TICKET_TIME")," "))}function gn(t,i){if(t&1&&(r(0,"div",16),W(),r(1,"svg"),l(2,"use"),s(),j(),r(3,"p",6),u(4),p(5,"translate"),s()(),l(6,"p",17)),t&2){let n=_(2);a(2),H("href","./assets/icons/tabler-sprite.svg#tabler-message-2",null,"xlink"),a(2),T(" ",m(5,3,"MY_TICKETS.TICKET_DETAIL.COMMENT_LABEL")," "),a(2),C("innerHTML",n.userDescription,st)}}function xn(t,i){if(t&1&&(g(0,Tn,7,6),g(1,fn,7,6),g(2,gn,7,5)),t&2){let n=_(),e=_();x(n.codeTxt||n.processTypeTxt||n.description?0:-1),a(),x(n.fechaSrvRReady&&n.fechaSrvStart&&e.showRemainingTime?1:-1),a(),x(n.userDescription?2:-1)}}function hn(t,i){if(t&1&&(l(0,"div",15),r(1,"div",18)(2,"div",19),W(),r(3,"svg"),l(4,"use"),s(),j(),r(5,"p",20),u(6),p(7,"translate"),s()(),r(8,"p",21),u(9),s()()),t&2){let n=_();a(4),H("href","./assets/icons/tabler-sprite.svg#tabler-info-circle",null,"xlink"),a(2),T(" ",m(7,3,"MY_TICKETS.TICKET_DETAIL.RECOMMENDATION_LABEL")," "),a(3),T(" ",n.disclaimer," ")}}function kn(t,i){if(t&1&&(g(0,dn,10,5),r(1,"app-card")(2,"div",3)(3,"div",4)(4,"p",5),u(5),p(6,"translate"),s(),r(7,"p",6),u(8),s()(),r(9,"div",7)(10,"div",8)(11,"p",6),u(12),p(13,"translate"),s(),r(14,"p",9),u(15),s()(),r(16,"div"),l(17,"app-label",10),p(18,"translate"),s()()(),r(19,"div",11),g(20,Cn,2,2)(21,xn,3,3),s()(),g(22,hn,10,5)),t&2){let n=i,e=_();x(n.fechaSrvRReady?0:-1),a(5),T(" ",m(6,10,"MY_TICKETS.TICKET_DETAIL.DATE")," "),a(3),M(n.fechaSrvStart),a(4),T(" ",m(13,12,"MY_TICKETS.TICKET_DETAIL.NUMBER_TICKET_LABEL")," "),a(3),M(n.objectId),a(2),kt(e.classByStatusTxt),C("text",m(18,14,n==null?null:n.statusTxt)),a(3),x(e.isCrmTicket?20:21),a(2),x(e.isCrmTicket&&n.disclaimer?22:-1)}}var mi=(()=>{let i=class i extends Ct{constructor(){super(),this.destroyRef=f(q),this.router=f(F),this.myTicketsStore=f(N),this.appStore=f(N),this.client=this.appStore.selectSignal(X),this.ticketDetail=this.myTicketsStore.selectSignal(pi),this.newClientSelected()}ngOnInit(){this.initTicket(),this.classByStatusTxt=this.getClassByStatusTxt(),this.showRemainingTime=this.isOpenStatus()}get isCrmTicket(){let e=O.get(ft);return(e?JSON.parse(e):void 0)?.isEDF??!1}initTicket(){let e=JSON.parse(O.get(ft));this.setStatusTxt(e.statusTxt),this.myTicketsStore.dispatch(Lt({ticket:e}))}newClientSelected(){J(this.client).pipe(z(),L(this.destroyRef)).subscribe({next:([e,o])=>{e.clientId!==o.clientId&&this.router.navigate(["main/my-tickets"])}})}goToMyTickets(){this.router.navigate(["main/my-tickets"])}ngOnDestroy(){O.remove(ft),this.myTicketsStore.dispatch(Kt())}};i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=D({type:i,selectors:[["app-ticket-detail"]],features:[ht],decls:6,vars:6,consts:[["header","",3,"clickEvent","config"],["body","",1,"body-ticket-detail"],[1,"content-body-ticket-detail"],[1,"card-ticket-detail-header"],[1,"detail-date"],[1,"info-detail-text","date"],[1,"info-detail-text"],[1,"detail-info"],[1,"texts"],[1,"info-detail-value"],[3,"text"],[1,"card-ticket-detail-body"],[1,"head-detail-ticket"],[1,"text-head"],[1,"date"],[1,"mb-16"],[1,"content-icon"],[1,"info-detail-value",3,"innerHTML"],[1,"disclaimer-container"],[1,"disclaimer-header"],[1,"disclaimer-title"],[1,"disclaimer-text"]],template:function(o,c){if(o&1&&(r(0,"app-page-structure")(1,"app-title-page",0),p(2,"translate"),h("clickEvent",function(){return c.goToMyTickets()}),s(),r(3,"div",1)(4,"div",2),g(5,kn,23,16),s()()()),o&2){let d;a(),C("config",R(4,pn,m(2,2,"MY_TICKETS.TICKET_DETAIL.TITLE_PAGE"))),a(4),x((d=c.ticketDetail())?5:-1,d)}},dependencies:[Q,tt,dt,et,Pt,B,pt],styles:["[_nghost-%COMP%]{width:100%;height:calc(100vh - 40px);position:relative}@media(min-width:992px){[_nghost-%COMP%]{height:100vh}}.info-detail-text[_ngcontent-%COMP%]{color:var(--gray-3);font-family:var(--font-gotham-book);font-size:16px}.info-detail-value[_ngcontent-%COMP%]{color:var(--gray-5);font-family:var(--font-gotham-book);font-size:18px;overflow:auto}.content-icon[_ngcontent-%COMP%]{display:flex}.content-icon[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:24px;height:24px;color:var(--gray-3);margin-right:4px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%]{width:100%}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] .head-detail-ticket[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:flex-end;align-items:center}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] .head-detail-ticket[_ngcontent-%COMP%] .text-head[_ngcontent-%COMP%]{display:flex;color:var(--gray-4);font-family:var(--font-gotham-book);font-size:16px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] .head-detail-ticket[_ngcontent-%COMP%] .text-head[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-right:8px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] .head-detail-ticket[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:24px;height:24px;margin-right:8px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-header[_ngcontent-%COMP%]{padding-bottom:16px;border-bottom:1px solid var(--gray-1)}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-header[_ngcontent-%COMP%] .detail-date[_ngcontent-%COMP%]{display:flex;color:var(--gray-3);font-family:var(--font-gotham-book);font-size:16px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-header[_ngcontent-%COMP%] .detail-date[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{margin-right:8px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-header[_ngcontent-%COMP%] .detail-info[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-header[_ngcontent-%COMP%] .detail-info[_ngcontent-%COMP%] .texts[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--primario-80, #3c3c3c);font-size:18px}.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%] app-card[_ngcontent-%COMP%] .card-ticket-detail-body[_ngcontent-%COMP%]{padding-top:16px;display:flex;flex-direction:column}@media(min-width:992px){.body-ticket-detail[_ngcontent-%COMP%] .content-body-ticket-detail[_ngcontent-%COMP%]{width:75%}}@media(min-width:992px){.body-ticket-detail[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-start;flex-direction:column}}.disclaimer-container[_ngcontent-%COMP%]{background-color:#e4e7eb;border-radius:16px;padding:20px}.disclaimer-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-bottom:8px}.disclaimer-header[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:20px;height:20px;color:#3c3c3c}.disclaimer-title[_ngcontent-%COMP%]{font-weight:600;font-size:16px;color:#3c3c3c;margin:0}.disclaimer-text[_ngcontent-%COMP%]{font-size:14px;color:#3c3c3c;margin:0;line-height:1.4}"],changeDetection:0});let t=i;return t})();var _i=[{path:"",component:ci},{path:"page-info",component:Qt},{path:"ticket-detail",component:mi},{path:"new-ticket",component:ni},{path:"new-ticket/page-info",component:Qt}];var ui=(()=>{let i=class i{constructor(){this.actions$=f(Le),this.myTicketsService=f(Ft),this.router=f(F),this.getTreeOptions$=Wt(()=>this.actions$.pipe(jt(mt),Vt(e=>this.myTicketsService.getTreeOptionsData(e.clientId).pipe(V(o=>_t({treeOptions:o})),Bt(()=>(O.set(nt,Je),this.router.navigate(["main/my-tickets/new-ticket/page-info"]),gt(Nt()))))))),this.getTickets$=Wt(()=>this.actions$.pipe(jt(Y),Vt(e=>this.myTicketsService.getTickets(e.clientId).pipe(V(o=>at({tickets:o})),Bt(({error:o})=>o.httpStatus==="404"&&o.code==="30"?gt(at({tickets:[]})):(O.set(nt,Qe),this.router.navigate(["main/my-tickets/page-info"]),gt(At())))))))}};i.\u0275fac=function(o){return new(o||i)},i.\u0275prov=xt({token:i,factory:i.\u0275fac});let t=i;return t})();
1var Ci={tickets:Xe,treeOptions:ze,ticketDetail:di,ui:$e};var Ea=(()=>{let i=class i{};i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=re({type:i}),i.\u0275inj=ee({providers:[xe("myTickets",Ci),Ke(ui)],imports:[ge.forChild(_i)]});let t=i;return t})();export{Ea as MyTicketsModule};
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.