PageSourceSearch

https://peoplematch.no/assets/OstfolkDashboard-BBAekuhZ.js

js peoplematch.no collected 2026-10-04 16:24:36 UTC 34,920 bytes, 1 lines download raw bytes

1import{r as p,j as e}from"./vendor-react-YcQeLyCT.js";import{u as f,b as te}from"./vendor-query-YhiXJ5UB.js";import{n as ae,q as E,v as l,aO as le,e as ie,I as i,aQ as q,ag as re,w as y,f as C,a5 as w,S as F,aq as ne,at as j,h as r,i as n,B as K,j as x,k as o,U as T,aa as $,l as v,C as A,M as ce,T as O,F as de,m as me,H as xe,J as oe,K as he,N as je,O as I}from"./index-DJ8tWrMn.js";import{L as z}from"./layout-template-D-NPCvAl.js";import{B as P}from"./bot-DyCT0vM9.js";import{H as R}from"./heart-CwO7AhGX.js";import{D as L}from"./dollar-sign-BK8YLF5m.js";import{S as pe}from"./star-CiZjK8Fu.js";import"./vendor-radix-C79pJRp9.js";import"./vendor-charts-vgdclHSZ.js";function Oe(){const{toast:h}=ae(),[t,m]=p.useState("dashboard"),[ge,ue]=p.useState(!1),[be,Ne]=p.useState(!1),[S,G]=p.useState(null),[c,M]=p.useState(null),[a,H]=p.useState(!1);p.useEffect(()=>{(async()=>{try{(await fetch("/api/login/customer",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:"ostfolk",password:"ostfolk123"})})).ok&&E.invalidateQueries()}catch(d){console.log("Auto-login failed:",d)}})()},[]);const{data:u}=f({queryKey:["/api/customer-info/ostfolk"],retry:!1}),J=async()=>{try{(await fetch("/api/logout",{method:"POST"})).ok&&(window.location.href="/")}catch{h({title:"Feil ved utlogging",description:"Kunne ikke logge ut. Prøv igjen.",variant:"destructive"})}},{data:V}=f({queryKey:["/api/customer/dashboard-summary"],staleTime:120*1e3,retry:!1}),{data:D}=f({queryKey:["/api/jobs"],staleTime:120*1e3,retry:!1}),{data:U,refetch:Q}=f({queryKey:["/api/customer/pending-time-entries"],staleTime:60*1e3,retry:!1}),k={activeJobs:V?.activeJobsCount??0,monthlyCost:0,monthlyHours:0,favorites:V?.favoriteCount??0},B=(D??[]).slice(0,10).map(s=>({id:String(s.id),title:s.title,location:s.location||s.address||"",startDate:s.startDate||s.date||"",hourlyRate:s.hourlyRate||0,status:s.status||"active",candidatesCount:s.activeCandidates?.length??0})),b=(U??[]).filter(s=>s.status==="submitted").slice(0,10).map(s=>({id:s.id,candidateName:s.candidateName||"Ukjent",hoursWorked:s.totalHours||s.hoursWorked||0,weekEnding:s.weekEnding||s.clockOut?.slice(0,10)||"",project:s.jobTitle||""})),W=[],X=[],{data:N,isLoading:Y}=f({queryKey:["/api/customers/ostfolk/job-templates"],staleTime:300*1e3}),g=te({mutationFn:async s=>{const d=await fetch(`/api/customer/time-entries/${s}/approve`,{method:"PATCH",headers:{"Content-Type":"application/json"},credentials:"include"});if(!d.ok){const se=await d.json().catch(()=>({}));throw new Error(se.message||"Godkjenning feilet")}return d.json()},onSuccess:()=>{Q(),E.invalidateQueries({queryKey:["/api/customer/pending-time-entries"]}),h({title:"Timeregistrering godkjent",description:"Timeregistreringen har blitt godkjent og sendt til lønnsavdeling."})},onError:s=>{h({title:"Feil",description:s.message||"Kunne ikke godkjenne timeregistrering. Prøv igjen.",variant:"destructive"})}}),Z=s=>{M(s),m("create-job"),h({title:"Jobbmal valgt",description:`Bruker malen "${s.title}" for ny jobb`})},_=s=>{h({title:"Redigerer mal",description:`Åpner redigeringsvisning for "${s.title}"`})},ee=()=>{h({title:"Publiserer jobb",description:c?`Publiserer jobb basert på "${c.title}"`:"Publiserer nytt oppdrag"})};return e.jsxs("div",{className:"min-h-screen bg-gray-50 flex flex-col",children:[e.jsxs("div",{className:"h-12 border-b flex items-center justify-between px-4 shadow-sm pl-[14px] pr-[14px] pt-[0px] pb-[0px] mt-[0px] mb-[0px] bg-[#ebf9ffd4]",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(l,{variant:"ghost",size:"sm",onClick:()=>H(!a),className:"text-slate-600 hover:text-slate-900 h-8 w-8 p-0 flex items-center justify-center mr-1",children:e.jsx(le,{className:"w-5 h-5"})}),e.jsx("div",{className:`flex items-center gap-2 ${a?"ml-1":"ml-52"} transition-all duration-200`,children:e.jsx("img",{src:"/api/people-logo-transparent",alt:"People Logo",className:"h-8"})}),e.jsx("div",{className:"font-bold text-[#2e384d] text-[15px] ml-3",children:u?.organizationName||"Østfolk AS"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ie,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 text-slate-400 w-4 h-4"}),e.jsx(i,{placeholder:"Søk...",className:"w-64 pl-8 h-8 text-sm border-slate-200"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-7 h-7 bg-blue-500 rounded-full flex items-center justify-center text-white text-xs font-medium",children:"Ø"}),e.jsx(l,{variant:"ghost",size:"sm",onClick:J,className:"text-slate-600 hover:text-slate-900 h-8 px-2",children:e.jsx(q,{className:"w-4 h-4"})})]})]})]}),e.jsxs("div",{className:"flex flex-1",children:[e.jsxs("div",{className:`${a?"w-16":"w-64"} bg-white shadow-lg border-r flex flex-col transition-all duration-200`,children:[e.jsx("nav",{className:`flex-1 ${a?"p-2":"p-4"}`,children:e.jsxs("div",{className:"space-y-1",children:[e.jsxs("button",{onClick:()=>
1m("dashboard"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="dashboard"?"bg-blue-50 text-blue-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Hjem":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="dashboard"?"bg-blue-100":""}`,children:e.jsx(re,{className:`w-5 h-5 ${t==="dashboard"?"text-blue-600":"text-blue-500"}`})}),!a&&"Hjem"]}),e.jsxs("button",{onClick:()=>m("job-templates"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="job-templates"?"bg-orange-50 text-orange-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Jobbmaler":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="job-templates"?"bg-orange-100":""}`,children:e.jsx(z,{className:`w-5 h-5 ${t==="job-templates"?"text-orange-600":"text-orange-500"}`})}),!a&&"Jobbmaler"]}),e.jsxs("button",{onClick:()=>m("ai-matching"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="ai-matching"?"bg-green-50 text-green-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"AI Matching":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="ai-matching"?"bg-green-100":""}`,children:e.jsx(P,{className:`w-5 h-5 ${t==="ai-matching"?"text-green-600":"text-green-500"}`})}),!a&&"AI Matching"]}),e.jsxs("button",{onClick:()=>m("create-job"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="create-job"?"bg-purple-50 text-purple-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Opprett Jobb":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="create-job"?"bg-purple-100":""}`,children:e.jsx(y,{className:`w-5 h-5 ${t==="create-job"?"text-purple-600":"text-purple-500"}`})}),!a&&"Nye jobber"]}),e.jsxs("button",{onClick:()=>m("favorites"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="favorites"?"bg-red-50 text-red-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Favoritter":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="favorites"?"bg-red-100":""}`,children:e.jsx(R,{className:`w-5 h-5 ${t==="favorites"?"text-red-600":"text-red-500"}`})}),!a&&"Favoritter"]}),e.jsxs("button",{onClick:()=>m("time-approval"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="time-approval"?"bg-teal-50 text-teal-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Tidrapport":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="time-approval"?"bg-teal-100":""}`,children:e.jsx(C,{className:`w-5 h-5 ${t==="time-approval"?"text-teal-600":"text-teal-500"}`})}),!a&&"Tidrapport"]}),e.jsxs("button",{onClick:()=>m("reports"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="reports"?"bg-indigo-50 text-indigo-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Rapporter":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="reports"?"bg-indigo-100":""}`,children:e.jsx(w,{className:`w-5 h-5 ${t==="reports"?"text-indigo-600":"text-indigo-500"}`})}),!a&&"Rapporter"]}),e.jsxs("button",{onClick:()=>m("company"),className:`w-full flex items-center ${a?"justify-center px-2":"gap-3 px-3"} py-2 rounded-lg text-sm font-medium transition-colors ${t==="company"?"bg-gray-50 text-gray-700":"text-slate-600 hover:text-slate-900 hover:bg-slate-50"}`,title:a?"Selskap":"",children:[e.jsx("div",{className:`p-1 rounded ${t==="company"?"bg-gray-100":""}`,children:e.jsx(F,{className:`w-5 h-5 ${t==="company"?"text-gray-600":"text-gray-500"}`})}),!a&&"Selskap"]})]})}),e.jsx("div",{className:`${a?"p-2":"p-4"} border-t`,children:e.jsxs(l,{variant:"ghost",onClick:J,className:`w-full ${a?"justify-center px-2":"justify-start"} text-slate-600 hover:text-slate-900 hover:bg-slate-50`,title:a?"Logg ut":"",children:[e.jsx(q,{className:`w-4 h-4 ${a?"":"mr-2"}`}),!a&&"Logg ut"]}
1)})]}),e.jsxs("div",{className:"flex-1",children:[e.jsx("header",{className:"bg-white shadow-sm border-b",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"flex justify-between items-center",children:e.jsxs("div",{children:[e.jsxs("h2",{className:"text-xl font-semibold text-slate-900",children:[t==="dashboard"&&"Hjem",t==="job-templates"&&"Jobbmaler",t==="ai-matching"&&"AI Matching",t==="create-job"&&"Nye jobber",t==="favorites"&&"Favoritter",t==="time-approval"&&"Tidrapport",t==="reports"&&"Rapporter",t==="company"&&"Selskap"]}),e.jsxs("p",{className:"text-sm text-slate-500 mt-1",children:[t==="dashboard"&&"Oversikt over din bedrifts aktivitet",t==="job-templates"&&"Administrer og bruk jobbmaler",t==="ai-matching"&&"AI-assistert kandidatmatching",t==="create-job"&&"Opprett nye jobbannonser",t==="favorites"&&"Lagrede kandidater og jobber",t==="time-approval"&&"Godkjenn timeregistreringer",t==="reports"&&"Rapporter og statistikk",t==="company"&&"Innstillinger for selskap og kunder"]})]})})})}),e.jsx("main",{className:"p-6",children:e.jsxs(ne,{value:t,onValueChange:m,className:"w-full",children:[e.jsxs(j,{value:"dashboard",className:"mt-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-8",children:[e.jsx(r,{children:e.jsx(n,{className:"p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"p-2 bg-blue-100 rounded-lg",children:e.jsx(K,{className:"w-6 h-6 text-blue-600"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Aktive oppdrag"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:k.activeJobs})]})]})})}),e.jsx(r,{children:e.jsx(n,{className:"p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"p-2 bg-green-100 rounded-lg",children:e.jsx(L,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Månedskostnad"}),e.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:["kr ",k.monthlyCost.toLocaleString()]})]})]})})}),e.jsx(r,{children:e.jsx(n,{className:"p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"p-2 bg-amber-100 rounded-lg",children:e.jsx(C,{className:"w-6 h-6 text-amber-600"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Timer denne måneden"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:k.monthlyHours})]})]})})}),e.jsx(r,{children:e.jsx(n,{className:"p-6",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"p-2 bg-purple-100 rounded-lg",children:e.jsx(R,{className:"w-6 h-6 text-purple-600"})}),e.jsxs("div",{className:"ml-4",children:[e.jsx("p",{className:"text-sm font-medium text-slate-600",children:"Favoritt vikarer"}),e.jsx("p",{className:"text-2xl font-bold text-slate-900",children:k.favorites})]})]})})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsxs(r,{children:[e.jsxs(x,{className:"flex flex-row items-center justify-between",children:[e.jsx(o,{children:"Aktive oppdrag"}),e.jsx(l,{onClick:()=>m("create-job"),children:"Opprett nytt oppdrag"})]}),e.jsx(n,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:B.map(s=>e.jsxs("div",{className:"border rounded-lg p-4 hover:bg-slate-50",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("h3",{className:"font-semibold text-slate-900",children:s.title}),e.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${s.status==="active"?"bg-green-100 text-green-800":"bg-amber-100 text-amber-800"}`,children:s.status==="active"?"Aktiv":"Avventer"})]}),e.jsx("p",{className:"text-sm text-slate-600 mb-1",children:s.location}),e.jsxs("p",{className:"text-sm text-slate-600 mb-2",children:["kr ",s.hourlyRate,"/time"]}),e.jsxs("p",{className:"text-sm text-blue-600",children:[s.candidatesCount," kandidater"]})]},s.id))})})]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(r,{children:[e.jsx(x,{children:e.jsx(o,{children:"Hurtighandlinger"})}),e.jsxs(n,{className:"space-y-3",children:[e.jsxs(l,{variant:"outline",className:"w-full justify-start",onClick:()=>m("create-job"),children:[e.jsx(z,{className:"w-4 h-4 mr-2"}),"Opprett nytt oppdrag"]}),e.jsxs(l,{variant:"outline",className:"w-full justify-start",onClick:()=>m("ai-matching"),children:[e.jsx(T,{className:"w-4 h-4 mr-2"}),"Se kandidater"]}),e.jsxs(l,{variant:"outline",className:"w-full justify-start",onClick:()=>{h({title:"Generer rapport",description:"Rapportgenerering kommer snart"})},children:[e.jsx(w,{className:"w-4 h-4 mr-2"}),"Generer rapport"]})]})]}),e.jsxs(r,{children:[e.jsxs(x,{className:"flex flex-row items-center justify-between",children:[e.jsx(o,{children:"Godkjenn timer"}),e.jsxs("span",{className:"bg-red-100 text-red-800 text-xs font-medium px-2 py-1 rounded-full",children:[b.length," venter"]})]}),e.jsx(n,{children:b.length===0?e.jsxs("div",{className:"text-center py-4",children:[e.jsx($,{className:"w-8 h-8 text-green-500 mx-auto mb-2"}),e.jsx("p",{className:"text-slate-500 text-sm",children:"Ingen timer venter på godkjenning"})]}):e.jsx("div",{className:"space-y-3",children:b.map(s=>e.jsxs("div",{className:"border rounded-lg p-3",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:s.candidateName}),e.jsx("p",{className:"text-sm text-slate-600",children:s.project})]}),e.jsxs("span",{className:"text-sm font-medium",children:[s.hoursWorked,"t"]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("span",{className:"text-xs text-slate-500",children:["Uke slutter ",s.weekEnding]}),e.jsx(l,{size:"sm",onClick:()=>g.mutate(s.id),disabled:g.isPending,children:g.isPending?"...":"Godkjenn"})]})]},s.id))})})]})]})]})]}),e.jsx(j,{value:"job-templates",className:"mt-6",children:e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(z,{className:"w-5 h-5"}),"Østfolk AS Jobbmaler"]})}),e.jsxs(n,{children:[Y?e.jsx("div",{className:"text-center py-8",children:e.jsx("p",{className:"text-slate-600",children:"Laster jobbmaler..."})}):!N||Array.isArray(N)&&N.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-slate-600 mb-4",children:"Ingen jobbmaler funnet for Østfolk AS"}),e.jsxs(l,{variant:"outline",children:[e.jsx(y,{className:"w-4 h-4 mr-2"}),"Opprett første mal"]})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.isArray(N)&&N.map(s=>e.jsxs("div",{className:"border rounded-lg p-6 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:s.title}),e.jsx(v,{variant:"secondary",children:s.category||"Generelt"})]}),e.jsx("p",{className:"text-sm text-slate-600 mb-3",children:s.description}),e.jsxs("div",{className:"flex justify-between items-center mb-3",children:[e.jsx("span",{className:"text-lg font-bold text-slate-900",children:s.hourlyRate?`kr ${s.hourlyRate}/time`:"Pris ikke satt"}),e.jsx("span",{className:"text-sm text-slate-600",children:s.experienceLevel||"Ikke spesifisert"})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"text-sm font-medium text-slate-900 mb-2",children:"Nøkkelkompetanse:"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.requiredSkills&&Array.isArray(s.requiredSkills)?e.jsxs(e.Fragment,{children:[s.requiredSkills.slice(0,3).map(d=>e.jsx(v,{variant:"outline",className:"text-xs",children:d},d)),s.requiredSkills.length>3&&e.jsxs(v,{variant:"outline",className:"text-xs",children:["+",s.requiredSkills.length-3]})]}):e.jsx("span",{className:"text-xs text-slate-500",children:"Ingen ferdigheter spesifisert"})})]}),e.jsxs("div",{className:"mb-4 space-y-1 text-sm text-slate-600",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{className:"w-4 h-4"}),e.jsx("span",{children:s.duration||"Varighet ikke spesifisert"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ce,{className:"w-4 h-4"}),e.jsx("span",{children:s.location||"Lokasjon ikke spesifisert"})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"text-sm font-medium text-slate-900 mb-2",children:"Beskrivelse:"}),e.jsx("p",{className:"text-sm text-slate-600 line-clamp-3",children:s.description||"Ingen detaljert beskrivelse tilgjengelig"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{size:"sm",className:"flex-1",onClick:()=>Z(s),children:"Bruk mal"}),e.jsx(l,{size:"sm",variant:"outline",onClick:()=>_(s),children:"Rediger"})]})]},s.id))}),e.jsxs("div",{className:"mt-8 p-6 bg-slate-50 rounded-lg",children:[e.jsx("h3",{className:"text-lg font-medium text-slate-900 mb-2",children:"Opprett ny jobbmal"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Lag en ny mal basert på dine spesifikke behov for å forenkle fremtidige utlysninger."}),e.jsxs(l,{variant:"outline",onClick:()=>{h({title:"Opprett ny mal",description:"Åpner skjema for å opprette en ny jobbmal"})},children:[e.jsx(y,{className:"w-4 h-4 mr-2"}),"Opprett ny mal"]})]})]})]})}),e.jsx(j,{value:"ai-matching",className:"mt-6",children:e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-5 h-5"}),"AI-drevet kandidatmatching"]})}),e.jsxs(n,{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-medium mb-4",children:"Velg oppdrag for AI-matching"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:B.map(s=>e.jsxs("div",{className:`border rounded-lg p-4 cursor-pointer transition-colors ${S?.id===s.id?"border-blue-500 bg-blue-50":"hover:bg-slate-50"}`,onClick:()=>G(s),children:[e.jsx("h4",{className:"font-medium",children:s.title}),e.jsxs("p",{className:"text-sm text-slate-600",children:[s.location," • kr ",s.hourlyRate,"/time"]})]},s.id))})]}),S&&e.jsxs("div",{children:[e.jsxs("h3",{className:"text-lg font-medium mb-4",children:["AI-anbefalte kandidater for ",S.title]}),e.jsx("div",{className:"space-y-4",children:W.map(s=>e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:s.name}),e.jsxs("p",{className:"text-sm text-slate-600",children:[s.location," • ",s.experience]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("div",{className:`inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${s.match>=90?"bg-green-100 text-green-800":s.match>=80?"bg-amber-100 text-amber-800":"bg-slate-100 text-slate-800"}`,children:[s.match,"% match"]}),e.jsxs("p",{className:"text-sm text-slate-600 mt-1",children:["kr ",s.hourlyRate,"/time"]})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:s.skills.map(d=>e.jsx(v,{variant:"secondary",children:d},d))}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{size:"sm",children:"Kontakt kandidat"}),e.jsx(l,{size:"sm",variant:"outline",children:"Se profil"})]})]},s.id))})]})]})]})}),e.jsx(j,{value:"create-job",className:"mt-6",children:e.jsxs(r,{children:[e.jsxs(x,{children:[e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(y,{className:"w-5 h-5"}),c?`Opprett jobb basert på "${c.title}"`:"Opprett nytt oppdrag"]}),c&&e.jsxs("div",{className:"text-sm text-slate-600",children:["Basert på jobbmal: ",c.title," • kr ",c.hourlyRate,"/time"]})]}),e.jsxs(n,{children:[c?e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Stillingstittel"}),e.jsx(i,{defaultValue:c.title})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Lokasjon"}),e.jsx(i,{defaultValue:c.location})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Timelønn (kr)"}),e.jsx(i,{type:"number",defaultValue:c.hourlyRate})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Startdato"}),e.jsx(i,{type:"date"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Beskrivelse"}),e.jsx(O,{rows:4,defaultValue:c.description})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Nødvendige ferdigheter"}),e.jsx(i,{defaultValue:c.requiredSkills?.join(", ")||""})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Antall kandidater"}),e.jsx(i,{type:"number",defaultValue:"1",min:"1"})]})]})]}):e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Stillingstittel"}),e.jsx(i,{placeholder:"f.eks. Senior React Utvikler"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Lokasjon"}),e.jsx(i,{placeholder:"f.eks. Oslo"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Timelønn (kr)"}),e.jsx(i,{type:"number",placeholder:"750"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Startdato"}),e.jsx(i,{type:"date"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Beskrivelse"}),e.jsx(O,{rows:4,placeholder:"Beskriv oppdraget..."})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Nødvendige ferdigheter"}),e.jsx(i,{placeholder:"React, TypeScript, Node.js"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium mb-2",children:"Antall kandidater"}),e.jsx(i,{type:"number",placeholder:"1",min:"1"})]})]})]}),e.jsxs("div",{className:"mt-6 flex gap-3",children:[e.jsx(l,{onClick:ee,children:c?"Publiser jobb":"Publiser oppdrag"}),c?e.jsx(l,{variant:"outline",onClick:()=>{M(null),m("job-templates")}
1,children:"Avbryt"}):e.jsx(l,{variant:"outline",children:"Lagre som utkast"})]})]})]})}),e.jsx(j,{value:"favorites",className:"mt-6",children:e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(R,{className:"w-5 h-5"}),"Favoritt vikarer"]})}),e.jsx(n,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:X.map(s=>e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsxs("div",{className:"flex justify-between items-start mb-3",children:[e.jsx("h4",{className:"font-medium text-slate-900",children:s.name}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(pe,{className:"w-4 h-4 text-amber-500 fill-current"}),e.jsx("span",{className:"text-sm text-slate-600",children:s.rating})]})]}),e.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:s.skills.map(d=>e.jsx(v,{variant:"secondary",className:"text-xs",children:d},d))}),e.jsxs("div",{className:"space-y-1 text-sm text-slate-600 mb-3",children:[e.jsxs("p",{children:[s.completedJobs," fullførte oppdrag"]}),e.jsx("p",{className:`font-medium ${s.availability==="Tilgjengelig"?"text-green-600":"text-amber-600"}`,children:s.availability}),e.jsxs("p",{children:["kr ",s.hourlyRate,"/time"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{size:"sm",className:"flex-1",children:"Kontakt"}),e.jsx(l,{size:"sm",variant:"outline",children:"Profil"})]})]},s.id))})})]})}),e.jsx(j,{value:"time-approval",className:"mt-6",children:e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(C,{className:"w-5 h-5"}),"Tidrapportering og godkjenning"]})}),e.jsx(n,{children:b.length===0?e.jsxs("div",{className:"text-center py-8",children:[e.jsx($,{className:"w-12 h-12 text-green-500 mx-auto mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-slate-900 mb-2",children:"Alle timer godkjent"}),e.jsx("p",{className:"text-slate-500",children:"Ingen timeregistreringer venter på godkjenning"})]}):e.jsx("div",{className:"space-y-4",children:b.map(s=>e.jsx("div",{className:"border rounded-lg p-4",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 items-center",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-slate-900",children:s.candidateName}),e.jsx("p",{className:"text-sm text-slate-600",children:s.project})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[s.hoursWorked,"t"]}),e.jsx("p",{className:"text-sm text-slate-600",children:"Timer arbeidet"})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm text-slate-600",children:"Uke slutter"}),e.jsx("p",{className:"font-medium",children:s.weekEnding})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(l,{size:"sm",onClick:()=>g.mutate(s.id),disabled:g.isPending,className:"flex-1",children:g.isPending?"...":"Godkjenn"}),e.jsx(l,{size:"sm",variant:"outline",children:"Detaljer"})]})]})},s.id))})})]})}),e.jsx(j,{value:"reports",className:"mt-6",children:e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(w,{className:"w-5 h-5"}),"Rapporter og analyser"]})}),e.jsx(n,{children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(de,{className:"w-8 h-8 text-blue-600 mb-3"}),e.jsx("h3",{className:"font-medium mb-2",children:"Månedlig kostnadsoversikt"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Detaljert oversikt over alle kostnader denne måneden"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(T,{className:"w-8 h-8 text-green-600 mb-3"}),e.jsx("h3",{className:"font-medium mb-2",children:"Kandidatytelse"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Analyse av kandidatprestasjoner og vurderinger"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(A,{className:"w-8 h-8 text-purple-600 mb-3"}),e.jsx("h3",{className:"font-medium mb-2",children:"Timeregistrering"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Oversikt over alle registrerte timer og godkjenninger"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(K,{className:"w-8 h-8 text-amber-600 mb-3"}),e.jsx("h3",{className:"font-medium mb-2",children:"Oppdragsoversikt"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Status og fremdrift for alle aktive oppdrag"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(L,{className:"w-8 h-8 text-red-600 mb-3"}),e.jsx("h3",{className:"font-medium mb-2",children:"Budsjettanalyse"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Sammenligning av budsjett vs faktiske kostnader"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]}),e.jsxs("div",{className:"border rounded-lg p-4",children:[e.jsx(w,{className:"w-8 h-8 text-indigo-600 mb-3"}
1),e.jsx("h3",{className:"font-medium mb-2",children:"Trend analyse"}),e.jsx("p",{className:"text-sm text-slate-600 mb-4",children:"Trender og prognoser for fremtidig bemanning"}),e.jsx(l,{size:"sm",variant:"outline",className:"w-full",children:"Generer rapport"})]})]})})]})}),e.jsx(j,{value:"company",className:"mt-6",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(me,{className:"w-5 h-5"}),"Selskapsinformasjon"]})}),e.jsxs(n,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Organisasjonsnavn"}),e.jsx(i,{defaultValue:u?.organizationName||"Østfolk AS"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Organisasjonsnummer"}),e.jsx(i,{defaultValue:u?.organizationNumber||"123456789"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"E-postadresse"}),e.jsx(i,{defaultValue:u?.email||"[email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Telefonnummer"}),e.jsx(i,{defaultValue:u?.phone||"+47 123 45 678"})]}),e.jsx(l,{className:"w-full",children:"Lagre endringer"})]})]}),e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(L,{className:"w-5 h-5"}),"Faktureringsinnstillinger"]})}),e.jsxs(n,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Fakturaadresse"}),e.jsx(O,{placeholder:"Skriv inn fullstendig fakturaadresse"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"Betalingsbetingelser"}),e.jsxs(xe,{children:[e.jsx(oe,{children:e.jsx(he,{placeholder:"Velg betalingsbetingelser"})}),e.jsxs(je,{children:[e.jsx(I,{value:"14",children:"14 dager"}),e.jsx(I,{value:"30",children:"30 dager"}),e.jsx(I,{value:"45",children:"45 dager"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-sm font-medium text-slate-700",children:"MVA-nummer"}),e.jsx(i,{placeholder:"NO 123 456 789 MVA"})]}),e.jsx(l,{className:"w-full",children:"Oppdater faktureringsinfo"})]})]}),e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(F,{className:"w-5 h-5"}),"Varslingsinnstillinger"]})}),e.jsxs(n,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"E-postvarslinger"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Motta varsler om nye jobbsøknader"})]}),e.jsx("div",{className:"bg-blue-100 text-blue-600 px-2 py-1 rounded text-xs",children:"Aktivert"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"SMS-varsler"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Motta SMS ved viktige hendelser"})]}),e.jsx("div",{className:"bg-green-100 text-green-600 px-2 py-1 rounded text-xs",children:"Aktivert"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Ukemail med oppsummering"}),e.jsx("p",{className:"text-sm text-slate-600",children:"FÃ¥ ukentlig sammendrag av aktiviteter"})]}),e.jsx("div",{className:"bg-gray-100 text-gray-600 px-2 py-1 rounded text-xs",children:"Deaktivert"})]}),e.jsx(l,{className:"w-full",children:"Oppdater innstillinger"})]})]}),e.jsxs(r,{children:[e.jsx(x,{children:e.jsxs(o,{className:"flex items-center gap-2",children:[e.jsx(P,{className:"w-5 h-5"}),"Integrasjoner"]})}),e.jsxs(n,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:e.jsx($,{className:"w-5 h-5 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Tripletex"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Regnskapssystem"})]})]}),e.jsx("div",{className:"bg-green-100 text-green-600 px-2 py-1 rounded text-xs",children:"Tilkoblet"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:e.jsx(A,{className:"w-5 h-5 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Office 365"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Kalender og e-post"})]})]}),e.jsx(l,{size:"sm",variant:"outline",children:"Koble til"})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-purple-100 rounded-lg flex items-center justify-center",children:e.jsx(T,{className:"w-5 h-5 text-purple-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Slack"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Team kommunikasjon"})]})]}),e.jsx(l,{size:"sm",variant:"outline",children:"Koble til"})]})]})]})]})})]})})]})]})]})}export{Oe 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.