PageSourceSearch

https://lapena-cundinamarca.gov.co/chunk-TCPYIWWR.js

js lapena-cundinamarca.gov.co collected 2026-09-25 11:57:08 UTC 5,256 bytes, 1 lines download raw bytes

1import{a as M,b as G,c as z,d as L}from"./chunk-IUD3Z7EH.js";import{a as D}from"./chunk-64ZEVU2M.js";import{a as P}from"./chunk-M7VQHQXJ.js";import{C as N,E as A,e as T,g as I,h as w,m as k,q as F,r as V}from"./chunk-TZ2MW36L.js";import"./chunk-SHTGYNA2.js";import{k as E,u as y}from"./chunk-4YERUHPX.js";import{Cc as C,Db as g,Ib as v,Jb as c,Pa as h,Tb as d,Xa as m,Ya as f,ac as b,da as S,ib as p,mb as l,na as _,oa as u,xb as r,yb as o,zb as s}from"./chunk-DQGQ5ICO.js";import"./chunk-4IDNTCH7.js";function H(i,n){if(i&1){let e=g();r(0,"div",4)(1,"div",5)(2,"div",6),v("click",function(){_(e);let a=c();return u(a.saved=a.editing=!1)}),s(3,"i",7),o(),r(4,"div",8)(5,"div",9),d(6,"Pol\xEDticas y T\xE9rminos"),o(),r(7,"div",10),d(8,"Tus pol\xEDticas y t\xE9rminos han sido creados correctamente"),o(),s(9,"br"),r(10,"div",11),v("click",function(){_(e);let a=c();return u(a.saved=a.editing=!1)}),d(11,"Entendido"),o()()()()}}function j(i,n){i&1&&(r(0,"span"),d(1,"Debes ingresar la descripci\xF3n del t\xE9rmino"),o())}function B(i,n){i&1&&(r(0,"span"),d(1,"El m\xEDnimo de caracteres para la descripci\xF3n es de 20"),o())}function R(i,n){i&1&&(r(0,"span"),d(1,"Ingresa m\xE1ximo 4000 caracteres"),o())}function O(i,n){if(i&1&&(r(0,"div",23),p(1,j,2,0,"span",2)(2,B,2,0,"span",2)(3,R,2,0,"span",2),o()),i&2){let e,t,a,x=c(3);m(),l("ngIf",(e=x.form.get("term"))==null||e.errors==null?null:e.errors.required),m(),l("ngIf",(t=x.form.get("term"))==null||t.errors==null?null:t.errors.minlength),m(),l("ngIf",(a=x.form.get("term"))==null||a.errors==null?null:a.errors.maxlength)}}function J(i,n){if(i&1&&(r(0,"div",19)(1,"label"),d(2,"Descripci\xF3n"),o(),s(3,"ngx-editor-menu",20)(4,"ngx-editor",21),p(5,O,4,3,"div",22),o()),i&2){let e,t=c(2);m(3),l("editor",t.editor)("toolbar",t.editorToolbar),m(),l("editor",t.editor)("placeholder",""),m(),l("ngIf",((e=t.form.get("term"))==null?null:e.invalid)&&((e=t.form.get("term"))==null?null:e.touched))}}function K(i,n){if(i&1){let e=g();r(0,"div")(1,"a",12),v("click",function(){_(e);let a=c();return u(a.cancel())}),s(2,"span",13),d(3," CANCELAR "),o(),r(4,"form",14),v("ngSubmit",function(){_(e);let a=c();return u(a.send())}),p(5,J,6,5,"div",15),r(6,"div",16),s(7,"div",17),r(8,"div",17)(9,"button",18),d(10,"Publicar"),o()()()()()}if(i&2){let e=c();m(4),l("formGroup",e.form),m(),l("ngIf",e.isAuthorized),m(4),l("disabled",e.form.invalid)}}function Q(i,n){if(i&1){let e=g();r(0,"a",26),v("click",function(){_(e);let a=c(2);return u(a.edit())}),s(1,"span",27),o()}}function U(i,n){if(i&1&&(r(0,"div")(1,"div",24),p(2,Q,2,0,"a",25),o(),s(3,"article",3),o()),i&2){let e=c();m(2),l("ngIf",e.canAdminSettings),m(),l("innerHTML",e.model==null||e.model.TermTerritorial==null?null:e.model.TermTerritorial.term,h)}}var q=class i{constructor(n,e,t){this.fb=n;this.policeTermsService=e;this.sharedSignalsService=t;C(()=>{this.canAdminSettings=this.sharedSignalsService.canAdminSettings(),this.isAuthorized=this.sharedSignalsService.isAuthorized()})}form;saved=!1;editing=!1;model={};canAdminSettings=!1;isAuthorized=!1;editor;editorToolbar=[["bold","italic"],["underline","strike"],["code","blockquote"],["ordered_list","bullet_list"],[{heading:["h1","h2","h3","h4","h5","h6"]}],["link"],["align_left","align_center","align_right","align_justify"]];ngOnInit(){this.buildForm(),this.loadPolicies(),this.editor=new L,console.log(this.canAdminSettings)}buildForm(){this.form=this.fb.group({term:["",[T.required,T.minLength(20),T.maxLength(4e3)]]})}loadPolicies(){this.policeTermsService.get().subscribe({next:n=>{n.result.forEach(e=>{this.model[e.termType]=e})},error:n=>console.error(n)})}edit(){this.editing=!0}send(){if(this.form.valid){this.saved=!0;let n=this.model.TermTerritorial||{version:0};n.term=this.form.value.term,(n.version===0?this.policeTermsService.add(n):this.policeTermsService.update(n)).subscribe({next:()=>this.editing=!1,error:t=>console.error(t)})}}cancel(){this.editing=!1}static \u0275fac=function(e){return new(e||i)(f(N),f(D),f(P))};static \u0275cmp=S({type:i,selectors:[["app-police-term"]],standalone:!0,features:[b],decls:5,vars:4,consts:[["class","modal-wrap",4,"ngIf"],[1,"content_all"],[4,"ngIf"],[1,"content-descri",3,"innerHTML"],[1,"modal-wrap"],[1,"modal-inner"],[1,"modal__close",3,"click"],[1,"icon-icon-1"],[1,"modal-wrapTxt"],[1,"modal__tit"],[1,"modal__txt"],[1,"modal__btn",3,"click"],[1,"btn-close",3,"click"],[1,"icon-close"],["novalidate","",1,"create-content","c-b",3,"ngSubmit","formGroup"],["class","row-area",4,"ngIf"],[1,"wrap-btnIdea"],[1,"wrap-btnIdea-Col"],["type","submit",1,"btn-main",3,"disabled"],[1,"row-area"],[3,"editor","toolbar"],["formControlName","term","name","description","outputFormat","html",3,"editor","placeholder"],["class","error",4,"ngIf"],[1,"error"],[1,"user-box","user-inter"],["class","btn-edit ng-scope",3,"click",4,"ngIf"],[1,"btn-edit","ng-scope",3,"click"],[1,"icon-edit"]],template:function(e,t){e&1&&(p(0,H,12,0,"div",0),r(1,"section",1),p(2,K,11,3,"div",2)(3,U,4,2,"div",2),s(4,"article",3),o()),e&2&&(l("ngIf",t.saved),m(2),l("ngIf",t.editing),m(),l("ngIf",!t.editing),m(),l("innerHTML",t.model==null||t.model.TermGlobal==null?null:t.model.TermGlobal.term,h))},dependencies:[y,E,A,k,I,w,F,V,z,M,G]})};export{q as PoliceTermComponent};

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.