PageSourceSearch

https://anserma-caldas.gov.co/chunk-7S2UMO4O.js

js anserma-caldas.gov.co collected 2026-09-25 11:18:34 UTC 15,682 bytes, 1 lines download raw bytes

1import{a as ne}from"./chunk-FWFQXZIB.js";import{a as ie}from"./chunk-FUDUIXY4.js";import{a as le}from"./chunk-YWAL7HVF.js";import{a as ee}from"./chunk-I7CB4NGY.js";import{a as te}from"./chunk-KDYAPSMV.js";import{A as K,B as X,D as $,b as j,c as L,g as q,h as Y,j as O,l as Q,m as R,s as z,t as G,u as Z,x as J}from"./chunk-TZ2MW36L.js";import{a as N}from"./chunk-WZBVDNS6.js";import"./chunk-3KOQRKYT.js";import{t as W}from"./chunk-MTKRVMUJ.js";import{c as H}from"./chunk-SHTGYNA2.js";import{k as U,u as B}from"./chunk-4YERUHPX.js";import{Db as A,Ib as h,Jb as u,Pb as E,Qb as C,Rb as w,Sb as M,Tb as o,Ub as P,Xa as s,Ya as v,Yb as g,Zb as f,_b as _,ac as T,bc as S,da as F,ib as y,mb as p,na as m,oa as d,tb as k,v as I,vb as V,wb as D,xb as n,yb as r,zb as x}from"./chunk-DQGQ5ICO.js";import{e as ae}from"./chunk-4IDNTCH7.js";var oe=ae(le());var se=["formUrl"],me=["form"],de=["formdelegate"],b=()=>({standalone:!0});function ce(c,e){c&1&&(n(0,"span"),o(1,"Debes ingresar una URL"),r())}function pe(c,e){c&1&&(n(0,"span"),o(1,"Url inv\xE1lida"),r())}function ue(c,e){if(c&1&&(n(0,"div",19),y(1,ce,2,0,"span",20)(2,pe,2,0,"span",20),r()),c&2){u();let t=M(6);s(),p("ngIf",t==null||t.errors==null?null:t.errors.required),s(),p("ngIf",t==null||t.errors==null?null:t.errors.pattern)}}function he(c,e){if(c&1){let t=A();n(0,"form",14,0),h("ngSubmit",function(){m(t);let i=u();return d(i.saveUrlAttention())}),n(2,"div",15)(3,"label"),o(4,"Ingresa la Url del sistema externo de Agendamiento de citas"),r(),n(5,"input",16,1),_("ngModelChange",function(i){m(t);let a=u();return f(a.attentionUrl.value,i)||(a.attentionUrl.value=i),d(i)}),r(),y(7,ue,3,2,"div",17),r(),n(8,"div",15),x(9,"input",18),r()()}if(c&2){let t=M(1),l=M(6),i=u();s(5),g("ngModel",i.attentionUrl.value),s(2),p("ngIf",(l==null||l.errors==null?null:l.errors.required)&&t.submitted),s(2),p("disabled",i.formUrlIsBusy)}}function ge(c,e){if(c&1){let t=A();n(0,"div")(1,"div",28)(2,"div",29)(3,"input",30),_("ngModelChange",function(i){let a=m(t).$implicit;return f(a.state,i)||(a.state=i),d(i)}),r(),n(4,"span",31),o(5),r()(),n(6,"div",32)(7,"div",33)(8,"label",34),o(9,"Hora de inicio jornada ma\xF1ana"),r(),n(10,"div",35)(11,"select",36),_("ngModelChange",function(i){let a=m(t).$implicit;return f(a.hourInitAm,i)||(a.hourInitAm=i),d(i)}),h("change",function(){let i=m(t).$implicit,a=u(2);return d(a.compareHours(i,"AM"))})("click",function(){let i=m(t).$implicit,a=u(2);return d(a.setHour(i,"AM"))}),n(12,"option",37),o(13,"06:00 a.m."),r(),n(14,"option",38),o(15,"07:00 a.m."),r(),n(16,"option",39),o(17,"08:00 a.m."),r(),n(18,"option",40),o(19,"09:00 a.m."),r(),n(20,"option",41),o(21,"10:00 a.m."),r(),n(22,"option",42),o(23,"11:00 a.m."),r(),n(24,"option",43),o(25,"12:00 m."),r()()()(),n(26,"div",33)(27,"label",34),o(28,"Hora de salida jornada ma\xF1ana"),r(),n(29,"div",35)(30,"select",36),_("ngModelChange",function(i){let a=m(t).$implicit;return f(a.hourEndAm,i)||(a.hourEndAm=i),d(i)}),h("change",function(){let i=m(t).$implicit,a=u(2);return d(a.compareHours(i,"AM"))})("click",function(){let i=m(t).$implicit,a=u(2);return d(a.setHour(i,"AM"))}),n(31,"option",37),o(32,"06:00 a.m."),r(),n(33,"option",38),o(34,"07:00 a.m."),r(),n(35,"option",39),o(36,"08:00 a.m."),r(),n(37,"option",40),o(38,"09:00 a.m."),r(),n(39,"option",41),o(40,"10:00 a.m."),r(),n(41,"option",42),o(42,"11:00 a.m."),r(),n(43,"option",43),o(44,"12:00 m."),r()()()(),n(45,"div",33)(46,"label",34),o(47,"Hora de inicio jornada tarde"),r(),n(48,"div",35)(49,"select",36),_("ngModelChange",function(i){let a=m(t).$implicit;return f(a.hourInitPm,i)||(a.hourInitPm=i),d(i)}),h("change",function(){let i=m(t).$implicit,a=u(2);return d(a.compareHours(i,"PM"))})("click",function(){let i=m(t).$implicit,a=u(2);return d(a.setHour(i,"PM"))}),n(50,"option",43),o(51,"12:00 m."),r(),n(52,"option",44),o(53,"1:00 p.m."),r(),n(54,"option",45),o(55,"2:00 p.m."),r(),n(56,"option",46),o(57,"3:00 p.m."),r(),n(58,"option",47),o(59,"4:00 p.m."),r(),n(60,"option",48),o(61,"5:00 p.m."),r(),n(62,"option",49),o(63,"6:00 p.m."),r(),n(64,"option",50),o(65,"7:00 p.m."),r(),n(66,"option",51),o(67,"8:00 p.m."),r()()()(),n(68,"div",33)(69,"label",34),o(70,"Hora de salida jornada tarde"),r(),n(71,"div",35)(72,"select",36),_("ngModelChange",function(i){let a=m(t).$implicit;return f(a.hourEndPm,i)||(a.hourEndPm=i),d(i)}),h("change",function(){let i=m(t).$implicit,a=u(2);return d(a.compareHours(i,"PM"))})("click",function(){let i=m(t).$implicit,a=u(2);return d(a.setHour(i,"PM"))}),n(73,"option",43),o(74,"12:00 m."),r(),n(75,"option",44),o(76,"1:00 p.m."),r(),n(77,"option",45),o(78,"2:00 p.m."),r(),n(79,"option",46),o(80,"3:00 p.m."),r(),n(81,"option",47),o(82,"4:00 p.m."),r(),n(83,"option",48),o(84,"5:00 p.m."),r(),n(85,"option",49),o(86,"6:00 p.m."),r(),n(87,"option",50),o(88,"7:00 p.m."),r(),n(89,"option",51),o(90,"8:00 p.m."),r()()()()()()()}if(c&2){let t=e.$implicit;s(3),g("ngModel",t.state),p("ngModelOptions",S(23,b)),s(2),P(t.day),s(3),p("for","hourInitAm_"+t.attentionConfigID),s(3),g("ngModel",t.hourInitAm),p("ngModelOptions",S(24,b))("value",t.hourInitAm)("id","hourInitAm_"+t.attentionConfigID),s(16),p("for","hourEndAm_"+t.attentionConfigID),s(3),g("ngModel",t.hourEndAm),p("ngModelOptions",S(25,b))("value",t.hourEndAm)("id","hourEndAm_"+t.attentionConfigID),s(16),p("for","hourInitAm_"+t.attentionConfigID),s(3),g("ngModel",t.hourInitPm),p("ngModelOptions",S(26,b))("value",t.hourInitPm)("id","hourInitAm_"+t.attentionConfigID),s(20),p("for","hourEndAm_"+t.attentionConfigID),s(3),g("ngModel",t.hourEndPm),p("ngModelOptions",S(27,b))("value",t.hourEndPm)("id","hourEndAm_"+t.attentionConfigID)}}function fe(c,e){if(c&1){let t=A();n(0,"form",21),h("ngSubmit",function(){m(t);let i=u();return d(i.update())}),n(1,"div",22)(2,"h3",23),o(3,"Escribe un mensaje de horario sugerido para los usuarios"),r(),n(4,"textarea",24),_("ngModelChange",function(i){m(t);let a=u();return f(a.message,i)||(a.message=i),d(i)}),r()(),n(5,"div",22)(6,"h3",23),o(7,"Selecciona los d\xEDas de atenci\xF3n de la entidad y una franja horaria para cada d\xEDa"),r(),V(8,ge,91,28,"div",null,k),r(),n(10,"div",25)(11,"button",26),o(12,"Guardar"),r(),n(13,"button",27),h("click",function(){m(t);let i=u();return d(i.back())}),o(14,"Salir"),r()()()}if(c&2){let t=u();s(4),g("ngModel",t.message),p("ngModelOptions",S(2,b)),s(4),D(t.model)}}var re=class c{constructor(e,t,l,i,a,_e,ve){this.settingService=e;this.helperService=t;this.modalService=l;this.labelService=i;this.complaintAttentionConfigService=a;this.fileService=_e;this.complaintFormService=ve}attentions=[];filter={};totalCount=0;model=[];hourInit="";hourEnd="";range={};keyEnableAttention={};configs=[];message="";attentionUrl={};files;attentionTypes;formUrl;formUrlIsBusy;formUrlSubmitted;form;formIsBusy;formSubmitted;formdelegate;formdelegateIsBusy;formdelegateSubmitted;ngOnInit(){this.activate()}activate(){this.complaintAttentionConfigService.getAll().subscribe({next:e=>{this.model=e},error:e=>{this.helperService.handlerException(e)}}),this.labelService.getByFriendlyName("mensaje-horario-sugerido").subscribe({next:e=>{this.message=e.description},error:e=>{this.helperService.handlerException(e)}}),I([this.settingService.get({keyword:"GeneralSettings.EnableAttention"}),this.settingService.get({keyword:"GeneralSettings.UrlAttention"})]).subscribe({next:e=>{this.setSetting(e)},error:e=>{this.helperService.handlerException(e)}})}saveUrlAttention(){this.formUrl.valid&&!this.formUrlIsBusy?(this.formUrlIsBusy=!0,this.keyEnableAttention.value="False",this.settingService.update(this.keyEnableAttention).subscribe({next:e=>this.settingService.update(this.attentionUrl).subscribe({next:t=>{this.formUrlIsBusy=!1,this.formUrlSubmitted=!1,this.modalService.showExit("Se actualiz\xF3 la informaci\xF3n del agendamiento de citas con \xE9xito.")},error:t=>{this.helperService.handlerException(t)}})})):this.formUrlSubmitted=!0}update(){this.labelService.getByFriendlyName("mensaje-horario-sugerido").subscribe({next:e=>{this.updateMessage(e)},error:e=>{this.helperService.handlerException(e)}})}
1updateMessage(e){e.description=this.message,this.labelService.update(e).subscribe({next:()=>{this.updateAttention()},error:t=>{this.helperService.handlerException(t)}})}updateAttention(){this.complaintAttentionConfigService.update(this.model).subscribe({next:()=>{this.back()},error:e=>{this.helperService.handlerException(e)}})}back(){location.href="/administrador/pqrs"}compareHours(e,t){if(t=="AM"){if(e.hourInitAm>=e.hourEndAm){this.modalService.showAlert('La "hora de inicio jornada ma\xF1ana" no puede ser mayor o igual a la "hora de salida jornada ma\xF1ana" en el d\xEDa '+e.day+"."),e.hourInitAm=this.hourInit,e.hourEndAm=this.hourEnd;return}}else if(e.hourInitPm>=e.hourEndPm){this.modalService.showAlert('La "hora de inicio jornada tarde" no puede ser mayor o igual a la "hora de salida jornada tarde" en el d\xEDa '+e.day+"."),e.hourInitPm=this.hourInit,e.hourEndPm=this.hourEnd;return}}setHour(e,t){t=="AM"?(this.hourInit=e.hourInitAm,this.hourEnd=e.hourEndAm):(this.hourInit=e.hourInitPm,this.hourEnd=e.hourEndPm)}search(){this.filter.page=0,this.bind()}bind(){this.complaintFormService.get(this.filter).subscribe({next:e=>{this.setattentions(e)},error:e=>{this.helperService.handlerException(e)}})}nextPage(){this.filter.page+=1,this.bind()}detail(e){this.files=[],location.pathname="/pqrs/"+e.attentionID}resolve(){this.form.valid&&!this.formIsBusy?(this.formIsBusy=!0,this.model.status="Closed",this.files.length&&(this.model.fileIdentifiers=this.files.map(function(e){return e.fileID})),this.complaintAttentionConfigService.update(this.model).subscribe({next:()=>{this.setUpdate()},error:e=>{this.errorUpdate(e)}})):this.formSubmitted=!0}selectRange(){this.filter.startDate=this.range.start.format("YYYY-MM-DD"),this.filter.endDate=this.range.end.format("YYYY-MM-DD")}download(){this.fileService.downloadFile("/api/v1/attentions/export/",this.filter).subscribe({next:e=>{document.location.href=e}})}delegate(){this.model.delegate=!0,this.model.email=""}delegateattention(){this.formdelegate.valid&&!this.formdelegateIsBusy?(this.formdelegateIsBusy=!0,this.complaintFormService.delegate(this.model).subscribe({next:()=>{this.setDelegate()},error:()=>{this.errorDelegate()}})):this.formdelegateSubmitted=!0}getNumber(e){return new Array(e)}exit(){location.pathname="/pqrs"}startFile(e){this.files.push(e)}endFile(){}removeFile(e){this.files.splice(e,1)}setattentions(e){this.filter.page===0&&(this.attentions=[]);for(var t=0;t<e.results.length;t++)this.attentions.push(e.results[t]);this.totalCount=e.meta.totalCount,this.filter.hasNextPage=e.meta.hasNextPage}setattention(e){if(this.model=e,e.birthDate!==null&&(this.model.birthDate2=(0,oe.default)(e.birthDate,"YYYY/MM/DD HH:mm:ss").format("DD MMMM YYYY")),e.genderID!==null)switch(this.model.genderID){case 0:this.model.genre="Masculino";break;case 1:this.model.genre="Femenino";break;case 2:this.model.genre="Otro";break;default:}this.model.description&&(this.model.descriptionHtml=this.helperService.trustAsHtml(this.model.description.replace(/\n/g,"<br />"))),this.model.answer&&(this.model.answerHtml=this.helperService.trustAsHtml(this.model.answer.replace(/\n/g,"<br />"))),window.scrollTo(0,0)}setUpdate(){this.helperService.piwikTrackEvent("Pqrds","Resolver","admin_attention.controller"),location.pathname="/pqrs"}setattentionTypes(e){this.attentionTypes=e.results}reorder(e){this.filter.orderBy=e,this.filter.orderDir=this.filter.orderDir=="asc"?"desc":"asc",this.bind()}setDelegate(){this.helperService.piwikTrackEvent("Pqrds","Delegar","admin_attention.controller"),location.pathname="/pqrs"}setSetting(e){e[0].results.length&&e[1].results.length?(this.keyEnableAttention=e[0].results[0],this.keyEnableAttention.enable=this.keyEnableAttention.value==="True",this.attentionUrl=e[1].results[0],this.keyEnableAttention.enable&&(this.filter.page=0,this.filter.pageSize=30,this.range={},this.bind())):this.modalService.showAlert(this.settingService.settings.resources["attention.KeyError"])}errorUpdate(e){this.model.status=1,this.form&&(this.formIsBusy=!1),this.helperService.handlerException(e)}errorattentionTypes(){}errorDelegate(){}toggleAttentionQuotes(){this.keyEnableAttention.enable?(this.keyEnableAttention.value="True",this.settingService.update(this.keyEnableAttention).subscribe({next:e=>(this.attentionUrl.value="",this.settingService.update(this.attentionUrl).subscribe({next:t=>{this.filter.pageSize=30,this.search()},error:t=>{this.helperService.handlerException(t)}}))})):this.modalService.showAlert("Debes ingresar la URL del sistema externo de Agendamiento de citas para poder inactivar las citas para PQRDS")}static \u0275fac=function(t){return new(t||c)(v(H),v(N),v(W),v(te),v(ne),v(ee),v(ie))};static \u0275cmp=F({type:c,selectors:[["app-admin-attention"]],viewQuery:function(t,l){if(t&1&&(E(se,5),E(me,5),E(de,5)),t&2){let i;C(i=w())&&(l.formUrl=i.first),C(i=w())&&(l.form=i.first),C(i=w())&&(l.formdelegate=i.first)}},standalone:!0,features:[T],decls:16,vars:5,consts:[["formUrl","ngForm"],["attentionLink","ngModel"],[1,"admin-content","fix-height"],["href","/administrador/pqrs",1,"btn-close"],[1,"icon-close"],[1,"section-tit"],[1,"switch-box","pqr-form"],["for","enableAttention",1,"f-l"],[1,"onoffswitch"],["type","checkbox","name","enableAttention","id","enableAttention",1,"onoffswitch-checkbox",3,"change","ngModelChange","ngModel","ngModelOptions"],["for","enableAttention",1,"onoffswitch-label"],[1,"clear"],["novalidate","","class","form-table","name","formUrl",3,"ngSubmit",4,"ngIf"],["class","form-table",3,"ngSubmit",4,"ngIf"],["novalidate","","name","formUrl",1,"form-table",3,"ngSubmit"],[1,""],["placeholder","Url","required","","aria-required","true","name","attentionLink","pattern","https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)","maxlength","150","type","text",3,"ngModelChange","ngModel"],["class","error",4,"ngIf"],["type","submit","value","Guardar",1,"btn-search",3,"disabled"],[1,"error"],[4,"ngIf"],[1,"form-table",3,"ngSubmit"],[1,"row-input"],[1,"section-label"],["placeholder","Escribe un mensaje de horario sugerido para los usuarios",3,"ngModelChange","ngModel","ngModelOptions"],[2,"display","flex"],["type","submit",1,"btn-save","btn-save--pqrs",2,"margin-right","1rem"],[1,"btn-save","btn-save--pqrs",3,"click"],[1,"day-config"],[1,"day-checkbox"],["type","checkbox","name","state",3,"ngModelChange","ngModel","ngModelOptions"],[1,"day-name"],[1,"day-hours"],[1,"hours-select"],[3,"for"],[1,"wrap-select"],["type","text",3,"ngModelChange","change","click","ngModel","ngModelOptions","value","id"],["value","06:00"],["value","07:00"],["value","08:00"],["value","09
1:00"],["value","10:00"],["value","11:00"],["value","12:00"],["value","13:00"],["value","14:00"],["value","15:00"],["value","16:00"],["value","17:00"],["value","18:00"],["value","19:00"],["value","20:00"]],template:function(t,l){t&1&&(n(0,"div",2)(1,"a",3),x(2,"span",4),r(),n(3,"h2",5),o(4,"Agendamiento de citas"),r(),n(5,"div",6)(6,"div",7),o(7,"Habilitar gesti\xF3n de citas"),r(),n(8,"div",8)(9,"input",9),h("change",function(){return l.toggleAttentionQuotes()}),_("ngModelChange",function(a){return f(l.keyEnableAttention.enable,a)||(l.keyEnableAttention.enable=a),a}),r(),x(10,"label",10),r()(),x(11,"div",11),y(12,he,10,3,"form",12),x(13,"br")(14,"br"),y(15,fe,15,3,"form",13),r()),t&2&&(s(9),g("ngModel",l.keyEnableAttention.enable),p("ngModelOptions",S(4,b)),s(3),p("ngIf",!l.keyEnableAttention.enable),s(3),p("ngIf",l.keyEnableAttention.enable))},dependencies:[$,R,G,Z,L,j,z,q,Y,J,K,X,Q,O,B,U]})};export{re as AdminAttentionComponent};

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.