Separate CP admin panel into independent Vite project at /cp/
- New /cp/ Vite project with own package.json, Dockerfile, tailwind config - Migrated CpLoginPage, CpLayout, AdminDashboard → cp/src/ (self-contained) - cp/src/lib/utils.ts has only what CP needs (cn, PLAN_LABELS, PLAN_COLORS) - cp/src/data/mockData.ts has Hotel/User types and mock data - cp/ builds to nginx static container (hotelsync-cp) - docker-compose.yml: added cp service - nginx: added cp.hotelsync.ru → hotelsync-cp:80 (SSL block ready for certbot) - deploy.yml: builds hotelsync-cp:latest and restarts container on push - Cleaned src/App.tsx: removed IS_CP branch, CpLoginPage/CpLayout/AdminDashboard imports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
20
cp/src/lib/utils.ts
Normal file
20
cp/src/lib/utils.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { clsx, type ClassValue } from 'clsx'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
}
|
||||
|
||||
export type HotelPlan = 'starter' | 'pro' | 'enterprise'
|
||||
|
||||
export const PLAN_LABELS: Record<HotelPlan, string> = {
|
||||
starter: 'Starter',
|
||||
pro: 'Pro',
|
||||
enterprise: 'Enterprise',
|
||||
}
|
||||
|
||||
export const PLAN_COLORS: Record<HotelPlan, string> = {
|
||||
starter: 'bg-slate-700 text-slate-300',
|
||||
pro: 'bg-brand-900/30 text-brand-300',
|
||||
enterprise: 'bg-amber-900/30 text-amber-300',
|
||||
}
|
||||
Reference in New Issue
Block a user