PageSourceSearch

https://onerc.redcross.or.ke/assets/onerc_vmms/frontend/assets/Jobs-C4OnZya-.js

js redcross.or.ke collected 2026-10-02 06:16:50 UTC 9,656 bytes, 2 lines download raw bytes

1import{L as N,_ as U}from"./MultiSelect-zLHG9oJW.js";import{_ as J}from"./EmptyState-Cg3uhZp2.js";import{K as F,l as m,o as c,g as e,p as w,h as a,i as l,U as L,t as u,M as P,N as T,j as S,O as Y,P as K,Q as z,R as Q,y as q,r as h,e as R,s as X,b as G,S as V,z as W,A as Z,f as A,w as $,V as ee,_ as se,F as te,m as oe}from"./index-DkHxERqz.js";import{_ as ae}from"./Breadcrumbs.vue_vue_type_script_setup_true_lang-9UEkAjMt.js";import{_ as le}from"./FormControl.vue_vue_type_script_setup_true_lang-Dc-cNXff.js";import{T as ne}from"./TabButtons-BAUbJQbv.js";import ie from"./JobApplication-BHLpc75k.js";import"./sanitizeHtml-BbWx3ulo.js";import"./form-mfsyIw-y.js";import"./format-BkWISJ_x.js";const re={class:"group relative flex flex-col bg-white border border-gray-200 rounded-xl p-4 h-full shadow-sm hover:shadow-xl hover:border-red-300 transition-all duration-300 overflow-hidden"},de={class:"mb-3 flex flex-wrap gap-2"},ce={key:0,class:"inline-flex items-center gap-1 px-2 py-0.5 bg-red-50 border border-red-200 rounded-full text-xs font-medium text-red-700"},ue={class:"text-lg font-bold text-gray-900 leading-tight mb-2 group-hover:text-red-600 transition-colors duration-200"},pe={key:0,class:"flex items-center gap-2 px-3 py-1 bg-red-100 border-l-4 border-red-500 rounded text-sm font-semibold text-red-800 mb-3"},me={class:"space-y-3 mb-4 flex-grow"},_e={class:"grid grid-cols-2 gap-3"},fe={key:0,class:"flex items-center gap-2 min-w-0"},ge={class:"flex-shrink-0 w-7 h-7 bg-green-50 rounded-md flex items-center justify-center"},ve={class:"flex-1 min-w-0"},he={class:"text-xs text-gray-500"},be={class:"font-semibold text-gray-900"},ye={key:1,class:"flex items-center gap-2 min-w-0"},xe={class:"flex-shrink-0 w-7 h-7 bg-red-50 rounded-md flex items-center justify-center"},we={class:"flex-1 min-w-0"},je={class:"text-xs text-gray-500"},Oe={class:"font-semibold text-gray-900"},Ce={key:0,class:"flex items-center gap-2"},ke={class:"flex-shrink-0 w-7 h-7 bg-blue-50 rounded-md flex items-center justify-center"},Ve={class:"flex-1 min-w-0"},Ne={class:"text-xs text-gray-500"},Se={class:"text-sm font-semibold text-gray-900"},$e={class:"pt-3 border-t border-gray-100 mt-auto"},De={class:"flex items-center justify-between gap-4"},Me={key:0,class:"flex items-center gap-1.5 text-xs text-gray-500"},Ue={key:1,class:"flex items-center gap-1.5 px-2 py-1 bg-gradient-to-r from-red-500 to-orange-500 rounded-md text-white shadow-sm"},Fe={class:"text-sm font-bold leading-none"},Re={class:"text-xs opacity-90 leading-none"},Ae={__name:"JobCard",props:{job:{type:Object,default:null}},setup(n){const k=F("$dayjs");F("jobSettings",{showApplicants:!0});const b=t=>{const f=2.6297568000000003e6,g=Math.floor(t/f);let r=t%f;const O=Math.floor(r/86400);r%=86400;const j=Math.ceil(r/3600);let d=[];return g>0&&d.push(`${g}m`),O>0&&d.push(`${O}d`),j>0&&g===0&&d.push(`${j}h`),d.join(" ")};return(t,_)=>{var y;return c(),m("div",re,[_[0]||(_[0]=e("div",{class:"absolute top-0 left-0 right-0 h-1 bg-gradient-to-r from-red-500 via-red-400 to-orange-400"},null,-1)),e("div",de,[n.job.designation?(c(),m("div",ce,[a(l(L),{class:"w-3 h-3"}),e("span",null,u(t.__(n.job.designation)),1)])):w("",!0)]),e("h2",ue,u(t.__(n.job.job_title)),1),n.job.company?(c(),m("div",pe,[a(l(P),{class:"w-4 h-4 text-red-600 flex-shrink-0"}),e("span",null,u(t.__(n.job.company)),1)])):w("",!0),_[1]||(_[1]=e("div",{class:"h-px bg-gradient-to-r from-transparent via-gray-200 to-transparent mb-3"},null,-1)),e("div",me,[e("div",_e,[n.job.posted_on?(c(),m("div",fe,[e("div",ge,[a(l(T),{class:"w-4 h-4 text-green-600"})]),e("div",ve,[e("p",he,[S(u(t.__("Posted On:"))+" ",1),e("span",be,u(l(k)(n.job.posted_on).format("MMM D")),1)])])])):w("",!0),n.job.closes_on?(c(),m("div",ye,[e("div",xe,[a(l(Y),{class:"w-4 h-4 text-red-600"})]),e("div",we,[e("p",je,[S(u(t.__("Closes On:"))+" ",1),e("span",Oe,u(l(k)(n.job.closes_on).format("MMM D")),1)])])])):w("",!0)]),n.job.duration?(c(),m("div",Ce,[e("div",ke,[a(l(K),{class:"w-4 h-4 text-blue-600"})]),e("div",Ve,[e("p",Ne,[S(u(t.__("Open For:"))+" ",1),e("span",Se,u(t.__(b(n.job.duration))),1)])])])):w("",!0)]),e("div",$e,[e("div",De,[n.job.creation?(c(),m("div",Me,[a(l(z),{class:"w-3 h-3"}),e("span",null,u(l(k)().diff(l(k)(n.job.creation),"day"))+u(t.__("d ago")),1)])):w("",!0),(y=n.job)!=null&&y.publish_applications_received&&n.job.applicants?(c(),m("div",Ue,[a(l(Q),{
1class:"w-3.5 h-3.5"}),e("span",Fe,u(t.__(n.job.applicants)),1),e("span",Re,u(t.__("applicants")),1)])):w("",!0)])])])}}},Ie={class:"flex flex-col min-h-screen bg-gray-50"},Ee={class:"sticky top-0 z-10 flex items-center justify-between border-b border-gray-200 bg-white px-4 py-3 sm:px-6 shadow-sm"},Be={class:"flex items-center space-x-4"},He={class:"hidden sm:block text-xl font-bold text-red-600"},Je={class:"flex-1 min-w-0 p-4 sm:p-6 lg:p-8"},Le={class:"flex justify-start mb-6 lg:mb-8"},Pe={key:0},Te={key:0,class:"bg-white rounded-xl shadow-sm p-4 sm:p-6 mb-6 space-y-6"},Ye={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"},Ke={class:"text-sm font-medium"},ze={key:1,class:"grid gap-6 grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},Qe={key:1},ls={__name:"Jobs",setup(n){const{brand:k}=q(),b=h(null),t=h(null),_=h(null),y=h(""),f=h([]),g=h([]),r=h({}),O=h([]),j=h(0),d=h("Open"),I=R(()=>[{label:__("Open"),value:"Open"},{label:__("My Applications"),value:"My Applications"}]),E=R(()=>{var o;const s={organisation_type:"Branch"};if((o=f.value)!=null&&o.length){const v=f.value.map(p=>typeof p=="string"?p:p.company);s.parent_company=["in",v]}return s});X(()=>{const s=new URLSearchParams(location.search);s.has("type")&&(b.value=s.get("type")),D()});const C=G({url:"onerc_vmms.volunteer_and_member_management.api.application.get_job_openings",cache:["jobs"]}),D=()=>{d.value==="Open"&&x()},x=()=>{B(),C.update({params:{filters:r.value,orFilters:O.value}}),C.reload()},B=()=>{var s,o;if(r.value.status="Open",b.value?r.value.job_location=b.value:delete r.value.job_location,t.value?r.value.designation=t.value:delete r.value.designation,_.value?r.value.profession=_.value:delete r.value.profession,(s=f.value)!=null&&s.length){const v=f.value.map(p=>typeof p=="string"?p:p.company);r.value.region=v}else delete r.value.region;if((o=g.value)!=null&&o.length){const v=g.value.map(p=>typeof p=="string"?p:p.company);r.value.company=v}else delete r.value.company;if(y.value){const v=`%${y.value}%`;O.value=[["job_title","like",v],["company","like",v],["location","like",v]]}else O.value=[]},M=()=>{g.value=[],x()},H=()=>{f.value=[],g.value=[],b.value=null,t.value=null,_.value=null,y.value="",x()};return V(d,()=>{D(),j.value=0}),V([b,t,_,g],()=>{d.value==="Open"&&x()}),V(f,()=>{d.value==="Open"&&M()}),V(C,()=>{var s;d.value==="Open"&&(j.value=((s=C.data)==null?void 0:s.length)||0)}),W({title:"Opportunities | Kenya Red Cross",meta:[{name:"description",content:"Explore open opportunities with the Kenya Red Cross. Filter by location, profession, and designation, or manage your applications."}]}),(s,o)=>{var p;const v=Z("router-link");return c(),m("div",Ie,[e("header",Ee,[e("div",Be,[a(l(ae),{class:"h-7 text-sm sm:text-base text-gray-600",items:[{label:s.__("Opportunities"),route:{name:"Jobs"}}]},null,8,["items"]),e("div",He,u(s.__(d.value)===s.__("Open")?s.__("{0} Open Opportunities").format(j.value):s.__("{0} My Applications").format(j.value)),1)])]),e("div",Je,[e("div",Le,[a(l(ne),{buttons:I.value,modelValue:d.value,"onUpdate:modelValue":o[0]||(o[0]=i=>d.value=i),class:"w-full sm:w-auto","active-class":"bg-red-600 text-white","inactive-class":"text-gray-700 hover:bg-gray-100"},null,8,["buttons","modelValue"])]),d.value==="Open"?(c(),m("div",Pe,[d.value==="Open"?(c(),m("div",Te,[e("div",Ye,[a(l(le),{type:"text",placeholder:s.__("Search opportunities..."),modelValue:y.value,"onUpdate:modelValue":o[1]||(o[1]=i=>y.value=i),class:"w-full",onInput:x},{prefix:$(()=>[a(l(ee),{class:"w-5 h-5 text-gray-500"})]),_:1},8,["placeholder","modelValue"]),a(N,{doctype:"Designation",modelValue:t.value,"onUpdate:modelValue":o[2]||(o[2]=i=>t.value=i),placeholder:s.__("Designation"),class:"w-full",onChange:x},null,8,["modelValue","placeholder"]),a(N,{doctype:"Profession",modelValue:_.value,"onUpdate:modelValue":o[3]||(o[3]=i=>_.value=i),placeholder:s.__("Profession"),class:"w-full",onChange:x},null,8,["modelValue","placeholder"]),a(N,{doctype:"Location",modelValue:b.value,"onUpdate:modelValue":o[4]||(o[4]=i=>
1b.value=i),placeholder:s.__("Location"),class:"w-full",onChange:x},null,8,["modelValue","placeholder"]),a(U,{doctype:"Company Item",modelValue:f.value,"onUpdate:modelValue":o[5]||(o[5]=i=>f.value=i),label:s.__("Region"),mainField:"company",filters:{organisation_type:"Region"},class:"w-full",onChange:M},null,8,["modelValue","label"]),a(U,{doctype:"Company Item",modelValue:g.value,"onUpdate:modelValue":o[6]||(o[6]=i=>g.value=i),mainField:"company",label:s.__("County"),filters:E.value,class:"w-full",onChange:x},null,8,["modelValue","label","filters"]),a(l(se),{variant:"ghost",class:"justify-center text-red-600 hover:bg-red-50 border border-red-200",onClick:H},{default:$(()=>[e("span",Ke,u(s.__("Clear All")),1)]),_:1})])])):w("",!0),(p=l(C).data)!=null&&p.length?(c(),m("div",ze,[(c(!0),m(te,null,oe(l(C).data,i=>(c(),A(v,{key:i.name,to:{name:"JobDetail",params:{job:i.name}},class:"transition-transform duration-300 hover:scale-[1.02] transform"},{default:$(()=>[a(Ae,{job:i},null,8,["job"])]),_:2},1032,["to"]))),128))])):(c(),A(J,{key:2,type:s.__("Job Openings")},null,8,["type"]))])):d.value==="My Applications"?(c(),m("div",Qe,[a(ie)])):w("",!0)])])}}};export{ls as default};
2//# sourceMappingURL=Jobs-C4OnZya-.js.map

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.