1import{a as be}from"./chunk-RMVKAPJH.js";import{a as Ce}from"./chunk-DIDQFJMW.js";import"./chunk-QTIN2PGP.js";import"./chunk-BYXBJQAS.js";import{Ac as se,Cc as de,Ed as ue,Ia as oe,Pa as ae,Ra as le,Va as pe,kf as ge,ld as L,le as U,md as T,me as _e,mf as ve,mh as he,nd as me,od as fe,tb as ce,uc as A,vb as M,wb as O,yh as xe}from"./chunk-QFL2PSEW.js";import{Bc as ee,Cd as D,Da as h,Db as u,Dd as re,Ea as x,Fc as c,Gc as d,Hb as a,Hc as J,Id as w,Rb as o,Sb as r,Tb as v,Ub as N,Vb as V,Xb as y,_b as C,ac as f,ib as Q,ma as g,nb as n,nc as s,oc as m,pc as P,qd as te,ra as b,sd as I,td as R,ud as ie,vd as ne,wb as B,wc as X,xc as S,zc as Z}from"./chunk-OOA2NBWP.js";import"./chunk-2W3Q6YC6.js";var Se=(i,t,e)=>({"image--hidden":i,"image--previous":t,"image--next":e}),Pe=i=>({"marker--selected":i});function Re(i,t){if(i&1){let e=y();o(0,"img",9),C("click",function(){h(e);let p=f().index,_=f();return x(_.setSelectedFile(p))}),r()}if(i&2){let e=f().$implicit;a("src",e.url,Q)}}function Me(i,t){if(i&1){let e=y();o(0,"video",10),C("click",function(){h(e);let p=f().index,_=f();return x(_.setSelectedFile(p))}),v(1,"source",11),r()}if(i&2){let e=f().$implicit;n(),a("src",e.url,Q)}}function Oe(i,t){if(i&1&&(o(0,"figure",5),N(1,6),u(2,Re,1,1,"img",7)(3,Me,2,1,"video",8),V(),r()),i&2){let e=t.$implicit,l=t.index,p=f();a("ngClass",ee(4,Se,p.selected.url!==e.url&&p.selected.index!==l+1&&p.selected.index!==l-1,p.selected.index===l+1,p.selected.index===l-1)),n(),a("ngSwitch",e.type),n(),a("ngSwitchCase","image"),n(),a("ngSwitchCase","video")}}function De(i,t){if(i&1){let e=y();o(0,"div",12),C("click",function(){let p=h(e).index,_=f();return x(_.setSelectedFile(p))}),r()}if(i&2){let e=t.index,l=f();a("ngClass",Z(1,Pe,l.selected.index===e))}}var j=class i{selected=void 0;urls=[];data=g(A);ngOnInit(){this.setUrls(this.data.urls)}isSelectedImage(t){return this.selected.index===t}setSelectedFile(t){let e=this.urls[t];this.selected={index:t,url:e.url,type:e.type}}setUrls(t){let e=[".jpg",".jpeg",".png",".gif",".bmp",".tiff"],l=[".mp4",".avi",".mov",".wmv",".flv",".mkv"];this.urls=t.map((p,_)=>{let G="image";return l.some(Y=>p.includes(Y))?G="video":e.some(Y=>p.includes(Y))&&(G="image"),{index:_,url:p,type:G}}),this.urls?.length&&(this.selected={index:0,url:this.urls[0].url,type:this.urls[0].type})}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-carousel-files"]],standalone:!0,features:[S],decls:5,vars:2,consts:[[1,"carousel"],[1,"carousel-images"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"carousel-markers"],["class","marker",3,"ngClass","click",4,"ngFor","ngForOf"],[3,"ngClass"],[3,"ngSwitch"],["draggable","false","alt","Retrofit equipment","width","800px","height","500px",3,"src","click",4,"ngSwitchCase"],["width","800px","height","500px","controls","",3,"click",4,"ngSwitchCase"],["draggable","false","alt","Retrofit equipment","width","800px","height","500px",3,"click","src"],["width","800px","height","500px","controls","",3,"click"],["type","video/mp4",3,"src"],[1,"marker",3,"click","ngClass"]],template:function(e,l){e&1&&(o(0,"div",0)(1,"div",1),u(2,Oe,4,8,"figure",2),r(),o(3,"div",3),u(4,De,1,3,"div",4),r()()),e&2&&(n(2),a("ngForOf",l.urls),n(2),a("ngForOf",l.urls))},dependencies:[w,te,I,ie,ne],styles:[".carousel[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.313rem}.carousel-images[_ngcontent-%COMP%]{display:inline-flex;gap:.313rem}figure[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin:0;transition:margin .3s}figure[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{-webkit-user-select:none;user-select:none;border-radius:10px;aspect-ratio:1;object-fit:contain}figure.image--hidden[_ngcontent-%COMP%]{display:none}figure.image--previous[_ngcontent-%COMP%]{filter:brightness(.5);margin-left:-50%}figure.image--previous[_ngcontent-%COMP%]:hover{filter:brightness(.7)}figure.image--next[_ngcontent-%COMP%]{filter:brightness(.5);margin-right:-50%}figure.image--next[_ngcontent-%COMP%]:hover{filter:brightness(.7)}.carousel-markers[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;gap:.313rem}.marker[_ngcontent-%COMP%]{height:20px;width:20px;border-radius:50%;
1background-color:var(--retrofit-carousel-marker);transition:width .2s;cursor:pointer}.marker--selected[_ngcontent-%COMP%]{width:40px;border-radius:20px;background-color:var(--retrofit-carousel-marker-selected)}"]})};function we(i,t){if(i&1){let e=y();o(0,"app-icon",4),c(1,"translate"),C("copied",function(){h(e);let p=f();return x(p.copyValue())}),r()}if(i&2){let e=f();a("copyValue",e.value)("icon",e.isCopied?"check":"logs")("customTooltip",d(1,3,"NumberCopy.Icon"))}}var $=class i{label;value;canCopyClipboard=!1;isCopied=!1;copyValue(){this.isCopied=!0,setTimeout(()=>{this.isCopied=!1},1e3)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-field"]],inputs:{label:"label",value:"value",canCopyClipboard:"canCopyClipboard"},standalone:!0,features:[S],decls:8,vars:5,consts:[[1,"label"],[1,"content"],["appCopyToClipboard","","class","clip-icon",3,"copyValue","icon","customTooltip","copied",4,"ngIf"],[1,"separator"],["appCopyToClipboard","",1,"clip-icon",3,"copied","copyValue","icon","customTooltip"]],template:function(e,l){if(e&1&&(o(0,"span",0),s(1),c(2,"translate"),r(),o(3,"div",1)(4,"span"),s(5),r(),u(6,we,2,5,"app-icon",2),r(),v(7,"hr",3)),e&2){let p;n(),m(d(2,3,l.label)),n(4),m((p=l.value)!==null&&p!==void 0?p:"-"),n(),a("ngIf",l.canCopyClipboard)}},dependencies:[w,R,O,M,T,de,se],styles:["[_nghost-%COMP%]{color:var(--secondary-color)}.label[_ngcontent-%COMP%]{font-weight:var(--bold)}.content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.clip-icon[_ngcontent-%COMP%]{height:20px;width:20px;cursor:pointer}
1.separator[_ngcontent-%COMP%]{margin-top:.313rem!important;border:1px solid var(--secondary-color)}"]})};function Ie(i,t){if(i&1&&v(0,"app-retrofit-field",13),i&2){let e=f(2);a("value",e.retrofit.techName)}}function Te(i,t){if(i&1&&(o(0,"section",1)(1,"header")(2,"h2"),s(3),c(4,"translate"),c(5,"uppercase"),r()(),o(6,"div",2),v(7,"app-retrofit-field",3)(8,"app-retrofit-field",4)(9,"app-retrofit-field",5)(10,"app-retrofit-field",6),c(11,"date"),v(12,"app-retrofit-field",7),c(13,"date"),v(14,"app-retrofit-field",8)(15,"app-retrofit-field",9)(16,"app-retrofit-field",10)(17,"app-retrofit-field",11),u(18,Ie,1,1,"app-retrofit-field",12),r()()),i&2){let e=f();n(3),m(d(5,14,d(4,12,"Details"))),n(4),a("value",e.retrofit.orderCode)("canCopyClipboard",!0),n(),a("value",e.retrofit.description),n(),a("value",e.retrofit.customerCode+" - "+e.retrofit.customerName),n(),a("value",J(11,16,e.retrofit.iniMaxDate,"shortDate")),n(2),a("value",J(13,19,e.retrofit.endMaxDate,"shortDate")),n(2),a("value",e.retrofit.plantName),n(),a("value",e.retrofit.ctName),n(),a("value",e.retrofit.equipmentCode),n(),a("value",e.retrofit.product),n(),a("ngIf",e.retrofit.isClosed())}}var H=class i{retrofit;static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-data"]],inputs:{retrofit:"retrofit"},standalone:!0,features:[S],decls:1,vars:1,consts:[["class","retrofit",4,"ngIf"],[1,"retrofit"],[1,"retrofit-fields"],["label","Order",3,"value","canCopyClipboard"],["label","Description",3,"value"],["label","Customer",3,"value"],["label","Date.Max.Start",3,"value"],["label","Date.Max.End",3,"value"],["label","Plant",3,"value"],["label","Ct",3,"value"],["label","Equipment",3,"value"],["label","Product",3,"value"],["label","Technician",3,"value",4,"ngIf"],["label","Technician",3,"value"]],template:function(e,l){e&1&&u(0,Te,19,22,"section",0),e&2&&a("ngIf",l.retrofit)},dependencies:[R,re,D,O,M,$],styles:[".retrofit-fields[_ngcontent-%COMP%]{border-radius:var(--border-radius);padding:.625rem;background-color:var(--retrofits-background-color)}"]})};function Ee(i,t){if(i&1&&(o(0,"tr")(1,"td"),s(2),r(),o(3,"td"),s(4),r(),o(5,"td"),s(6),r(),o(7,"td"),s(8),r(),o(9,"td"),s(10),c(11,"translate"),r(),o(12,"td"),s(13),c(14,"translate"),r()()),i&2){let e=t.$implicit;n(2),m(e.code),n(2),m(e.name),n(2),m(e.quantity),n(2),m(e.unit),n(2),m(d(11,6,e.isSerialized?"Yes":"No")),n(3),m(d(14,8,e.automaticConsumption?"Yes":"No"))}}function ke(i,t){if(i&1&&(o(0,"div",5)(1,"div",6)(2,"h3"),s(3),c(4,"translate"),c(5,"uppercase"),r()(),o(6,"div",7)(7,"table",8)(8,"thead")(9,"tr")(10,"th"),s(11),c(12,"translate"),r(),o(13,"th"),s(14),r(),o(15,"th"),s(16),c(17,"translate"),r(),o(18,"th"),s(19),c(20,"translate"),r(),o(21,"th"),s(22),c(23,"translate"),r(),o(24,"th"),s(25),c(26,"translate"),r()()(),o(27,"tbody"),u(28,Ee,15,10,"tr",9),r()()()()),i&2){let e=f().$implicit;n(3),m(d(5,10,d(4,8,"Materials"))),n(8),m(d(12,12,"Code")),n(3),m("Material"),n(2),m(d(17,14,"Quantity")),n(3),m(d(20,16,"Unit")),n(3),m(d(23,18,"Serialized")),n(3),m(d(26,20,"Retrograde")),n(3),a("ngForOf",e.materials)}}function Fe(i,t){if(i&1&&(o(0,"tr")(1,"td"),s(2),r(),o(3,"td"),s(4),r(),o(5,"td"),s(6),r(),o(7,"td"),s(8),r(),o(9,"td"),s(10),r(),o(11,"td"),s(12),c(13,"translate"),r()()),i&2){let e=t.$implicit,l=f(4);n(2),m(e.employeeName),n(2),m(e.employeeCode),n(2),m(e.hourType),n(2),m(e.descriptionHour),n(2),m(l.parseTime(e.time)),n(2),m(d(13,6,e.timeUnit))}}function Be(i,t){if(i&1&&(o(0,"div",7)(1,"table",8)(2,"thead")(3,"tr")(4,"th"),s(5),c(6,"translate"),r(),o(7,"th"),s(8),c(9,"translate"),r(),o(10,"th"),s(11),c(12,"translate"),r(),o(13,"th"),s(14),c(15,"translate"),r(),o(16,"th"),s(17),c(18,"translate"),r(),o(19,"th"),s(20),c(21,"translate"),r()()(),o(22,"tbody"),u(23,Fe,14,8,"tr",9),r()()()),i&2){let e=f(2).$implicit;n(5),m(d(6,7,"Name")),n(3),m(d(9,9,"Employee.Number")),n(3),m(d(12,11,"Type.Time")),n(3),m(d(15,13,"Description.Time.Retrofit")),n(3),m(d(18,15,"Time")),n(3),m(d(21,17,"Unit")),n(3),a("ngForOf",e.times)}}function Ne(i,t){if(i&1&&(o(0,"div",5)(1,"div",6)(2,"h3"),s(3),c(4,"translate"),c(5,"uppercase"),r()(),u(6,Be,24,19,"div",10),r()),i&2){let e=f().$implicit;n(3),m(d(5,4,d(4,2,"Times"))),n(3),a("ngIf",e==null||e.times==null?null:e.times.length)}}function Ve(i,t){i&1&&(o(0,"div",11),s(1),c(2,"translate"),r()),i&2&&(n(),P(" ",d(2,1,"Data.NotResult")," "))}function Ae(i,t){if(i&1&&(o(0,"app-accordion",2)(1,"app-accordion-title")(2,"h3"),s(3),r()(),u(4,ke,29,22,"div",3)(5,Ne,7,6,"div",3)(6,Ve,3,3,"div",4),r()),i&2){let e=t.$implicit;a("expanded",!0),n(3),m(e.description),n(),a("ngIf",e==null||e.materials==null?null:e.materials.length),n(),a("ngIf",e==null||e.times==null?null:e.times.length),n(),a("ngIf",!(!(e==null||e.materials==null)&&e.materials.length)&&!(!(e==null||e.times==null)&&e.times.length))}}var q=class i{operations=[];parseTime(t){return parseInt(t)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-operations"]],inputs:{operations:"operations"},standalone:!0,features:[S],decls:8,vars:6,consts:[[1,"operations-container"],[3,"expanded",4,"ngFor","ngForOf"],[3,"expanded"],["class","section",4,"ngIf"],["class","not-results",4,"ngIf"],[1,"section"],[1,"title"],[1,"table-wrapper"],["aria-describedby","Retrofit operations table"],[4,"ngFor","ngForOf"],["class","table-wrapper",4,"ngIf"],[1,"not-results"]],template:function(e,l){e&1&&(o(0,"section")(1,"header")(2,"h2"),s(3),c(4,"translate"),c(5,"uppercase"),r()(),o(6,"div",0),u(7,Ae,7,5,"app-accordion",1),r()()),e&2&&(n(3),P(" ",d(5,4,d(4,2,"Operations"))," "),n(4),a("ngForOf",l.operations))},dependencies:[I,R,D,O,M,ue,me,fe],styles:[".operations-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.625rem}app-accordion[_ngcontent-%COMP%]{background-color:var(--retrofits-background-color);color:var(--secondary-color);border-radius:var(--border-radius);margin:0;--min-height: 20px;--margin: .625rem 0;--padding: 0 .625rem}h3[_ngcontent-%COMP%]{margin:0}.title[_ngcontent-%COMP%]{background-color:var(--pos-gray-2)}.title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--primary-color);margin:.625rem}.table-wrapper[_ngcontent-%COMP%]{width:calc(100% - .625rem);max-height:200px;overflow:auto;padding:.625rem;padding-top:0;margin:.625rem;margin-left:0;margin-top:0}.table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-track{box-shadow:inset 0 0 6px #0000004d;-moz-box-shadow:inset 0 0 6px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);background-color:var(--scrollbar-background-color);border-color:var(--scrollbar-border-color)}.table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px;height:6px}.table-wrapper[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:10px;background-color:var(--scrollbar-thumb-background-color);border-color:var(--scrollbar-thumb-border-color)}@supports not (-webkit-border-radius: 10px){.table-wrapper[_ngcontent-%COMP%]{scrollbar-color:var(--scrollbar-thumb-background-color) var(--scrollbar-background-color);scrollbar-width:thin}}.table-wrapper[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-collapse:collapse;border-spacing:.625rem;min-width:max-content}.table-wrapper[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;top:0;left:0;z-index:1}.table-wrapper[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{position:-webkit-sticky;position:sticky;left:0;z-index:0}.table-wrapper[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .table-wrapper[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--secondary-color)}table[_ngcontent-%COMP%], th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{width:inherit}th[_ngcontent-%COMP%]{background-color:var(--retrofits-background-color);text-align:left}td[_ngcontent-%COMP%]{background-color:transparent}.not-results[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}"]})};function Le(i,t){if(i&1){let e=y();o(0,"li")(1,"span",2),c(2,"translate"),s(3),r(),o(4,"button",3),c(5,"translate"),C("click",function(){let p=h(e).$implicit,_=f(2);return x(_.openPdf(p.pdf))}),s(6),c(7,"translate"),v(8,"app-icon",4),r()()}if(i&2){let e=t.$implicit;n(),a("title",d(2,4,"name")),n(2),m(e.fileName),n(),a("title",d(5,6,"Display")),n(2),P(" ",d(7,8,"Display")," ")}}function Ue(i,t){if(i&1&&(o(0,"app-scrollable-container"),u(1,Le,9,10,"li",1),r()),i&2){let e=f();n(),a("ngForOf",e.documents)}}function je(i,t){i&1&&(o(0,"li"),s(1),c(2,"translate"),r()),i&2&&(n(),m(d(2,1,"Data.NotResult")))}var W=class i{documents=g(A).documents??[];openPdf(t){let e=new Uint8Array(t),l=new Blob([e],{type:"application/pdf"}),p=URL.createObjectURL(l);window.open(p)}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-pdf-modal"]],standalone:!0,features:[S],decls:7,vars:7,consts:[[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"title"],[3,"click","title"],["icon","eye"]],template:function(e,l){e&1&&(o(0,"h2"),s(1),c(2,"translate"),c(3,"uppercase"),r(),o(4,"ul"),u(5,Ue,2,1,"app-scrollable-container",0)(6,je,3,3,"li",0),r()),e&2&&(n(),m(d(3,5,d(2,3,"Retrofit.Reports"))),n(4),a("ngIf",l.documents.length),n(),a("ngIf",!l.documents.length))},dependencies:[w,I,R,D,O,M,L,T],styles:["app-scrollable-container[_ngcontent-%COMP%]{max-height:150px;padding:0 .625rem 0 0;gap:.625rem}ul[_ngcontent-%COMP%]{padding:0;margin:0}li[_ngcontent-%COMP%]{width:100%;height:40px}button[_ngcontent-%COMP%]{align-items:center;height:max-content!important;display:flex;justify-content:space-between;width:max-content!important;gap:.313rem;border:1px solid var(--secondary-color)!important;color:var(--secondary-color)!important;background-color:transparent!important;border-radius:var(--border-radius-xs)!important;cursor:pointer;font-weight:var(--medium)!important}app-icon[_ngcontent-%COMP%]{height:20px;width:20px;cursor:inherit}"]})};var F=class{retrofitDetails=B(void 0);technicians=B([]);isLoading=B(!0);_loadingService=g(_e);_retrofitApiService=g(Ce);_feedbackService=g(ge);_headerService=g(ve);_translateService=g(ce);_router=g(le);_authenticationService=g(he);_dialogService=g(U);destroy(){this._headerService.removeLastBreadcrumb()}addDetailsBreadcrumb(t){let e={title:{value:t},route:{url:`/retrofits/${t}`}};this._headerService.addBreadcrumb(e)}getDetails(t){this._loadingService.setLoading(!0),this._retrofitApiService.getRetrofitByOrder(t).then(e=>this.handleData(e)).catch(()=>()=>this.handleError()).finally(()=>{this.retrofitDetails()||this.handleError(!0),this._loadingService.setLoading(!1)})}getTechnicians(){this._loadingService.setLoading(!0),this._retrofitApiService.getTechnicians().then(t=>this.technicians.set(t)).catch(()=>()=>this.handleError()).finally(()=>this._loadingService.setLoading(!1))}assignTechnician(t){this._loadingService.setLoading(!0),this._retrofitApiService.assignTechnician(this.retrofitDetails().orderCode,t).then(()=>{let e=this.technicians().find(l=>l.PERNR===t);this.retrofitDetails().tech=Number(e.PERNR),this.retrofitDetails().techName=e.ENAME.toUpperCase(),this._feedbackService.message("Technician.Assigned","success")}
1).catch(({message:e})=>()=>this._feedbackService.message(e,"error")).finally(()=>this._loadingService.setLoading(!1))}retrofitPdfFinder(t){this._loadingService.setLoading(!0),this._retrofitApiService.retrofitPdfFinder(t).then(e=>{this.openRetrofitPdfsPopup(e)}).catch(()=>{this._feedbackService.message("PDF.NotAvailable","error")}).finally(()=>this._loadingService.setLoading(!1))}regeneratePdf(t){this._loadingService.setLoading(!0),this._retrofitApiService.regeneratePdf(t).then(()=>{this._feedbackService.message("RegeneratePDF.Correctly","success")}).catch(()=>{this._feedbackService.message("RegeneratePDF.Error","error")}).finally(()=>this._loadingService.setLoading(!1))}userHasManagerRetrofitRole(){return this._authenticationService.getUserRoles().some(t=>t.name==="gestionretrofit")}openRetrofitPdfsPopup(t){this._dialogService.open(W,{width:"400px",data:{documents:t}})}handleData(t){this.retrofitDetails.set(t)}handleError(t=!1){let e=this._translateService.instant("Retrofit").toLowerCase(),p=["ThereWasAnError.Loading",{item:this._translateService.instant("Item.Details",{item:e}).toLowerCase()}];this._feedbackService.message(p,"error"),t&&this._router.navigate(["retrofits"])}};function $e(i,t){if(i&1){let e=y();o(0,"button",3),C("click",function(){h(e);let p=f(2);return x(p.regeneratePdf(p.retrofitDetails()))}),s(1),c(2,"translate"),c(3,"uppercase"),v(4,"app-icon",10),r()}i&2&&(n(),P(" ",d(3,4,d(2,2,"RegeneratePDF"))," "),n(3),a("icon","refresh-icon"))}function ze(i,t){if(i&1){let e=y();o(0,"app-retrofit-technician-autocomplete",11),C("selectTechnician",function(p){h(e);let _=f(2);return x(_.assignTechnician(p))}),r()}if(i&2){let e,l=f(2);a("permissions",l.permissions)("technicianSelected",(e=l.retrofitDetails())==null?null:e.techName)("technicians",l.technicians())}}function He(i,t){if(i&1&&v(0,"app-retrofit-operations",12),i&2){let e,l=f(2);a("operations",(e=l.retrofitDetails())==null?null:e.operations)}}function qe(i,t){if(i&1){let e=y();o(0,"app-scrollable-container")(1,"div",1),N(2),o(3,"div",2)(4,"button",3),C("click",function(){let p;h(e);let _=f();return x(_.openFiles((p=_.retrofitDetails())==null?null:p.filesUrls.filesBeforeUrls))}),s(5),c(6,"translate"),c(7,"uppercase"),v(8,"app-icon",4),r(),o(9,"button",3),C("click",function(){let p;h(e);let _=f();return x(_.openFiles((p=_.retrofitDetails())==null?null:p.filesUrls.filesAfterUrls))}),s(10),c(11,"translate"),c(12,"uppercase"),v(13,"app-icon",4),r(),o(14,"button",3),C("click",function(){let p;h(e);let _=f();return x(_.openPdf((p=_.retrofitDetails())==null?null:p.orderCode))}),s(15),c(16,"translate"),c(17,"uppercase"),v(18,"app-icon",4),r(),u(19,$e,5,6,"button",5),r(),V(),v(20,"app-retrofit-data",6),r(),o(21,"div",7),u(22,ze,1,3,"app-retrofit-technician-autocomplete",8)(23,He,1,1,"app-retrofit-operations",9),r()()}if(i&2){let e,l,p=f();n(5),P(" ",d(7,12,d(6,10,"Retrofit.Before"))," "),n(3),a("icon","media"),n(2),P(" ",d(12,16,d(11,14,"Retrofit.After"))," "),n(3),a("icon","media"),n(2),P(" ",d(17,20,d(16,18,"ViewPdf"))," "),n(3),a("icon","eye"),n(),a("ngIf",p.isManagerRetrofit),n(),a("retrofit",p.retrofitDetails()),n(2),a("ngIf",!((e=p.retrofitDetails())!=null&&e.isClosed())),n(),a("ngIf",(l=p.retrofitDetails())==null?null:l.operations)}}var ye=class i{retrofitDetails;technicians;technicianSearch;permissions;isManagerRetrofit;_activatedRoute=g(ae);_retrofitDetailsService=g(F);_roleService=g(xe);_dialogService=g(U);constructor(){this.permissions=this._roleService.getAllPermissionsUser("retrofits"),this.retrofitDetails=this._retrofitDetailsService.retrofitDetails,this.technicians=this._retrofitDetailsService.technicians,this.isManagerRetrofit=this._retrofitDetailsService.userHasManagerRetrofitRole()}ngOnInit(){let t=String(this._activatedRoute.snapshot.params.order);t&&this._retrofitDetailsService.addDetailsBreadcrumb(t),this._retrofitDetailsService.getDetails(t),this._retrofitDetailsService.getTechnicians()}ngOnDestroy(){this._retrofitDetailsService.destroy()}assignTechnician(t){this._retrofitDetailsService.assignTechnician(t)}openFiles(t){this._dialogService.open(j,{panelClass:"retrofit-panel",width:"80%",maxWidth:"1440px",height:"auto",data:{urls:t}})}openPdf(t){this._retrofitDetailsService.retrofitPdfFinder(t)}regeneratePdf(t){this._retrofitDetailsService.regeneratePdf(t)}get env(){return pe}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=b({type:i,selectors:[["app-retrofit-details"]],standalone:!0,features:[X([F]),S],decls:1,vars:1,consts:[[4,"ngIf"],[1,"retrofit-column"],["role","group"],[3,"click"],[3,"icon"],[3,"click",4,"ngIf"],[3,"retrofit"],[1,"retrofit-column","retrofit-actions"],[3,"permissions","technicianSelected","technicians","selectTechnician",4,"ngIf"],[3,"operations",4,"ngIf"],[1,"refresh-icon",3,"icon"],[3,"selectTechnician","permissions","technicianSelected","technicians"],[3,"operations"]],template:function(e,l){e&1&&u(0,qe,24,22,"app-scrollable-container",0),e&2&&a("ngIf",l.retrofitDetails())},dependencies:[w,R,D,oe,O,M,L,H,q,be,T],styles:["[_nghost-%COMP%]{height:inherit}app-scrollable-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1.25rem;height:inherit;border-radius:0}.retrofit-column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.retrofit-column[_ngcontent-%COMP%] [role=group][_ngcontent-%COMP%]{display:flex;flex-flow:column;gap:8px}.retrofit-actions[_ngcontent-%COMP%]{height:inherit}button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-radius:.313rem!important;padding:0 .625rem;height:40px!important;font-size:.875rem!important;text-align:left;font-weight:var(--medium)!important;border:1px solid var(--secondary-color)!important;background-color:var(--retrofits-background-color)!important;color:var(--secondary-color)!important}.refresh-icon[_ngcontent-%COMP%]{width:22px}@media screen and (min-width: 1440px){app-scrollable-container[_ngcontent-%COMP%]{grid-template-columns:1fr 2fr}}"]}
1)};export{ye as RetrofitDetailsComponent};
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.