@@ -16,6 +16,10 @@ interface Newcomer {
1616 phone : string | null
1717 gender : "man" | "woman" | "" | null
1818 status : string
19+ createdAt : string
20+ deletedAt ?: string | null
21+ pendingDate ?: string | null
22+ promotionDate ?: string | null
1923}
2024
2125interface NewcomerTableProps {
@@ -35,6 +39,21 @@ export default function NewcomerTable({
3539 onSortClick,
3640 onNewcomerSelect,
3741} : NewcomerTableProps ) {
42+ const getStatusLabel = ( status ?: string ) => {
43+ switch ( status ) {
44+ case "NORMAL" :
45+ return "활동중"
46+ case "PROMOTED" :
47+ return "등반"
48+ case "PENDING" :
49+ return "보류"
50+ case "DELETED" :
51+ return "삭제"
52+ default :
53+ return ""
54+ }
55+ }
56+
3857 return (
3958 < Stack
4059 width = "50%"
@@ -85,6 +104,27 @@ export default function NewcomerTable({
85104 전화번호
86105 </ TableSortLabel >
87106 </ TableCell >
107+ < TableCell >
108+ < TableSortLabel
109+ active = { orderProperty === "status" }
110+ direction = { direction }
111+ onClick = { ( ) => onSortClick ( "status" ) }
112+ >
113+ 상태
114+ </ TableSortLabel >
115+ </ TableCell >
116+ < TableCell >
117+ < TableSortLabel
118+ active = { orderProperty === "createdAt" }
119+ direction = { direction }
120+ onClick = { ( ) => onSortClick ( "createdAt" ) }
121+ >
122+ 등록일
123+ </ TableSortLabel >
124+ </ TableCell >
125+ < TableCell > 보류일</ TableCell >
126+ < TableCell > 등반일</ TableCell >
127+ < TableCell > 삭제일</ TableCell >
88128 </ TableRow >
89129 </ TableHead >
90130 < TableBody >
@@ -108,6 +148,27 @@ export default function NewcomerTable({
108148 : newcomer . yearOfBirth }
109149 </ TableCell >
110150 < TableCell > { newcomer . phone || "" } </ TableCell >
151+ < TableCell > { getStatusLabel ( newcomer . status ) } </ TableCell >
152+ < TableCell >
153+ { newcomer . createdAt
154+ ? new Date ( newcomer . createdAt ) . toLocaleDateString ( "ko-KR" )
155+ : "" }
156+ </ TableCell >
157+ < TableCell >
158+ { newcomer . pendingDate
159+ ? new Date ( newcomer . pendingDate ) . toLocaleDateString ( "ko-KR" )
160+ : "" }
161+ </ TableCell >
162+ < TableCell >
163+ { newcomer . promotionDate
164+ ? new Date ( newcomer . promotionDate ) . toLocaleDateString ( "ko-KR" )
165+ : "" }
166+ </ TableCell >
167+ < TableCell >
168+ { newcomer . deletedAt
169+ ? new Date ( newcomer . deletedAt ) . toLocaleDateString ( "ko-KR" )
170+ : "" }
171+ </ TableCell >
111172 </ TableRow >
112173 ) ) }
113174 </ TableBody >
0 commit comments