2026-03-12 11:42:39 -04:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import * as React from "react";
|
|
|
|
|
import { toast } from "sonner";
|
|
|
|
|
import {
|
|
|
|
|
Save,
|
|
|
|
|
UserCircle,
|
|
|
|
|
Camera,
|
|
|
|
|
X,
|
|
|
|
|
Mail,
|
|
|
|
|
Briefcase,
|
|
|
|
|
Building2,
|
|
|
|
|
Shield,
|
|
|
|
|
Loader2,
|
|
|
|
|
} from "lucide-react";
|
|
|
|
|
|
|
|
|
|
import { Header } from "@/components/layout/header";
|
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
import {
|
|
|
|
|
Card,
|
|
|
|
|
CardContent,
|
|
|
|
|
CardHeader,
|
|
|
|
|
CardTitle,
|
|
|
|
|
CardDescription,
|
|
|
|
|
} from "@/components/ui/card";
|
|
|
|
|
import { Input } from "@/components/ui/input";
|
|
|
|
|
import { Label } from "@/components/ui/label";
|
|
|
|
|
import { Textarea } from "@/components/ui/textarea";
|
|
|
|
|
import { Badge } from "@/components/ui/badge";
|
|
|
|
|
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
|
|
|
import { useUserProfile } from "@/lib/user-profile";
|
|
|
|
|
|
|
|
|
|
export default function ProfilePage() {
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
const { profile, updateProfile, initials, role, isAuthenticated, loading } = useUserProfile();
|
2026-03-12 11:42:39 -04:00
|
|
|
|
|
|
|
|
const [form, setForm] = React.useState({
|
|
|
|
|
jobTitle: profile.jobTitle,
|
|
|
|
|
company: profile.company,
|
|
|
|
|
bio: profile.bio,
|
|
|
|
|
displayName: profile.displayName,
|
|
|
|
|
email: profile.email,
|
|
|
|
|
avatarUrl: profile.avatarUrl,
|
|
|
|
|
});
|
|
|
|
|
const [dirty, setDirty] = React.useState(false);
|
|
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
|
setForm({
|
|
|
|
|
jobTitle: profile.jobTitle,
|
|
|
|
|
company: profile.company,
|
|
|
|
|
bio: profile.bio,
|
|
|
|
|
displayName: profile.displayName,
|
|
|
|
|
email: profile.email,
|
|
|
|
|
avatarUrl: profile.avatarUrl,
|
|
|
|
|
});
|
|
|
|
|
}, [profile]);
|
|
|
|
|
|
|
|
|
|
const handleChange = (field: string, value: string) => {
|
|
|
|
|
setForm((prev) => ({ ...prev, [field]: value }));
|
|
|
|
|
setDirty(true);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleSave = () => {
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
updateProfile({
|
2026-03-12 11:42:39 -04:00
|
|
|
jobTitle: form.jobTitle,
|
|
|
|
|
company: form.company,
|
|
|
|
|
bio: form.bio,
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
displayName: form.displayName,
|
|
|
|
|
email: form.email,
|
|
|
|
|
avatarUrl: form.avatarUrl,
|
|
|
|
|
});
|
2026-03-12 11:42:39 -04:00
|
|
|
setDirty(false);
|
|
|
|
|
toast.success("Profile updated");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleAvatarUpload = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
|
|
|
const file = e.target.files?.[0];
|
|
|
|
|
if (!file) return;
|
|
|
|
|
|
|
|
|
|
if (!file.type.startsWith("image/")) {
|
|
|
|
|
toast.error("Please select an image file");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (file.size > 2 * 1024 * 1024) {
|
|
|
|
|
toast.error("Image must be under 2 MB");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const reader = new FileReader();
|
|
|
|
|
reader.onload = () => {
|
|
|
|
|
handleChange("avatarUrl", reader.result as string);
|
|
|
|
|
};
|
|
|
|
|
reader.readAsDataURL(file);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const removeAvatar = () => {
|
|
|
|
|
handleChange("avatarUrl", "");
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (loading) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex items-center justify-center py-20">
|
|
|
|
|
<Loader2 className="size-8 animate-spin text-muted-foreground" />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="space-y-6">
|
|
|
|
|
<Header title="Profile" description="Manage your personal information" icon={UserCircle}>
|
|
|
|
|
<Button className="rounded-xl" onClick={handleSave} disabled={!dirty}>
|
|
|
|
|
<Save className="mr-2 size-4" />
|
|
|
|
|
Save Changes
|
|
|
|
|
</Button>
|
|
|
|
|
</Header>
|
|
|
|
|
|
|
|
|
|
{isAuthenticated && (
|
|
|
|
|
<div className="flex items-center gap-2 rounded-xl border border-emerald-500/20 bg-emerald-500/5 px-4 py-3">
|
|
|
|
|
<Shield className="size-4 shrink-0 text-emerald-600 dark:text-emerald-400" />
|
|
|
|
|
<p className="text-sm text-emerald-700 dark:text-emerald-300">
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
Signed in as <span className="font-medium">{profile.displayName || profile.email}</span>.
|
|
|
|
|
Role: <Badge variant="secondary" className="ml-1 text-[10px] px-1.5 py-0">{role}</Badge>
|
2026-03-12 11:42:39 -04:00
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
<div className="grid gap-4 sm:gap-6 grid-cols-1 lg:grid-cols-3">
|
|
|
|
|
<Card variant="glass" className="lg:col-span-1">
|
|
|
|
|
<CardHeader>
|
|
|
|
|
<CardTitle className="text-base">Photo</CardTitle>
|
|
|
|
|
<CardDescription>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
Your profile picture is visible in the header
|
2026-03-12 11:42:39 -04:00
|
|
|
</CardDescription>
|
|
|
|
|
</CardHeader>
|
|
|
|
|
<CardContent className="flex flex-col items-center gap-4">
|
|
|
|
|
<div className="relative group">
|
|
|
|
|
<Avatar size="lg" className="!size-24 text-2xl">
|
|
|
|
|
{form.avatarUrl && (
|
|
|
|
|
<AvatarImage src={form.avatarUrl} alt={form.displayName} />
|
|
|
|
|
)}
|
|
|
|
|
<AvatarFallback className="text-2xl">
|
|
|
|
|
{initials || <UserCircle className="size-10 text-muted-foreground" />}
|
|
|
|
|
</AvatarFallback>
|
|
|
|
|
</Avatar>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
<label className="absolute inset-0 flex cursor-pointer items-center justify-center rounded-full bg-black/40 opacity-0 transition-opacity group-hover:opacity-100">
|
|
|
|
|
<Camera className="size-6 text-white" />
|
|
|
|
|
<input
|
|
|
|
|
type="file"
|
|
|
|
|
accept="image/*"
|
|
|
|
|
className="hidden"
|
|
|
|
|
onChange={handleAvatarUpload}
|
|
|
|
|
/>
|
|
|
|
|
</label>
|
2026-03-12 11:42:39 -04:00
|
|
|
</div>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
<div className="flex gap-2">
|
|
|
|
|
<Button
|
|
|
|
|
variant="outline"
|
|
|
|
|
size="sm"
|
|
|
|
|
className="rounded-xl"
|
|
|
|
|
onClick={() => document.querySelector<HTMLInputElement>('input[type="file"]')?.click()}
|
|
|
|
|
>
|
|
|
|
|
<Camera className="mr-1.5 size-3" />
|
|
|
|
|
Upload
|
|
|
|
|
</Button>
|
|
|
|
|
{form.avatarUrl && (
|
2026-03-12 11:42:39 -04:00
|
|
|
<Button
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
variant="ghost"
|
2026-03-12 11:42:39 -04:00
|
|
|
size="sm"
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
className="rounded-xl text-muted-foreground"
|
|
|
|
|
onClick={removeAvatar}
|
2026-03-12 11:42:39 -04:00
|
|
|
>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
<X className="mr-1.5 size-3" />
|
|
|
|
|
Remove
|
2026-03-12 11:42:39 -04:00
|
|
|
</Button>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
<p className="text-center text-xs text-muted-foreground">
|
|
|
|
|
JPG, PNG or WebP. Max 2 MB.
|
|
|
|
|
</p>
|
2026-03-12 11:42:39 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card variant="glass" className="lg:col-span-2">
|
|
|
|
|
<CardHeader>
|
|
|
|
|
<CardTitle className="text-base">Personal Information</CardTitle>
|
|
|
|
|
<CardDescription>
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
Update your name, email, and other details
|
2026-03-12 11:42:39 -04:00
|
|
|
</CardDescription>
|
|
|
|
|
</CardHeader>
|
|
|
|
|
<CardContent className="space-y-5">
|
|
|
|
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
|
|
|
<div>
|
|
|
|
|
<Label className="mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
|
|
|
|
<UserCircle className="size-3" />
|
|
|
|
|
Display Name
|
|
|
|
|
</Label>
|
|
|
|
|
<Input
|
|
|
|
|
value={form.displayName}
|
|
|
|
|
onChange={(e) => handleChange("displayName", e.target.value)}
|
|
|
|
|
placeholder="Your name"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Label className="mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
|
|
|
|
<Mail className="size-3" />
|
|
|
|
|
Email
|
|
|
|
|
</Label>
|
|
|
|
|
<Input
|
|
|
|
|
type="email"
|
|
|
|
|
value={form.email}
|
|
|
|
|
onChange={(e) => handleChange("email", e.target.value)}
|
|
|
|
|
placeholder="you@example.com"
|
Add SaaS foundation: Auth.js, dashboard shell, org model, auto-assignment
Major architectural upgrade preparing Echo OCR for self-hosted SaaS deployment:
- Auth: Built-in Auth.js v5 with credentials + Authentik OIDC SSO, JWT sessions,
middleware route protection, login/signup/setup pages, registration API
- UI: Dashboard layout with collapsible sidebar nav, AppShell wrapper, route
groups for (dashboard) and (auth), new pages for events/people/reports
- Schema: Auth.js tables (Account, Session, VerificationToken), Organization,
OrgMember, Location, CollectionDay, Invitation, SystemConfig, ApiKey models;
proper User relations to ResponseCard/ActivityLog/Notification
- Permissions: Role hierarchy (owner/admin/editor/reviewer/viewer) with
action-based permission map and requirePermission/requireAuth helpers
- Onboarding: Multi-step setup wizard for first-user bootstrap (account, org,
location) with SystemConfig tracking
- Events: CollectionDay model with rrule support for recurring church services
- Auto-assign: Event-aware card assignment engine replacing getPreviousSunday()
- Migration: seed-migration.ts script for upgrading existing deployments
Made-with: Cursor
2026-04-15 00:59:38 -04:00
|
|
|
readOnly
|
|
|
|
|
className="bg-muted/40 cursor-default"
|
2026-03-12 11:42:39 -04:00
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="grid gap-4 sm:grid-cols-2">
|
|
|
|
|
<div>
|
|
|
|
|
<Label className="mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
|
|
|
|
<Briefcase className="size-3" />
|
|
|
|
|
Job Title
|
|
|
|
|
</Label>
|
|
|
|
|
<Input
|
|
|
|
|
value={form.jobTitle}
|
|
|
|
|
onChange={(e) => handleChange("jobTitle", e.target.value)}
|
|
|
|
|
placeholder="e.g. Project Manager"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<Label className="mb-1.5 flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
|
|
|
|
|
<Building2 className="size-3" />
|
|
|
|
|
Company
|
|
|
|
|
</Label>
|
|
|
|
|
<Input
|
|
|
|
|
value={form.company}
|
|
|
|
|
onChange={(e) => handleChange("company", e.target.value)}
|
|
|
|
|
placeholder="e.g. Echo Labs"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<Label className="mb-1.5 block text-xs font-medium text-muted-foreground">
|
|
|
|
|
Bio
|
|
|
|
|
</Label>
|
|
|
|
|
<Textarea
|
|
|
|
|
value={form.bio}
|
|
|
|
|
onChange={(e) => handleChange("bio", e.target.value)}
|
|
|
|
|
placeholder="Tell us a little about yourself..."
|
|
|
|
|
className="min-h-24 resize-none"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|