PageSourceSearch

https://xterns.ai/assets/TechLeadProfile-ChOM-5qB.js

js xterns.ai collected 2026-10-05 13:24:49 UTC 14,554 bytes, 1 lines download raw bytes

1import{r as N,j as e,N as U,O as F,Q as D,V as E,I as m,ad as k,n as I,J as h,X as A,B as _,u as B,f as R,bL as H,h as G,i as O,a as $,H as M,m as Y,a5 as K,aK as q,bK as J,bu as Q}from"./index-DLd_kDlx.js";import{L as d}from"./label-D4-ENrYn.js";import{T as V}from"./textarea-C6X-I43k.js";import{U as S}from"./url-input-Dei4E79g.js";import{P as T,D as X}from"./ProfilePictureUpload-C75uCAIp.js";import{S as P}from"./star-BH1OFEcs.js";import{S as z}from"./square-pen-Ce4P3TUP.js";import{M as W}from"./map-pin-ChCNbN_o.js";import{M as Z}from"./mail-BVn2o8AP.js";import{P as ee}from"./phone-rtR4Bg4j.js";import{L as se}from"./linkedin-C3YpjTq8.js";import{G as ae}from"./globe-C057RQ73.js";import{T as le}from"./TechLeadHeader-eLOg3V3h.js";import"./linkValidation-XNJaCD7E.js";import"./external-link-D0CFvOTk.js";import"./loader-circle-D2miE2xB.js";import"./select-RSrodAEw.js";import"./index-BdQq_4o_.js";import"./index-Deh-4PO1.js";import"./chevron-down-DpJJsCer.js";import"./chevron-up-M4SAwIjf.js";import"./monitor-CcmP4yDI.js";import"./rotate-ccw-Bx1C64Ur.js";import"./camera-CjU4dBqw.js";import"./upload-CCEcMTV9.js";import"./dropdown-menu-DSd1c3Vk.js";import"./index-lTaZyIGy.js";import"./chevron-right-CD1gvy-q.js";import"./NotificationIcon-C1wwYnH5.js";import"./popover-BMD5FOmU.js";import"./scroll-area-BXTuUF24.js";import"./NotificationItem-Dc2WXW-y.js";import"./formatDistanceToNow-57P64IbE.js";import"./en-US-9SRVm7yB.js";import"./differenceInCalendarMonths-BA0TPVs2.js";import"./endOfDay-DkR3ZXc8.js";import"./endOfMonth-CYn6pTOm.js";import"./message-square-CtxeCfRz.js";import"./trophy-DBX-jNOC.js";import"./triangle-alert-Chqk_WK7.js";const re=({isOpen:p,onClose:c,currentProfile:s,onProfileUpdate:y,avatarUrl:g,onAvatarUpdate:w})=>{const[u,j]=N.useState(!1),[r,i]=N.useState({full_name:"",bio:"",expertise_areas:[],career_paths:[],years_experience:0,linkedin_url:"",github_url:"",portfolio_url:"",company:"",position:"",phone:"",location:"",is_available:!0});N.useEffect(()=>{p&&s&&i({full_name:s.full_name||"",bio:s.bio||"",expertise_areas:s.expertise_areas||[],career_paths:s.career_paths||[],years_experience:s.years_experience||0,linkedin_url:s.linkedin_url||"",github_url:s.github_url||"",portfolio_url:s.portfolio_url||"",company:s.company||"",position:s.position||"",phone:s.phone||"",location:s.location||"",is_available:s.is_available??!0})},[p,s]);const b=(a,l)=>{l?r.career_paths.length<2&&i(n=>({...n,career_paths:[...n.career_paths,a]})):i(n=>({...n,career_paths:n.career_paths.filter(t=>t!==a)}))},v=async()=>{try{j(!0),await y(r),c()}catch(a){console.error("Error updating profile:",a)}finally{j(!1)}};return e.jsx(U,{open:p,onOpenChange:c,children:e.jsxs(F,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsx(D,{children:e.jsx(E,{children:"Edit Tech Lead Profile"})}),e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx(T,{currentImageUrl:g,onImageUpdate:w})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"full_name",children:"Full Name"}),e.jsx(m,{id:"full_name",value:r.full_name,onChange:a=>i(l=>({...l,full_name:a.target.value})),placeholder:"Enter your full name"})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"years_experience",children:"Years of Experience"}),e.jsx(m,{id:"years_experience",type:"number",value:r.years_experience,onChange:a=>i(l=>({...l,years_experience:parseInt(a.target.value)||0})),placeholder:"Years of experience"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"company",children:"Company"}),e.jsx(m,{id:"company",value:r.company,onChange:a=>i(l=>({...l,company:a.target.value})),placeholder:"Your current company"})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"position",children:"Position"}),e.jsx(m,{id:"position",value:r.position,onChange:a=>i(l=>({...l,position:a.target.value})),placeholder:"Your current position"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"location",children:"Location"}),e.jsx(m,{id:"location",value:r.location,onChange:a=>i(l=>({...l,location:a.target.value})),placeholder:"City, State/Country"})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"phone",children:"Phone"}),e.jsx(m,{id:"phone",value:r.phone,onChange:a=>i(l=>({...l,phone:a.target.value})),placeholder:"+1 (555) 123-4567"})]})]}),e.jsxs("div",{children:[e.jsx(d,{htmlFor:"bio",children:"Bio"}),e.jsx(V,{id:"bio",value:r.bio,onChange:a=>i(l=>({...l,bio:a.target.value})),placeholder:"Tell us about yourself and your experience...",rows:3})]}),e.jsxs("div",{children:[e.jsx(d,{children:"Professional Roles (Select up to 2)"}),e.jsx("p",{className:"text-sm text-gray-600 mb-3",children:"Choose up to 2 professional roles that reflect your primary specialisations."}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 max-h-60 overflow-y-auto border rounded-lg p-4",children:k.map(a=>e.jsxs("div",{className:"flex items-start space-x-3 p-2 rounded hover:bg-gray-50",children:[e.jsx(I,{id:`career-${a.id}`,checked:r.career_paths.includes(a.id),onCheckedChange:l=>b(a.id,l),disabled:!r.career_paths.includes(a.id)&&r.career_paths.length>=2}),e.jsxs("div",{className:"flex-1",children:[e.jsx("label",{htmlFor:`career-${a.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",children:a.name}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:a.description})]})]},a.id))}),r.career_paths.length>0&&e.jsxs("div",{className:"mt-3",children:[e.jsx("p",{className:"text-sm font-medium mb-2",children:"Selected Professional Roles:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.career_paths.map(a=>{const l=k.find(n=>n.id===a);return l?e.jsxs(h,{variant:"secondary",className:"flex items-center gap-1",children:[l.name,e.jsx("button",{type:"button",onClick:()=>b(a,!1),className:"ml-1 hover:text-red-500",children:e.jsx(A,{className:"h-3 w-3"})})]},a):null})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{children:[e.jsx(d,{htmlFor:"portfolio_url",children:"Portfolio URL"}),e.jsx(m,{id:"portfolio_url",value:r.portfolio_url,onChange:a=>i(l=>({...l,portfolio_url:a.target.value})),placeholder:"https://yourportfolio.com"})]}),e.jsx(S,{id:"github_url",label:"GitHub URL",value:r.github_url,onChange:a=>i(l=>({...l,github_url:a})),placeholder:"https://github.com/username",type:"github"}),e.jsx(S,{id:"linkedin_url",label:"LinkedIn URL",value:r.linkedin_url,onChange:a=>i(l=>({...l,linkedin_url:a})),placeholder:"https://linkedin.com/in/username",type:"linkedin"})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(_,{type:"button",variant:"outline",onClick:c,className:"flex-1",children:"Cancel"}),e.jsx(_,{onClick:v,disabled:u,className:"flex-1",children:u?"Saving...":"Save Changes"})]})]})]})})};function te(){var a,l,n;const p=B(),{user:c}=R(),{profile:s,isLoading:y,avatarUrl:g,createOrUpdateProfile:w,updateAvatar:u}=H(),[j,r]=N.useState(!1),i=t=>t.map(o=>{var x;return(x=k.find(f=>f.id===o))==null?void 0:x.name}
1).filter(Boolean),b=async t=>{await w(t),r(!1)},v=t=>{const o=typeof t=="string",x=o?t:t.name,f=o?0:t.proficiency||0,C=!o&&f>0;return e.jsxs("div",{className:`rounded-2xl border p-4 ${C?"border-emerald-200 bg-emerald-50":"border-slate-200 bg-slate-50"}`,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm font-semibold text-slate-950",children:x}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:5},(ie,L)=>e.jsx(P,{className:`w-3 h-3 ${L<f?"fill-yellow-400 text-yellow-400":"text-gray-300"}`},L))})]}),C&&e.jsx("div",{className:"mt-1",children:e.jsx(h,{variant:"secondary",className:"rounded-full bg-emerald-100 text-xs text-emerald-800 hover:bg-emerald-100",children:"Assessed"})}),!C&&e.jsx("div",{className:"mt-1",children:e.jsx(h,{variant:"outline",className:"rounded-full border-slate-200 text-xs text-slate-500",children:"Not assessed"})})]},x)};return y?e.jsx("div",{className:"space-y-6",children:e.jsx("div",{className:"mx-auto max-w-5xl",children:e.jsxs("div",{className:"animate-pulse",children:[e.jsx("div",{className:"mb-6 h-8 w-1/4 rounded bg-slate-200"}),e.jsxs("div",{className:"rounded-[24px] border border-slate-200 bg-white p-6 shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:[e.jsx("div",{className:"mb-4 h-32 rounded-2xl bg-slate-200"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"h-4 w-3/4 rounded bg-slate-200"}
1),e.jsx("div",{className:"h-4 w-1/2 rounded bg-slate-200"}),e.jsx("div",{className:"h-4 w-2/3 rounded bg-slate-200"})]})]})]})})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("section",{className:"rounded-[24px] border border-slate-200/80 bg-white p-6 shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{children:[e.jsx(h,{className:"mb-4 rounded-full bg-slate-100 px-3 py-1 text-xs font-semibold text-xterns-navy hover:bg-slate-100",children:"Tech Lead workspace"}),e.jsx("h1",{className:"text-3xl font-bold tracking-tight text-slate-950",children:"Tech Lead Profile"}),e.jsx("p",{className:"mt-2 max-w-2xl text-sm leading-6 text-slate-600",children:"Keep your leadership identity, expertise, and collaboration preferences up to date."})]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(_,{onClick:()=>p("/tech-lead/skill-update-assessment"),variant:"outline",className:"flex items-center gap-2 rounded-full border-slate-200 bg-white px-4 text-slate-700 hover:bg-slate-50",children:[e.jsx(P,{className:"h-4 w-4"}),"Update Skills"]}),e.jsxs(_,{onClick:()=>r(!0),className:"flex items-center gap-2 rounded-full bg-xterns-navy px-4 text-white hover:bg-xterns-navy2",children:[e.jsx(z,{className:"h-4 w-4"}),"Edit Profile"]})]})]})}),e.jsxs(G,{className:"overflow-hidden rounded-[24px] border border-slate-200/80 bg-white shadow-[0_18px_55px_rgba(15,23,42,0.05)]",children:[e.jsx(O,{className:"border-b border-slate-100 p-6 pb-5",children:e.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-start",children:[e.jsx(T,{currentImageUrl:g,onImageUpdate:u}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"mb-2 flex flex-wrap items-center gap-3",children:[e.jsx("h2",{className:"text-2xl font-bold text-slate-950",children:(s==null?void 0:s.full_name)||"Tech Lead"}),e.jsx(h,{variant:s!=null&&s.is_available?"default":"secondary",className:s!=null&&s.is_available?"rounded-full bg-xterns-navy text-white hover:bg-xterns-navy":"rounded-full bg-slate-100 text-slate-700",children:s!=null&&s.is_available?"Available":"Busy"})]}),e.jsxs("div",{className:"mb-3 flex flex-wrap gap-4 text-sm text-slate-600",children:[(s==null?void 0:s.position)&&(s==null?void 0:s.company)&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx($,{className:"h-4 w-4"}),e.jsxs("span",{children:[s.position," at ",s.company]})]}),(s==null?void 0:s.location)&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(W,{className:"h-4 w-4"}),e.jsx("span",{children:s.location})]}),(s==null?void 0:s.years_experience)&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(M,{className:"h-4 w-4"}),e.jsxs("span",{children:[s.years_experience,"+ years experience"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[(c==null?void 0:c.email)&&e.jsxs("div",{className:"flex items-center gap-1 text-sm text-slate-600",children:[e.jsx(Z,{className:"h-4 w-4"}),e.jsx("span",{children:c.email})]}),(s==null?void 0:s.phone)&&e.jsxs("div",{className:"flex items-center gap-1 text-sm text-slate-600",children:[e.jsx(ee,{className:"h-4 w-4"}),e.jsx("span",{children:s.phone})]})]})]})]})}),e.jsxs(Y,{className:"p-6",children:[(s==null?void 0:s.bio)&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-2 font-semibold text-slate-950",children:"About"}),e.jsx("p",{className:"leading-relaxed text-slate-600",children:s.bio})]}),(s==null?void 0:s.career_paths)&&s.career_paths.length>0&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-3 font-semibold text-slate-950",children:"Career Paths"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:i(s.career_paths).map(t=>e.jsx(h,{variant:"secondary",className:"rounded-full bg-slate-100 px-3 py-1 text-slate-700",children:t},t))})]}),((s==null?void 0:s.skill_proficiencies)&&s.skill_proficiencies.length>0||(s==null?void 0:s.expertise_areas)&&s.expertise_areas.length>0)&&e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"mb-3 font-semibold text-slate-950",children:"Technical Skills"}),e.jsxs("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(a=s==null?void 0:s.skill_proficiencies)==null?void 0:a.map(t=>v(t)),(n=(l=s==null?void 0:s.expertise_areas)==null?void 0:l.filter(t=>{var o;return!((o=s==null?void 0:s.skill_proficiencies)!=null&&o.some(x=>x.name===t))}))==null?void 0:n.map(t=>v(t))]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4",children:[(s==null?void 0:s.github_url)&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 transition-colors hover:text-xterns-navy",children:[e.jsx(K,{className:"h-4 w-4"}),e.jsx("span",{children:"GitHub"})]}),(s==null?void 0:s.linkedin_url)&&e.jsxs("a",{href:s.linkedin_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 transition-colors hover:text-xterns-navy",children:[e.jsx(se,{className:"h-4 w-4"}),e.jsx("span",{children:"LinkedIn"})]}),(s==null?void 0:s.portfolio_url)&&e.jsxs("a",{href:s.portfolio_url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 transition-colors hover:text-xterns-navy",children:[e.jsx(ae,{className:"h-4 w-4"}),e.jsx("span",{children:"Portfolio"})]})]})]})]}),e.jsx(X,{}),e.jsx(re,{isOpen:j,onClose:()=>r(!1),currentProfile:s,onProfileUpdate:b,avatarUrl:g,onAvatarUpdate:u})]})}const Je=()=>e.jsx(q,{children:e.jsxs("div",{className:"flex min-h-screen w-full bg-[#F8FAFC] font-['Inter',sans-serif]",children:[e.jsx(J,{}),e.jsxs(Q,{className:"flex-1",children:[e.jsx(le,{title:"Profile"}),e.jsx("main",{className:"mx-auto w-full max-w-[1280px] flex-1 px-4 py-6 sm:px-6 lg:px-8",children:e.jsx(te,{})})]})]})});export{Je 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.