fix default local platform and remote workspace paths

This commit is contained in:
2026-08-13 11:57:49 +09:00
parent 719edf8b08
commit 5c03032921
+26 -22
View File
@@ -412,28 +412,32 @@ export class CurriculumService {
}); });
environmentProfilesByPlatformKey.set(profile.platformKey, items); environmentProfilesByPlatformKey.set(profile.platformKey, items);
}); });
const fixedPlatforms = course.platforms const configuredLocalPlatform = course.platforms.find((coursePlatform) => (
.filter((coursePlatform) => { this.isFixedPlatform(coursePlatform.platform)
return this.isFixedPlatform(coursePlatform.platform); ));
}) const localPlatform = configuredLocalPlatform?.platform ?? await this.prisma.platform.findFirst({
.map((coursePlatform) => { where: {
const isLocal = this.isFixedPlatform(coursePlatform.platform); platformKey: 'futuredrive-local-pc',
return { isActive: true,
id: coursePlatform.platform.id, },
platformKey: coursePlatform.platform.platformKey, });
title: coursePlatform.platform.displayName, const fixedPlatforms = localPlatform
description: coursePlatform.platform.description, ? [{
organizationName: coursePlatform.platform.organizationName, id: localPlatform.id,
iconKey: coursePlatform.platform.iconKey, platformKey: localPlatform.platformKey,
sourceSettings: coursePlatform.platform.defaultStudioSettings, title: localPlatform.displayName,
vehicleRuntimeProfile: this.toVehicleRuntimeProfile(coursePlatform.platform), description: localPlatform.description,
environmentProfiles: environmentProfilesByPlatformKey.get(coursePlatform.platform.platformKey) ?? [], organizationName: localPlatform.organizationName,
status: isLocal ? '사용 가능' : coursePlatform.status, iconKey: localPlatform.iconKey,
action: isLocal ? '연결' : coursePlatform.action, sourceSettings: localPlatform.defaultStudioSettings,
state: coursePlatform.state, vehicleRuntimeProfile: this.toVehicleRuntimeProfile(localPlatform),
local: isLocal, environmentProfiles: environmentProfilesByPlatformKey.get(localPlatform.platformKey) ?? [],
}; status: '사용 가능',
}); action: '연결',
state: configuredLocalPlatform?.state ?? 'ready',
local: true,
}]
: [];
const controlStates = await this.platformControlService.getControlStates( const controlStates = await this.platformControlService.getControlStates(
{ organizationId, organizationName }, { organizationId, organizationName },
lmsUser?.id ?? null, lmsUser?.id ?? null,