fix bug 16 and 17
Build & Push / Pipeline Tests (push) Successful in 1m53s
Test / Type Check (all packages) (push) Successful in 56s
Build & Push / Build & Push Docker Image (push) Failing after 4m53s
Test / API Unit Tests (push) Successful in 1m15s
Test / Homepage Unit Tests (push) Successful in 46s
Test / Carplace Unit Tests (push) Successful in 41s
Test / Admin Unit Tests (push) Successful in 40s
Test / Dashboard Unit Tests (push) Successful in 42s
Test / API Integration Tests (push) Successful in 1m6s

This commit is contained in:
root
2026-08-04 00:52:58 -04:00
parent 626da23c2e
commit 149806a773
72 changed files with 834 additions and 174 deletions
+3 -1
View File
@@ -14,10 +14,12 @@ import { AdminSessionProvider, type AdminSessionUser } from './AdminSessionConte
function buildUnifiedLoginUrl(nextPath: string) {
const websiteUrl = resolveBrowserAppUrl(process.env.NEXT_PUBLIC_WEBSITE_URL ?? 'http://localhost:3000')
const storedTheme = window.localStorage.getItem('rentaldrivego-theme') ?? window.localStorage.getItem('admin-theme')
const theme = storedTheme === 'light' ? 'light' : 'dark'
const params = new URLSearchParams({
next: `/admin${nextPath || '/dashboard'}`,
})
return `${websiteUrl}/en/light/admin-sign-in?${params.toString()}`
return `${websiteUrl}/en/${theme}/admin-sign-in?${params.toString()}`
}
const navLinks = [
@@ -4,7 +4,7 @@ import { useEffect, useMemo, useState } from 'react'
import { ADMIN_API_BASE } from '@/lib/api'
type EmployeeRole = 'OWNER' | 'MANAGER' | 'AGENT'
type Plan = 'STARTER' | 'GROWTH' | 'PRO'
type Plan = 'STARTER' | 'GROWTH' | 'PRO' | 'ENTERPRISE'
type MenuItemType = 'INTERNAL_PAGE' | 'EXTERNAL_LINK' | 'PARENT_MENU' | 'SECTION_LABEL' | 'DIVIDER'
type CompanyOption = {
@@ -82,7 +82,7 @@ type FormState = {
}
const ROLES: EmployeeRole[] = ['OWNER', 'MANAGER', 'AGENT']
const PLANS: Plan[] = ['STARTER', 'GROWTH', 'PRO']
const PLANS: Plan[] = ['STARTER', 'GROWTH', 'PRO', 'ENTERPRISE']
const ITEM_TYPES: MenuItemType[] = ['INTERNAL_PAGE', 'EXTERNAL_LINK', 'PARENT_MENU', 'SECTION_LABEL', 'DIVIDER']
const INPUT =
@@ -117,7 +117,7 @@ function emptyForm(): FormState {
isRequired: false,
isActive: true,
roles: ['OWNER', 'MANAGER', 'AGENT'],
plans: ['STARTER', 'GROWTH', 'PRO'],
plans: ['STARTER', 'GROWTH', 'PRO', 'ENTERPRISE'],
companyIds: [],
}
}
@@ -64,19 +64,21 @@ type PlanFeatureForm = {
// ─── Constants ─────────────────────────────────────────────────────────────
const PLANS = ['STARTER', 'GROWTH', 'PRO']
const PLANS = ['STARTER', 'GROWTH', 'PRO', 'ENTERPRISE']
const PERIODS = ['MONTHLY', 'ANNUAL']
const PLAN_COLORS: Record<string, string> = {
STARTER: 'text-zinc-400',
GROWTH: 'text-sky-400',
PRO: 'text-violet-400',
ENTERPRISE: 'text-emerald-400',
}
const PLAN_BADGE: Record<string, string> = {
STARTER: 'bg-zinc-800 text-zinc-300',
GROWTH: 'bg-sky-900/40 text-sky-300',
PRO: 'bg-violet-900/40 text-violet-300',
ENTERPRISE: 'bg-emerald-900/40 text-emerald-300',
}
// ─── Helpers ───────────────────────────────────────────────────────────────