chore(wizard): update demo license keys in lookup panel
This commit is contained in:
@@ -25,47 +25,47 @@ import { lookupLicenseFromLicServer } from '@/lib/actions/licserver-config'
|
|||||||
|
|
||||||
// ─── MOCK DATA (until real LicServer API is wired up) ───────────────────────
|
// ─── MOCK DATA (until real LicServer API is wired up) ───────────────────────
|
||||||
const MOCK_LICENSES: Record<string, LicenseInfo> = {
|
const MOCK_LICENSES: Record<string, LicenseInfo> = {
|
||||||
'CAS-2023-PRO-00123': {
|
'995500-0005': {
|
||||||
licenseKey: 'CAS-2023-PRO-00123',
|
licenseKey: '995500-0005',
|
||||||
status: 'active',
|
status: 'active',
|
||||||
product: 'CAS genesisWorld Professional',
|
product: 'CASPOS DEMO',
|
||||||
edition: 'Professional',
|
edition: 'Professional',
|
||||||
version: '14.1.2',
|
version: '14.1.2',
|
||||||
seats: 10,
|
seats: 10,
|
||||||
customer: 'Mustermann GmbH',
|
customer: 'Mustermann GmbH',
|
||||||
contact: 'Max Mustermann',
|
contact: 'Max Mustermann',
|
||||||
issuedAt: '2023-04-01',
|
issuedAt: '2023-04-01',
|
||||||
expiresAt: '2026-03-31',
|
expiresAt: '2026-03-31',
|
||||||
maintenanceUntil: '2025-03-31',
|
maintenanceUntil: '2025-03-31',
|
||||||
modules: ['CRM', 'ERP-Link', 'Mobile Client', 'Web Client'],
|
modules: ['CRM', 'ERP-Link', 'Mobile Client', 'Web Client'],
|
||||||
},
|
},
|
||||||
'CAS-2020-STD-00456': {
|
'CAS-2020-STD-00456': {
|
||||||
licenseKey: 'CAS-2020-STD-00456',
|
licenseKey: 'CAS-2020-STD-00456',
|
||||||
status: 'expired',
|
status: 'expired',
|
||||||
product: 'CAS genesisWorld Standard',
|
product: 'CAS genesisWorld Standard',
|
||||||
edition: 'Standard',
|
edition: 'Standard',
|
||||||
version: '12.0.0',
|
version: '12.0.0',
|
||||||
seats: 5,
|
seats: 5,
|
||||||
customer: 'Beispiel AG',
|
customer: 'Beispiel AG',
|
||||||
contact: 'Erika Muster',
|
contact: 'Erika Muster',
|
||||||
issuedAt: '2020-01-15',
|
issuedAt: '2020-01-15',
|
||||||
expiresAt: '2023-01-14',
|
expiresAt: '2023-01-14',
|
||||||
maintenanceUntil: '2022-01-14',
|
maintenanceUntil: '2022-01-14',
|
||||||
modules: ['CRM'],
|
modules: ['CRM'],
|
||||||
},
|
},
|
||||||
'CAS-2024-ENT-00789': {
|
'CAS-2024-ENT-00789': {
|
||||||
licenseKey: 'CAS-2024-ENT-00789',
|
licenseKey: 'CAS-2024-ENT-00789',
|
||||||
status: 'active',
|
status: 'active',
|
||||||
product: 'CAS genesisWorld Enterprise',
|
product: 'CAS genesisWorld Enterprise',
|
||||||
edition: 'Enterprise',
|
edition: 'Enterprise',
|
||||||
version: '15.0.0',
|
version: '15.0.0',
|
||||||
seats: 50,
|
seats: 50,
|
||||||
customer: 'Tech Solutions GmbH & Co. KG',
|
customer: 'Tech Solutions GmbH & Co. KG',
|
||||||
contact: 'Julia Schneider',
|
contact: 'Julia Schneider',
|
||||||
issuedAt: '2024-01-01',
|
issuedAt: '2024-01-01',
|
||||||
expiresAt: '2026-12-31',
|
expiresAt: '2026-12-31',
|
||||||
maintenanceUntil: '2026-12-31',
|
maintenanceUntil: '2026-12-31',
|
||||||
modules: ['CRM', 'ERP-Link', 'Mobile Client', 'Web Client', 'AI Assistant', 'Analytics Pro'],
|
modules: ['CRM', 'ERP-Link', 'Mobile Client', 'Web Client', 'AI Assistant', 'Analytics Pro'],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,18 +73,18 @@ const MOCK_LICENSES: Record<string, LicenseInfo> = {
|
|||||||
export type LicenseStatus = 'active' | 'expired' | 'invalid' | 'suspended'
|
export type LicenseStatus = 'active' | 'expired' | 'invalid' | 'suspended'
|
||||||
|
|
||||||
export interface LicenseInfo {
|
export interface LicenseInfo {
|
||||||
licenseKey: string
|
licenseKey: string
|
||||||
status: LicenseStatus
|
status: LicenseStatus
|
||||||
product: string
|
product: string
|
||||||
edition: string
|
edition: string
|
||||||
version: string
|
version: string
|
||||||
seats: number
|
seats: number
|
||||||
customer: string
|
customer: string
|
||||||
contact: string
|
contact: string
|
||||||
issuedAt: string
|
issuedAt: string
|
||||||
expiresAt: string
|
expiresAt: string
|
||||||
maintenanceUntil: string
|
maintenanceUntil: string
|
||||||
modules: string[]
|
modules: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface LicenseLookupPanelProps {
|
interface LicenseLookupPanelProps {
|
||||||
@@ -98,34 +98,34 @@ function statusConfig(status: LicenseStatus) {
|
|||||||
case 'active':
|
case 'active':
|
||||||
return {
|
return {
|
||||||
label: 'Aktiv',
|
label: 'Aktiv',
|
||||||
icon: <CheckCircle2 className="w-3.5 h-3.5" />,
|
icon: <CheckCircle2 className="w-3.5 h-3.5" />,
|
||||||
cls: 'bg-emerald-500/20 text-emerald-300 border-emerald-500/40',
|
cls: 'bg-emerald-500/20 text-emerald-300 border-emerald-500/40',
|
||||||
ring: 'border-emerald-500/30',
|
ring: 'border-emerald-500/30',
|
||||||
glow: 'shadow-emerald-500/10',
|
glow: 'shadow-emerald-500/10',
|
||||||
}
|
}
|
||||||
case 'expired':
|
case 'expired':
|
||||||
return {
|
return {
|
||||||
label: 'Abgelaufen',
|
label: 'Abgelaufen',
|
||||||
icon: <AlertTriangle className="w-3.5 h-3.5" />,
|
icon: <AlertTriangle className="w-3.5 h-3.5" />,
|
||||||
cls: 'bg-amber-500/20 text-amber-300 border-amber-500/40',
|
cls: 'bg-amber-500/20 text-amber-300 border-amber-500/40',
|
||||||
ring: 'border-amber-500/30',
|
ring: 'border-amber-500/30',
|
||||||
glow: 'shadow-amber-500/10',
|
glow: 'shadow-amber-500/10',
|
||||||
}
|
}
|
||||||
case 'suspended':
|
case 'suspended':
|
||||||
return {
|
return {
|
||||||
label: 'Gesperrt',
|
label: 'Gesperrt',
|
||||||
icon: <XCircle className="w-3.5 h-3.5" />,
|
icon: <XCircle className="w-3.5 h-3.5" />,
|
||||||
cls: 'bg-red-500/20 text-red-300 border-red-500/40',
|
cls: 'bg-red-500/20 text-red-300 border-red-500/40',
|
||||||
ring: 'border-red-500/30',
|
ring: 'border-red-500/30',
|
||||||
glow: 'shadow-red-500/10',
|
glow: 'shadow-red-500/10',
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return {
|
return {
|
||||||
label: 'Ungültig',
|
label: 'Ungültig',
|
||||||
icon: <XCircle className="w-3.5 h-3.5" />,
|
icon: <XCircle className="w-3.5 h-3.5" />,
|
||||||
cls: 'bg-red-500/20 text-red-300 border-red-500/40',
|
cls: 'bg-red-500/20 text-red-300 border-red-500/40',
|
||||||
ring: 'border-red-500/30',
|
ring: 'border-red-500/30',
|
||||||
glow: 'shadow-red-500/10',
|
glow: 'shadow-red-500/10',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,13 +149,13 @@ async function lookupLicense(key: string): Promise<LicenseInfo | null> {
|
|||||||
|
|
||||||
// ─── MAIN COMPONENT ───────────────────────────────────────────────────────────
|
// ─── MAIN COMPONENT ───────────────────────────────────────────────────────────
|
||||||
export function LicenseLookupPanel({ onLicenseResolved }: LicenseLookupPanelProps) {
|
export function LicenseLookupPanel({ onLicenseResolved }: LicenseLookupPanelProps) {
|
||||||
const [licenseKey, setLicenseKey] = useState('')
|
const [licenseKey, setLicenseKey] = useState('')
|
||||||
const [result, setResult] = useState<LicenseInfo | null>(null)
|
const [result, setResult] = useState<LicenseInfo | null>(null)
|
||||||
const [notFound, setNotFound] = useState(false)
|
const [notFound, setNotFound] = useState(false)
|
||||||
const [isPending, startTransition] = useTransition()
|
const [isPending, startTransition] = useTransition()
|
||||||
const [expanded, setExpanded] = useState(true)
|
const [expanded, setExpanded] = useState(true)
|
||||||
const [modulesOpen, setModulesOpen] = useState(false)
|
const [modulesOpen, setModulesOpen] = useState(false)
|
||||||
const inputRef = useRef<HTMLInputElement>(null)
|
const inputRef = useRef<HTMLInputElement>(null)
|
||||||
|
|
||||||
const handleSearch = () => {
|
const handleSearch = () => {
|
||||||
if (!licenseKey.trim()) return
|
if (!licenseKey.trim()) return
|
||||||
@@ -242,7 +242,7 @@ export function LicenseLookupPanel({ onLicenseResolved }: LicenseLookupPanelProp
|
|||||||
setNotFound(false)
|
setNotFound(false)
|
||||||
}}
|
}}
|
||||||
onKeyDown={handleKeyDown}
|
onKeyDown={handleKeyDown}
|
||||||
placeholder="z. B. CAS-2023-PRO-00123"
|
placeholder="z. B. 995500-00"
|
||||||
className="pl-9 pr-8 bg-white/5 border-white/10 text-white placeholder:text-slate-500
|
className="pl-9 pr-8 bg-white/5 border-white/10 text-white placeholder:text-slate-500
|
||||||
focus:border-violet-500/60 focus:ring-violet-500/20 rounded-xl text-sm h-10"
|
focus:border-violet-500/60 focus:ring-violet-500/20 rounded-xl text-sm h-10"
|
||||||
/>
|
/>
|
||||||
@@ -278,16 +278,16 @@ export function LicenseLookupPanel({ onLicenseResolved }: LicenseLookupPanelProp
|
|||||||
Demo:
|
Demo:
|
||||||
<span
|
<span
|
||||||
className="font-mono text-violet-400/80 cursor-pointer hover:text-violet-400 transition-colors"
|
className="font-mono text-violet-400/80 cursor-pointer hover:text-violet-400 transition-colors"
|
||||||
onClick={() => setLicenseKey('CAS-2023-PRO-00123')}
|
onClick={() => setLicenseKey('995500-00')}
|
||||||
>
|
>
|
||||||
CAS-2023-PRO-00123
|
995500-00
|
||||||
</span>
|
</span>
|
||||||
{' · '}
|
{' · '}
|
||||||
<span
|
<span
|
||||||
className="font-mono text-amber-400/80 cursor-pointer hover:text-amber-400 transition-colors"
|
className="font-mono text-amber-400/80 cursor-pointer hover:text-amber-400 transition-colors"
|
||||||
onClick={() => setLicenseKey('CAS-2020-STD-00456')}
|
onClick={() => setLicenseKey('995500-01')}
|
||||||
>
|
>
|
||||||
CAS-2020-STD-00456
|
995500-01
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user