PageSourceSearch

https://www.cambrasabadell.org/chunk-BXQGKP2K.js

js cambrasabadell.org collected 2026-10-02 02:42:00 UTC 3,087 bytes, 1 lines download raw bytes

1import{a as j}from"./chunk-K7WGX7UJ.js";import"./chunk-BYXBJQAS.js";import"./chunk-CAGGHHBW.js";import{A as T,B as D,z as w}from"./chunk-54K5274F.js";import{N as x,O as R,P as C,j as P,l as y,r as v}from"./chunk-FSCDA4YL.js";import{Ab as a,Bb as E,Hb as I,Mc as O,Tb as m,Ub as h,Vb as g,Xc as F,Ya as o,Za as p,a as b,ac as N,gc as l,ha as _,hc as d,kd as M,nb as S,pb as f,zb as s}from"./chunk-32HDVXFX.js";function k(t,r){t&1&&(s(0,"span",9),m(1),l(2,"translate"),a()),t&2&&(o(),h(d(2,1,"ERRORSENDFORM")))}function L(t,r){t&1&&(s(0,"span",10)(1,"span",11),E(2,"i",12),a(),m(3),l(4,"translate"),a()),t&2&&(o(3),g(" ",d(4,1,"SUCCESS_SEND_OPINION_FORM")," "))}var X=(()=>{let r=class r{constructor(n,i,e,u,c){this.fb=n,this._router=i,this._service=e,this._activatedRoute=u,this._routingService=c,this.language=v.ca,this.product="",this.opinionPutError=!1,this.opinionPutSuccess=!1,this.opinionFormEnabled=!0,this.id=-1,this._routingService.language$.subscribe(B=>this.language=B??v.ca)}ngOnInit(){this._activatedRoute.queryParams.subscribe({next:n=>{this._service.getOpinion(n.token).subscribe({next:i=>{let e=i.data.map(({id:u,attributes:c})=>b({id:u},c))[0];this.id=e.id,this.inputData={name:e.userName,lastName:e.userLastname,email:e.userEmail,companyName:e.companyName,companyPosition:e.companyPosition,productNumber:e.productNumber},this.product=e.productEditionName},error:i=>{console.error(i)}})}})}onSubmit(n){this.opinionFormEnabled=!1,this._service.updateOpinion(this.id,{rating:n.rating,summary:n.summary,commentary:n.commentary,completed:!0}).subscribe({next:()=>{this.opinionPutError=!1,this.opinionPutSuccess=!0,this.opinionFormEnabled=!0,new Promise(i=>setTimeout(i,5e3)).then(()=>{this._router.navigate(["/"])})},error:i=>{console.error(i),this.opinionFormEnabled=!0,this.opinionPutError=!0,this.opinionPutSuccess=!1}})}};r.\u0275fac=function(i){return new(i||r)(p(w),p(y),p(M),p(P),p(C))},r.\u0275cmp=_({type:r,selectors:[["app-new-opinion"]],standalone:!0,features:[N],decls:14,vars:12,consts:[[1,"container"],[1,"element-content"],[1,"header"],[1,"highlighted","fs-4"],[1,"strong","fs-5"],[1,"fw-bold","fs-5"],[3,"onSubmit","input","disableFields","disabled"],["class","alert alert-danger",4,"ngIf"],["class","alert alert-success",4,"ngIf"],[1,"alert","alert-danger"],[1,"alert","alert-success"],[1,"highlighted"],[1,"bi","bi-check2-circle","text-succeed"]],template:function(i,e){i&1&&(s(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),m(4),l(5,"translate"),a()(),s(6,"div",4),m(7),l(8,"translate"),s(9,"span",5),m(10),a()(),s(11,"app-opinion-form",6),I("onSubmit",function(c){return e.onSubmit(c)}),a(),S(12,k,3,3,"span",7)(13,L,5,3,"span",8),a()()),i&2&&(o(4),h(d(5,8,"OPINION_FORM.title")),o(3),g("",d(8,10,"OPINION_FORM.subtitle"),": "),o(3),h(e.product),o(),f("input",e.inputData)("disableFields",!0)("disabled",!e.opinionFormEnabled),o(),f("ngIf",e.opinionPutError),o(),f("ngIf",e.opinionPutSuccess))},dependencies:[F,O,T,D,R,x,j],styles:[".container[_ngcontent-%COMP%]{margin-top:150px;padding-top:50px}"]});let t=r;return t})();export{X as NewOpinionComponent};

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.