PageSourceSearch

https://freelance.legacyforce.jp/_nuxt/BmH-9gWm.js

js legacyforce.jp collected 2026-10-05 08:38:04 UTC 5,815 bytes, 1 lines download raw bytes

1import{_ as E}from"./CMLQgEnM.js";import{_ as L}from"./BY2m2N7t.js";import{a as v}from"./Dj7xaVzF.js";import{C as N}from"./CkEGP5Em.js";import{d as z,i as A}from"./CKcjhaN3.js";import{e as J,A as K,u as T,f as V,r as D,l as H,c as i,a as s,b as l,w as x,F as R,q as U,o as c,d as f,n as Y,t as u,h as k}from"./BRz7g3r3.js";import{u as G}from"./BywQnJkC.js";import"./I-LGoBsJ.js";import"./BmaHQEnJ.js";import"./BC8DVXCb.js";import"./C0Wv6Nit.js";const O={class:"min-h-screen flex flex-col bg-white font-sans text-gray-800"},Q={class:"flex-grow"},W={class:"mx-auto lg:py-8 lg:max-w-[1200px] lg:px-[30px] w-full"},X={class:"lg:grid lg:grid-cols-4 lg:gap-6"},Z={class:"hidden lg:block lg:col-span-1"},tt={class:"lg:hidden mb-6 px-4 pt-4"},et={class:"lg:col-span-3 px-4 lg:px-0 pb-8"},st={key:0,class:"flex justify-center py-12"},at={key:1,class:"bg-white rounded-lg shadow-sm p-8 text-center border border-gray-200"},ot={key:2,class:"space-y-4"},rt={class:"flex flex-col md:flex-row md:items-center justify-between gap-4"},nt={class:"flex-1"},it={class:"flex items-center gap-2 mb-2"},lt=["title"],ct={class:"text-xs text-gray-500"},dt={class:"text-lg font-bold text-gray-800 hover:text-blue-600 transition-colors"},_t={class:"text-sm text-gray-500 mt-1"},ut={class:"text-gray-500"},ft={class:"flex items-center gap-3"},qt=J({__name:"applications",setup(gt){const g=K(),b=T(),q=V(),m=D([]),j=D(!0),$=r=>{switch(r){case"applied":return"bg-accent/10 text-main";case"screening":return"bg-yellow-50 text-yellow-600";case"interview":return"bg-purple-50 text-purple-600";case"offer":return"bg-green-50 text-green-600";case"rejected":return"bg-gray-100 text-gray-500";default:return"bg-gray-100 text-gray-500"}},C=r=>{const e=new Date(r);return`${e.getFullYear()}/${e.getMonth()+1}/${e.getDate()}`};return H(async()=>{if(!b.value){q.push("/login");return}try{const r=b.value.sub||b.value.id,{data:e,error:d}=await g.from("legacyforce_job_applications").select("id, created_at, status, legacyforce_job_offer_id").eq("user_id",r);if(d)throw d;const{data:_,error:o}=await g.from("legacyforce_job_inquiries").select("id, created_at, legacyforce_job_offer_id, status, status_note, status_updated_at").eq("user_id",r);if(o)throw o;const p=e||[],y=_||[];if(p.length>0||y.length>0){const S=p.map(t=>t.legacyforce_job_offer_id),I=y.map(t=>t.legacyforce_job_offer_id),P=[...new Set([...S,...I])],{data:B}=await g.from("legacyforce_job_offers").select("id, subject, main_location, min_salary, max_salary").in("id",P),h=new Map(B?.map(t=>[t.id,t])||[]),w=(t,a)=>!t&&!a?"-":t&&a?`${t}〜${a}万円`:t?`${t}
1万円〜`:a?`〜${a}万円`:"-",F=p.map(t=>{const a=h.get(t.legacyforce_job_offer_id),n=t.status||"applied";return{id:t.id,uniqueKey:`app-${t.id}`,type:"application",created_at:t.created_at,status:n,status_label:"応募済み",status_note:null,status_class:$(n),job_offer_id:t.legacyforce_job_offer_id,job_title:a?.subject||"削除された案件",job_location:a?.main_location||"-",job_price:a?w(a.min_salary,a.max_salary):"-"}}),M=y.map(t=>{const a=h.get(t.legacyforce_job_offer_id),n=z(t.status,t.status_note,t.status_updated_at);return{id:t.id,uniqueKey:`inq-${t.id}`,type:"inquiry",created_at:t.created_at,status:n.status,status_label:n.label,status_note:n.note,status_class:A(n.status),job_offer_id:t.legacyforce_job_offer_id,job_title:a?.subject||"削除された案件",job_location:a?.main_location||"-",job_price:a?w(a.min_salary,a.max_salary):"-"}});m.value=[...F,...M].sort((t,a)=>new Date(a.created_at).getTime()-new Date(t.created_at).getTime())}}catch(r){console.error("Error fetching history:",r)}finally{j.value=!1}}),G({title:"応募履歴 | LegacyForce"}),(r,e)=>{const d=E,_=L;return c(),i("div",O,[s("main",Q,[s("div",W,[s("div",X,[s("aside",Z,[l(d)]),s("div",tt,[l(d)]),s("div",et,[e[8]||(e[8]=s("h1",{class:"text-2xl font-bold text-gray-900 mb-8"},"応募履歴",-1)),j.value?(c(),i("div",st,[...e[0]||(e[0]=[s("i",{class:"fas fa-spinner fa-spin text-main text-3xl"},null,-1)])])):m.value.length===0?(c(),i("div",at,[e[2]||(e[2]=s("div",{class:"w-16 h-16 bg-gray-50 rounded-full flex items-center justify-center mx-auto mb-4"},[s("i",{class:"fas fa-inbox text-gray-400 text-2xl"})],-1)),e[3]||(e[3]=s("h3",{class:"text-lg font-bold text-gray-700 mb-2"},"まだ応募履歴がありません",-1)),e[4]||(e[4]=s("p",{class:"text-gray-500 mb-6"},"気になる案件を見つけて、応募してみましょう。",-1)),l(_,{to:"/jobs",class:"inline-flex items-center px-6 py-3 bg-main text-white font-bold rounded-lg hover:bg-main-dark transition-colors"},{default:x(()=>[...e[1]||(e[1]=[f(" 案件を探す ",-1)])]),_:1})])):(c(),i("div",ot,[(c(!0),i(R,null,U(m.value,o=>(c(),i("div",{key:o.uniqueKey,class:"bg-white rounded-lg shadow-sm border border-gray-200 p-6 hover:shadow-md transition-shadow relative"},[s("div",rt,[s("div",nt,[s("div",it,[s("span",{class:Y(["text-xs px-2 py-1 rounded font-medium",o.status_class]),title:o.status_note||o.status_label},u(o.status_label),11,lt),s("span",ct,u(C(o.created_at)),1)]),s("h3",dt,[l(_,{to:("jobDetailPath"in r?r.jobDetailPath:k(v))(o.job_offer_id)},{default:x(()=>[f(u(o.job_title),1)]),_:2},1032,["to"])]),s("p",_t,[e[5]||(e[5]=s("i",{class:"fas fa-map-marker-alt text-gray-400 mr-1"},null,-1)),f(" "+u(o.job_location)+" ",1),e[6]||(e[6]=s("span",{class:"mx-2 text-gray-300"},"|",-1)),s("span",ut,u(o.job_price),1)])]),s("div",ft,[l(_,{to:("jobDetailPath"in r?r.jobDetailPath:k(v))(o.job_offer_id),class:"px-4 py-2 text-sm font-bold text-gray-600 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors"},{default:x(()=>[...e[7]||(e[7]=[f(" 詳細を見る ",-1)])]),_:1},8,["to"])])])]))),128))]))])])])]),l(N,{items:[{label:"Legacy Force",to:"/"},{label:"マイページ",to:"/mypage"},{label:"応募履歴"}]})])}}});export{qt as default};

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.