@@ -498,6 +528,42 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
/>
+ {registrationModalOpen ? createPortal(
+
+
+
+
+
교보재 등록 키
+
에이전트 설치 화면에서 강사 계정 이메일과 함께 입력하세요.
+
+
setRegistrationModalOpen(false)} disabled={saving} aria-label="닫기" title="닫기">
+
+
+
+
+ {registrationCode ? (
+
+
{registrationCode}
+
{registrationExpiresAt ? `${new Date(registrationExpiresAt).toLocaleTimeString('ko-KR', { hour: '2-digit', minute: '2-digit' })}까지 사용할 수 있습니다.` : '한 번만 사용할 수 있습니다.'}
+
+ ) : (
+
키를 발급한 뒤 교보재 장비에 에이전트를 설치하세요. 설치가 완료되어 연결되면 플랫폼 추가에서 해당 에이전트를 선택할 수 있습니다.
+ )}
+
+
+ setRegistrationModalOpen(false)} disabled={saving}>닫기
+ {!registrationCode ? (
+ void handleIssueRegistrationCode()} disabled={saving}>
+ {saving ? : }
+ 키 발급
+
+ ) : null}
+
+
+
,
+ document.body,
+ ) : null}
+
{modalOpen ? createPortal(
@@ -633,7 +699,19 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
) : assignmentGroupsError ? (
{assignmentGroupsError}
- ) : assignmentGroups.length ? assignmentGroups.map((group) => {
+ ) : <>
+
setSelectedAssignmentGroupId(assignmentUnassignedSelected ? '' : 'unassigned')}
+ >
+
+ 미배정
+ 현재 플랫폼 배정을 해제합니다.
+
+ 배정 해제
+
+ {assignmentGroups.map((group) => {
const selected = selectedAssignmentGroupId === group.id;
const assigned = Boolean(group.instructorPlatformId);
return (
@@ -655,9 +733,8 @@ export function PlatformsPage({ session }: { session: AuthSession }) {
);
- }) : (
-
등록된 그룹이 없습니다.
- )}
+ })}
+ >}