PageSourceSearch

https://jesusmaria-santander.gov.co/chunk-NTWRDLFQ.js

js jesusmaria-santander.gov.co collected 2026-09-25 11:57:27 UTC 7,584 bytes, 1 lines download raw bytes

1import{a as Z}from"./chunk-RZT2WZMC.js";import"./chunk-JWSAKKVQ.js";import"./chunk-LT72JKOL.js";import"./chunk-AHQSOXDD.js";import"./chunk-XBBEU2YL.js";import"./chunk-I7CB4NGY.js";import{a as O}from"./chunk-EOEOCEUL.js";import{a as P}from"./chunk-4SYJTDU2.js";import{a as H}from"./chunk-LH7AKJBU.js";import{a as D}from"./chunk-M7VQHQXJ.js";import{b as A,g as L}from"./chunk-BAGWPQZV.js";import{A as z,C as G,E as U,c as F,e as v,g as V,h as q,m as j,q as N,r as M,x as R}from"./chunk-TZ2MW36L.js";import{a as w}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import{t as T}from"./chunk-MTKRVMUJ.js";import"./chunk-SHTGYNA2.js";import{k as E,u as I}from"./chunk-4YERUHPX.js";import{Cc as B,Db as k,Ib as g,Jb as c,Qa as x,Tb as m,Vb as y,Xa as s,Ya as f,ac as C,da as S,ib as d,mb as a,na as _,oa as b,xb as r,yb as o,zb as u}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";function $(t,n){t&1&&(r(0,"span"),m(1,"Debes ingresar el nombre del logo"),o())}function K(t,n){if(t&1&&(r(0,"div",16),d(1,$,2,0,"span",8),o()),t&2){let e,i=c();s(),a("ngIf",(e=i.form.get("name"))==null?null:e.hasError("required"))}}function Q(t,n){t&1&&(r(0,"span"),m(1,"Debes ingresar la url del logo"),o())}function W(t,n){t&1&&(r(0,"span"),m(1,"Debes ingresar una url v\xE1lida"),o())}function X(t,n){if(t&1&&(r(0,"div",16),d(1,Q,2,0,"span",8)(2,W,2,0,"span",8),o()),t&2){let e,i,l=c();s(),a("ngIf",(e=l.form.get("url"))==null?null:e.hasError("required")),s(),a("ngIf",(i=l.form.get("url"))==null?null:i.hasError("pattern"))}}function Y(t,n){if(t&1&&(r(0,"div"),u(1,"img",17),o()),t&2){let e=c();s(),a("src",e.block.image,x)}}function ee(t,n){if(t&1&&(r(0,"div"),m(1),o()),t&2){let e=c();s(),y("Progreso ",e.file.progress,"")}}function te(t,n){if(t&1){let e=k();r(0,"input",18),g("end",function(l){_(e);let p=c();return b(p.endFile(l))})("error",function(){_(e);let l=c();return b(l.uploadError())})("start",function(l){_(e);let p=c();return b(p.startFile(l))}),o()}if(t&2){let e=c();a("obj",e.block)("reg",".(gif|jpg|jpeg|png)$")("maxw",200)("maxh",200)("size",5242880)("contentsize",1)("param","?asFormat=png")}}function ie(t,n){t&1&&(r(0,"span"),m(1,"Debes subir una imagen"),o())}function ne(t,n){if(t&1&&(r(0,"div",16),d(1,ie,2,0,"span",8),o()),t&2){let e,i=c();s(),a("ngIf",(e=i.form.get("url"))==null?null:e.hasError("required"))}}function oe(t,n){if(t&1){let e=k();r(0,"button",19),g("click",function(){_(e);let l=c();return b(l.remove())}),u(1,"span",20),m(2," Eliminar "),o()}if(t&2){let e=c();a("disabled",e.isBusy)}}var J=class t{constructor(n,e,i,l,p,h){this.fb=n;this.blocksService=e;this.helperService=i;this.modalService=l;this.activatedRoute=p;this.sharedSignalsService=h;B(()=>{this.gov=this.sharedSignalsService.gov(),this.topBar=this.sharedSignalsService.topBar(),this.linkAccess=this.sharedSignalsService.linkAccess(),this.logoTopBar=this.sharedSignalsService.logoTopBar(),this.headerTitle=this.sharedSignalsService.headerTitle()})}id;identifier;count;form;block;file=null;isBusy=!1;gov;topBar;linkAccess;logoTopBar;headerTitle;ngOnInit(){this.activate()}buildForm(){this.form=this.fb.group({name:[this.block.name,[v.required,v.maxLength(100)]],url:[this.block.url,[v.required,v.pattern("https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)")]],image:[this.block.image,v.required]})}activate(){this.id=parseInt(this.activatedRoute.snapshot.paramMap.get("id"),10),this.identifier=parseInt(this.activatedRoute.snapshot.paramMap.get("identifier"),10),this.count=this.activatedRoute.snapshot.queryParamMap.get("count"),this.blocksService.get(this.id).subscribe({next:n=>{this.block=n,this.block.json=JSON.parse(n.frame),this.buildForm(),this.identifier?this.blocksService.getLogo(this.identifier).subscribe({next:e=>this.block=e,error:e=>{this.helperService.handlerException(e)}}):(this.block.type=this.block.blockTypeID===4?0:1,this.block.blockID=this.block.blockID,this.block.order=this.count?parseInt(this.count)+1:0)},error:n=>{this.helperService.handlerException(n)}})}send(){if(this.form.valid&&!this.isBusy){this.isBusy=!0;let n=this.form.value;this.block.name=n.name,this.block.url=n.url,this.block.image=n.image,(this.block.blockLogosID?this.blocksService.updateLogo(this.block):this.blocksService.addLogo(this.block)).subscribe({next:()=>this.back(),error:i=>{this.isBusy=!1,this.helperService.handlerException(i)}})}else this.form.markAllAsTouched()}back(){this.blocksService.goBack(this.activatedRoute.snapshot.params)}cancel(){this.back()}startFile(n){this.isBusy=!0,this.file=n}endFile(n){this.block.image=n.filePath,this.file=null,this.isBusy=!1}uploadError(){this.isBusy=!1}remove(){this.modalService.showConfirm("\xBFDeseas eliminar el logo?").subscribe({next:()=>{this.blocksService.deleteLogo(this.block.blockLogosID).subscribe({next:()=>this.back(),error:this.helperService.handlerException})}})}static \u0275fac=function(e){return new(e||t)(f(G),f(H),f(w),f(T),f(A),f(D))};static \u0275cmp=S({type:t,selectors:[["app-admin-block-logos"]],standalone:!0,features:[C],decls:34,vars:9,consts:[[1,"admin-content"],[3,"ngSubmit","formGroup"],["for","name"],["id","name","type","text","formControlName","name","maxlength","100","required","","aria-required","true"],["class","error",4,"ngIf"],["for","url"],["id","url","type","url","formControlName","url","maxlength","200","required","","aria-required","true"],["for","image"],[4,"ngIf"],["name","file","type","file","appUploadFile","","accept","image/*","multiple","false",3,"obj","reg","maxw","maxh","size","contentsize","param","end","error","start",4,"ngIf"],["type","hidden","formControlName","image","required","","aria-required","true"],["type","button",1,"btn-main-2",3,"click"],[1,"icon-close"],["type","submit",1,"btn-main-2",3,"click","disabled"],[1,"icon-save-2"],["type","button","class","setBanner-btnDelr",3,"disabled","click",4,"ngIf"],[1,"error"],["alt","Logo",3,"src"],["name","file","type","file","appUploadFile","","accept","image/*","multiple","false",3,"end","error","start","obj","reg","maxw","maxh","size","contentsize","param"],["type","button",1,"setBanner-btnDelr",3,"click","disabled"],[1,"icon-delete"]],template:function(e,i){if(e&1&&(u(0,"app-admin-header")(1,"app-admin-desktop"),r(2,"div",0)(3,"form",1),g("ngSubmit",function(){return i.send()}),r(4,"div")(5,"label",2),m(6,"Nombre*"),o(),u(7,"input",3),d(8,
1K,2,1,"div",4),o(),r(9,"div")(10,"label",5),m(11,"Url*"),o(),r(12,"p"),m(13,"Ej. http://www.contoso.com"),o(),u(14,"input",6),d(15,X,3,2,"div",4),o(),r(16,"div")(17,"label",7),m(18,"Imagen*"),o(),r(19,"p"),m(20,"Se recomienda una im\xE1gen de m\xE1ximo 200px de ancho y m\xE1ximo 200px de alto"),o(),d(21,Y,2,1,"div",8)(22,ee,2,1,"div",8)(23,te,1,7,"input",9),u(24,"input",10),d(25,ne,2,1,"div",4),o(),r(26,"div")(27,"button",11),g("click",function(){return i.cancel()}),u(28,"span",12),m(29," Cancelar "),o(),r(30,"button",13),g("click",function(){return i.send()}),u(31,"span",14),m(32," Guardar "),o(),d(33,oe,3,1,"button",15),o()()()),e&2){let l,p,h;s(3),a("formGroup",i.form),s(5),a("ngIf",((l=i.form.get("name"))==null?null:l.invalid)&&((l=i.form.get("name"))==null?null:l.touched)),s(7),a("ngIf",((p=i.form.get("url"))==null?null:p.invalid)&&((p=i.form.get("url"))==null?null:p.touched)),s(6),a("ngIf",i.block.image),s(),a("ngIf",i.file),s(),a("ngIf",!i.file),s(2),a("ngIf",((h=i.form.get("url"))==null?null:h.invalid)&&((h=i.form.get("url"))==null?null:h.touched)),s(5),a("disabled",i.isBusy),s(3),a("ngIf",i.block.blockLogosID)}}
1,dependencies:[I,E,U,j,F,V,q,R,z,N,M,Z,P,L,O]})};export{J as AdminBlockLogosComponent};

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.