Compare commits

..

4 Commits

Author SHA1 Message Date
Khalid Abdi 7846dacd42 chore: release v0.13.0
Bump version to 0.13.0 across root/backend/frontend, add the 0.13.0 CHANGELOG
entry, and refresh stale CLAUDE.md docs (the AI chat is real and @ai-sdk/react
is installed; the signing/approval flow is built).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 21:17:55 +03:00
Khalid Abdi 2c239fbd27 frontend: UI fixes + settings/patients features
- Record history: replace fragile COSS Timeline separator math with a
  continuous-rail list so every audited change renders in full (RTL-safe).
- Prescriptions: new reusable COSS DatePicker (Popover + Calendar) replaces
  raw <input type="date"> for Start/End date.
- Update banner: rebuilt with COSS Alert variant="warning"; pinned physical
  bottom-right so it stays bottom-right under Arabic RTL.
- AI setup notice: thin attached warning banner with clearer copy; now shown
  above the input in active chats too, not just the empty state.
- Settings profile: wire the previously dead Specialty (Select) and
  Professional links (editable rows) into the persisted preferences.
- Patients: add a status filter and broaden search to conditions/allergies.
- Sidebar user menu: quick language switch submenu (RTL already wired).
- ai-elements: fix a subset of Base UI type drift (22 -> 12; remainder is
  cmdk->Autocomplete migration drift kept behind ignoreBuildErrors).
