-
Notifications
You must be signed in to change notification settings - Fork 5
Feat: 알바폼 지원자일 경우 상세페이지 API 불러오기 구현 완료 , UI 미완성 #115
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
24 commits
Select commit
Hold shift + click to select a range
99b3da0
bugfix: webpack 에러 수정
yyezzzy e86a271
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/oauth
yyezzzy 09b4055
chore: 로그인시 회원이 아니면 회원가입으로 리다이렉트
yyezzzy b2c22a6
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/oauth
yyezzzy 7e873a4
chore: home에서 로그인이 됐을 경우 알바 둘러보기
yyezzzy 7dd2bc2
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/alb…
yyezzzy 397b08a
feat: 알바폼 상세 페이지 생성
yyezzzy df1e372
chore: 자잘한 수정
yyezzzy d514532
feat: 알바폼 지원내역 상세보기 albaFormSupportDetail, 알바폼 상세 지원자 페이지 albaFormDet…
yyezzzy da817a3
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/alb…
yyezzzy 850324a
chore: 원님이 수정한 Date로 바꿈
yyezzzy ac7f283
feat: useFormDetail 추가
yyezzzy 672b26f
bug: useSearchParams을 사용하여 formId을 가져오는데 게속 null이 나옴
yyezzzy 6f54d62
feat: 알바폼 상세페이지 API 불러오기 구현 완료, UI 미완성
yyezzzy b1cf11c
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/alb…
yyezzzy 47190af
chore: 스토리북 캐시 제거
yyezzzy c556866
chore: 스토리북 캐시 삭제
yyezzzy 9823d0c
chore: package-lock 삭제 후 npm i
yyezzzy 9049991
fix: yml 파일 내 버전 수정
hongggyelim 3323ce5
Merge branch 'dev' of https://github.com/FE9-2/workroot into feat/alb…
yyezzzy 05640a6
bugfix: 스토리북 빌드 에러 수정
yyezzzy 2552239
Merge branch 'feat/albaFormDetail-applicant' of https://github.com/FE…
yyezzzy 162dca5
chore: package-lock-json
yyezzzy 07c905a
bugfix: CSS 지원이 비활성화 경고 수정 Webpack 커스터마이징 제거
yyezzzy 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
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
74 changes: 74 additions & 0 deletions
74
src/app/(pages)/albaFormDetail/applicant/[formId]/page.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,74 @@ | ||
| "use client"; | ||
|
|
||
| import { useParams } from "next/navigation"; | ||
| import { useUserFormDetail } from "@/hooks/queries/form/userFormDetail"; | ||
| import React, { useEffect, useState } from "react"; | ||
| import CardChipIcon from "@/app/components/card/cardList/CardChipIcon"; | ||
| import Chip from "@/app/components/chip/Chip"; | ||
|
|
||
| export default function AlbaFormDetailPage() { | ||
| const { formId } = useParams(); // useParams로 formId 추출 | ||
| const [formIdState, setFormIdState] = useState<number>(0); | ||
|
|
||
| useEffect(() => { | ||
| // formId가 문자열로 전달되므로 숫자로 변환하여 상태에 저장 | ||
| if (formId) { | ||
| setFormIdState(Number(formId)); // formId를 숫자로 변환하여 상태에 저장 | ||
| } | ||
| }, [formId]); | ||
|
|
||
| // formId가 설정되면 useUserFormDetail 호출 | ||
| const { data, isLoading, error } = useUserFormDetail({ formId: formIdState }); | ||
|
|
||
| if (isLoading) { | ||
| return <div>Loading...</div>; | ||
| } | ||
|
|
||
| if (error) { | ||
| return <div>Error: 데이터를 불러오는데 문제가 발생했습니다.</div>; | ||
| } | ||
|
|
||
| if (!data) { | ||
| return <div>데이터가 없습니다.</div>; | ||
| } | ||
|
|
||
| // 모집 상태 계산 | ||
| const recruitmentStatus = new Date(data.recruitmentEndDate) > new Date() ? "모집중" : "모집완료"; | ||
|
|
||
| return ( | ||
| <div className="container flex min-h-screen flex-col"> | ||
| <div className="h-[562px] bg-black-100">사진영역</div> | ||
| <div> | ||
| <div className="mt-20 w-[770px] space-y-10"> | ||
| <div className="flex items-center"> | ||
| <Chip label={data.isPublic ? "공개" : "비공개"} variant={data.isPublic ? "positive" : "negative"} /> | ||
| <Chip label={recruitmentStatus} variant="positive" /> | ||
| <p className="text-sm text-grayscale-500">{new Date(data.createdAt).toLocaleString()} 등록</p> | ||
| </div> | ||
| <div className="mb-4 flex gap-4"> | ||
| <span className="text-base text-black-400 underline">{data.storeName || "가게명"}</span> | ||
| <span className="text-grayscale-500"> | ||
| {data.location || "위치"} ・ {"경력 정보 없음"} | ||
| </span> | ||
| </div> | ||
| <p className="text-3xl font-bold">{data.title}</p> | ||
| <CardChipIcon | ||
| formData={{ | ||
| updatedAt: new Date(data.updatedAt), | ||
| createdAt: new Date(data.createdAt), | ||
| isPublic: data.isPublic, | ||
| scrapCount: data.scrapCount, | ||
| applyCount: data.applyCount, | ||
| imageUrls: data.imageUrls, | ||
| recruitmentEndDate: new Date(data.recruitmentEndDate), | ||
| recruitmentStartDate: new Date(data.recruitmentStartDate), | ||
| title: data.title, | ||
| id: data.id, | ||
| }} | ||
| /> | ||
| <div className="text-2xl">{data.description}</div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
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,17 @@ | ||
| import React, { Suspense } from "react"; | ||
|
|
||
| export default function AlbaFormDetailLayout({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <div className="mx-auto max-w-screen-2xl px-4 py-8"> | ||
| <Suspense | ||
| fallback={ | ||
| <div className="flex h-[calc(100vh-200px)] items-center justify-center"> | ||
| <div>로딩 중...</div> | ||
| </div> | ||
| } | ||
| > | ||
| {children} | ||
| </Suspense> | ||
| </div> | ||
| ); | ||
| } |
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,49 @@ | ||
| "use client"; | ||
| import CardChipIcon from "@/app/components/card/cardList/CardChipIcon"; | ||
| import Chip from "@/app/components/chip/Chip"; | ||
| import ChipWithIcon from "@/app/components/chip/ChipWithIcon"; | ||
| import React from "react"; | ||
|
|
||
| // 알바폼 상세 사장님 페이지 | ||
| export default function AlbaFormDetailPage({ formId }: { formId: number }) { | ||
| return ( | ||
| <div className="container flex min-h-screen flex-col"> | ||
| <div className="h-[562px] bg-black-100">사진영역</div> | ||
| <div> | ||
| <div className="mt-20 w-[770px] space-y-10"> | ||
| <div className="flex items-center"> | ||
| <Chip label="공개여부" variant="positive" /> | ||
| <Chip label="모집중" variant="positive" /> | ||
| <p className="text-sm text-grayscale-500">2024. 05. 04 12:30:54 등록</p> | ||
| </div> | ||
| <div className="mb-4 flex gap-4"> | ||
| <span className="text-base text-black-400 underline">코드잇</span> | ||
| <span className="text-grayscale-500">서울 종로구 ・ 경력 무관</span> | ||
| </div> | ||
| <p className="text-3xl font-bold">코드잇 스터디카페 관리 (주말 오전) 모집합니다 서울 종로구 용산구 서대문 </p> | ||
| <CardChipIcon | ||
| formData={{ | ||
| updatedAt: new Date(), | ||
| createdAt: new Date(), | ||
| isPublic: true, | ||
| scrapCount: 0, | ||
| applyCount: 0, | ||
| imageUrls: [], | ||
| recruitmentEndDate: new Date(), | ||
| recruitmentStartDate: new Date(), | ||
| title: "제목", | ||
| id: 1, | ||
| }} | ||
| /> | ||
| <div className="text-2xl"> | ||
| 코드잇 스터디 카페입니다. 주말 토, 일 오픈업무 하실 분 구합니다. 성실하게 일하실 분들만 지원 바랍니다. | ||
| 작성한 이력서(사진 부착)를 알바폼에 첨부해주시고, 아래와 같이 문자 보내주세요. 근무 중 전화통화 불가합니다. | ||
| 예) OOO입니다. __에 거주합니다. 알바폼 지원. 이력서 검토 후 면접진행자에 한해 면접일정 개별 | ||
| 연락드리겠습니다. 많은 지원 바랍니다. | ||
| </div> | ||
| </div> | ||
| <div>{/* 오른쪽 콘텐츠 */}</div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
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,17 @@ | ||
| import React, { Suspense } from "react"; | ||
|
|
||
| export default function AlbaFormDetailLayout({ children }: { children: React.ReactNode }) { | ||
| return ( | ||
| <div className="mx-auto max-w-screen-2xl px-4 py-8"> | ||
| <Suspense | ||
| fallback={ | ||
| <div className="flex h-[calc(100vh-200px)] items-center justify-center"> | ||
| <div>로딩 중...</div> | ||
| </div> | ||
| } | ||
| > | ||
| {children} | ||
| </Suspense> | ||
| </div> | ||
| ); | ||
| } |
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,44 @@ | ||
| import CardChipIcon from "@/app/components/card/cardList/CardChipIcon"; | ||
| import Chip from "@/app/components/chip/Chip"; | ||
| import React from "react"; | ||
|
|
||
| // 알바폼 지원내역 상세 페이지 | ||
| export default function AlbaFormSupportDetailPage({ formId }: { formId: number }) { | ||
| return ( | ||
| <div className="container flex min-h-screen flex-col"> | ||
| <div className="h-[562px] bg-black-100">지도영역</div> | ||
| <div className="mt-20 w-[770px] space-y-10"> | ||
| <div className="flex items-center"> | ||
| <Chip label="공개여부" variant="positive" /> | ||
| <Chip label="모집중" variant="positive" /> | ||
| <p className="text-sm text-grayscale-500">2024. 05. 04 12:30:54 등록</p> | ||
| </div> | ||
| <div className="mb-4 flex gap-4"> | ||
| <span className="text-base text-black-400 underline">코드잇</span> | ||
| <span className="text-grayscale-500">서울 종로구 ・ 경력 무관</span> | ||
| </div> | ||
| <p className="text-3xl font-bold">코드잇 스터디카페 관리 (주말 오전) 모집합니다 서울 종로구 용산구 서대문 </p> | ||
| <CardChipIcon | ||
| formData={{ | ||
| updatedAt: new Date(), | ||
| createdAt: new Date(), | ||
| isPublic: true, | ||
| scrapCount: 0, | ||
| applyCount: 0, | ||
| imageUrls: [], | ||
| recruitmentEndDate: new Date(), | ||
| recruitmentStartDate: new Date(), | ||
| title: "제목", | ||
| id: 1, | ||
| }} | ||
| /> | ||
| <div className="text-2xl"> | ||
| 코드잇 스터디 카페입니다. 주말 토, 일 오픈업무 하실 분 구합니다. 성실하게 일하실 분들만 지원 바랍니다. 작성한 | ||
| 이력서(사진 부착)를 알바폼에 첨부해주시고, 아래와 같이 문자 보내주세요. 근무 중 전화통화 불가합니다. 예) | ||
| OOO입니다. __에 거주합니다. 알바폼 지원. 이력서 검토 후 면접진행자에 한해 면접일정 개별 연락드리겠습니다. 많은 | ||
| 지원 바랍니다. | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } |
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.
이 부분 에러나서 삭제했어요