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);
});
const fixedPlatforms = course.platforms
.filter((coursePlatform) => {
return this.isFixedPlatform(coursePlatform.platform);
})
.map((coursePlatform) => {
const isLocal = this.isFixedPlatform(coursePlatform.platform);
return {
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 configuredLocalPlatform = course.platforms.find((coursePlatform) => (
this.isFixedPlatform(coursePlatform.platform)
));
const localPlatform = configuredLocalPlatform?.platform ?? await this.prisma.platform.findFirst({
where: {
platformKey: 'futuredrive-local-pc',
isActive: true,
},
});
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(
{ organizationId, organizationName },
lmsUser?.id ?? null,