2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{S as v}from"./SectionTitle-CrHOP_mf.js";import{g as h,r as w,u as _,c as x,d,l as k,w as f,e,F as N,f as A,z as c,t as l,b as o,m as q,h as C}from"./index-BmU8V2V2.js";const P=async(g=1)=>{try{const{data:u}=await h.get(`/loadcarganotificaciones?page=${g}`);return{notificaciones:u.records.map(s=>({id:s.ID,radicado:s.radicado,fecha:s.fecha,nombre:s.nombre,municipio:s.municipio,vence:s.vence,ruta:s.ruta})),totalPages:u.totalPages}}catch(u){throw console.log(u),new Error("Error getting notificaciones aviso")}},S={class:"mx-auto py-8 px-4 sm:px-6 lg:px-8 max-w-5xl mb-8"},V={class:"w-full overflow-x-auto"},$={class:"min-w-full inline-block align-middle"},j={class:"min-w-full divide-y divide-gray-200"},z={class:"divide-y divide-gray-200"},F={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},T={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},B={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},D={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},E={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},I={key:0},M={key:1},R={class:"px-6 py-4 whitespace-nowrap text-sm border border-gray-300"},U={class:"flex items-center justify-center"},K=["href"],L={key:1,class:"bg-gray-500 cursor-pointer text-white px-4 py-2 rounded"},O={key:0},Q={class:"flex justify-between items-center p-2 border border-t-0 border-gray-300"},G={class:"text-sm text-gray-600"},H={class:"text-sm text-gray-600"},J={key:0,class:"flex justify-start items-center p-2 border gap-2 border-t-0 border-gray-300"},Y={__name:"NoticeNotificationsView",setup(g){const u="https://www.gasesdeloriente.com.co",s=w(1),{data:p}=_({queryKey:["notificaciones",{page:s}],queryFn:()=>P(s.value),staleTime:1e3*60}),n=x(()=>{var a;return((a=p==null?void 0:p.value)==null?void 0:a.notificaciones)||[]}),i=x(()=>{var a;return((a=p==null?void 0:p.value)==null?void 0:a.totalPages)||1}),y=a=>{if(!a)return!1;const r=new Date;return new Date(a)<r};return(a,r)=>{var m,b;return o(),d("div",S,[k(v,null,{default:f(()=>r[2]||(r[2]=[q("Notificaciones por aviso")])),_:1}),r[6]||(r[6]=e("p",{class:"mt-4 text-lg leading-7 text-gray-600 mb-4"}," Teniendo en cuenta que se desconoce la información exacta sobre el destinatario que permita remitirle el AVISO para su notificación, se procede a publicar el mismo junto con la copia íntegra de la respuesta emitida por el término de cinco (5) días hábiles, advirtiendo que la Notificación quedaría surtida al finalizar el día siguiente al retiro de la publicación. Para visualizar su respuesta, digite el código de usuario que identifica su predio (lo encuentra en su factura en la parte superior izquierda), Cédula o el número de radicado en caso de no contar con servicio de gas combustible. ",-1)),e("div",V,[e("div",$,[r[5]||(r[5]=e("div",{class:"bg-[#9cd043] px-6 py-3 font-semibold min-w-full"}," Notificaciones por Aviso ",-1)),e("table",j,[r[4]||(r[4]=e("thead",{class:"border-b border-gray-300"},[e("tr",null,[e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Radicado "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Fecha "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Nombre "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Municipio "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Respuesta "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Archivo ")])],-1)),e("tbody",z,[(o(!0),d(N,null,A(n.value,t=>(o(),d("tr",{key:t==null?void 0:t.id},[e("td",F,l((t==null?void 0:t.radicado)||"-"),1),e("td",T,l((t==null?void 0:t.fecha)||"-"),1),e("td",B,l((t==null?void 0:t.nombre)||"-"),1),e("td",D,l((t==null?void 0:t.municipio)||"-"),1),e("td",E,[y(t==null?void 0:t.vence)?(o(),d("span",I,"CADUCADA")):(o(),d("span",M))]),e("td",R,[e("div",U,[t!=null&&t.ruta?(o(),d("a",{key:0,target:"_blank",href:`${C(u)}/${t.ruta}`,class:"bg-[#8eb02f] cursor-pointer text-white px-4 py-2 rounded"}," Ver archivo ",8,K)):(o(),d("span",L,"N/A"))])])]))),128)),((m=n.value)==null?void 0:m.length)===0?(o(),d("tr",O,r[3]||(r[3]=[e("td",{colspan:"5",class:"px-6 py-4 text-center text-sm text-gray-500 border border-gray-300"}," Sin registros que mostrar ",-1)]))):c("",!0)])]),e("div",null,[e("div",Q,[e("div",null,[e("p",G," Página "+l(s.value||1)+" de "+l(i.value||1),1)]),e("div",null,[e("p",H," Mostrando "+l(((b=n.value)==null?void 0:b.length)||0)+" registros ",1)])]),i.value>1?(o(),d("div",J,[e("button",{onClick:r[0]||(r[0]=t=>s.value>1&&(s.value-=1)),class:"bg-[#8eb02f] cursor-pointer text-white px-3 py-1 rounded"}," Anterior "),e("button",{onClick:r[1]||(r[1]=t=>s.value<i.value&&(s.value+=1)),class:"bg-[#8eb02f] cursor-pointer text-white px-3 py-1 rounded"}," Siguiente ")])):c("",!0)])])])])}}};export{Y as default};
|