From 5cfb283ac53b78b9b26c2ac639175e9ed196167b Mon Sep 17 00:00:00 2001 From: hyuna Date: Tue, 12 Nov 2024 16:53:28 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix=20::=20=EC=A7=80=EC=9B=90=EC=9E=90=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Pages/PopUp/ApplicationPopup/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Pages/PopUp/ApplicationPopup/index.tsx b/src/Pages/PopUp/ApplicationPopup/index.tsx index dcd0203..ef098d5 100644 --- a/src/Pages/PopUp/ApplicationPopup/index.tsx +++ b/src/Pages/PopUp/ApplicationPopup/index.tsx @@ -15,7 +15,7 @@ export function ApplicationPopup() { student_name: '', recruitment_id: id ? id : '', year: date.getFullYear().toString(), - winter_intern: false, + winter_intern: true, }); const { From 0ebe8a24786ccc411e9d6f88d5aec6802dc4869a Mon Sep 17 00:00:00 2001 From: hyuna Date: Tue, 12 Nov 2024 23:08:20 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore=20::=20=EB=AA=A8=EC=A7=91=EC=9D=98?= =?UTF-8?q?=EB=A2=B0=EC=84=9C=20=EA=B0=9C=EC=88=98=20query=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Apis/Recruitments/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Apis/Recruitments/index.ts b/src/Apis/Recruitments/index.ts index 5cacdbd..20e8604 100644 --- a/src/Apis/Recruitments/index.ts +++ b/src/Apis/Recruitments/index.ts @@ -82,13 +82,22 @@ export const useGetRecruitmentForm = ( { queryKey: ['getRecruitmentCount', searchRecruitmentFormQueryString], queryFn: async () => { - const { winter_intern } = searchRecruitmentFormQueryString; + const { + year, + company_name, + start, + end, + status, + winter_intern, + } = searchRecruitmentFormQueryString; const winterIntern = winter_intern !== null ? `&winter_intern=${winter_intern}` : ''; const { data } = await instance.get<{ count: number }>( - `${router}/count?${winterIntern}` + `${router}/count?year=${year}${winterIntern}&company_name=${company_name}&start=${start}&end=${end}&status=${ + status === '전체' || status === undefined ? '' : status + }` ); return data; }, From 00b1d288512b0765c10556fa3a00cacedae5d128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=9D=98=EC=A7=84?= Date: Thu, 14 Nov 2024 16:52:46 +0900 Subject: [PATCH 3/3] =?UTF-8?q?chore=20::=20=EA=B3=B5=EC=A7=80=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=ED=8C=8C=EC=9D=BC=20nullabled=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Apis/Notices/index.ts | 1 + src/Apis/Notices/request.ts | 2 +- src/Apis/Notices/response.ts | 2 +- src/Pages/NoticePage/NoticeWritePage/index.tsx | 10 ++++++++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Apis/Notices/index.ts b/src/Apis/Notices/index.ts index b532cec..e49031c 100644 --- a/src/Apis/Notices/index.ts +++ b/src/Apis/Notices/index.ts @@ -120,6 +120,7 @@ export const useNoticeListData = () => { useEffect(() => { fetchNoticeList(); + }, [fetchNoticeList]); return { notices }; diff --git a/src/Apis/Notices/request.ts b/src/Apis/Notices/request.ts index 07ef2fe..e51eb26 100644 --- a/src/Apis/Notices/request.ts +++ b/src/Apis/Notices/request.ts @@ -3,7 +3,7 @@ import { AttachmentType } from "./response"; export interface NoticeWrite { title: string; content: string; - attachments: AttachmentRequest[]; + attachments?: AttachmentRequest[]; } export interface NoticeEdit { diff --git a/src/Apis/Notices/response.ts b/src/Apis/Notices/response.ts index c6fcb03..56d2e55 100644 --- a/src/Apis/Notices/response.ts +++ b/src/Apis/Notices/response.ts @@ -8,7 +8,7 @@ export interface NoticeDetailResponse { title: string; content: string; created_at: string; - attachments: AttachmentResponse[]; + attachments?: AttachmentResponse[]; } export type AttachmentType = diff --git a/src/Pages/NoticePage/NoticeWritePage/index.tsx b/src/Pages/NoticePage/NoticeWritePage/index.tsx index e20e78a..158a95d 100644 --- a/src/Pages/NoticePage/NoticeWritePage/index.tsx +++ b/src/Pages/NoticePage/NoticeWritePage/index.tsx @@ -18,7 +18,6 @@ export function NoticeWritePage() { const navigate = useNavigate(); const { mutate: writeNotice } = useNoticeWriteData(); - const { mutate: getPresignedUrl, data } = usePresignedUrl(); useEffect(() => { @@ -91,6 +90,13 @@ export function NoticeWritePage() { const handleNoticeSubmit = () => { if (attachments.length > 0) { getPresignedUrl(attachments); + } else { + writeNotice({ + title, + content, + attachments: [{url: '', type: 'FILE'}], + }); + navigate('/Notice') } }; @@ -136,7 +142,7 @@ export function NoticeWritePage() { <_.FileWrap> <_.Text>첨부파일 <_.AddFileWrapper> - {attachments.map( + {attachments?.map( (file: File, index: number) => ( <_.AddFile key={index}> {file.name}