merge: sync develop into AI agent branch
This commit is contained in:
@@ -83,6 +83,7 @@ export type MasterPlatform = {
|
||||
name: string;
|
||||
description: string;
|
||||
iconKey: string;
|
||||
vehicleType: string;
|
||||
};
|
||||
|
||||
export type InstructorPlatformsSummary = {
|
||||
|
||||
@@ -125,6 +125,18 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
Number(isRegisteredAgent(a, registeredAgentKeys)) - Number(isRegisteredAgent(b, registeredAgentKeys)),
|
||||
), [agents, registeredAgentKeys]);
|
||||
const pagedPlatforms = useMemo(() => filteredPlatforms.slice((page - 1) * pageSize, page * pageSize), [filteredPlatforms, page, pageSize]);
|
||||
const vehicleTypeOptions = useMemo(() => {
|
||||
const options = new Map<string, string>();
|
||||
const addOption = (value: string | null | undefined) => {
|
||||
const normalized = value?.trim();
|
||||
if (!normalized || normalized.toLowerCase() === 'simulator') return;
|
||||
options.set(normalized.toLowerCase(), normalized);
|
||||
};
|
||||
|
||||
masterPlatforms.forEach((platform) => addOption(platform.vehicleType));
|
||||
addOption(settingsTarget?.vehicleType);
|
||||
return Array.from(options.values());
|
||||
}, [masterPlatforms, settingsTarget?.vehicleType]);
|
||||
const summaryItems = [
|
||||
{ label: '전체 플랫폼', value: `${summary.totalPlatforms}대`, icon: Car, tone: 'bg-[#eff6ff] text-[#2563eb]' },
|
||||
{ label: '활성 플랫폼', value: `${summary.activePlatforms}대`, icon: Activity, tone: 'bg-[#f0efff] text-[#4f46e5]' },
|
||||
@@ -815,9 +827,9 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
|
||||
</SettingsField>
|
||||
<SettingsField label="차량 타입">
|
||||
<select className="h-10 w-full rounded-md border border-[#d1d9e6] bg-white px-3 text-[13px] font-semibold text-[#111827] outline-none focus:border-[#2563eb]" value={settingsVehicleType} onChange={(event) => setSettingsVehicleType(event.target.value)}>
|
||||
<option>F1tenth</option>
|
||||
<option>MK-mini</option>
|
||||
<option>Simulator</option>
|
||||
{vehicleTypeOptions.map((vehicleType) => (
|
||||
<option key={vehicleType} value={vehicleType}>{vehicleType}</option>
|
||||
))}
|
||||
</select>
|
||||
</SettingsField>
|
||||
<SettingsField label="휠베이스 (m)">
|
||||
|
||||
Reference in New Issue
Block a user