2 lines
5.6 KiB
JavaScript
2 lines
5.6 KiB
JavaScript
import{S as _}from"./SectionTitle-CrHOP_mf.js";import{g as b,r as f,u as h,c as g,d as a,l as v,w,e,F as k,f as C,z as y,t as o,b as d,m as A,i as j,h as S}from"./index-BmU8V2V2.js";const z=async(x=1)=>{try{const{data:n}=await b.get(`/loadlicitaciones?page=${x}`);return{licitaciones:n.records.map(t=>({id:t.ID,codigo:t.codigo,alcance_convocatoria:t.alcance_convocatoria,condiciones_generales:t.condiciones_generales,centro_operativo:t.centro_operativo,estado:t.estado,fecha_max_inscripcion:t.fecha_max_inscripcion,fecha_lanzamiento:t.fecha_lanzamiento,fecha_apertura:t.fecha_apertura,fecha_cierre:t.fecha_cierre,ruta:t.ruta})),totalPages:n.totalPages}}catch(n){throw console.log(n),new Error("Error getting licitaciones")}},E={class:"mx-auto py-8 px-4 sm:px-6 lg:px-8 max-w-[85rem] mb-8"},F={class:"w-full overflow-x-auto"},P={class:"min-w-full inline-block align-middle"},L={class:"min-w-full divide-y divide-gray-200"},N={class:"divide-y divide-gray-200"},T={class:"px-2 py-4 text-sm border border-gray-300"},V={class:"px-2 py-4 text-sm border border-gray-300"},$={class:"px-2 py-4 text-sm border border-gray-300"},q=["innerHTML"],I={class:"px-2 py-4 text-sm border border-gray-300"},M={class:"px-1 py-4 text-sm border border-gray-300"},O={class:"flex items-center justify-center"},B={class:"px-1 py-4 text-sm border border-gray-300"},G={class:"flex items-center justify-center"},H={class:"px-1 py-4 text-sm border border-gray-300"},U={class:"flex items-center justify-center"},K={class:"px-1 py-4 text-sm border border-gray-300"},Q={class:"flex items-center justify-center"},R={class:"px-1 py-4 text-sm border border-gray-300"},W={class:"flex items-center justify-center"},D={class:"px-2 py-4 text-sm border border-gray-300"},J={class:"flex items-center justify-center"},X=["href"],Y={key:1,class:"bg-gray-500 cursor-pointer text-white px-4 py-2 rounded"},Z={key:0},ee={class:"flex justify-between items-center p-2 border border-t-0 border-gray-300"},te={class:"text-sm text-gray-600"},re={class:"text-sm text-gray-600"},se={key:0,class:"flex justify-start items-center p-2 border gap-2 border-t-0 border-gray-300"},de={__name:"WorkUsView",setup(x){const n="https://www.gasesdeloriente.com.co",t=f(1),{data:i}=h({queryKey:["licitaciones",{page:t}],queryFn:()=>z(t.value),staleTime:1e3*60}),l=g(()=>{var c;return((c=i==null?void 0:i.value)==null?void 0:c.licitaciones)||[]}),p=g(()=>{var c;return((c=i==null?void 0:i.value)==null?void 0:c.totalPages)||1});return(c,s)=>{var m,u;return d(),a("div",E,[v(_,null,{default:w(()=>s[2]||(s[2]=[A("Invitación a Ofertar")])),_:1}),s[6]||(s[6]=e("p",{class:"mt-4 text-lg leading-7 text-gray-600 mb-4"}," A continuación encontrará las convocatorias en Gases del Oriente SA ESP. ",-1)),e("div",F,[e("div",P,[s[5]||(s[5]=e("div",{class:"bg-[#9cd043] px-6 py-3 font-semibold min-w-full"}," Invitación a Ofertar ",-1)),e("table",L,[s[4]||(s[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"}," Codigo "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Alcance Convocatoria "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Condiciones Generales "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Centro Operativo "),e("th",{class:"px-4 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Estado "),e("th",{class:"px-2 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Fecha Lanzamiento "),e("th",{class:"px-2 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Fecha Maxima Inscripción "),e("th",{class:"px-2 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Envío de términos de referencia "),e("th",{class:"px-5 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Fecha Cierre "),e("th",{class:"px-6 py-3 text-left text-sm font-medium tracking-wider border border-gray-300"}," Requisitos Adicionales ")])],-1)),e("tbody",N,[(d(!0),a(k,null,C(l.value,r=>(d(),a("tr",{key:r.id},[e("td",T,o(r.codigo),1),e("td",V,o(r.alcance_convocatoria),1),e("td",$,[e("div",{class:"whitespace-pre-line",innerHTML:r==null?void 0:r.condiciones_generales},null,8,q)]),e("td",I,o(r.centro_operativo),1),e("td",M,[e("div",O,[e("span",{class:j(["text-white px-2 py-1 rounded",r.estado===!0||r.estado==="true"?"bg-green-500":"bg-red-500"])},o(r.estado===!0||r.estado==="true"?"Abierta":"Cerrada"),3)])]),e("td",B,[e("div",G,o(r.fecha_lanzamiento),1)]),e("td",H,[e("div",U,o(r.fecha_max_inscripcion),1)]),e("td",K,[e("div",Q,o(r.fecha_apertura),1)]),e("td",R,[e("div",W,o(r.fecha_cierre),1)]),e("td",D,[e("div",J,[r.ruta?(d(),a("a",{key:0,target:"_blank",href:`${S(n)}/${r.ruta}`,class:"bg-[#8eb02f] cursor-pointer text-white px-4 py-2 rounded"}," Descargar ",8,X)):(d(),a("span",Y,"N/A"))])])]))),128)),((m=l.value)==null?void 0:m.length)===0?(d(),a("tr",Z,s[3]||(s[3]=[e("td",{colspan:"9",class:"px-6 py-4 text-center text-sm text-gray-500 border border-gray-300"}," Sin registros que mostrar ",-1)]))):y("",!0)])]),e("div",null,[e("div",ee,[e("div",null,[e("p",te," Página "+o(t.value||1)+" de "+o(p.value||1),1)]),e("div",null,[e("p",re," Mostrando "+o(((u=l.value)==null?void 0:u.length)||0)+" registros ",1)])]),p.value>1?(d(),a("div",se,[e("button",{onClick:s[0]||(s[0]=r=>t.value>1&&(t.value-=1)),class:"bg-[#8eb02f] cursor-pointer text-white px-3 py-1 rounded"}," Anterior "),e("button",{onClick:s[1]||(s[1]=r=>t.value<p.value&&(t.value+=1)),class:"bg-[#8eb02f] cursor-pointer text-white px-3 py-1 rounded"}," Siguiente ")])):y("",!0)])])])])}}};export{de as default};
|