-
Notifications
You must be signed in to change notification settings - Fork 0
지원자 합/불합 페이지 - 대기상태, 결과 전송 구현(issue #152) #157
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
16 commits
Select commit
Hold shift + click to select a range
ecbe4b9
Merge remote-tracking branch 'origin' into feat/#150
hyeongjun6364 c6021a7
Merge branch 'develop' into feat/#152
hyeongjun6364 d94ba5d
feat: 이메일로 결과 전송 api 추가
hyeongjun6364 ac8932f
feat: flexbox 추가
hyeongjun6364 222bae1
refactor: 타입 안정성 강화
hyeongjun6364 cd1545e
feat: relative추가
hyeongjun6364 e9f17d3
feat: 삭제 버튼 구현
hyeongjun6364 dc0e958
refactor: 삭제버튼 추출
hyeongjun6364 7ea2573
refactor: props isPass -> status로 변경 및 쿼리무효화 추가
hyeongjun6364 2e7fc0f
feat: 지원자에게 결과 전송 버튼 구현
hyeongjun6364 fe03ece
feat: modal 메세지 추가
hyeongjun6364 45c5e89
feat: 지원자에게 결과 전송 관련 훅 구현
hyeongjun6364 f60770c
feat: 결과 전송 mock api구현
hyeongjun6364 bae2424
feat: 결과전송, 지원자 대기상태 구현
hyeongjun6364 581563b
fix: Merge branch 'develop' into feat/#152
hyeongjun6364 8b05db7
fix: Merge branch 'develop' into feat/#152
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
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
9 changes: 9 additions & 0 deletions
9
src/components/manageProjects/passNonPassList/DeleteButton.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,9 @@ | ||
| import styled from 'styled-components'; | ||
|
|
||
| export const DeleteButton = styled.button` | ||
| svg { | ||
| color: #e69191; | ||
| width: 1.2rem; | ||
| height: 1.2rem; | ||
| } | ||
| `; |
16 changes: 16 additions & 0 deletions
16
src/components/manageProjects/passNonPassList/DeleteButton.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,16 @@ | ||
| import { ButtonHTMLAttributes } from 'react'; | ||
| import * as S from './DeleteButton.styled'; | ||
| import { XCircleIcon } from '@heroicons/react/24/outline'; | ||
| interface DeleteButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
| onClick: () => void; | ||
| } | ||
|
|
||
| function DeleteButton({ onClick }: DeleteButtonProps) { | ||
| return ( | ||
| <S.DeleteButton onClick={onClick}> | ||
| <XCircleIcon /> | ||
| </S.DeleteButton> | ||
| ); | ||
| } | ||
|
|
||
| export default DeleteButton; |
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
12 changes: 7 additions & 5 deletions
12
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
9 changes: 7 additions & 2 deletions
9
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
24 changes: 24 additions & 0 deletions
24
src/components/manageProjects/passNonPassList/SendResultButton.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,24 @@ | ||
| import styled from 'styled-components'; | ||
| import Button from '../../common/Button/Button'; | ||
|
|
||
| export const Wrapper = styled.div` | ||
| width: 100%; | ||
| display: flex; | ||
| justify-content: end; | ||
| align-items: center; | ||
| position: absolute; | ||
| top: 7rem; | ||
| right: 2.5rem; | ||
| `; | ||
|
|
||
| export const SendEmailButton = styled(Button)` | ||
| width: 9rem; | ||
|
|
||
| svg { | ||
| width: 1.5rem; | ||
| margin-left: 0.5rem; | ||
| } | ||
| &:hover { | ||
| opacity: 0.8; | ||
| } | ||
| `; |
24 changes: 24 additions & 0 deletions
24
src/components/manageProjects/passNonPassList/SendResultButton.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,24 @@ | ||
| import { ButtonHTMLAttributes } from 'react'; | ||
| import * as S from './SendResultButton.styled'; | ||
| import { EnvelopeIcon } from '@heroicons/react/24/outline'; | ||
| export interface SendResultButtonProps | ||
| extends ButtonHTMLAttributes<HTMLButtonElement> { | ||
| onSubmit: () => void; | ||
| } | ||
|
|
||
| function SendResultButton({ onSubmit }: SendResultButtonProps) { | ||
| return ( | ||
| <S.Wrapper> | ||
| <S.SendEmailButton | ||
| size='primary' | ||
| schema='primary' | ||
| radius='primary' | ||
| onClick={onSubmit} | ||
| > | ||
| 결과 전송 <EnvelopeIcon /> | ||
| </S.SendEmailButton> | ||
| </S.Wrapper> | ||
| ); | ||
| } | ||
|
|
||
| export default SendResultButton; |
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,30 @@ | ||
| import { useMutation } from '@tanstack/react-query'; | ||
| import { AxiosError } from 'axios'; | ||
| import { patchSendResult } from '../api/myProjectList.api'; | ||
| import { MODAL_MESSAGE } from '../constants/modalMessage'; | ||
|
|
||
| export const useSendResultMutation = ( | ||
| projectId: number, | ||
| openModal: (message: string) => void | ||
| ) => { | ||
| const sendResultMutaition = useMutation<void, AxiosError>({ | ||
| mutationFn: async () => { | ||
| await patchSendResult(projectId); | ||
| }, | ||
|
|
||
| onSuccess: () => { | ||
| openModal(MODAL_MESSAGE.sendResult); | ||
| }, | ||
|
|
||
| onError: (error) => { | ||
| console.error(error); | ||
| openModal(MODAL_MESSAGE.needAuth); | ||
| }, | ||
| }); | ||
|
|
||
| const handleSendResult = () => { | ||
| sendResultMutaition.mutate(); | ||
| }; | ||
|
|
||
| return { handleSendResult }; | ||
| }; |
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.
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.
ButtonHTMLAttributes에는 children이 없으려나요? 👀