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
+25 -21
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,
description: coursePlatform.platform.description,
organizationName: coursePlatform.platform.organizationName,
iconKey: coursePlatform.platform.iconKey,
sourceSettings: coursePlatform.platform.defaultStudioSettings,
vehicleRuntimeProfile: this.toVehicleRuntimeProfile(coursePlatform.platform),
environmentProfiles: environmentProfilesByPlatformKey.get(coursePlatform.platform.platformKey) ?? [],
status: isLocal ? '사용 가능' : coursePlatform.status,
action: isLocal ? '연결' : coursePlatform.action,
state: coursePlatform.state,
local: isLocal,
};
}); });
const fixedPlatforms = localPlatform
? [{
id: localPlatform.id,
platformKey: localPlatform.platformKey,
title: localPlatform.displayName,
description: localPlatform.description,
organizationName: localPlatform.organizationName,
iconKey: localPlatform.iconKey,
sourceSettings: localPlatform.defaultStudioSettings,
vehicleRuntimeProfile: this.toVehicleRuntimeProfile(localPlatform),
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,