Files
dragonsstash/src/lib/constants.ts
xCyanGrizzly 5fd341dfc4 feat: fix channel scanning bugs, add package tags, and kickstarters tab
Bug fixes:
- Fix channels not being scanned by paginating TDLib getChats (was only
  loading first batch, additional channels were unknown to TDLib)
- Add per-channel getChat pre-load as safety net before scanning
- Fix preview pictures not loading by checking previewData instead of
  previewMsgId for hasPreview flag
- Prevent previewMsgId from being set when preview download fails

Package Tags:
- Add tags Text[] column to Package with migration backfilling from
  channel categories
- Worker auto-inherits source channel category as initial tag
- Tag filter dropdown and Tags column in STL Files table
- Server actions for individual and bulk tag editing

Kickstarters Tab:
- New KickstarterHost, Kickstarter, and KickstarterPackage models
- Full CRUD with delivery status, payment status, host management
- Package linking (many-to-many with existing packages)
- Sidebar entry with Gift icon
- Table with search, filters, modal forms

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:17:44 +01:00

88 lines
2.6 KiB
TypeScript

export const APP_NAME = "Dragon's Stash";
export const NAV_ITEMS = [
{ label: "Dashboard", href: "/dashboard", icon: "LayoutDashboard", adminOnly: false },
{ label: "Filaments", href: "/filaments", icon: "Cylinder", adminOnly: false },
{ label: "Resins", href: "/resins", icon: "Droplets", adminOnly: false },
{ label: "Paints", href: "/paints", icon: "Paintbrush", adminOnly: false },
{ label: "Supplies", href: "/supplies", icon: "Gem", adminOnly: false },
{ label: "STL Files", href: "/stls", icon: "FileBox", adminOnly: false },
{ label: "Kickstarters", href: "/kickstarters", icon: "Gift", adminOnly: false },
{ label: "Telegram", href: "/telegram", icon: "Send", adminOnly: true },
{ label: "Invites", href: "/invites", icon: "UserPlus", adminOnly: true },
{ label: "Usage", href: "/usage", icon: "ClipboardList", adminOnly: false },
{ label: "Vendors", href: "/vendors", icon: "Building2", adminOnly: false },
{ label: "Locations", href: "/locations", icon: "MapPin", adminOnly: false },
{ label: "Settings", href: "/settings", icon: "Settings", adminOnly: false },
] as const;
export const MATERIALS = [
"PLA",
"PETG",
"ABS",
"TPU",
"ASA",
"Nylon",
"PC",
"PVA",
"HIPS",
"Other",
] as const;
export const RESIN_TYPES = [
"Standard",
"ABS-Like",
"Water-Washable",
"Flexible",
"Tough",
"Dental",
"Castable",
"Other",
] as const;
export const PAINT_FINISHES = [
"Matte",
"Satin",
"Gloss",
"Metallic",
"Wash",
"Contrast",
"Ink",
"Primer",
"Varnish",
"Other",
] as const;
export const SUPPLY_CATEGORIES = [
"Glitter",
"Alcohol Ink",
"Mica Powder",
"Pigment",
"Silicone",
"Resin Additive",
"Sanding/Polishing",
"Mold",
"Other",
] as const;
export const SUPPLY_UNITS = ["g", "ml", "sheets", "pieces", "oz"] as const;
export const SUPPLY_CATEGORY_DEFAULTS: Record<string, { unit: string; totalAmount: number }> = {
"Glitter": { unit: "g", totalAmount: 50 },
"Alcohol Ink": { unit: "ml", totalAmount: 15 },
"Mica Powder": { unit: "g", totalAmount: 25 },
"Pigment": { unit: "g", totalAmount: 25 },
"Silicone": { unit: "ml", totalAmount: 500 },
"Resin Additive": { unit: "ml", totalAmount: 100 },
"Sanding/Polishing": { unit: "sheets", totalAmount: 10 },
"Mold": { unit: "pieces", totalAmount: 1 },
"Other": { unit: "g", totalAmount: 100 },
};
export const CURRENCIES = ["USD", "EUR", "GBP", "CAD", "AUD", "JPY"] as const;
export const UNITS = ["metric", "imperial"] as const;
export const DEFAULT_PAGE_SIZE = 20;
export const PAGE_SIZE_OPTIONS = [10, 20, 30, 50] as const;