feat(layout): login, uygulama kabuğu, alt menü, hızlı ekle ve dashboard
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import type { SessionUser } from "./types";
|
||||
|
||||
/**
|
||||
* FAZ 2 GEÇİCİ: Better Auth bağlanana kadar arayüzü besleyen sahte oturum.
|
||||
* Faz 3'te `requireSession()` (lib/dal.ts) ile değiştirilecek ve bu dosya silinecek.
|
||||
*/
|
||||
export const MOCK_SESSION_USER: SessionUser = {
|
||||
id: "u_admin",
|
||||
name: "Suphi Çakır",
|
||||
username: "suphi",
|
||||
email: "admin@butcem.local",
|
||||
role: "admin",
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import type { SystemRole } from "@/shared/schemas/common";
|
||||
|
||||
/** Oturumdaki kullanıcının arayüzde ihtiyaç duyulan özeti. */
|
||||
export type SessionUser = {
|
||||
id: string;
|
||||
name: string;
|
||||
username: string;
|
||||
email?: string;
|
||||
role: SystemRole;
|
||||
image?: string;
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
import { tr } from "@/i18n/tr";
|
||||
|
||||
export function SummaryCardsSkeleton() {
|
||||
return (
|
||||
<div
|
||||
role="status"
|
||||
aria-label={tr.common.loading}
|
||||
className="grid grid-cols-2 gap-3 lg:grid-cols-3 xl:grid-cols-6"
|
||||
>
|
||||
{Array.from({ length: 6 }, (_, i) => (
|
||||
<Skeleton key={i} className="h-24 rounded-xl" />
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import type { HouseholdSummary } from "./types";
|
||||
|
||||
/** FAZ 2 GEÇİCİ: Faz 5'te kullanıcının üye olduğu hanelerle değiştirilecek. */
|
||||
export const MOCK_HOUSEHOLDS: HouseholdSummary[] = [
|
||||
{ id: "h_cakir", name: "Çakır Ailesi", role: "owner" },
|
||||
{ id: "h_anne", name: "Annemler", role: "viewer" },
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
export const HOUSEHOLD_ROLES = ["owner", "member", "viewer"] as const;
|
||||
export type HouseholdRole = (typeof HOUSEHOLD_ROLES)[number];
|
||||
|
||||
export type HouseholdSummary = {
|
||||
id: string;
|
||||
name: string;
|
||||
role: HouseholdRole;
|
||||
};
|
||||
Reference in New Issue
Block a user