-
Notifications
You must be signed in to change notification settings - Fork 0
합/ 불합 페이지 구현 (issue #144) #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a61714e
feat: 합/불합격자 리스트 get api
hyeongjun6364 9d4a88a
refactor: project 헤더 컴포넌트로 분리
hyeongjun6364 e219600
feat: 합/불합 리스트 탭 구현
hyeongjun6364 ecdd4a8
refactor: usePAssNonPassMutaion으로 이름 변경
hyeongjun6364 611f729
feat: 합/ 불합 리스트 관련 훅 구현
hyeongjun6364 5dcf300
feat: passNonPass 키 값 추가
hyeongjun6364 3576c90
feat: 합/불합 mock api 구현
hyeongjun6364 54f6d26
feat: 합/불합 페이지 mock api연결 및 UI 구현
hyeongjun6364 e62bf99
refactor: 프로젝트 헤더 분리
hyeongjun6364 bed9b63
Merge branch 'develop' into feat/#144
hyeongjun6364 4f5703c
feat: passNonPass 타입 추가
hyeongjun6364 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,15 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const TitleWrapper = styled.div` | ||
| display: flex; | ||
| justify-content: start; | ||
| align-items: center; | ||
| width: 100%; | ||
| `; | ||
|
|
||
| export const RecruitmentEnd = styled.h3` | ||
| margin-left: 1.2rem; | ||
| font-size: 1rem; | ||
| font-weight: 400; | ||
| color: ${({ theme }) => theme.color.red}; | ||
| `; |
This file contains hidden or 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,21 @@ | ||
| import * as S from './ProjectHeader.styled'; | ||
| import Title from '../common/title/Title'; | ||
| import { ProjectDetailExtended } from '../../models/projectDetail'; | ||
| import RecruitmentDate from './RecruitmentDate'; | ||
| interface ProjectHeaderProps { | ||
| projectData: ProjectDetailExtended; | ||
| } | ||
|
|
||
| function ProjectHeader({ projectData }: ProjectHeaderProps) { | ||
| return ( | ||
| <> | ||
| <S.TitleWrapper> | ||
| {projectData && <Title size='semiLarge'>{projectData.title} </Title>} | ||
| {projectData?.isDone && <S.RecruitmentEnd>공고 마감</S.RecruitmentEnd>} | ||
| </S.TitleWrapper> | ||
| {projectData && <RecruitmentDate ProjectData={projectData} />} | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default ProjectHeader; |
28 changes: 28 additions & 0 deletions
28
src/components/manageProjects/passNonPassList/PassNonPassItem.styled.ts
This file contains hidden or 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,28 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const ItemWrapper = styled.li` | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| width: 100%; | ||
| padding: 1rem; | ||
| border: 1px solid ${({ theme }) => theme.color.grey}; | ||
| border-radius: ${({ theme }) => theme.borderRadius.primary}; | ||
| &:hover { | ||
| background-color: ${({ theme }) => theme.color.navy}; | ||
| color: ${({ theme }) => theme.color.white}; | ||
| } | ||
|
|
||
| svg { | ||
| color: #e69191; | ||
| width: 1.2rem; | ||
| height: 1.2rem; | ||
| } | ||
| `; | ||
|
|
||
| export const NickName = styled.p` | ||
| font-size: ${({ theme }) => theme.heading.small.fontSize}; | ||
| font-weight: 400; | ||
| `; | ||
|
|
||
| export const DeleteButton = styled.button``; |
20 changes: 20 additions & 0 deletions
20
src/components/manageProjects/passNonPassList/PassNonPassItem.tsx
This file contains hidden or 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,20 @@ | ||
| import { ApplicantInfo } from '../../../models/applicant'; | ||
| import * as S from './PassNonPassItem.styled'; | ||
| import { XCircleIcon } from '@heroicons/react/24/outline'; | ||
|
|
||
| interface PassNonPassItemProps { | ||
| userInfo: ApplicantInfo; | ||
| } | ||
|
|
||
| function PassNonPassItem({ userInfo }: PassNonPassItemProps) { | ||
| return ( | ||
| <S.ItemWrapper> | ||
| <S.NickName>{userInfo.User.nickname}</S.NickName> | ||
| <S.DeleteButton> | ||
| <XCircleIcon /> | ||
| </S.DeleteButton> | ||
| </S.ItemWrapper> | ||
| ); | ||
| } | ||
|
|
||
| export default PassNonPassItem; |
20 changes: 20 additions & 0 deletions
20
src/components/manageProjects/passNonPassList/PassNonPassList.styled.ts
This file contains hidden or 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,20 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const Wrapper = styled.ul` | ||
| width: 100%; | ||
| height: 27rem; | ||
| min-width: 22rem; | ||
| border-radius: ${({ theme }) => theme.borderRadius.primary}; | ||
| border: 1px solid ${({ theme }) => theme.color.border}; | ||
| padding: 1.6rem 2rem; | ||
| gap: 1rem; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: start; | ||
| align-items: center; | ||
| overflow: hidden; | ||
| overflow-y: auto; | ||
| &::-webkit-scrollbar { | ||
| display: none; | ||
| } | ||
| `; |
19 changes: 19 additions & 0 deletions
19
src/components/manageProjects/passNonPassList/PassNonPassList.tsx
This file contains hidden or 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,19 @@ | ||
| import { ApplicantInfo } from '../../../models/applicant'; | ||
| import PassNonPassItem from './PassNonPassItem'; | ||
| import * as S from './PassNonPassList.styled'; | ||
|
|
||
| interface PassNonPassListProps { | ||
| passNonPassListData: ApplicantInfo[]; | ||
| } | ||
|
|
||
| function PassNonPassList({ passNonPassListData }: PassNonPassListProps) { | ||
| return ( | ||
| <S.Wrapper> | ||
| {passNonPassListData.map((data) => ( | ||
| <PassNonPassItem key={data.userId} userInfo={data} /> | ||
| ))} | ||
| </S.Wrapper> | ||
| ); | ||
| } | ||
|
|
||
| export default PassNonPassList; |
This file contains hidden or 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 hidden or 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,13 @@ | ||
| import { useQuery } from '@tanstack/react-query'; | ||
| import { applicantKey } from './queries/keys'; | ||
| import { getPassNonPassList } from '../api/applicant.api'; | ||
|
|
||
| export const usePassNonPassList = (projectId: number) => { | ||
| const { data } = useQuery({ | ||
| queryKey: applicantKey.passNonPass, | ||
| queryFn: () => getPassNonPassList(projectId), | ||
| staleTime: 1 * 60 * 1000, | ||
| }); | ||
|
|
||
| return { passNonPassListData: data }; | ||
| }; |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이런 env도 하나의 상수처럼 관리하면 조금 더 편할지 모르겠네요 👀