Add dashboard, layout components, and CRM scaffolding

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-27 14:25:37 +05:30
parent ffedda86a9
commit 50b120e184
11 changed files with 238 additions and 64 deletions
+26
View File
@@ -0,0 +1,26 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
/**
* Merge Tailwind class names safely (handles conditional + conflicting classes).
*/
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
/** Format a number as currency (default: USD). */
export function formatCurrency(value: number, currency = "USD") {
return new Intl.NumberFormat("en-US", {
style: "currency",
currency,
}).format(value);
}
/** Format a date into a readable short form. */
export function formatDate(date: Date | string) {
return new Intl.DateTimeFormat("en-US", {
day: "2-digit",
month: "short",
year: "numeric",
}).format(new Date(date));
}