diff --git a/apps/admin/src/components/common/Modals/ProgressModal.tsx b/apps/admin/src/components/common/Modals/ProgressModal.tsx
index 67d077fe..2de896c2 100644
--- a/apps/admin/src/components/common/Modals/ProgressModal.tsx
+++ b/apps/admin/src/components/common/Modals/ProgressModal.tsx
@@ -10,6 +10,9 @@ interface ProgressModalProps {
const ProgressModal = ({ publishData, onClose }: ProgressModalProps) => {
const [selectedProblemIndex, setSelectedProblemIndex] = useState(0);
+ const [selectedChildProblemIndex, setSelectedChildProblemIndex] = useState(0);
+ const [selectedChildPointingIndex, setSelectedChildPointingIndex] = useState(0);
+ const [selectedMainPointingIndex, setSelectedMainPointingIndex] = useState(0);
const selectedProblem = publishData.data[selectedProblemIndex];
const getProgressText = (progress: 'DONE' | 'DOING' | 'NONE') => {
@@ -19,37 +22,37 @@ const ProgressModal = ({ publishData, onClose }: ProgressModalProps) => {
case 'DOING':
return '미완';
case 'NONE':
- return '시작전';
+ return '시작 전';
default:
- return '시작전';
+ return '시작 전';
}
};
const getProgressBadgeStyle = (progress: 'DONE' | 'DOING' | 'NONE') => {
switch (progress) {
case 'DONE':
- return 'bg-green-100 text-green-800';
+ return 'text-green';
case 'DOING':
- return 'bg-yellow-100 text-yellow-800';
+ return 'text-yellow';
case 'NONE':
- return 'bg-gray-100 text-gray-600';
+ return 'text-gray-600';
default:
- return 'bg-gray-100 text-gray-600';
+ return 'text-gray-600';
}
};
const getStatusText = (status: 'NONE' | 'CORRECT' | 'INCORRECT' | 'SEMI_CORRECT' | undefined) => {
switch (status) {
case 'CORRECT':
- return '정답';
+ return 'O';
case 'INCORRECT':
- return '오답';
+ return 'X';
case 'SEMI_CORRECT':
- return '세모';
+ return '△';
case 'NONE':
- return '시작전';
+ return '-';
default:
- return '시작전';
+ return '-';
}
};
@@ -58,15 +61,15 @@ const ProgressModal = ({ publishData, onClose }: ProgressModalProps) => {
) => {
switch (status) {
case 'CORRECT':
- return 'bg-green-100 text-green-800';
+ return 'text-green';
case 'INCORRECT':
- return 'bg-red-100 text-red-800';
+ return 'text-red';
case 'SEMI_CORRECT':
- return 'bg-yellow-100 text-yellow-800';
+ return 'text-yellow';
case 'NONE':
- return 'bg-gray-100 text-gray-600';
+ return 'text-gray-600';
default:
- return 'bg-gray-100 text-gray-600';
+ return 'text-gray-600';
}
};
@@ -74,26 +77,27 @@ const ProgressModal = ({ publishData, onClose }: ProgressModalProps) => {
{publishData.publishAt} 진행도
-
-
숙제 완료도
+
+
숙제 완료도
{publishData.data.map((problemGroup, index) => (
setSelectedProblemIndex(index)}>
-
{problemGroup.no}
-
+
+ {problemGroup.no}
+
+
{problemGroup.problem.title}
-
{getProgressText(problemGroup.progress)}
@@ -104,151 +108,172 @@ const ProgressModal = ({ publishData, onClose }: ProgressModalProps) => {
-
-
{selectedProblem?.problem.title}
-
-
+
+
{selectedProblem?.problem.title}
+
+
-
메인 문제
+
+
새끼 문제
+
+ {selectedProblem?.childProblems.map((childProblem, index) => (
+
+ ))}
+
+
- {getStatusText(selectedProblem?.problem.progress)}
+ {getStatusText(
+ selectedProblem?.childProblems[selectedChildProblemIndex]?.progress
+ )}
-
-

block.type === 'IMAGE'
- )?.data ?? '/images/image-placeholder.svg'
- }
- alt='문제 이미지'
- className='w-full object-cover'
- />
+ {selectedProblem?.childProblems && selectedProblem?.childProblems.length > 0 ? (
+
+ {selectedProblem?.childProblems[
+ selectedChildProblemIndex
+ ]?.problemContent.blocks.map((block) => {
+ if (block.type === 'TEXT') {
+ return block.data;
+ }
+ return null;
+ })}
+
+ ) : (
+
새끼 문제가 없어요
+ )}
+
+
+
+
+
+
새끼 문제 포인팅
+
+ {selectedProblem?.childProblems[selectedChildProblemIndex]?.pointings.map(
+ (pointing, index) => (
+
+ )
+ )}
+
+
+ {selectedProblem?.childProblems && selectedProblem?.childProblems.length > 0 ? (
+
+
+ {selectedProblem?.childProblems[selectedChildProblemIndex]?.pointings[
+ selectedChildPointingIndex
+ ]?.questionContent.blocks.map((block) => {
+ if (block.type === 'TEXT') {
+ return block.data;
+ }
+ return null;
+ })}
+
+
+ {selectedProblem?.childProblems[selectedChildProblemIndex]?.pointings[
+ selectedChildPointingIndex
+ ]?.isUnderstood
+ ? 'O'
+ : 'X'}
+
+
+ ) : (
+
새끼 문제가 없어요
+ )}
-
+
+
+
+
-
새끼 문제
+
메인 문제
- {getStatusText(selectedProblem?.childProblems[0]?.progress)}
+ {getStatusText(selectedProblem?.problem.progress)}
-
-

block.type === 'IMAGE'
- )?.data ?? '/images/image-placeholder.svg'
+
+ {selectedProblem?.problem.problemContent.blocks.map((block) => {
+ if (block.type === 'TEXT') {
+ return block.data;
}
- alt='문제 이미지'
- className='w-full object-cover'
- />
-
+ return null;
+ })}
+
-
-
-
새끼 문제 포인팅
-
-
- {selectedProblem?.childProblems && selectedProblem.childProblems.length > 0 ? (
-
- {selectedProblem.childProblems.map((childProblem, index) => (
-
-
-
- 새끼 문제 {childProblem.no}
-
-
-
- {getStatusText(childProblem.progress)}
-
-
-
-
- {childProblem.pointings && childProblem.pointings.length > 0 && (
-
- {childProblem.pointings.map((pointing) => (
-
-
-
- {pointing.isUnderstood ? 'O' : 'X'}
-
-
-
- Question
-
- {pointing.questionContent.blocks.map((block) => {
- if (block.type === 'TEXT') {
- return block.data;
- }
- return null;
- })}
-
- Comments
-
- {pointing.commentContent.blocks.map((block) => {
- if (block.type === 'TEXT') {
- return block.data;
- }
- return null;
- })}
-
-
- ))}
-
- )}
-
- ))}
-
- ) : (
-
-
새끼 문제가 없어요.
+
+
+
+
메인 문제 포인팅
+
+ {selectedProblem?.problem.pointings.map((pointing, index) => (
+
+ ))}
+
- )}
-
- {selectedProblem?.problem.pointings && selectedProblem.problem.pointings.length > 0 && (
-
-
-
메인 문제 포인팅
+
+
+
+ {selectedProblem?.problem.pointings[
+ selectedMainPointingIndex
+ ]?.questionContent.blocks.map((block) => {
+ if (block.type === 'TEXT') {
+ return block.data;
+ }
+ return null;
+ })}
+
+
+ {selectedProblem?.problem.pointings[selectedMainPointingIndex]?.isUnderstood
+ ? 'O'
+ : 'X'}
- {selectedProblem.problem.pointings.map((pointing, index) => (
-
-
-
- {pointing.isUnderstood ? 'O' : 'X'}
-
-
-
- Question
- {pointing.questionContent.blocks.map((block) => {
- if (block.type === 'TEXT') {
- return block.data;
- }
- return null;
- })}
-
- Comments
- {pointing.commentContent.blocks.map((block) => {
- if (block.type === 'TEXT') {
- return block.data;
- }
- return null;
- })}
-
-
- ))}
- )}
+
diff --git a/apps/admin/src/types/api/schema.d.ts b/apps/admin/src/types/api/schema.d.ts
index 04a2b1d7..b5683767 100644
--- a/apps/admin/src/types/api/schema.d.ts
+++ b/apps/admin/src/types/api/schema.d.ts
@@ -1447,12 +1447,13 @@ export interface components {
};
ContentBlockUpdateRequest: {
/** Format: int64 */
- id: number;
+ id?: number;
/** Format: int32 */
rank: number;
/** @enum {string} */
type?: 'TEXT' | 'IMAGE';
data?: string;
+ style?: string;
};
ContentUpdateRequest: {
/** Format: int64 */
@@ -2006,7 +2007,7 @@ export interface components {
total: number;
data: components['schemas']['StudentResp'][];
};
- PageRespNotListQnAGroupByWeekResp: {
+ '5j4k1Ye12dXiFMLSJpD7gFrLbv4QcUrRoKHsgo32kRFr': {
/** Format: int32 */
page: number;
/** Format: int32 */
@@ -3035,7 +3036,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- '*/*': components['schemas']['PageRespNotListQnAGroupByWeekResp'];
+ '*/*': components['schemas']['5j4k1Ye12dXiFMLSJpD7gFrLbv4QcUrRoKHsgo32kRFr'];
};
};
};
@@ -3942,7 +3943,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- '*/*': components['schemas']['PageRespNotListQnAGroupByWeekResp'];
+ '*/*': components['schemas']['5j4k1Ye12dXiFMLSJpD7gFrLbv4QcUrRoKHsgo32kRFr'];
};
};
};