- i18n: new keys added across all five locales (en/de/fr/ar/so).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 21:06:38 +03:00
Khalid Abdi bffed5525d chore: release v0.12.1
Bump root/backend/frontend to 0.12.1 and move the CHANGELOG notes under a dated
0.12.1 heading (centered wallet-sync stepper, timeline record history, and the
landing-page globe deferral). Adds the radix-ui dependency pulled in by the
Origin UI stepper/timeline primitives.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 20:51:04 +03:00
Khalid Abdi 591b2f9170 frontend: center wallet-sync stepper and record-history timeline
Replace the bespoke left-aligned DialogStepper with the Origin UI Stepper
primitive (components/ui/stepper.tsx) so the numbered indicators sit centered
inline with their labels. Rebuild the patient sheet's Record History section as
a vertical Timeline (components/ui/timeline.tsx) showing the actor name, an
entity-type icon, the action, and the date, replacing the flat avatar list.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 20:50:54 +03:00
30 changed files with 2328 additions and 289 deletions
+51
View File
@@ -7,6 +7,57 @@ for how releases are cut and published.
## [Unreleased]
## [0.13.0] — 2026-07-12
### Added
- **Prescription date pickers.** The New Prescription dialog's Start/End date now use a proper COSS
date picker (`frontend/components/ui/date-picker.tsx`, Popover + Calendar) instead of the raw
native date input.
- **Working profile fields.** Settings → Profile **Specialty** (a Select) and **Professional links**
(editable rows) are now wired to persisted preferences — previously they were inert stubs.
- **Patient filters.** The Patients page gains a status filter (all / active / inpatient /
discharged) and its search now also matches conditions and allergies.
- **Language quick-switch.** A language submenu in the sidebar user menu (alongside Theme), applied
immediately with Arabic RTL.
- **Wallet app — home & settings.** The patient app home screen adds a quick-action row (Share
record / My wallet / Notifications) and a recent-activity feed; the settings screen adds an About
section (version, docs, blog) and a privacy footer.
### Changed
- **Record history renders in full.** The patient sheet's Record history replaces the fragile
timeline-separator layout with a continuous-rail list, so every audited change shows completely
(and mirrors correctly under RTL).
- **Update banner + AI setup notice.** The "update available" banner now uses the COSS warning Alert
and stays bottom-right under Arabic; the "connect an AI provider" notice is a clearer, thinner bar
shown above the chat input in active conversations too.
- **Wallet app — bottom sheets.** Polished the shared sheet building blocks (spacing, radii, close
and action affordances).
### Fixed
- **Blog reachable.** `blog.temetro.com` was returning 502 due to a custom-domain target-port
mismatch (Ghost listens on 2368); documented and corrected.
- **Docs freshness.** Corrected stale `CLAUDE.md` claims (the AI chat is real and `@ai-sdk/react` is
installed; the signing/approval flow is built) and reduced the vendored `ai-elements` Base UI
type-drift errors.
## [0.12.1] — 2026-07-10
### Changed
- **Centered wallet-sync stepper.** The in-dialog "Sync to wallet" stepper (`DialogStepper` in
`frontend/components/wallet/wallet-sync-step.tsx`) now uses a proper Stepper primitive
(`components/ui/stepper.tsx`), so the numbered indicators sit centered inline with their labels
instead of the previous left-aligned look.
- **Record history is now a timeline.** The patient sheet's **Record history** section
(`RecordHistory` in `frontend/components/patients/patient-detail.tsx`) renders as a vertical
timeline (`components/ui/timeline.tsx`) — who made the change, an entity-type icon, what happened,
and when — replacing the flat avatar list.
### Performance
- **Landing page: defer the 3D globe.** The Temetro Network globe (three.js) on the marketing site
now mounts only when its section scrolls near the viewport (IntersectionObserver), instead of on
hydration — removing ~730 KB of JS and its main-thread execution from initial page load. (Landing
page lives in the sibling `temetro/landing-page` repo.)
## [0.12.0] — 2026-07-09
### Added
+5 -2
View File
@@ -31,9 +31,12 @@ repository (published as `temetro`).
> is imported (with optional **temporary share + auto-delete**). Clinic→wallet **record-update push**
> and **QR pairing** are built too. See `backend/src/routes/{signing,patients-wallet}.ts`.
>
> **Also built:** the **AI chat is real** — the frontend streams from the backend's tool-using
> agent (`POST /api/chat`), not mock replies (see `frontend/CLAUDE.md`).
>
> **Still vision, not built:** in-app record editing and cryptographic time-boxing of temporary
> shares. The AI chat is still **mock replies**. Email verification is wired but currently **not
> enforced** at sign-in (see `backend/CLAUDE.md`).
> shares. Email verification is wired but currently **not enforced** at sign-in (see
> `backend/CLAUDE.md`).
## Patient wallet app (sibling repo `~/Desktop/temetro-app`)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "temetro-backend",
"version": "0.12.0",
"version": "0.13.0",
"private": true,
"type": "module",
"description": "temetro backend — Express + Postgres API with Better Auth (email/password, organizations) and org-scoped patient records.",
+8 -6
View File
@@ -12,8 +12,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
`temetro` — an **open-source** clinical "AI middleman" (see the project vision in the root
`../CLAUDE.md`). This app is the clinician-facing chat UI. It is now **wired to the real
`../backend/`** for authentication and patient data (no longer a standalone UI-only demo); the AI
chat replies are **still mocked** (no LLM call yet).
`../backend/`** for authentication and patient data (no longer a standalone UI-only demo). The AI
chat is **real**: `components/chat/chat-panel.tsx` streams from the backend's tool-using agent
(`POST /api/chat`) via `useChat` and renders the record data parts it streams back.
- The chat parses `/patient <file#>` (or a bare `/<file#>`) in `components/chat/chat-panel.tsx` and
renders the record as a horizontal row of cards (`components/chat/patient-cards.tsx`), with small
@@ -21,7 +22,7 @@ chat replies are **still mocked** (no LLM call yet).
dialog; the Summary card has an **Edit record** button.
- Patients can be **created and edited** via the shared `components/chat/patient-form-dialog.tsx`
(mode `create` | `edit`). The "Add patient" pill in `chat-input.tsx` opens it.
- Non-command messages still get a mock assistant reply.
- Non-command messages stream a real reply from the backend agent (`POST /api/chat`).
### Auth & data (talks to `../backend`)
@@ -42,7 +43,8 @@ chat replies are **still mocked** (no LLM call yet).
`components/settings/settings-care-team.tsx` manages members + invitations.
- `.env.local` / `.env.example` hold `NEXT_PUBLIC_API_URL`.
The signing / patient-owned-storage / approval features from the root vision are **still not built**.
The signing / patient-owned-storage / approval features from the root vision **are built** (clinic
signing key, encrypted share/import, patient approval, clinic→wallet update push, QR pairing).
## Commands
@@ -77,8 +79,8 @@ trailer. See the root `../CLAUDE.md` for the project-wide per-folder commit poli
`components.json` (baseColor `neutral`).
- **`components/ai-elements/`** — a large AI-chat primitive library (`PromptInput`, `Conversation`,
`Message`, `Suggestion`, etc.) typed against **AI SDK v6** (`ai` package: `UIMessage`,
`ChatStatus`, `FileUIPart`). Note: `@ai-sdk/react` (`useChat`) is **not installed** — chat state
is managed with local React state.
`ChatStatus`, `FileUIPart`). `@ai-sdk/react` (`useChat`) **is installed** and drives the live chat
(`chat-panel.tsx`) with a custom transport pointed at `POST /api/chat`.
- **`components/sidebar-02/`** — the dashboard sidebar (`SidebarProvider` / `Sidebar` /
`SidebarInset` from `components/ui/sidebar.tsx`). `app-sidebar.tsx` holds the nav config (New chat
· Patients · Settings) + notifications; `team-switcher.tsx` is the `OrgSwitcher` (clinic switch).
@@ -369,15 +369,18 @@ export const AttachmentRemove = ({
// AttachmentHoverCard - Hover preview
// ============================================================================
export type AttachmentHoverCardProps = ComponentProps<typeof HoverCard>;
export type AttachmentHoverCardProps = ComponentProps<typeof HoverCard> & {
// Base UI moved hover delay to the Trigger (`delay`); kept here for API
// back-compat but no longer forwarded to the Root.
openDelay?: number;
closeDelay?: number;
};
export const AttachmentHoverCard = ({
openDelay = 0,
closeDelay = 0,
openDelay,
closeDelay,
...props
}: AttachmentHoverCardProps) => (
<HoverCard closeDelay={closeDelay} openDelay={openDelay} {...props} />
);
}: AttachmentHoverCardProps) => <HoverCard {...props} />;
export type AttachmentHoverCardTriggerProps = ComponentProps<
typeof HoverCardTrigger
+1 -1
View File
@@ -56,7 +56,7 @@ export const Context = ({
return (
<ContextContext.Provider value={contextValue}>
<HoverCard closeDelay={0} openDelay={0} {...props} />
<HoverCard {...props} />
</ContextContext.Provider>
);
};
@@ -50,7 +50,7 @@ export const InlineCitationText = ({
export type InlineCitationCardProps = ComponentProps<typeof HoverCard>;
export const InlineCitationCard = (props: InlineCitationCardProps) => (
<HoverCard closeDelay={0} openDelay={0} {...props} />
<HoverCard {...props} />
);
export type InlineCitationCardTriggerProps = ComponentProps<typeof Badge> & {
+14 -1
View File
@@ -128,5 +128,18 @@ export const PlanFooter = (props: PlanFooterProps) => (
export type PlanTriggerProps = ComponentProps<typeof CollapsibleTrigger>;
export const PlanTrigger = ({ className, ...props }: PlanTriggerProps) => (
<CollapsibleTrigger render={<Button className={cn("size-8", className)} data-slot="plan-trigger" size="icon" variant="ghost" {...props} />}><ChevronsUpDownIcon className="size-4" /><span className="sr-only">Toggle plan</span></CollapsibleTrigger>
<CollapsibleTrigger
{...props}
render={
<Button
className={cn("size-8", className)}
data-slot="plan-trigger"
size="icon"
variant="ghost"
/>
}
>
<ChevronsUpDownIcon className="size-4" />
<span className="sr-only">Toggle plan</span>
</CollapsibleTrigger>
);
@@ -1311,15 +1311,18 @@ export const PromptInputSelectValue = ({
<SelectValue className={cn(className)} {...props} />
);
export type PromptInputHoverCardProps = ComponentProps<typeof HoverCard>;
export type PromptInputHoverCardProps = ComponentProps<typeof HoverCard> & {
// Base UI moved hover delay to the Trigger (`delay`); kept here for API
// back-compat but no longer forwarded to the Root.
openDelay?: number;
closeDelay?: number;
};
export const PromptInputHoverCard = ({
openDelay = 0,
closeDelay = 0,
openDelay,
closeDelay,
...props
}: PromptInputHoverCardProps) => (
<HoverCard closeDelay={closeDelay} openDelay={openDelay} {...props} />
);
}: PromptInputHoverCardProps) => <HoverCard {...props} />;
export type PromptInputHoverCardTriggerProps = ComponentProps<
typeof HoverCardTrigger
@@ -107,7 +107,9 @@ export const SchemaDisplayPath = ({
<span
className={cn("font-mono text-sm", className)}
// oxlint-disable-next-line eslint-plugin-react(no-danger)
dangerouslySetInnerHTML={{ __html: children ?? highlightedPath }}
dangerouslySetInnerHTML={{
__html: typeof children === "string" ? children : highlightedPath,
}}
{...props}
/>
);
+24 -20
View File
@@ -1,6 +1,6 @@
"use client";
import { Sparkles, X } from "lucide-react";
import { TriangleAlert, X } from "lucide-react";
import Link from "next/link";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -8,9 +8,12 @@ import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { getAiConfig } from "@/lib/ai-settings";
// A single, dismissible heads-up shown above the chat input on a fresh chat when
// no AI provider is configured yet (no API key, and no local Ollama). It only
// renders on the empty state, so it naturally disappears once a message is sent.
// A thin, dismissible warning bar shown flush above the chat input whenever no
// AI provider is wired up yet — either no API key for any cloud provider, or the
// app is in local mode with no Ollama endpoint set. Without this, sending a
// message just fails silently, so the banner spells out the missing setup and
// links straight to AI settings. Rendered in both the empty and active chat
// states so a user mid-conversation with no provider still sees why replies fail.
export function AiSetupNotice() {
const { t } = useTranslation();
const [needsSetup, setNeedsSetup] = useState(false);
@@ -40,24 +43,25 @@ export function AiSetupNotice() {
return (
<div
className="flex w-full items-start gap-3 rounded-2xl border border-info/30 bg-info/8 px-4 py-3 text-sm dark:bg-info/12"
className="flex w-full items-center gap-2.5 rounded-2xl border border-warning/32 bg-warning/8 px-3.5 py-2 text-sm dark:bg-warning/12"
role="status"
>
<Sparkles className="mt-0.5 size-4 shrink-0 text-info-foreground" />
<div className="flex-1 space-y-0.5">
<p className="font-medium text-foreground">
{t("chat.setupNotice.title")}
</p>
<p className="text-muted-foreground">{t("chat.setupNotice.body")}</p>
<Button
className="mt-1 px-0 text-info-foreground"
render={<Link href="/settings?tab=ai" />}
size="sm"
variant="link"
>
{t("chat.setupNotice.action")}
</Button>
</div>
<TriangleAlert className="size-4 shrink-0 text-warning" />
<p className="min-w-0 flex-1 truncate text-foreground">
<span className="font-medium">{t("chat.setupNotice.title")}</span>
<span className="text-muted-foreground max-sm:hidden">
{" — "}
{t("chat.setupNotice.body")}
</span>
</p>
<Button
className="shrink-0"
render={<Link href="/settings?tab=ai" />}
size="sm"
variant="outline"
>
{t("chat.setupNotice.action")}
</Button>
<button
aria-label={t("chat.setupNotice.dismiss")}
className="-me-1 shrink-0 rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
+4 -2
View File
@@ -723,8 +723,7 @@ export function ChatPanel() {
<div className="flex w-full flex-col gap-3">
{errorAlert}
{veilGate}
{/* One-time setup heads-up — only on the empty state, so it clears
itself once the first message is sent. */}
{/* Setup heads-up when no AI provider is configured. */}
<AiSetupNotice />
{promptInput}
<Suggestions className="justify-center pt-1">
@@ -761,6 +760,9 @@ export function ChatPanel() {
{errorAlert}
{veilGate}
{queuePanel}
{/* Also warn mid-conversation when no AI provider is configured, so
failing replies have a visible cause and a fix. */}
<AiSetupNotice />
{promptInput}
</div>
</div>
+56 -20
View File
@@ -2,12 +2,18 @@
import {
ArrowLeftRight,
CalendarDays,
FileDown,
type LucideIcon,
ListTodo,
Mic,
Network,
NotebookPen,
Pencil,
Pill,
Send,
Trash2,
UserRound,
} from "lucide-react";
import { type ReactNode, useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -15,7 +21,11 @@ import { useTranslation } from "react-i18next";
import { Sparkline } from "@/components/chat/sparkline";
import { AttachmentsSection } from "@/components/patients/patient-files";
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import { type ActivityEntry, listPatientActivity } from "@/lib/activity";
import {
type ActivityEntityType,
type ActivityEntry,
listPatientActivity,
} from "@/lib/activity";
import { printPatientSummary } from "@/lib/patient-pdf";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
@@ -122,8 +132,18 @@ function TrendBlock({ trend }: { trend: Trend }) {
);
}
// Which icon marks each kind of audited change on the timeline.
const historyIcon: Record<ActivityEntityType, LucideIcon> = {
appointment: CalendarDays,
note: NotebookPen,
patient: UserRound,
prescription: Pill,
task: ListTodo,
};
// The patient's record history: every audited add/change on this chart, newest
// first. Reuses the clinic activity log scoped to this file number.
// first. Reuses the clinic activity log scoped to this file number, laid out as
// a vertical timeline — who made the change, what happened, and when.
function RecordHistory({ fileNumber }: { fileNumber: string }) {
const { t } = useTranslation();
const [entries, setEntries] = useState<ActivityEntry[] | null>(null);
@@ -152,24 +172,40 @@ function RecordHistory({ fileNumber }: { fileNumber: string }) {
{t("patientCard.history.empty")}
</p>
) : (
<ol className="flex flex-col gap-3">
{entries.map((e) => (
<li className="flex items-start gap-3" key={e.id}>
<Avatar className="mt-0.5 size-7 shrink-0">
<AvatarFallback className="text-[11px]">
{e.actorInitials}
</AvatarFallback>
</Avatar>
<div className="flex min-w-0 flex-1 flex-col">
<span className="text-foreground text-sm">
<span className="font-medium">{e.actorName}</span> {e.action}
</span>
<span className="text-muted-foreground text-xs">
{new Date(e.createdAt).toLocaleString()}
</span>
</div>
</li>
))}
// A plain vertical rail so EVERY audited change renders in full — the
// icon column draws a connector that stretches to the next entry, and
// the flex layout mirrors correctly under RTL.
<ol className="space-y-0">
{entries.map((e, i) => {
const Icon = historyIcon[e.entityType] ?? Pencil;
const isLast = i === entries.length - 1;
return (
<li className="flex gap-3" key={e.id}>
<div className="flex flex-col items-center">
<span className="flex size-6 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground">
<Icon size={14} />
</span>
{!isLast && (
<span
aria-hidden="true"
className="my-1 w-px flex-1 bg-primary/15"
/>
)}
</div>
<div
className={`min-w-0 flex-1 ${isLast ? "" : "pb-5"}`}
>
<p className="font-medium text-foreground text-sm">
{e.actorName}
</p>
<p className="text-muted-foreground text-sm">{e.action}</p>
<time className="mt-0.5 block font-medium text-muted-foreground text-xs">
{new Date(e.createdAt).toLocaleString()}
</time>
</div>
</li>
);
})}
</ol>
)}
</Section>
+51 -3
View File
@@ -13,8 +13,23 @@ import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
import { Input } from "@/components/ui/input";
import { ListPagination } from "@/components/ui/list-pagination";
import {
Select,
SelectItem,
SelectPopup,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { listPatients, type Patient } from "@/lib/patients";
type StatusFilter = "all" | Patient["status"];
const STATUS_FILTERS: StatusFilter[] = [
"all",
"active",
"inpatient",
"discharged",
];
// Rows shown per page on the patients table before paginating.
const PAGE_SIZE = 10;
@@ -32,6 +47,7 @@ const statusVariant: Record<Patient["status"], BadgeVariant> = {
export function PatientsView() {
const { t } = useTranslation();
const [query, setQuery] = useState("");
const [statusFilter, setStatusFilter] = useState<StatusFilter>("all");
const [addOpen, setAddOpen] = useState(false);
const [importOpen, setImportOpen] = useState(false);
// Bumped on open so the create dialog remounts with a fresh file # / form.
@@ -69,9 +85,18 @@ export function PatientsView() {
}, []);
const q = query.trim().toLowerCase();
const patients = allPatients.filter(
(p) => !q || p.name.toLowerCase().includes(q) || p.fileNumber.includes(q)
);
// Search matches name, MRN, problem/condition labels, and allergy substances;
// the status filter narrows to one clinical status.
const patients = allPatients.filter((p) => {
if (statusFilter !== "all" && p.status !== statusFilter) return false;
if (!q) return true;
return (
p.name.toLowerCase().includes(q) ||
p.fileNumber.includes(q) ||
p.problems.some((problem) => problem.label.toLowerCase().includes(q)) ||
p.allergies.some((a) => a.substance.toLowerCase().includes(q))
);
});
// Client-side pagination over the filtered list (10/page). Searching resets to
// the first page (done in the search handler); `page` is clamped at render so a
@@ -133,6 +158,29 @@ export function PatientsView() {
value={query}
/>
</div>
<Select
onValueChange={(value) => {
setStatusFilter((value ?? "all") as StatusFilter);
setPage(1);
}}
value={statusFilter}
>
<SelectTrigger
aria-label={t("patients.filterStatus")}
className="w-full sm:w-40"
>
<SelectValue />
</SelectTrigger>
<SelectPopup>
{STATUS_FILTERS.map((value) => (
<SelectItem key={value} value={value}>
{value === "all"
? t("patients.allStatuses")
: t(`patients.status.${value}`)}
</SelectItem>
))}
</SelectPopup>
</Select>
<Button
className="rounded-3xl"
onClick={() => setImportOpen(true)}
@@ -13,6 +13,7 @@ import { useTranslation } from "react-i18next";
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { DatePicker } from "@/components/ui/date-picker";
import {
Dialog,
DialogClose,
@@ -578,19 +579,17 @@ export function AddPrescriptionDialog({
</div>
<div className="grid grid-cols-2 gap-3">
<Field label={t("prescriptions.dialog.startDate")}>
<input
className={controlClass}
onChange={(event) => setStartDate(event.target.value)}
type="date"
<DatePicker
onChange={setStartDate}
placeholder={t("prescriptions.dialog.selectDate")}
value={startDate}
/>
</Field>
<Field label={t("prescriptions.dialog.endDate")}>
<input
className={controlClass}
<DatePicker
min={startDate || undefined}
onChange={(event) => setEndDate(event.target.value)}
type="date"
onChange={setEndDate}
placeholder={t("prescriptions.dialog.selectDate")}
value={endDate}
/>
</Field>
@@ -1,7 +1,7 @@
"use client";
import { useEffect, useState } from "react";
import { ChevronDown, Plus } from "lucide-react";
import { Plus, X } from "lucide-react";
import { useTranslation } from "react-i18next";
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
@@ -26,6 +26,7 @@ import {
import { authClient } from "@/lib/auth-client";
import { supportedLanguages } from "@/lib/i18n/config";
import { persistLanguage } from "@/lib/language";
import { SPECIALTIES, specialtyLabel } from "@/lib/staff";
import {
getSettings,
saveSettings,
@@ -60,8 +61,21 @@ const DEFAULT_PREFS: UserPreferences = {
"notif.recordsShared": true,
clinic: "",
contactEmail: "",
specialty: "",
// Professional links stored as a JSON array string (values are boolean|string).
links: "",
};
// Parse the stored `links` preference (a JSON array string) into an array.
function parseLinks(value: unknown): string[] {
try {
const parsed = JSON.parse(String(value || "[]"));
return Array.isArray(parsed) ? parsed.map(String) : [];
} catch {
return [];
}
}
export function ProfilePanel() {
const { t, i18n } = useTranslation();
const { data: session } = authClient.useSession();
@@ -110,13 +124,23 @@ export function ProfilePanel() {
const setPref = (key: string, value: boolean | string) =>
setPrefs((prev) => ({ ...prev, [key]: value }));
const links = parseLinks(prefs.links);
const setLinks = (next: string[]) =>
setPref("links", JSON.stringify(next));
const dirty =
name !== baselineName || JSON.stringify(prefs) !== JSON.stringify(baseline);
const save = async () => {
setSaving(true);
try {
const saved = await saveSettings(prefs);
// Drop blank link rows before persisting.
const cleanedLinks = links.map((l) => l.trim()).filter(Boolean);
const toSave: UserPreferences = {
...prefs,
links: cleanedLinks.length ? JSON.stringify(cleanedLinks) : "",
};
const saved = await saveSettings(toSave);
const trimmed = name.trim();
if (trimmed && trimmed !== baselineName) {
const { error } = await authClient.updateUser({ name: trimmed });
@@ -182,13 +206,31 @@ export function ProfilePanel() {
<div className="space-y-1.5">
<FieldLabel>{t("settings.profile.specialty")}</FieldLabel>
<button
className="flex h-9 w-full items-center justify-between rounded-3xl bg-input/50 px-3 text-sm text-muted-foreground transition-colors hover:bg-input/70"
type="button"
<Select
onValueChange={(value) => setPref("specialty", value ?? "")}
value={String(prefs.specialty ?? "")}
>
{t("settings.profile.selectSpecialty")}
<ChevronDown className="size-4" />
</button>
<SelectTrigger>
<SelectValue>
{(value: string) =>
value ? (
specialtyLabel(t, value)
) : (
<span className="text-muted-foreground">
{t("settings.profile.selectSpecialty")}
</span>
)
}
</SelectValue>
</SelectTrigger>
<SelectPopup>
{SPECIALTIES.map((s) => (
<SelectItem key={s} value={s}>
{t(`settings.careTeam.specialties.${s}`)}
</SelectItem>
))}
</SelectPopup>
</Select>
</div>
<div className="grid gap-4 sm:grid-cols-2">
@@ -221,7 +263,43 @@ export function ProfilePanel() {
{t("settings.profile.professionalLinksHint")}
</p>
</div>
<Button className="rounded-lg" size="sm" variant="outline">
{links.length > 0 ? (
<div className="space-y-2">
{links.map((link, index) => (
// biome-ignore lint/suspicious/noArrayIndexKey: rows are positional
<div className="flex items-center gap-2" key={index}>
<Input
inputMode="url"
onChange={(event) =>
setLinks(
links.map((value, i) =>
i === index ? event.target.value : value,
),
)
}
placeholder={t("settings.profile.linkPlaceholder")}
value={link}
/>
<Button
aria-label={t("settings.profile.removeLink")}
onClick={() =>
setLinks(links.filter((_, i) => i !== index))
}
size="icon-sm"
variant="ghost"
>
<X className="size-4" />
</Button>
</div>
))}
</div>
) : null}
<Button
className="rounded-lg"
onClick={() => setLinks([...links, ""])}
size="sm"
variant="outline"
>
<Plus className="size-4" />
{t("settings.profile.addLink")}
</Button>
+33 -1
View File
@@ -4,6 +4,7 @@ import {
Building2,
Check,
ChevronsUpDown,
Languages,
LogOut,
Moon,
Plus,
@@ -49,6 +50,8 @@ import {
useSidebar,
} from "@/components/ui/sidebar";
import { authClient } from "@/lib/auth-client";
import { supportedLanguages } from "@/lib/i18n/config";
import { persistLanguage } from "@/lib/language";
import { useActiveRole } from "@/lib/roles";
import { notify } from "@/lib/toast";
@@ -82,7 +85,13 @@ function GitHubIcon({ className }: { className?: string }) {
// shortcut hint (below Theme) and a clinic switcher submenu (below that) whose
// popup reveals the active clinic's details on hover.
export function NavUser() {
const { t } = useTranslation();
const { t, i18n } = useTranslation();
const activeLang = i18n.resolvedLanguage ?? i18n.language;
const changeLanguage = (lng: string) => {
if (lng === activeLang) return;
void i18n.changeLanguage(lng);
void persistLanguage(lng);
};
const { isMobile, state } = useSidebar();
const isCollapsed = state === "collapsed";
const router = useRouter();
@@ -197,6 +206,29 @@ export function NavUser() {
</MenuShortcut>
</MenuItem>
{/* Language: quick switch (also available in Settings). Applies
immediately and roams via the backend preferences. */}
<MenuSub>
<MenuSubTrigger>
<Languages />
<span className="truncate">{t("userMenu.language")}</span>
</MenuSubTrigger>
<MenuSubPopup className="min-w-44" sideOffset={8}>
{supportedLanguages.map((lng) => (
<MenuItem
className="gap-2"
key={lng}
onClick={() => changeLanguage(lng)}
>
<span className="flex-1 truncate">
{t(`settings.profile.language.${lng}`)}
</span>
{lng === activeLang && <Check className="size-4" />}
</MenuItem>
))}
</MenuSubPopup>
</MenuSub>
{/* Command palette: hint + shortcut, sits below Theme. */}
<MenuItem onClick={openCommand}>
<Search />
+103
View File
@@ -0,0 +1,103 @@
"use client";
import { CalendarIcon } from "lucide-react";
import type { Matcher } from "react-day-picker";
import { useState } from "react";
import { Button } from "@/components/ui/button";
import { Calendar } from "@/components/ui/calendar";
import {
Popover,
PopoverPopup,
PopoverTrigger,
} from "@/components/ui/popover";
import { cn } from "@/lib/utils";
// Parse a `YYYY-MM-DD` string as a LOCAL date. `new Date("YYYY-MM-DD")` parses
// as UTC and can shift the day across timezones, so build it from parts.
function parseISODate(value?: string): Date | undefined {
if (!value) return undefined;
const [y, m, d] = value.split("-").map(Number);
if (!y || !m || !d) return undefined;
return new Date(y, m - 1, d);
}
function toISODate(date: Date): string {
const y = date.getFullYear();
const m = String(date.getMonth() + 1).padStart(2, "0");
const d = String(date.getDate()).padStart(2, "0");
return `${y}-${m}-${d}`;
}
export interface DatePickerProps {
/** Selected date as `YYYY-MM-DD` (matches native date-input semantics). */
value?: string;
onChange: (value: string) => void;
/** Earliest selectable date, `YYYY-MM-DD`. */
min?: string;
/** Latest selectable date, `YYYY-MM-DD`. */
max?: string;
placeholder?: string;
id?: string;
className?: string;
disabled?: boolean;
}
// A COSS date picker: an outline Button trigger opening a Popover with the COSS
// Calendar. Drop-in replacement for `<input type="date">`, keeping the same
// string value shape so callers don't change their state handling.
export function DatePicker({
value,
onChange,
min,
max,
placeholder,
id,
className,
disabled,
}: DatePickerProps): React.ReactElement {
const [open, setOpen] = useState(false);
const selected = parseISODate(value);
const minDate = parseISODate(min);
const maxDate = parseISODate(max);
const disabledMatchers: Matcher[] = [
...(minDate ? [{ before: minDate }] : []),
...(maxDate ? [{ after: maxDate }] : []),
];
return (
<Popover onOpenChange={setOpen} open={open}>
<PopoverTrigger
render={
<Button
className={cn(
"w-full justify-between font-normal",
!selected && "text-muted-foreground",
className,
)}
disabled={disabled}
id={id}
variant="outline"
/>
}
>
{selected ? selected.toLocaleDateString() : (placeholder ?? "")}
<CalendarIcon className="opacity-80" />
</PopoverTrigger>
<PopoverPopup align="start" className="w-auto">
<Calendar
autoFocus
defaultMonth={selected ?? minDate}
disabled={disabledMatchers.length ? disabledMatchers : undefined}
mode="single"
onSelect={(date?: Date) => {
onChange(date ? toISODate(date) : "");
if (date) setOpen(false);
}}
selected={selected}
/>
</PopoverPopup>
</Popover>
);
}
+293
View File
@@ -0,0 +1,293 @@
"use client";
import { CheckIcon, LoaderCircleIcon } from "lucide-react";
import { Slot } from "radix-ui";
import * as React from "react";
import { createContext, useContext } from "react";
import { cn } from "@/lib/utils";
// Types
type StepperContextValue = {
activeStep: number;
setActiveStep: (step: number) => void;
orientation: "horizontal" | "vertical";
};
type StepItemContextValue = {
step: number;
state: StepState;
isDisabled: boolean;
isLoading: boolean;
};
type StepState = "active" | "completed" | "inactive" | "loading";
// Contexts
const StepperContext = createContext<StepperContextValue | undefined>(
undefined,
);
const StepItemContext = createContext<StepItemContextValue | undefined>(
undefined,
);
const useStepper = () => {
const context = useContext(StepperContext);
if (!context) {
throw new Error("useStepper must be used within a Stepper");
}
return context;
};
const useStepItem = () => {
const context = useContext(StepItemContext);
if (!context) {
throw new Error("useStepItem must be used within a StepperItem");
}
return context;
};
// Components
interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
defaultValue?: number;
value?: number;
onValueChange?: (value: number) => void;
orientation?: "horizontal" | "vertical";
}
function Stepper({
defaultValue = 0,
value,
onValueChange,
orientation = "horizontal",
className,
...props
}: StepperProps) {
const [activeStep, setInternalStep] = React.useState(defaultValue);
const setActiveStep = React.useCallback(
(step: number) => {
if (value === undefined) {
setInternalStep(step);
}
onValueChange?.(step);
},
[value, onValueChange],
);
const currentStep = value ?? activeStep;
return (
<StepperContext.Provider
value={{
activeStep: currentStep,
orientation,
setActiveStep,
}}
>
<div
className={cn(
"group/stepper inline-flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",
className,
)}
data-orientation={orientation}
data-slot="stepper"
{...props}
/>
</StepperContext.Provider>
);
}
// StepperItem
interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
step: number;
completed?: boolean;
disabled?: boolean;
loading?: boolean;
}
function StepperItem({
step,
completed = false,
disabled = false,
loading = false,
className,
children,
...props
}: StepperItemProps) {
const { activeStep } = useStepper();
const state: StepState =
completed || step < activeStep
? "completed"
: activeStep === step
? "active"
: "inactive";
const isLoading = loading && step === activeStep;
return (
<StepItemContext.Provider
value={{ isDisabled: disabled, isLoading, state, step }}
>
<div
className={cn(
"group/step flex items-center group-data-[orientation=horizontal]/stepper:flex-row group-data-[orientation=vertical]/stepper:flex-col",
className,
)}
data-slot="stepper-item"
data-state={state}
{...(isLoading ? { "data-loading": true } : {})}
{...props}
>
{children}
</div>
</StepItemContext.Provider>
);
}
// StepperTrigger
interface StepperTriggerProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
asChild?: boolean;
}
function StepperTrigger({
asChild = false,
className,
children,
...props
}: StepperTriggerProps) {
const { setActiveStep } = useStepper();
const { step, isDisabled } = useStepItem();
if (asChild) {
const Comp = asChild ? Slot.Root : "span";
return (
<Comp className={className} data-slot="stepper-trigger">
{children}
</Comp>
);
}
return (
<button
className={cn(
"inline-flex items-center gap-3 rounded-full outline-none focus-visible:z-10 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",
className,
)}
data-slot="stepper-trigger"
disabled={isDisabled}
onClick={() => setActiveStep(step)}
type="button"
{...props}
>
{children}
</button>
);
}
// StepperIndicator
interface StepperIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
asChild?: boolean;
}
function StepperIndicator({
asChild = false,
className,
children,
...props
}: StepperIndicatorProps) {
const { state, step, isLoading } = useStepItem();
return (
<span
className={cn(
"relative flex size-6 shrink-0 items-center justify-center rounded-full bg-muted font-medium text-muted-foreground text-xs data-[state=active]:bg-primary data-[state=completed]:bg-primary data-[state=active]:text-primary-foreground data-[state=completed]:text-primary-foreground",
className,
)}
data-slot="stepper-indicator"
data-state={state}
{...props}
>
{asChild ? (
children
) : (
<>
<span className="transition-all group-data-[state=completed]/step:scale-0 group-data-loading/step:scale-0 group-data-[state=completed]/step:opacity-0 group-data-loading/step:opacity-0 group-data-loading/step:transition-none">
{step}
</span>
<CheckIcon
aria-hidden="true"
className="absolute scale-0 opacity-0 transition-all group-data-[state=completed]/step:scale-100 group-data-[state=completed]/step:opacity-100"
size={16}
/>
{isLoading && (
<span className="absolute transition-all">
<LoaderCircleIcon
aria-hidden="true"
className="animate-spin"
size={14}
/>
</span>
)}
</>
)}
</span>
);
}
// StepperTitle
function StepperTitle({
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
return (
<h3
className={cn("font-medium text-sm", className)}
data-slot="stepper-title"
{...props}
/>
);
}
// StepperDescription
function StepperDescription({
className,
...props
}: React.HTMLAttributes<HTMLParagraphElement>) {
return (
<p
className={cn("text-muted-foreground text-sm", className)}
data-slot="stepper-description"
{...props}
/>
);
}
// StepperSeparator
function StepperSeparator({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn(
"m-0.5 bg-muted group-data-[orientation=horizontal]/stepper:h-0.5 group-data-[orientation=vertical]/stepper:h-12 group-data-[orientation=horizontal]/stepper:w-full group-data-[orientation=vertical]/stepper:w-0.5 group-data-[orientation=horizontal]/stepper:flex-1 group-data-[state=completed]/step:bg-primary",
className,
)}
data-slot="stepper-separator"
{...props}
/>
);
}
export {
Stepper,
StepperDescription,
StepperIndicator,
StepperItem,
StepperSeparator,
StepperTitle,
StepperTrigger,
};
+210
View File
@@ -0,0 +1,210 @@
"use client";
import { Slot } from "radix-ui";
import * as React from "react";
import { cn } from "@/lib/utils";
// Types
type TimelineContextValue = {
activeStep: number;
setActiveStep: (step: number) => void;
};
// Context
const TimelineContext = React.createContext<TimelineContextValue | undefined>(
undefined,
);
const useTimeline = () => {
const context = React.useContext(TimelineContext);
if (!context) {
throw new Error("useTimeline must be used within a Timeline");
}
return context;
};
// Components
interface TimelineProps extends React.HTMLAttributes<HTMLDivElement> {
defaultValue?: number;
value?: number;
onValueChange?: (value: number) => void;
orientation?: "horizontal" | "vertical";
}
function Timeline({
defaultValue = 1,
value,
onValueChange,
orientation = "vertical",
className,
...props
}: TimelineProps) {
const [activeStep, setInternalStep] = React.useState(defaultValue);
const setActiveStep = React.useCallback(
(step: number) => {
if (value === undefined) {
setInternalStep(step);
}
onValueChange?.(step);
},
[value, onValueChange],
);
const currentStep = value ?? activeStep;
return (
<TimelineContext.Provider
value={{ activeStep: currentStep, setActiveStep }}
>
<div
className={cn(
"group/timeline flex data-[orientation=horizontal]:w-full data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",
className,
)}
data-orientation={orientation}
data-slot="timeline"
{...props}
/>
</TimelineContext.Provider>
);
}
// TimelineContent
function TimelineContent({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
className={cn("text-muted-foreground text-sm", className)}
data-slot="timeline-content"
{...props}
/>
);
}
// TimelineDate
interface TimelineDateProps extends React.HTMLAttributes<HTMLTimeElement> {
asChild?: boolean;
}
function TimelineDate({
asChild = false,
className,
...props
}: TimelineDateProps) {
const Comp = asChild ? Slot.Root : "time";
return (
<Comp
className={cn(
"mb-1 block font-medium text-muted-foreground text-xs group-data-[orientation=vertical]/timeline:max-sm:h-4",
className,
)}
data-slot="timeline-date"
{...props}
/>
);
}
// TimelineHeader
function TimelineHeader({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div className={cn(className)} data-slot="timeline-header" {...props} />
);
}
// TimelineIndicator
interface TimelineIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
asChild?: boolean;
}
function TimelineIndicator({
asChild = false,
className,
children,
...props
}: TimelineIndicatorProps) {
return (
<div
aria-hidden="true"
className={cn(
"group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute size-4 rounded-full border-2 border-primary/20 group-data-[orientation=vertical]/timeline:top-0 group-data-[orientation=horizontal]/timeline:left-0 group-data-completed/timeline-item:border-primary",
className,
)}
data-slot="timeline-indicator"
{...props}
>
{children}
</div>
);
}
// TimelineItem
interface TimelineItemProps extends React.HTMLAttributes<HTMLDivElement> {
step: number;
}
function TimelineItem({ step, className, ...props }: TimelineItemProps) {
const { activeStep } = useTimeline();
return (
<div
className={cn(
"group/timeline-item relative flex flex-1 flex-col gap-0.5 group-data-[orientation=vertical]/timeline:ms-8 group-data-[orientation=horizontal]/timeline:mt-8 group-data-[orientation=horizontal]/timeline:not-last:pe-8 group-data-[orientation=vertical]/timeline:not-last:pb-12 has-[+[data-completed]]:[&_[data-slot=timeline-separator]]:bg-primary",
className,
)}
data-completed={step <= activeStep || undefined}
data-slot="timeline-item"
{...props}
/>
);
}
// TimelineSeparator
function TimelineSeparator({
className,
...props
}: React.HTMLAttributes<HTMLDivElement>) {
return (
<div
aria-hidden="true"
className={cn(
"group-data-[orientation=horizontal]/timeline:-top-6 group-data-[orientation=horizontal]/timeline:-translate-y-1/2 group-data-[orientation=vertical]/timeline:-left-6 group-data-[orientation=vertical]/timeline:-translate-x-1/2 absolute self-start bg-primary/10 group-last/timeline-item:hidden group-data-[orientation=horizontal]/timeline:h-0.5 group-data-[orientation=vertical]/timeline:h-[calc(100%-1rem-0.25rem)] group-data-[orientation=horizontal]/timeline:w-[calc(100%-1rem-0.25rem)] group-data-[orientation=vertical]/timeline:w-0.5 group-data-[orientation=horizontal]/timeline:translate-x-4.5 group-data-[orientation=vertical]/timeline:translate-y-4.5",
className,
)}
data-slot="timeline-separator"
{...props}
/>
);
}
// TimelineTitle
function TimelineTitle({
className,
...props
}: React.HTMLAttributes<HTMLHeadingElement>) {
return (
<h3
className={cn("font-medium text-sm", className)}
data-slot="timeline-title"
{...props}
/>
);
}
export {
Timeline,
TimelineContent,
TimelineDate,
TimelineHeader,
TimelineIndicator,
TimelineItem,
TimelineSeparator,
TimelineTitle,
};
+31 -21
View File
@@ -1,10 +1,12 @@
"use client";
import Link from "next/link";
import { X } from "lucide-react";
import { ArrowUpCircle, X } from "lucide-react";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import { Alert, AlertAction, AlertTitle } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import { getVersionInfo } from "@/lib/version";
const DISMISS_KEY = "temetro:update-dismissed";
@@ -39,28 +41,36 @@ export function UpdateBanner() {
setLatest(null);
};
// Pinned to the physical bottom-right in both LTR and RTL. The user wants it
// in the bottom-right corner in Arabic too, so we use physical `right`/`bottom`
// rather than the logical `end` (which would flip to the left under RTL).
return (
<div className="fixed end-4 bottom-4 z-50 flex max-w-sm items-start gap-3 rounded-2xl border border-border bg-card px-4 py-3 shadow-lg">
<div className="space-y-1.5">
<p className="text-sm text-foreground">
<div className="fixed right-4 bottom-4 z-50 w-full max-w-sm" dir="auto">
<Alert className="bg-card shadow-lg" variant="warning">
<ArrowUpCircle />
<AlertTitle className="text-foreground">
{t("settings.version.banner", { version: latest })}
</p>
<Link
className="text-sm font-medium text-primary underline-offset-4 hover:underline"
href="/settings?tab=version"
onClick={dismiss}
>
{t("settings.version.bannerUpdate")}
</Link>
</div>
<button
aria-label={t("settings.version.bannerDismiss")}
className="-me-1 shrink-0 rounded-lg p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground"
onClick={dismiss}
type="button"
>
<X className="size-4" />
</button>
</AlertTitle>
<AlertAction>
<Button
render={
<Link href="/settings?tab=version" onClick={dismiss} />
}
size="sm"
variant="outline"
>
{t("settings.version.bannerUpdate")}
</Button>
<Button
aria-label={t("settings.version.bannerDismiss")}
onClick={dismiss}
size="icon-sm"
variant="ghost"
>
<X className="size-4" />
</Button>
</AlertAction>
</Alert>
</div>
);
}
+26 -42
View File
@@ -5,57 +5,41 @@ import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";
import { DialogFooter, DialogPanel } from "@/components/ui/dialog";
import { cn } from "@/lib/utils";
import {
Stepper,
StepperIndicator,
StepperItem,
StepperSeparator,
StepperTitle,
} from "@/components/ui/stepper";
import type { UseWalletSync } from "./use-wallet-sync";
// Two-step header shown at the top of a dialog when the selected patient has a
// linked wallet: "Details" → "Sync to wallet".
// linked wallet: "Details" → "Sync to wallet". Centered so the numbered
// indicators sit inline with their labels.
export function DialogStepper({ step }: { step: "form" | "wallet" }) {
const { t } = useTranslation();
const steps = [
{ key: "form", label: t("walletSync.step1") },
{ key: "wallet", label: t("walletSync.step2") },
] as const;
const activeIndex = step === "form" ? 0 : 1;
{ value: 1, label: t("walletSync.step1") },
{ value: 2, label: t("walletSync.step2") },
];
const activeValue = step === "form" ? 1 : 2;
return (
<div className="mt-3 flex items-center gap-2">
{steps.map((s, i) => {
const done = i < activeIndex;
const active = i === activeIndex;
return (
<div className="flex flex-1 items-center gap-2" key={s.key}>
<span
className={cn(
"flex size-5 shrink-0 items-center justify-center rounded-full text-[11px] font-semibold transition-colors",
done && "bg-primary text-primary-foreground",
active && "bg-primary/15 text-primary ring-1 ring-primary/40",
!done && !active && "bg-muted text-muted-foreground",
)}
>
{done ? <Check className="size-3" /> : i + 1}
</span>
<span
className={cn(
"text-xs font-medium",
active || done ? "text-foreground" : "text-muted-foreground",
)}
>
{s.label}
</span>
{i < steps.length - 1 && (
<span
className={cn(
"ml-1 h-px flex-1",
done ? "bg-primary/40" : "bg-border",
)}
/>
)}
</div>
);
})}
</div>
<Stepper className="mx-auto mt-3 max-w-sm" value={activeValue}>
{steps.map(({ value, label }, i) => (
<StepperItem className="not-last:flex-1" key={value} step={value}>
<span className="inline-flex items-center gap-2">
<StepperIndicator />
<StepperTitle className="whitespace-nowrap text-xs">
{label}
</StepperTitle>
</span>
{i < steps.length - 1 && <StepperSeparator className="mx-3" />}
</StepperItem>
))}
</Stepper>
);
}
+10 -4
View File
@@ -263,7 +263,8 @@
"createDialogDescription": "أضف عيادة جديدة وانتقل إليها.",
"signOutFailed": "فشل تسجيل الخروج",
"tryAgain": "يرجى المحاولة مرة أخرى.",
"signedOut": "تم تسجيل الخروج"
"signedOut": "تم تسجيل الخروج",
"language": "اللغة"
},
"clinic": {
"create": "إنشاء عيادة",
@@ -374,7 +375,9 @@
"doneTitle": "تم حذف المريض",
"failedTitle": "تعذّر حذف المريض",
"failedBody": "يرجى المحاولة مرة أخرى."
}
},
"filterStatus": "تصفية حسب الحالة",
"allStatuses": "كل الحالات"
},
"appointments": {
"title": "المواعيد والجدول",
@@ -615,7 +618,8 @@
"removeDates": "إزالة",
"startDate": "تاريخ البدء",
"endDate": "تاريخ الانتهاء",
"addDates": "إضافة تاريخ البدء/الانتهاء"
"addDates": "إضافة تاريخ البدء/الانتهاء",
"selectDate": "اختر التاريخ"
}
},
"pharmacy": {
@@ -1886,7 +1890,9 @@
"pendingApprovalsDesc": "أبلغني عند موافقة مريض على تغيير معلّق أو رفضه",
"recordsShared": "سجلات شُوركت معي",
"recordsSharedDesc": "أبلغني عند مشاركة مريض سجلًا معي"
}
},
"linkPlaceholder": "https://example.com",
"removeLink": "إزالة الرابط"
},
"careTeam": {
"title": "فريق الرعاية",
+10 -4
View File
@@ -259,7 +259,8 @@
"createDialogDescription": "Fügen Sie eine neue Klinik hinzu und wechseln Sie zu ihr.",
"signOutFailed": "Abmeldung fehlgeschlagen",
"tryAgain": "Bitte versuchen Sie es erneut.",
"signedOut": "Abgemeldet"
"signedOut": "Abgemeldet",
"language": "Sprache"
},
"clinic": {
"create": "Klinik erstellen",
@@ -362,7 +363,9 @@
"doneTitle": "Patient gelöscht",
"failedTitle": "Patient konnte nicht gelöscht werden",
"failedBody": "Bitte versuchen Sie es erneut."
}
},
"filterStatus": "Nach Status filtern",
"allStatuses": "Alle Status"
},
"appointments": {
"title": "Termine & Zeitplan",
@@ -599,7 +602,8 @@
"removeDates": "Entfernen",
"startDate": "Startdatum",
"endDate": "Enddatum",
"addDates": "Start-/Enddatum hinzufügen"
"addDates": "Start-/Enddatum hinzufügen",
"selectDate": "Datum wählen"
}
},
"pharmacy": {
@@ -1866,7 +1870,9 @@
"pendingApprovalsDesc": "Benachrichtigen Sie mich, wenn ein Patient eine ausstehende Änderung genehmigt oder ablehnt",
"recordsShared": "Mit mir geteilte Datensätze",
"recordsSharedDesc": "Benachrichtigen Sie mich, wenn ein Patient einen Datensatz mit mir teilt"
}
},
"linkPlaceholder": "https://example.com",
"removeLink": "Link entfernen"
},
"careTeam": {
"title": "Behandlungsteam",
+10 -4
View File
@@ -259,7 +259,8 @@
"createDialogDescription": "Add a new clinic and switch to it.",
"signOutFailed": "Sign out failed",
"tryAgain": "Please try again.",
"signedOut": "Signed out"
"signedOut": "Signed out",
"language": "Language"
},
"clinic": {
"create": "Create clinic",
@@ -362,7 +363,9 @@
"doneTitle": "Patient deleted",
"failedTitle": "Couldn't delete patient",
"failedBody": "Please try again."
}
},
"filterStatus": "Filter by status",
"allStatuses": "All statuses"
},
"appointments": {
"title": "Appointments & Schedule",
@@ -599,7 +602,8 @@
"removeDates": "Remove",
"startDate": "Start date",
"endDate": "End date",
"addDates": "Add start/end dates"
"addDates": "Add start/end dates",
"selectDate": "Select date"
}
},
"pharmacy": {
@@ -1866,7 +1870,9 @@
"pendingApprovalsDesc": "Notify me when a patient approves or rejects a pending change",
"recordsShared": "Records shared with me",
"recordsSharedDesc": "Notify me when a patient shares a record with me"
}
},
"linkPlaceholder": "https://example.com",
"removeLink": "Remove link"
},
"careTeam": {
"title": "Care team",
+10 -4
View File
@@ -259,7 +259,8 @@
"createDialogDescription": "Ajoutez une nouvelle clinique et passez-y.",
"signOutFailed": "Échec de la déconnexion",
"tryAgain": "Veuillez réessayer.",
"signedOut": "Déconnecté"
"signedOut": "Déconnecté",
"language": "Langue"
},
"clinic": {
"create": "Créer une clinique",
@@ -362,7 +363,9 @@
"doneTitle": "Patient supprimé",
"failedTitle": "Impossible de supprimer le patient",
"failedBody": "Veuillez réessayer."
}
},
"filterStatus": "Filtrer par statut",
"allStatuses": "Tous les statuts"
},
"appointments": {
"title": "Rendez-vous & Planning",
@@ -599,7 +602,8 @@
"removeDates": "Retirer",
"startDate": "Date de début",
"endDate": "Date de fin",
"addDates": "Ajouter les dates de début/fin"
"addDates": "Ajouter les dates de début/fin",
"selectDate": "Choisir une date"
}
},
"pharmacy": {
@@ -1866,7 +1870,9 @@
"pendingApprovalsDesc": "Me notifier lorsqu'un patient approuve ou rejette une modification en attente",
"recordsShared": "Dossiers partagés avec moi",
"recordsSharedDesc": "Me notifier lorsqu'un patient partage un dossier avec moi"
}
},
"linkPlaceholder": "https://example.com",
"removeLink": "Supprimer le lien"
},
"careTeam": {
"title": "Équipe soignante",
+10 -4
View File
@@ -259,7 +259,8 @@
"createDialogDescription": "Ku dar rug cusub oo u beddel.",
"signOutFailed": "Ka-bixitaanka waa fashilmay",
"tryAgain": "Fadlan isku day mar kale.",
"signedOut": "Waa laga baxay"
"signedOut": "Waa laga baxay",
"language": "Luqadda"
},
"clinic": {
"create": "Samee rug",
@@ -362,7 +363,9 @@
"doneTitle": "Bukaanka waa la tirtiray",
"failedTitle": "Bukaanka lama tirtiri karin",
"failedBody": "Fadlan isku day mar kale."
}
},
"filterStatus": "Ku kala sooc xaaladda",
"allStatuses": "Dhammaan xaaladaha"
},
"appointments": {
"title": "Ballamaha & Jadwalka",
@@ -599,7 +602,8 @@
"removeDates": "Ka saar",
"startDate": "Taariikhda bilowga",
"endDate": "Taariikhda dhammaadka",
"addDates": "Ku dar taariikhaha bilow/dhammaad"
"addDates": "Ku dar taariikhaha bilow/dhammaad",
"selectDate": "Dooro taariikhda"
}
},
"pharmacy": {
@@ -1866,7 +1870,9 @@
"pendingApprovalsDesc": "I ogeysii marka bukaan ansixiyo ama diido isbeddel la sugayo",
"recordsShared": "Diiwaanno la ila wadaagay",
"recordsSharedDesc": "I ogeysii marka bukaan diiwaan ila wadaago"
}
},
"linkPlaceholder": "https://example.com",
"removeLink": "Ka saar linkiga"
},
"careTeam": {
"title": "Kooxda daryeelka",
+1248 -116
View File
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.12.0",
"version": "0.13.0",
"private": true,
"scripts": {
"dev": "next dev",
@@ -52,6 +52,7 @@
"nanoid": "^5.1.11",
"next": "16.2.6",
"next-themes": "^0.4.6",
"radix-ui": "^1.6.2",
"react": "19.2.4",
"react-day-picker": "^10.0.1",
"react-dom": "19.2.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "temetro",
"version": "0.12.0",
"version": "0.13.0",
"private": true,
"devDependencies": {
"shadcn": "^4.11.0"