-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 칸반 보드 페이지에서 지원자의 지원 상태를 카드에 보여준다. (#197)
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
frontend/components/kanban/card/CardApplicantStatusLabel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { ApplicantPassState, KanbanCardReq } from "@/src/apis/kanban"; | ||
import { cn } from "@/src/utils/cn"; | ||
|
||
interface labelConfigType { | ||
backgroundColor: string; | ||
label: string; | ||
} | ||
|
||
export const labelConfig: Record<ApplicantPassState, labelConfigType> = { | ||
"non-processed": { | ||
backgroundColor: "bg-gray-300", | ||
label: "처리중", | ||
}, | ||
"first-passed": { | ||
backgroundColor: "bg-lime-300", | ||
label: "1차 합격", | ||
}, | ||
"final-passed": { | ||
backgroundColor: "bg-blue-300", | ||
label: "최종 합격", | ||
}, | ||
"non-passed": { | ||
backgroundColor: "bg-red-300", | ||
label: "탈락", | ||
}, | ||
}; | ||
|
||
const KanbanCardApplicantStatusLabel = ({ | ||
passState, | ||
}: KanbanCardReq["state"]) => { | ||
const { backgroundColor, label } = labelConfig[passState]; | ||
return ( | ||
<div className={cn("text-xs px-2.5 py-1 rounded-lg", backgroundColor)}> | ||
{label} | ||
</div> | ||
); | ||
}; | ||
|
||
export default KanbanCardApplicantStatusLabel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters