@burdenoff/microfe-technospam 2026.828.1 → 2026.830.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -3
- package/dist/technospam/TechnoSpamRoot.js +4 -4
- package/dist/technospam/components/PageLayout.d.ts.map +1 -1
- package/dist/technospam/components/PageLayout.js +24 -23
- package/dist/technospam/components/PageLayout.js.map +1 -1
- package/dist/technospam/components/StateViews.d.ts +1 -1
- package/dist/technospam/components/StateViews.d.ts.map +1 -1
- package/dist/technospam/components/StateViews.js +28 -26
- package/dist/technospam/components/StateViews.js.map +1 -1
- package/dist/technospam/components/TagInput.d.ts +1 -1
- package/dist/technospam/components/TagInput.d.ts.map +1 -1
- package/dist/technospam/components/TagInput.js +39 -34
- package/dist/technospam/components/TagInput.js.map +1 -1
- package/dist/technospam/hooks/useTr.d.ts +17 -0
- package/dist/technospam/hooks/useTr.d.ts.map +1 -0
- package/dist/technospam/hooks/useTr.js +12 -0
- package/dist/technospam/hooks/useTr.js.map +1 -0
- package/dist/technospam/index.d.ts +1 -0
- package/dist/technospam/index.d.ts.map +1 -1
- package/dist/technospam/index.js +1 -0
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js +198 -189
- package/dist/technospam/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +165 -163
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +117 -113
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/DashboardDashboardPagePage.js +211 -193
- package/dist/technospam/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +110 -110
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +174 -160
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.d.ts.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +156 -151
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/dist/technospam/utils/i18n.js +1 -1
- package/dist/technospam/utils/i18n.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorshipMentorsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"sourcesContent":["import { createElement, useMemo, useState } from 'react';\nimport { Award, MessageSquare, Search, Sparkles, Star, UserPlus, Users, X } from 'lucide-react';\nimport { Badge, Button, GlassCard, Input, Textarea } from '@burdenoff/fe-libs/ui';\nimport {\n EmptyView,\n ErrorView,\n LoadMore,\n LoadingGrid,\n PageLayout,\n StatCard,\n coverGradient,\n topicIcon,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useBecomeMentor,\n useMentorsQuery,\n usePageLimit,\n type TecMentor,\n} from '../api/technospamApi';\nimport { formatMoneyFromMinorUnits } from '../utils/format';\nimport { cn } from '../utils/cn';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\n\n/** Circular gradient medallion standing in for a mentor avatar, with a live\n * \"accepting\" presence dot — mirrors the directory mockup within the dark theme. */\nfunction MentorMedallion({ mentor, size = 'md' }: { mentor: TecMentor; size?: 'md' | 'lg' }) {\n const box = size === 'lg' ? 'h-20 w-20' : 'h-16 w-16';\n return (\n <div className=\"relative shrink-0\">\n <span\n className={cn(\n 'flex items-center justify-center rounded-full bg-gradient-to-br text-white shadow-md ring-1 ring-white/15',\n box,\n coverGradient(mentor.headline)\n )}\n >\n {createElement(topicIcon(mentor.expertise.join(' ') || mentor.headline), {\n size: size === 'lg' ? 32 : 26,\n strokeWidth: 1.7,\n })}\n </span>\n {mentor.isAcceptingMentees ? (\n <span className=\"absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-bg-surface bg-status-success-text\" />\n ) : null}\n </div>\n );\n}\n\nfunction MentorCard({ mentor, onOpen }: { mentor: TecMentor; onOpen: () => void }) {\n return (\n <GlassCard\n className=\"group flex cursor-pointer flex-col gap-4 p-5 transition-all duration-200 hover:-translate-y-1 hover:shadow-lg\"\n onClick={onOpen}\n >\n <div className=\"flex items-start gap-4\">\n <MentorMedallion mentor={mentor} />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n {mentor.headline}\n </h3>\n {mentor.role ? (\n <p className=\"mt-0.5 truncate text-xs font-medium text-text-secondary\">{mentor.role}</p>\n ) : null}\n {mentor.isAcceptingMentees ? (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 inline-flex items-center gap-1.5 border-status-success-border bg-status-success-bg-subtle text-status-success-text\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-success-text\" /> Accepting mentees\n </Badge>\n ) : (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 border-border-seam bg-bg-sunken text-text-secondary\"\n >\n Not accepting\n </Badge>\n )}\n </div>\n </div>\n\n {mentor.bio ? <p className=\"line-clamp-2 text-sm text-text-secondary\">{mentor.bio}</p> : null}\n\n {mentor.expertise.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {mentor.expertise.slice(0, 4).map((skill) => (\n <Badge key={skill} variant=\"secondary\" className=\"text-[11px]\">\n {skill}\n </Badge>\n ))}\n {mentor.expertise.length > 4 ? (\n <span className=\"self-center text-xs text-text-muted\">\n +{mentor.expertise.length - 4}\n </span>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"mt-auto grid grid-cols-3 divide-x divide-border-seam rounded-xl border border-border-seam bg-bg-sunken text-center\">\n <div className=\"px-2 py-2.5\">\n <div className=\"flex items-center justify-center gap-1 text-sm font-semibold text-text-primary\">\n <Star size={13} className=\"text-accent-teal\" />\n {mentor.ratingAvg > 0 ? mentor.ratingAvg.toFixed(1) : 'New'}\n </div>\n <div className=\"text-[11px] text-text-muted\">rating</div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">{mentor.sessionsCount}</div>\n <div className=\"text-[11px] text-text-muted\">sessions</div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">\n {formatMoneyFromMinorUnits(mentor.hourlyRate, mentor.currency)}\n </div>\n <div className=\"text-[11px] text-text-muted\">/ hr</div>\n </div>\n </div>\n\n <Button\n className=\"w-full\"\n onClick={(e) => {\n e.stopPropagation();\n onOpen();\n }}\n >\n View profile\n </Button>\n </GlassCard>\n );\n}\n\nfunction BecomeMentorForm({\n onClose,\n onDone,\n workspaceId,\n}: {\n onClose: () => void;\n onDone: () => void;\n workspaceId?: string;\n}) {\n const [headline, setHeadline] = useState('');\n const [role, setRole] = useState('');\n const [bio, setBio] = useState('');\n const [expertise, setExpertise] = useState('');\n const [hourlyRate, setHourlyRate] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [becomeMentor, { loading }] = useBecomeMentor();\n const { emit } = useTechnoSpamAnalytics();\n\n const canSubmit = headline.trim().length > 0 && !loading;\n\n const handleSubmit = async () => {\n if (!canSubmit) return;\n const input: {\n headline: string;\n role?: string;\n bio?: string;\n expertise?: string[];\n hourlyRate?: number;\n currency?: string;\n } = { headline: headline.trim() };\n if (role.trim()) input.role = role.trim();\n if (bio.trim()) input.bio = bio.trim();\n const exp = expertise\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n if (exp.length) input.expertise = exp;\n // The form collects a dollars-and-cents rate (e.g. \"50\" or \"49.99\") but\n // TecMentor.hourlyRate is stored in the smallest currency unit (cents)\n // so BOFF-4433's fee math never loses precision to floating point --\n // convert here rather than storing the raw dollar figure as if it were\n // cents (which would under-charge/under-pay by 100x).\n const rateDollars = Number.parseFloat(hourlyRate);\n if (!Number.isNaN(rateDollars) && rateDollars >= 0) {\n input.hourlyRate = Math.round(rateDollars * 100);\n }\n if (currency.trim()) input.currency = currency.trim().toUpperCase();\n\n emit('technospam.mentor.become_mentor_clicked', { workspaceId });\n const res = await becomeMentor({ variables: { input } });\n if (res.data?.tecBecomeMentor) {\n emit('technospam.mentor.became_mentor', {\n workspaceId,\n entityId: res.data.tecBecomeMentor.id,\n entityType: 'TEC_MENTOR',\n });\n notify.success('Mentor profile created', 'Your profile is pending review.');\n onDone();\n }\n };\n\n return (\n <GlassCard className=\"mb-6 p-5\">\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"flex items-center gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-accent-primary to-accent-indigo text-white shadow-sm\">\n <UserPlus size={20} />\n </span>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Become a mentor</h2>\n <p className=\"text-sm text-text-secondary\">\n Share your expertise and start mentoring builders in the community.\n </p>\n </div>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onClose} aria-label=\"Close\">\n <X size={16} />\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Headline <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer · Distributed systems & career growth\"\n value={headline}\n onChange={(e) => setHeadline(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Role & company\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer @ Acme\"\n value={role}\n onChange={(e) => setRole(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Shown as a subtitle under your headline. Optional.\n </p>\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Bio</label>\n <Textarea\n rows={3}\n placeholder=\"Tell mentees about your experience and how you can help.\"\n value={bio}\n onChange={(e) => setBio(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Expertise</label>\n <Input\n placeholder=\"React, System design, Career coaching\"\n value={expertise}\n onChange={(e) => setExpertise(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">Comma-separated topics.</p>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Hourly rate\n </label>\n <Input\n type=\"number\"\n min={0}\n step={0.01}\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Dollars per hour (e.g. 50 or 49.99). Leave 0 for free.\n </p>\n </div>\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Currency</label>\n <Input\n placeholder=\"USD\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button onClick={handleSubmit} disabled={!canSubmit}>\n <UserPlus size={16} /> {loading ? 'Submitting…' : 'Submit profile'}\n </Button>\n <Button variant=\"outline\" onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function MentorshipMentorsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const [search, setSearch] = useState('');\n const [showForm, setShowForm] = useState(false);\n\n const { limit, more } = usePageLimit();\n const { data, loading, error, refetch } = useMentorsQuery({\n status: 'ACTIVE',\n pagination: pageArg(limit),\n });\n\n const mentors = data?.tecListMentors?.items ?? [];\n const hasMore = data?.tecListMentors?.pageInfo?.hasMore ?? false;\n const userId = currentUser?.id;\n const alreadyMentor = Boolean(userId && mentors.some((m) => m.userId === userId));\n\n const filtered = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return mentors;\n return mentors.filter(\n (m) =>\n m.headline.toLowerCase().includes(q) ||\n m.expertise.some((skill) => skill.toLowerCase().includes(q))\n );\n }, [mentors, search]);\n\n const accepting = mentors.filter((m) => m.isAcceptingMentees).length;\n const totalSessions = mentors.reduce((s, m) => s + m.sessionsCount, 0);\n const rated = mentors.filter((m) => m.ratingAvg > 0);\n const avgRating = rated.length\n ? (rated.reduce((s, m) => s + m.ratingAvg, 0) / rated.length).toFixed(1)\n : '—';\n\n return (\n <PageLayout\n hero\n title=\"Find a Mentor\"\n description=\"Connect with experienced builders for 1:1 guidance, code review, and career coaching.\"\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/sessions-page')}>\n <MessageSquare size={16} /> My sessions\n </Button>\n }\n >\n {alreadyMentor ? (\n <GlassCard className=\"mb-6 flex items-center gap-3 p-4\">\n <span className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-status-success-bg-subtle text-status-success-text\">\n <Award size={20} />\n </span>\n <div>\n <div className=\"text-sm font-semibold text-text-primary\">You're a mentor</div>\n <div className=\"text-xs text-text-secondary\">\n Your mentor profile is live. Mentees can request sessions with you.\n </div>\n </div>\n </GlassCard>\n ) : showForm ? (\n <BecomeMentorForm\n onClose={() => setShowForm(false)}\n onDone={() => {\n setShowForm(false);\n void refetch();\n }}\n workspaceId={workspaceId}\n />\n ) : null}\n\n <div className=\"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <StatCard label=\"Mentors\" value={mentors.length} icon={Users} tone=\"blue\" />\n <StatCard label=\"Accepting mentees\" value={accepting} icon={Sparkles} tone=\"green\" />\n <StatCard label=\"Avg rating\" value={avgRating} icon={Star} tone=\"amber\" />\n <StatCard label=\"Total sessions\" value={totalSessions} icon={MessageSquare} tone=\"purple\" />\n </div>\n\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"relative w-full sm:w-80\">\n <Search\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-muted\"\n size={16}\n />\n <Input\n className=\"pl-9\"\n placeholder=\"Search by headline or expertise…\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n {!alreadyMentor && !showForm ? (\n <Button onClick={() => setShowForm(true)}>\n <UserPlus size={16} /> Become a mentor\n </Button>\n ) : null}\n </div>\n\n {loading && !mentors.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView title=\"Couldn't load mentors\" error={error} />\n ) : filtered.length === 0 ? (\n <EmptyView\n icon={<Users size={26} />}\n title={search ? 'No matching mentors' : 'No mentors yet'}\n description={\n search\n ? 'Try a different search term.'\n : 'Active mentors will appear here. TechnoSpam is pre-launch — be one of the first to sign up.'\n }\n action={\n !search && !alreadyMentor ? (\n <Button onClick={() => setShowForm(true)}>Become a mentor</Button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((mentor) => (\n <MentorCard\n key={mentor.id}\n mentor={mentor}\n onOpen={() => {\n emit('technospam.mentor.viewed', {\n workspaceId,\n entityId: mentor.id,\n entityType: 'TEC_MENTOR',\n });\n navigate(`/mentorship/mentor-profile-page?id=${mentor.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,SAAS,EAAgB,EAAE,WAAQ,UAAO,QAAmD;AAE3F,QACE,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AAU;MACV,MAAM;MACN,CAAA,EACF,kBAAC,GAAD;MACE,WAAU;MACV,aAAY;MACZ,OAAO;MACP,WAAW,MAAM,EAAU,EAAE,OAAO,MAAM;MAC1C,CAAA,CACE;QACL,CAAC,KAAiB,CAAC,IAClB,kBAAC,GAAD;KAAQ,eAAe,EAAY,GAAK;eAAxC,CACE,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA,EAAA,mBACf;SACP,KACA;;GAEL,KAAW,CAAC,EAAQ,SACnB,kBAAC,GAAD,EAAe,CAAA,GACb,IACF,kBAAC,GAAD;IAAW,OAAM;IAA+B;IAAS,CAAA,GACvD,EAAS,WAAW,IACtB,kBAAC,GAAD;IACE,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;IACzB,OAAO,IAAS,wBAAwB;IACxC,aACE,IACI,iCACA;IAEN,QACE,CAAC,KAAU,CAAC,IACV,kBAAC,GAAD;KAAQ,eAAe,EAAY,GAAK;eAAE;KAAwB,CAAA,GAChE,KAAA;IAEN,CAAA,GAEF,kBAAC,OAAD;IAAK,WAAU;cACZ,EAAS,KAAK,MACb,kBAAC,GAAD;KAEU;KACR,cAAc;AAMZ,MALA,EAAK,4BAA4B;OAC/B;OACA,UAAU,EAAO;OACjB,YAAY;OACb,CAAC,EACF,EAAS,sCAAsC,EAAO,KAAK;;KAE7D,EAVK,EAAO,GAUZ,CACF;IACE,CAAA;GAER,kBAAC,GAAD;IAAmB;IAAkB;IAAS,SAAS;IAAQ,CAAA;GACpD"}
|
|
1
|
+
{"version":3,"file":"MentorshipMentorsPagePage.js","names":[],"sources":["../../../src/technospam/pages/MentorshipMentorsPagePage.tsx"],"sourcesContent":["import { createElement, useMemo, useState } from 'react';\nimport { Award, MessageSquare, Search, Sparkles, Star, UserPlus, Users, X } from 'lucide-react';\nimport { Badge, Button, GlassCard, Input, Textarea } from '@burdenoff/fe-libs/ui';\nimport {\n EmptyView,\n ErrorView,\n LoadMore,\n LoadingGrid,\n PageLayout,\n StatCard,\n coverGradient,\n topicIcon,\n} from '../components';\nimport { useTechnoSpam, useTechnoSpamNavigate } from '../providers/TechnoSpamProvider';\nimport {\n pageArg,\n useBecomeMentor,\n useMentorsQuery,\n usePageLimit,\n type TecMentor,\n} from '../api/technospamApi';\nimport { formatMoneyFromMinorUnits } from '../utils/format';\nimport { cn } from '../utils/cn';\nimport { notify } from '../lib/toast';\nimport { useTechnoSpamAnalytics } from '../hooks/useTechnoSpamAnalytics';\nimport { useTr } from '../hooks/useTr';\n\n/** Circular gradient medallion standing in for a mentor avatar, with a live\n * \"accepting\" presence dot — mirrors the directory mockup within the dark theme. */\nfunction MentorMedallion({ mentor, size = 'md' }: { mentor: TecMentor; size?: 'md' | 'lg' }) {\n const box = size === 'lg' ? 'h-20 w-20' : 'h-16 w-16';\n return (\n <div className=\"relative shrink-0\">\n <span\n className={cn(\n 'flex items-center justify-center rounded-full bg-gradient-to-br text-white shadow-md ring-1 ring-white/15',\n box,\n coverGradient(mentor.headline)\n )}\n >\n {createElement(topicIcon(mentor.expertise.join(' ') || mentor.headline), {\n size: size === 'lg' ? 32 : 26,\n strokeWidth: 1.7,\n })}\n </span>\n {mentor.isAcceptingMentees ? (\n <span className=\"absolute -bottom-0.5 -right-0.5 h-4 w-4 rounded-full border-2 border-bg-surface bg-status-success-text\" />\n ) : null}\n </div>\n );\n}\n\nfunction MentorCard({ mentor, onOpen }: { mentor: TecMentor; onOpen: () => void }) {\n const tr = useTr();\n return (\n <GlassCard\n className=\"group flex cursor-pointer flex-col gap-4 p-5 transition-all duration-200 hover:-translate-y-1 hover:shadow-lg\"\n onClick={onOpen}\n >\n <div className=\"flex items-start gap-4\">\n <MentorMedallion mentor={mentor} />\n <div className=\"min-w-0 flex-1\">\n <h3 className=\"truncate text-base font-semibold text-text-primary group-hover:text-accent-primary\">\n {mentor.headline}\n </h3>\n {mentor.role ? (\n <p className=\"mt-0.5 truncate text-xs font-medium text-text-secondary\">{mentor.role}</p>\n ) : null}\n {mentor.isAcceptingMentees ? (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 inline-flex items-center gap-1.5 border-status-success-border bg-status-success-bg-subtle text-status-success-text\"\n >\n <span className=\"h-1.5 w-1.5 rounded-full bg-status-success-text\" />{' '}\n {tr('technospam.common.acceptingMentees', 'Accepting mentees')}\n </Badge>\n ) : (\n <Badge\n variant=\"outline\"\n className=\"mt-1.5 border-border-seam bg-bg-sunken text-text-secondary\"\n >\n {tr('technospam.common.notAcceptingMentees', 'Not accepting')}\n </Badge>\n )}\n </div>\n </div>\n\n {mentor.bio ? <p className=\"line-clamp-2 text-sm text-text-secondary\">{mentor.bio}</p> : null}\n\n {mentor.expertise.length ? (\n <div className=\"flex flex-wrap gap-1.5\">\n {mentor.expertise.slice(0, 4).map((skill) => (\n <Badge key={skill} variant=\"secondary\" className=\"text-[11px]\">\n {skill}\n </Badge>\n ))}\n {mentor.expertise.length > 4 ? (\n <span className=\"self-center text-xs text-text-muted\">\n +{mentor.expertise.length - 4}\n </span>\n ) : null}\n </div>\n ) : null}\n\n <div className=\"mt-auto grid grid-cols-3 divide-x divide-border-seam rounded-xl border border-border-seam bg-bg-sunken text-center\">\n <div className=\"px-2 py-2.5\">\n <div className=\"flex items-center justify-center gap-1 text-sm font-semibold text-text-primary\">\n <Star size={13} className=\"text-accent-teal\" />\n {mentor.ratingAvg > 0 ? mentor.ratingAvg.toFixed(1) : 'New'}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.rating', 'rating')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">{mentor.sessionsCount}</div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.sessions', 'sessions')}\n </div>\n </div>\n <div className=\"px-2 py-2.5\">\n <div className=\"text-sm font-semibold text-text-primary\">\n {formatMoneyFromMinorUnits(mentor.hourlyRate, mentor.currency)}\n </div>\n <div className=\"text-[11px] text-text-muted\">\n {tr('technospam.common.perHour', '/ hr')}\n </div>\n </div>\n </div>\n\n <Button\n className=\"w-full\"\n onClick={(e) => {\n e.stopPropagation();\n onOpen();\n }}\n >\n {tr('technospam.common.viewProfile', 'View profile')}\n </Button>\n </GlassCard>\n );\n}\n\nfunction BecomeMentorForm({\n onClose,\n onDone,\n workspaceId,\n}: {\n onClose: () => void;\n onDone: () => void;\n workspaceId?: string;\n}) {\n const [headline, setHeadline] = useState('');\n const [role, setRole] = useState('');\n const [bio, setBio] = useState('');\n const [expertise, setExpertise] = useState('');\n const [hourlyRate, setHourlyRate] = useState('');\n const [currency, setCurrency] = useState('USD');\n const [becomeMentor, { loading }] = useBecomeMentor();\n const { emit } = useTechnoSpamAnalytics();\n\n const canSubmit = headline.trim().length > 0 && !loading;\n\n const handleSubmit = async () => {\n if (!canSubmit) return;\n const input: {\n headline: string;\n role?: string;\n bio?: string;\n expertise?: string[];\n hourlyRate?: number;\n currency?: string;\n } = { headline: headline.trim() };\n if (role.trim()) input.role = role.trim();\n if (bio.trim()) input.bio = bio.trim();\n const exp = expertise\n .split(',')\n .map((s) => s.trim())\n .filter(Boolean);\n if (exp.length) input.expertise = exp;\n // The form collects a dollars-and-cents rate (e.g. \"50\" or \"49.99\") but\n // TecMentor.hourlyRate is stored in the smallest currency unit (cents)\n // so BOFF-4433's fee math never loses precision to floating point --\n // convert here rather than storing the raw dollar figure as if it were\n // cents (which would under-charge/under-pay by 100x).\n const rateDollars = Number.parseFloat(hourlyRate);\n if (!Number.isNaN(rateDollars) && rateDollars >= 0) {\n input.hourlyRate = Math.round(rateDollars * 100);\n }\n if (currency.trim()) input.currency = currency.trim().toUpperCase();\n\n emit('technospam.mentor.become_mentor_clicked', { workspaceId });\n const res = await becomeMentor({ variables: { input } });\n if (res.data?.tecBecomeMentor) {\n emit('technospam.mentor.became_mentor', {\n workspaceId,\n entityId: res.data.tecBecomeMentor.id,\n entityType: 'TEC_MENTOR',\n });\n notify.success('Mentor profile created', 'Your profile is pending review.');\n onDone();\n }\n };\n\n return (\n <GlassCard className=\"mb-6 p-5\">\n <div className=\"mb-4 flex items-start justify-between gap-3\">\n <div className=\"flex items-center gap-3\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br from-accent-primary to-accent-indigo text-white shadow-sm\">\n <UserPlus size={20} />\n </span>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Become a mentor</h2>\n <p className=\"text-sm text-text-secondary\">\n Share your expertise and start mentoring builders in the community.\n </p>\n </div>\n </div>\n <Button variant=\"ghost\" size=\"sm\" onClick={onClose} aria-label=\"Close\">\n <X size={16} />\n </Button>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Headline <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer · Distributed systems & career growth\"\n value={headline}\n onChange={(e) => setHeadline(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Role & company\n </label>\n <Input\n placeholder=\"e.g. Staff Engineer @ Acme\"\n value={role}\n onChange={(e) => setRole(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Shown as a subtitle under your headline. Optional.\n </p>\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Bio</label>\n <Textarea\n rows={3}\n placeholder=\"Tell mentees about your experience and how you can help.\"\n value={bio}\n onChange={(e) => setBio(e.target.value)}\n />\n </div>\n\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Expertise</label>\n <Input\n placeholder=\"React, System design, Career coaching\"\n value={expertise}\n onChange={(e) => setExpertise(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">Comma-separated topics.</p>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">\n Hourly rate\n </label>\n <Input\n type=\"number\"\n min={0}\n step={0.01}\n placeholder=\"0.00\"\n value={hourlyRate}\n onChange={(e) => setHourlyRate(e.target.value)}\n />\n <p className=\"mt-1 text-xs text-text-muted\">\n Dollars per hour (e.g. 50 or 49.99). Leave 0 for free.\n </p>\n </div>\n <div>\n <label className=\"mb-1.5 block text-sm font-medium text-text-primary\">Currency</label>\n <Input\n placeholder=\"USD\"\n value={currency}\n onChange={(e) => setCurrency(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button onClick={handleSubmit} disabled={!canSubmit}>\n <UserPlus size={16} /> {loading ? 'Submitting…' : 'Submit profile'}\n </Button>\n <Button variant=\"outline\" onClick={onClose} disabled={loading}>\n Cancel\n </Button>\n </div>\n </div>\n </GlassCard>\n );\n}\n\nexport function MentorshipMentorsPagePage() {\n const navigate = useTechnoSpamNavigate();\n const { currentUser, workspaceId } = useTechnoSpam();\n const { emit } = useTechnoSpamAnalytics();\n const tr = useTr();\n const [search, setSearch] = useState('');\n const [showForm, setShowForm] = useState(false);\n\n const { limit, more } = usePageLimit();\n const { data, loading, error, refetch } = useMentorsQuery({\n status: 'ACTIVE',\n pagination: pageArg(limit),\n });\n\n const mentors = data?.tecListMentors?.items ?? [];\n const hasMore = data?.tecListMentors?.pageInfo?.hasMore ?? false;\n const userId = currentUser?.id;\n const alreadyMentor = Boolean(userId && mentors.some((m) => m.userId === userId));\n\n const filtered = useMemo(() => {\n const q = search.trim().toLowerCase();\n if (!q) return mentors;\n return mentors.filter(\n (m) =>\n m.headline.toLowerCase().includes(q) ||\n m.expertise.some((skill) => skill.toLowerCase().includes(q))\n );\n }, [mentors, search]);\n\n const accepting = mentors.filter((m) => m.isAcceptingMentees).length;\n const totalSessions = mentors.reduce((s, m) => s + m.sessionsCount, 0);\n const rated = mentors.filter((m) => m.ratingAvg > 0);\n const avgRating = rated.length\n ? (rated.reduce((s, m) => s + m.ratingAvg, 0) / rated.length).toFixed(1)\n : '—';\n\n return (\n <PageLayout\n hero\n title={tr('technospam.mentorship.findAMentorTitle', 'Find a Mentor')}\n description={tr(\n 'technospam.mentorship.description',\n 'Connect with experienced builders for 1:1 guidance, code review, and career coaching.'\n )}\n actions={\n <Button variant=\"outline\" onClick={() => navigate('/mentorship/sessions-page')}>\n <MessageSquare size={16} /> {tr('technospam.common.mySessions', 'My sessions')}\n </Button>\n }\n >\n {alreadyMentor ? (\n <GlassCard className=\"mb-6 flex items-center gap-3 p-4\">\n <span className=\"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-status-success-bg-subtle text-status-success-text\">\n <Award size={20} />\n </span>\n <div>\n <div className=\"text-sm font-semibold text-text-primary\">You're a mentor</div>\n <div className=\"text-xs text-text-secondary\">\n Your mentor profile is live. Mentees can request sessions with you.\n </div>\n </div>\n </GlassCard>\n ) : showForm ? (\n <BecomeMentorForm\n onClose={() => setShowForm(false)}\n onDone={() => {\n setShowForm(false);\n void refetch();\n }}\n workspaceId={workspaceId}\n />\n ) : null}\n\n <div className=\"mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <StatCard\n label={tr('technospam.mentorship.statMentors', 'Mentors')}\n value={mentors.length}\n icon={Users}\n tone=\"blue\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAcceptingMentees', 'Accepting mentees')}\n value={accepting}\n icon={Sparkles}\n tone=\"green\"\n />\n <StatCard\n label={tr('technospam.mentorship.statAvgRating', 'Avg rating')}\n value={avgRating}\n icon={Star}\n tone=\"amber\"\n />\n <StatCard\n label={tr('technospam.mentorship.statTotalSessions', 'Total sessions')}\n value={totalSessions}\n icon={MessageSquare}\n tone=\"purple\"\n />\n </div>\n\n <div className=\"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"relative w-full sm:w-80\">\n <Search\n className=\"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-muted\"\n size={16}\n />\n <Input\n className=\"pl-9\"\n placeholder={tr(\n 'technospam.mentorship.searchPlaceholder',\n 'Search by headline or expertise…'\n )}\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n />\n </div>\n {!alreadyMentor && !showForm ? (\n <Button onClick={() => setShowForm(true)}>\n <UserPlus size={16} /> {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : null}\n </div>\n\n {loading && !mentors.length ? (\n <LoadingGrid />\n ) : error ? (\n <ErrorView\n title={tr('technospam.common.errorLoadMentors', \"Couldn't load mentors\")}\n error={error}\n />\n ) : filtered.length === 0 ? (\n <EmptyView\n icon={<Users size={26} />}\n title={\n search\n ? tr('technospam.mentorship.emptySearchTitle', 'No matching mentors')\n : tr('technospam.mentorship.emptyDefaultTitle', 'No mentors yet')\n }\n description={\n search\n ? tr('technospam.mentorship.emptySearchDesc', 'Try a different search term.')\n : tr(\n 'technospam.mentorship.emptyDefaultDesc',\n 'Active mentors will appear here. TechnoSpam is pre-launch — be one of the first to sign up.'\n )\n }\n action={\n !search && !alreadyMentor ? (\n <Button onClick={() => setShowForm(true)}>\n {tr('technospam.common.becomeAMentor', 'Become a mentor')}\n </Button>\n ) : undefined\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {filtered.map((mentor) => (\n <MentorCard\n key={mentor.id}\n mentor={mentor}\n onOpen={() => {\n emit('technospam.mentor.viewed', {\n workspaceId,\n entityId: mentor.id,\n entityType: 'TEC_MENTOR',\n });\n navigate(`/mentorship/mentor-profile-page?id=${mentor.id}`);\n }}\n />\n ))}\n </div>\n )}\n <LoadMore hasMore={hasMore} loading={loading} onClick={more} />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6BA,SAAS,EAAgB,EAAE,WAAQ,UAAO,QAAmD;AAE3F,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,QAAD;GACE,WAAW,EACT,6GALI,MAAS,OAAO,cAAc,aAOlC,EAAc,EAAO,SAAS,CAC/B;aAEA,EAAc,EAAU,EAA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ACpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorshipSessionsPagePage.d.ts","sourceRoot":"","sources":["../../../src/technospam/pages/MentorshipSessionsPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MentorshipSessionsPagePage.d.ts","sourceRoot":"","sources":["../../../src/technospam/pages/MentorshipSessionsPagePage.tsx"],"names":[],"mappings":"AAmPA,wBAAgB,0BAA0B,gCAiOzC"}
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import { useTechnoSpam as e, useTechnoSpamNavigate as t } from "../providers/TechnoSpamProvider.js";
|
|
2
2
|
import { useTechnoSpamAnalytics as n } from "../hooks/useTechnoSpamAnalytics.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useTr as r } from "../hooks/useTr.js";
|
|
4
|
+
import { PageLayout as i } from "../components/PageLayout.js";
|
|
5
|
+
import { StatCard as a } from "../components/StatCard.js";
|
|
6
|
+
import { formatDateTime as o, formatDuration as s } from "../utils/format.js";
|
|
7
|
+
import { StatusBadge as c } from "../components/StatusBadge.js";
|
|
8
|
+
import { EmptyView as l, ErrorView as u, LoadingRows as d } from "../components/StateViews.js";
|
|
8
9
|
import "../components/index.js";
|
|
9
|
-
import { notify as
|
|
10
|
-
import { useCancelSession as
|
|
11
|
-
import { useState as
|
|
12
|
-
import { CalendarClock as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { Button as
|
|
10
|
+
import { notify as f } from "../lib/toast.js";
|
|
11
|
+
import { useCancelSession as p, useCompleteSession as m, useConfirmSession as h, useMentorsQuery as g, useSessionsQuery as _ } from "../api/technospamApi.js";
|
|
12
|
+
import { useState as v } from "react";
|
|
13
|
+
import { CalendarClock as y, Check as b, CheckCircle2 as x, Clock as S, MessageSquare as C, Users as w, Video as T, X as E } from "lucide-react";
|
|
14
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
15
|
+
import { Button as k, GlassCard as A, Input as j, Tabs as M, TabsList as N, TabsTrigger as P } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
//#region src/technospam/pages/MentorshipSessionsPagePage.tsx
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
let u =
|
|
19
|
-
return /* @__PURE__ */
|
|
17
|
+
var F = new Set(["REQUESTED", "CONFIRMED"]);
|
|
18
|
+
function I({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: i, onComplete: a, busy: l }) {
|
|
19
|
+
let u = F.has(e.status), [d, f] = v("none"), [p, m] = v(""), [h, g] = v("5"), [_, C] = v("");
|
|
20
|
+
return /* @__PURE__ */ O(A, {
|
|
20
21
|
className: "flex flex-col gap-3 p-4 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-md",
|
|
21
22
|
children: [
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ O("div", {
|
|
23
24
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
24
|
-
children: [/* @__PURE__ */
|
|
25
|
+
children: [/* @__PURE__ */ O("div", {
|
|
25
26
|
className: "flex items-start gap-3",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ D("span", {
|
|
27
28
|
className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-accent-primary to-accent-purple text-white shadow-sm",
|
|
28
|
-
children: /* @__PURE__ */
|
|
29
|
-
}), /* @__PURE__ */
|
|
29
|
+
children: /* @__PURE__ */ D(T, { size: 18 })
|
|
30
|
+
}), /* @__PURE__ */ O("div", {
|
|
30
31
|
className: "min-w-0",
|
|
31
32
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ O("div", {
|
|
33
34
|
className: "flex flex-wrap items-center gap-2",
|
|
34
35
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ D("span", {
|
|
36
37
|
className: "truncate text-sm font-semibold text-text-primary",
|
|
37
38
|
children: e.topic
|
|
38
39
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
e.rating ? /* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ D(c, { status: e.status }),
|
|
41
|
+
e.rating ? /* @__PURE__ */ O("span", {
|
|
41
42
|
className: "text-xs text-text-muted",
|
|
42
43
|
children: [
|
|
43
44
|
"★ ",
|
|
@@ -47,72 +48,72 @@ function F({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: i,
|
|
|
47
48
|
}) : null
|
|
48
49
|
]
|
|
49
50
|
}),
|
|
50
|
-
t && e.mentor?.headline ? /* @__PURE__ */
|
|
51
|
+
t && e.mentor?.headline ? /* @__PURE__ */ O("div", {
|
|
51
52
|
className: "mt-0.5 truncate text-xs text-text-secondary",
|
|
52
53
|
children: ["with ", e.mentor.headline]
|
|
53
54
|
}) : null,
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ O("div", {
|
|
55
56
|
className: "mt-1 flex flex-wrap items-center gap-3 text-xs text-text-muted",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ O("span", {
|
|
57
58
|
className: "inline-flex items-center gap-1",
|
|
58
59
|
children: [
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ D(y, { size: 13 }),
|
|
60
61
|
" ",
|
|
61
|
-
|
|
62
|
+
o(e.scheduledAt)
|
|
62
63
|
]
|
|
63
|
-
}), /* @__PURE__ */
|
|
64
|
+
}), /* @__PURE__ */ O("span", {
|
|
64
65
|
className: "inline-flex items-center gap-1",
|
|
65
66
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ D(S, { size: 13 }),
|
|
67
68
|
" ",
|
|
68
|
-
|
|
69
|
+
s(e.durationMinutes)
|
|
69
70
|
]
|
|
70
71
|
})]
|
|
71
72
|
}),
|
|
72
|
-
e.agenda ? /* @__PURE__ */
|
|
73
|
+
e.agenda ? /* @__PURE__ */ D("p", {
|
|
73
74
|
className: "mt-1 line-clamp-2 text-xs text-text-secondary",
|
|
74
75
|
children: e.agenda
|
|
75
76
|
}) : null
|
|
76
77
|
]
|
|
77
78
|
})]
|
|
78
|
-
}), /* @__PURE__ */
|
|
79
|
+
}), /* @__PURE__ */ O("div", {
|
|
79
80
|
className: "flex shrink-0 flex-wrap items-center gap-2",
|
|
80
81
|
children: [
|
|
81
|
-
e.meetingUrl ? /* @__PURE__ */
|
|
82
|
+
e.meetingUrl ? /* @__PURE__ */ O(k, {
|
|
82
83
|
size: "sm",
|
|
83
84
|
onClick: () => window.open(e.meetingUrl ?? "", "_blank", "noopener,noreferrer"),
|
|
84
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ D(T, { size: 15 }), " Join"]
|
|
85
86
|
}) : null,
|
|
86
|
-
n && e.status === "REQUESTED" ? /* @__PURE__ */
|
|
87
|
+
n && e.status === "REQUESTED" ? /* @__PURE__ */ O(k, {
|
|
87
88
|
variant: "outline",
|
|
88
89
|
size: "sm",
|
|
89
90
|
onClick: () => f(d === "confirm" ? "none" : "confirm"),
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ D(b, { size: 15 }), " Confirm"]
|
|
91
92
|
}) : null,
|
|
92
|
-
n && e.status === "CONFIRMED" ? /* @__PURE__ */
|
|
93
|
+
n && e.status === "CONFIRMED" ? /* @__PURE__ */ O(k, {
|
|
93
94
|
variant: "outline",
|
|
94
95
|
size: "sm",
|
|
95
96
|
onClick: () => f(d === "complete" ? "none" : "complete"),
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ D(x, { size: 15 }), " Mark complete"]
|
|
97
98
|
}) : null,
|
|
98
|
-
u ? /* @__PURE__ */
|
|
99
|
+
u ? /* @__PURE__ */ O(k, {
|
|
99
100
|
variant: "ghost",
|
|
100
101
|
size: "sm",
|
|
101
102
|
onClick: () => r(e.id),
|
|
102
103
|
disabled: l,
|
|
103
|
-
children: [/* @__PURE__ */ E
|
|
104
|
+
children: [/* @__PURE__ */ D(E, { size: 15 }), " Cancel"]
|
|
104
105
|
}) : null
|
|
105
106
|
]
|
|
106
107
|
})]
|
|
107
108
|
}),
|
|
108
|
-
d === "confirm" ? /* @__PURE__ */
|
|
109
|
+
d === "confirm" ? /* @__PURE__ */ O("div", {
|
|
109
110
|
className: "flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3 sm:flex-row sm:items-center",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ D(j, {
|
|
111
112
|
className: "flex-1",
|
|
112
113
|
placeholder: "Meeting link (e.g. https://meet.…)",
|
|
113
114
|
value: p,
|
|
114
115
|
onChange: (e) => m(e.target.value)
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ D(k, {
|
|
116
117
|
size: "sm",
|
|
117
118
|
onClick: async () => {
|
|
118
119
|
await i(e.id, p.trim()), f("none"), m("");
|
|
@@ -121,15 +122,15 @@ function F({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: i,
|
|
|
121
122
|
children: "Confirm session"
|
|
122
123
|
})]
|
|
123
124
|
}) : null,
|
|
124
|
-
d === "complete" ? /* @__PURE__ */
|
|
125
|
+
d === "complete" ? /* @__PURE__ */ O("div", {
|
|
125
126
|
className: "flex flex-col gap-2 rounded-lg border border-border-seam bg-bg-sunken p-3",
|
|
126
127
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ O("div", {
|
|
128
129
|
className: "flex items-center gap-2",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ D("label", {
|
|
130
131
|
className: "text-xs text-text-secondary",
|
|
131
132
|
children: "Rating (1–5)"
|
|
132
|
-
}), /* @__PURE__ */
|
|
133
|
+
}), /* @__PURE__ */ D(j, {
|
|
133
134
|
type: "number",
|
|
134
135
|
min: 1,
|
|
135
136
|
max: 5,
|
|
@@ -138,15 +139,15 @@ function F({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: i,
|
|
|
138
139
|
onChange: (e) => g(e.target.value)
|
|
139
140
|
})]
|
|
140
141
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ D(j, {
|
|
142
143
|
placeholder: "Feedback for the mentee (optional)",
|
|
143
|
-
value:
|
|
144
|
+
value: _,
|
|
144
145
|
onChange: (e) => C(e.target.value)
|
|
145
146
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ D("div", { children: /* @__PURE__ */ D(k, {
|
|
147
148
|
size: "sm",
|
|
148
149
|
onClick: async () => {
|
|
149
|
-
await
|
|
150
|
+
await a(e.id, Math.min(5, Math.max(1, Number(h) || 5)), _.trim()), f("none");
|
|
150
151
|
},
|
|
151
152
|
disabled: l,
|
|
152
153
|
children: "Complete session"
|
|
@@ -156,181 +157,185 @@ function F({ session: e, showMentor: t, isMentor: n, onCancel: r, onConfirm: i,
|
|
|
156
157
|
]
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
-
return e && n.length === 0 ? /* @__PURE__ */
|
|
160
|
+
function L({ loading: e, error: t, sessions: n, showMentor: r, emptyTitle: i, emptyDescription: a, emptyAction: o, isMentor: s, onCancel: c, onConfirm: f, onComplete: p, busyId: m }) {
|
|
161
|
+
return e && n.length === 0 ? /* @__PURE__ */ D(d, {
|
|
161
162
|
count: 3,
|
|
162
163
|
height: "h-24"
|
|
163
|
-
}) : t ? /* @__PURE__ */
|
|
164
|
+
}) : t ? /* @__PURE__ */ D(u, {
|
|
164
165
|
title: "Couldn't load sessions",
|
|
165
166
|
error: t
|
|
166
|
-
}) : n.length === 0 ? /* @__PURE__ */
|
|
167
|
-
icon: /* @__PURE__ */
|
|
167
|
+
}) : n.length === 0 ? /* @__PURE__ */ D(l, {
|
|
168
|
+
icon: /* @__PURE__ */ D(C, { size: 26 }),
|
|
168
169
|
title: i,
|
|
169
170
|
description: a,
|
|
170
171
|
action: o
|
|
171
|
-
}) : /* @__PURE__ */
|
|
172
|
+
}) : /* @__PURE__ */ D("div", {
|
|
172
173
|
className: "space-y-3",
|
|
173
|
-
children: [...n].sort((e, t) => new Date(t.scheduledAt).getTime() - new Date(e.scheduledAt).getTime()).map((e) => /* @__PURE__ */
|
|
174
|
+
children: [...n].sort((e, t) => new Date(t.scheduledAt).getTime() - new Date(e.scheduledAt).getTime()).map((e) => /* @__PURE__ */ D(I, {
|
|
174
175
|
session: e,
|
|
175
176
|
showMentor: r,
|
|
176
177
|
isMentor: s,
|
|
177
|
-
onCancel:
|
|
178
|
+
onCancel: c,
|
|
178
179
|
onConfirm: f,
|
|
179
180
|
onComplete: p,
|
|
180
181
|
busy: m === e.id
|
|
181
182
|
}, e.id))
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
|
-
function
|
|
185
|
-
let
|
|
186
|
-
|
|
187
|
-
workspaceId:
|
|
185
|
+
function R() {
|
|
186
|
+
let o = t(), { currentUser: s, workspaceId: c } = e(), { emit: u } = n(), b = r(), [S, T] = v("mentee"), [E, A] = v(null), j = s?.id, F = _(j ? { menteeId: j } : {}), I = g({}), R = I.data?.tecListMentors?.items.find((e) => e.userId === s?.id), z = R?.id, B = _(z ? { mentorId: z } : {}), [V] = p(), [H] = h(), [U] = m(), W = j ? F.data?.tecListSessions?.items ?? [] : [], G = z ? B.data?.tecListSessions?.items ?? [] : [], K = [...W, ...G], q = K.filter((e) => e.status === "REQUESTED" || e.status === "CONFIRMED").length, J = K.filter((e) => e.status === "COMPLETED").length, Y = async (e) => {
|
|
187
|
+
A(e), u("technospam.session.cancel_clicked", {
|
|
188
|
+
workspaceId: c,
|
|
188
189
|
entityId: e,
|
|
189
190
|
entityType: "TEC_MENTOR_SESSION"
|
|
190
191
|
});
|
|
191
192
|
try {
|
|
192
|
-
(await
|
|
193
|
-
workspaceId:
|
|
193
|
+
(await V({ variables: { id: e } })).data?.tecCancelSession && (u("technospam.session.cancelled", {
|
|
194
|
+
workspaceId: c,
|
|
194
195
|
entityId: e,
|
|
195
196
|
entityType: "TEC_MENTOR_SESSION"
|
|
196
|
-
}),
|
|
197
|
+
}), f.success("Session cancelled", "The session has been cancelled."));
|
|
197
198
|
} finally {
|
|
198
|
-
|
|
199
|
+
A(null);
|
|
199
200
|
}
|
|
200
|
-
},
|
|
201
|
-
|
|
201
|
+
}, X = async (e, t) => {
|
|
202
|
+
A(e);
|
|
202
203
|
try {
|
|
203
|
-
(await
|
|
204
|
+
(await H({ variables: {
|
|
204
205
|
id: e,
|
|
205
206
|
meetingUrl: t || void 0
|
|
206
|
-
} })).data?.tecConfirmSession && (
|
|
207
|
+
} })).data?.tecConfirmSession && (f.success("Session confirmed", "The mentee has been notified."), await B.refetch());
|
|
207
208
|
} finally {
|
|
208
|
-
|
|
209
|
+
A(null);
|
|
209
210
|
}
|
|
210
|
-
},
|
|
211
|
-
|
|
212
|
-
workspaceId:
|
|
211
|
+
}, Z = async (e, t, n) => {
|
|
212
|
+
A(e), u("technospam.session.complete_clicked", {
|
|
213
|
+
workspaceId: c,
|
|
213
214
|
entityId: e,
|
|
214
215
|
entityType: "TEC_MENTOR_SESSION"
|
|
215
216
|
});
|
|
216
217
|
try {
|
|
217
|
-
(await
|
|
218
|
+
(await U({ variables: {
|
|
218
219
|
id: e,
|
|
219
220
|
rating: t,
|
|
220
221
|
feedback: n || void 0
|
|
221
|
-
} })).data?.tecCompleteSession && (
|
|
222
|
-
workspaceId:
|
|
222
|
+
} })).data?.tecCompleteSession && (u("technospam.session.completed", {
|
|
223
|
+
workspaceId: c,
|
|
223
224
|
entityId: e,
|
|
224
225
|
entityType: "TEC_MENTOR_SESSION"
|
|
225
|
-
}),
|
|
226
|
+
}), f.success("Session completed", "Nice work — the session is wrapped up."), await B.refetch());
|
|
226
227
|
} finally {
|
|
227
|
-
|
|
228
|
+
A(null);
|
|
228
229
|
}
|
|
229
230
|
};
|
|
230
|
-
return
|
|
231
|
+
return s?.id ? /* @__PURE__ */ O(i, {
|
|
231
232
|
hero: !0,
|
|
232
|
-
title: "My Sessions",
|
|
233
|
-
description: "Manage the mentorship sessions you've booked and the ones you host.",
|
|
234
|
-
actions: /* @__PURE__ */
|
|
233
|
+
title: b("technospam.mentorship.sessionsTitle", "My Sessions"),
|
|
234
|
+
description: b("technospam.mentorship.sessionsDescription", "Manage the mentorship sessions you've booked and the ones you host."),
|
|
235
|
+
actions: /* @__PURE__ */ O(k, {
|
|
235
236
|
variant: "outline",
|
|
236
|
-
onClick: () =>
|
|
237
|
-
children: [
|
|
237
|
+
onClick: () => o("/mentorship/mentors-page"),
|
|
238
|
+
children: [
|
|
239
|
+
/* @__PURE__ */ D(w, { size: 16 }),
|
|
240
|
+
" ",
|
|
241
|
+
b("technospam.common.findMentor", "Find a mentor")
|
|
242
|
+
]
|
|
238
243
|
}),
|
|
239
244
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ O("div", {
|
|
241
246
|
className: "mb-5 grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
242
247
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
label: "As mentee",
|
|
245
|
-
value:
|
|
246
|
-
icon:
|
|
248
|
+
/* @__PURE__ */ D(a, {
|
|
249
|
+
label: b("technospam.mentorship.statAsMentee", "As mentee"),
|
|
250
|
+
value: W.length,
|
|
251
|
+
icon: C,
|
|
247
252
|
tone: "blue"
|
|
248
253
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
label: "As mentor",
|
|
251
|
-
value:
|
|
252
|
-
icon:
|
|
254
|
+
/* @__PURE__ */ D(a, {
|
|
255
|
+
label: b("technospam.mentorship.statAsMentor", "As mentor"),
|
|
256
|
+
value: z ? G.length : 0,
|
|
257
|
+
icon: w,
|
|
253
258
|
tone: "purple"
|
|
254
259
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
256
|
-
label: "Upcoming",
|
|
257
|
-
value:
|
|
258
|
-
icon:
|
|
260
|
+
/* @__PURE__ */ D(a, {
|
|
261
|
+
label: b("technospam.mentorship.statUpcoming", "Upcoming"),
|
|
262
|
+
value: q,
|
|
263
|
+
icon: y,
|
|
259
264
|
tone: "teal"
|
|
260
265
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
label: "Completed",
|
|
263
|
-
value:
|
|
264
|
-
icon:
|
|
266
|
+
/* @__PURE__ */ D(a, {
|
|
267
|
+
label: b("technospam.mentorship.statCompleted", "Completed"),
|
|
268
|
+
value: J,
|
|
269
|
+
icon: x,
|
|
265
270
|
tone: "green"
|
|
266
271
|
})
|
|
267
272
|
]
|
|
268
273
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
value:
|
|
271
|
-
onValueChange: (e) =>
|
|
274
|
+
/* @__PURE__ */ D(M, {
|
|
275
|
+
value: S,
|
|
276
|
+
onValueChange: (e) => T(e),
|
|
272
277
|
className: "mb-4",
|
|
273
|
-
children: /* @__PURE__ */
|
|
278
|
+
children: /* @__PURE__ */ O(N, { children: [/* @__PURE__ */ D(P, {
|
|
274
279
|
value: "mentee",
|
|
275
|
-
children: "As mentee"
|
|
276
|
-
}), /* @__PURE__ */
|
|
280
|
+
children: b("technospam.mentorship.tabAsMentee", "As mentee")
|
|
281
|
+
}), /* @__PURE__ */ D(P, {
|
|
277
282
|
value: "mentor",
|
|
278
|
-
children: "As mentor"
|
|
283
|
+
children: b("technospam.mentorship.tabAsMentor", "As mentor")
|
|
279
284
|
})] })
|
|
280
285
|
}),
|
|
281
|
-
|
|
282
|
-
loading:
|
|
283
|
-
error:
|
|
284
|
-
sessions:
|
|
286
|
+
S === "mentee" ? /* @__PURE__ */ D(L, {
|
|
287
|
+
loading: F.loading,
|
|
288
|
+
error: F.error,
|
|
289
|
+
sessions: W,
|
|
285
290
|
showMentor: !0,
|
|
286
|
-
emptyTitle: "No sessions booked yet",
|
|
287
|
-
emptyDescription: "Find a mentor and request a session to get personalized guidance.",
|
|
288
|
-
emptyAction: /* @__PURE__ */
|
|
289
|
-
onClick: () =>
|
|
290
|
-
children: "Find a mentor"
|
|
291
|
+
emptyTitle: b("technospam.mentorship.noSessionsBookedTitle", "No sessions booked yet"),
|
|
292
|
+
emptyDescription: b("technospam.mentorship.noSessionsBookedDesc", "Find a mentor and request a session to get personalized guidance."),
|
|
293
|
+
emptyAction: /* @__PURE__ */ D(k, {
|
|
294
|
+
onClick: () => o("/mentorship/mentors-page"),
|
|
295
|
+
children: b("technospam.common.findMentor", "Find a mentor")
|
|
291
296
|
}),
|
|
292
297
|
isMentor: !1,
|
|
293
|
-
onCancel:
|
|
294
|
-
onConfirm:
|
|
295
|
-
onComplete:
|
|
296
|
-
busyId:
|
|
297
|
-
}) :
|
|
298
|
+
onCancel: Y,
|
|
299
|
+
onConfirm: X,
|
|
300
|
+
onComplete: Z,
|
|
301
|
+
busyId: E
|
|
302
|
+
}) : I.loading && !R ? /* @__PURE__ */ D(d, {
|
|
298
303
|
count: 3,
|
|
299
304
|
height: "h-24"
|
|
300
|
-
}) :
|
|
301
|
-
loading:
|
|
302
|
-
error:
|
|
303
|
-
sessions:
|
|
305
|
+
}) : z ? /* @__PURE__ */ D(L, {
|
|
306
|
+
loading: B.loading,
|
|
307
|
+
error: B.error,
|
|
308
|
+
sessions: G,
|
|
304
309
|
showMentor: !1,
|
|
305
|
-
emptyTitle: "No sessions to host yet",
|
|
306
|
-
emptyDescription: "When mentees request time with you, their sessions will show up here.",
|
|
310
|
+
emptyTitle: b("technospam.mentorship.noSessionsToHostTitle", "No sessions to host yet"),
|
|
311
|
+
emptyDescription: b("technospam.mentorship.noSessionsToHostDesc", "When mentees request time with you, their sessions will show up here."),
|
|
307
312
|
isMentor: !0,
|
|
308
|
-
onCancel:
|
|
309
|
-
onConfirm:
|
|
310
|
-
onComplete:
|
|
311
|
-
busyId:
|
|
312
|
-
}) : /* @__PURE__ */
|
|
313
|
-
icon: /* @__PURE__ */
|
|
314
|
-
title: "You're not a mentor yet",
|
|
315
|
-
description: "Create a mentor profile to start hosting sessions and helping others build.",
|
|
316
|
-
action: /* @__PURE__ */
|
|
317
|
-
onClick: () =>
|
|
318
|
-
children: "Become a mentor"
|
|
313
|
+
onCancel: Y,
|
|
314
|
+
onConfirm: X,
|
|
315
|
+
onComplete: Z,
|
|
316
|
+
busyId: E
|
|
317
|
+
}) : /* @__PURE__ */ D(l, {
|
|
318
|
+
icon: /* @__PURE__ */ D(w, { size: 26 }),
|
|
319
|
+
title: b("technospam.mentorship.notAMentorTitle", "You're not a mentor yet"),
|
|
320
|
+
description: b("technospam.mentorship.notAMentorDesc", "Create a mentor profile to start hosting sessions and helping others build."),
|
|
321
|
+
action: /* @__PURE__ */ D(k, {
|
|
322
|
+
onClick: () => o("/mentorship/mentors-page"),
|
|
323
|
+
children: b("technospam.common.becomeAMentor", "Become a mentor")
|
|
319
324
|
})
|
|
320
325
|
})
|
|
321
326
|
]
|
|
322
|
-
}) : /* @__PURE__ */
|
|
327
|
+
}) : /* @__PURE__ */ D(i, {
|
|
323
328
|
hero: !0,
|
|
324
|
-
title: "My Sessions",
|
|
325
|
-
description: "Track your mentorship sessions.",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
icon: /* @__PURE__ */
|
|
328
|
-
title: "Sign in to view your sessions",
|
|
329
|
-
description: "Your booked and hosted mentorship sessions will appear here once you're signed in."
|
|
329
|
+
title: b("technospam.mentorship.sessionsTitle", "My Sessions"),
|
|
330
|
+
description: b("technospam.mentorship.sessionsDescription", "Track your mentorship sessions."),
|
|
331
|
+
children: /* @__PURE__ */ D(l, {
|
|
332
|
+
icon: /* @__PURE__ */ D(C, { size: 26 }),
|
|
333
|
+
title: b("technospam.mentorship.signInTitle", "Sign in to view your sessions"),
|
|
334
|
+
description: b("technospam.mentorship.signInDesc", "Your booked and hosted mentorship sessions will appear here once you're signed in.")
|
|
330
335
|
})
|
|
331
336
|
});
|
|
332
337
|
}
|
|
333
338
|
//#endregion
|
|
334
|
-
export {
|
|
339
|
+
export { R as MentorshipSessionsPagePage };
|
|
335
340
|
|
|
336
341
|
//# sourceMappingURL=MentorshipSessionsPagePage.js.map
|