Skip to content

Commit 1ce28ac

Browse files
authored
Merge pull request #94 from plus-82/PD-255
[Feature] 지원자 상세 페이지 마크업
2 parents 46e86b1 + 2f60a03 commit 1ce28ac

23 files changed

Lines changed: 437 additions & 42 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ApplicantAnagementDetailPage as default } from 'pages/applicant-management'

app/globals.css

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,33 @@ button {
7575
overflow: auto;
7676
}
7777

78-
.scrollbar::-webkit-scrollbar {
78+
.scrollbar.gutter-stable {
79+
scrollbar-gutter: stable;
80+
}
81+
82+
.scrollbar.light::-webkit-scrollbar {
83+
@apply h-2 w-2 bg-transparent;
84+
}
85+
86+
.scrollbar.light::-webkit-scrollbar-thumb {
87+
background-clip: padding-box;
88+
border: 2px solid transparent;
89+
@apply rounded-full bg-gray-300;
90+
}
91+
92+
.scrollbar.dark::-webkit-scrollbar {
7993
@apply h-3 w-3 bg-white;
8094
}
8195

82-
.scrollbar::-webkit-scrollbar-thumb {
96+
.scrollbar.dark::-webkit-scrollbar-thumb {
8397
@apply rounded-full border border-solid border-transparent bg-gray-700 bg-clip-content;
8498
}
8599

86-
.scrollbar::-webkit-scrollbar:vertical {
100+
.scrollbar.dark::-webkit-scrollbar:vertical {
87101
@apply border-0 border-l border-solid border-l-gray-300;
88102
}
89103

90-
.scrollbar::-webkit-scrollbar:horizontal {
104+
.scrollbar.dark::-webkit-scrollbar:horizontal {
91105
@apply border-0 border-t border-solid border-t-gray-300;
92106
}
93107
}

src/entities/job-post-resume-relation/api/get-job-post-resume.ts

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,23 @@
11
'use server'
22

3-
import { getBusinessSession, getTeacherSession } from 'entities/auth'
4-
import { apiClient, Pagination, PaginationParams } from 'shared/api'
3+
import { getBusinessSession } from 'entities/auth'
4+
import { apiClient } from 'shared/api'
55

6-
import { JobPostRelation } from '../model/application'
7-
import { ApplicationStatus } from '../model/status'
6+
import { JobPostRelationDetail } from '../model/application'
87

9-
export type GetJobPostResumeRequest = PaginationParams<{
10-
status?: ApplicationStatus
11-
}>
12-
13-
type GetJobPostResumeResponse = Pagination<JobPostRelation>
14-
15-
export const getTeacherJobPostResumeRelations = async (
16-
queryParams: GetJobPostResumeRequest,
17-
) => {
18-
const { accessToken } = await getTeacherSession()
19-
20-
const response = await apiClient.get<GetJobPostResumeResponse>({
21-
endpoint: '/job-post-resume-relations',
22-
queryParams,
23-
option: {
24-
authorization: `Bearer ${accessToken}`,
25-
},
26-
})
27-
28-
return response
8+
export type GetJobPostResumeRequest = {
9+
jobPostResumeRelationId: number
2910
}
3011

31-
export const getBusinessJobPostResumeRelations = async (
32-
queryParams: GetJobPostResumeRequest,
33-
) => {
12+
type GetJobPostResumeResponse = JobPostRelationDetail
13+
14+
export const getBusinessJobPostResumeRelation = async ({
15+
jobPostResumeRelationId,
16+
}: GetJobPostResumeRequest) => {
3417
const { accessToken } = await getBusinessSession()
3518

3619
const response = await apiClient.get<GetJobPostResumeResponse>({
37-
endpoint: '/job-post-resume-relations',
38-
queryParams,
20+
endpoint: `/job-post-resume-relations/${jobPostResumeRelationId}`,
3921
option: {
4022
authorization: `Bearer ${accessToken}`,
4123
},
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
'use server'
2+
3+
import { getBusinessSession, getTeacherSession } from 'entities/auth'
4+
import { apiClient, Pagination, PaginationParams } from 'shared/api'
5+
6+
import { JobPostRelation } from '../model/application'
7+
import { ApplicationStatus } from '../model/status'
8+
9+
export type GetJobPostResumeRequest = PaginationParams<{
10+
status?: ApplicationStatus
11+
}>
12+
13+
type GetJobPostResumeResponse = Pagination<JobPostRelation>
14+
15+
export const getTeacherJobPostResumeRelations = async (
16+
queryParams: GetJobPostResumeRequest,
17+
) => {
18+
const { accessToken } = await getTeacherSession()
19+
20+
const response = await apiClient.get<GetJobPostResumeResponse>({
21+
endpoint: '/job-post-resume-relations',
22+
queryParams,
23+
option: {
24+
authorization: `Bearer ${accessToken}`,
25+
},
26+
})
27+
28+
return response
29+
}
30+
31+
export const getBusinessJobPostResumeRelations = async (
32+
queryParams: GetJobPostResumeRequest,
33+
) => {
34+
const { accessToken } = await getBusinessSession()
35+
36+
console.log(accessToken)
37+
38+
const response = await apiClient.get<GetJobPostResumeResponse>({
39+
endpoint: '/job-post-resume-relations',
40+
queryParams,
41+
option: {
42+
authorization: `Bearer ${accessToken}`,
43+
},
44+
})
45+
46+
return response
47+
}

src/entities/job-post-resume-relation/api/query.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
getBusinessJobPostResumeRelations,
55
getTeacherJobPostResumeRelations,
66
GetJobPostResumeRequest,
7-
} from './get-job-post-resume'
7+
} from './get-job-post-resumes'
88

99
export const jobPostResumeRelationQueries = {
1010
all: () => ['job-post-resume-relation'],
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
export { getJobPostResumeSummary } from './api/get-job-post-resume-summary'
22
export { getJobPostResumeByCode } from './api/get-job-post-resume-by-code'
3+
export { getBusinessJobPostResumeRelation } from './api/get-job-post-resume'
34
export { jobPostResumeRelationQueries } from './api/query'
45
export { ApplicationStatus, type StatusSummary } from './model/status'
56
export type { JobPostRelationDetail } from './model/application'
67
export { HistoryPanel } from './ui/history-panel'
78
export { StatusPanel } from './ui/status-panel'
89
export { ApplicationTable } from './ui/application-table'
10+
export { ApplicationStatusSelect } from './ui/application-status-select'

src/entities/job-post-resume-relation/model/application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export type JobPostRelation = {
55
coverLetter: string
66
status: ApplicationStatus
77
submittedDate: string
8-
resumeId: number
98
resumeTitle: string
109
resumeFirstName: string
1110
resumeLastName: string
@@ -21,6 +20,7 @@ export type JobPostRelationDetail = {
2120
coverLetter: string
2221
status: ApplicationStatus
2322
submittedDate: string
23+
academyMemo: string | null
2424
resumeTitle: string
2525
personalIntroduction: string
2626
firstName: string
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { ApplicationStatus } from 'entities/job-post-resume-relation'
2+
import { Form, FormSelectProps } from 'shared/form'
3+
4+
const StatusLabel = {
5+
[ApplicationStatus.SUBMITTED]: '접수',
6+
[ApplicationStatus.REVIEWED]: '검토',
7+
[ApplicationStatus.ACCEPTED]: '합격',
8+
[ApplicationStatus.REJECTED]: '불합격',
9+
}
10+
11+
export const ApplicationStatusSelect = (props: FormSelectProps) => {
12+
return (
13+
<Form.Select
14+
name="status"
15+
size="medium"
16+
className="w-[85px]"
17+
displayValue={value => StatusLabel[value as ApplicationStatus]}
18+
{...props}
19+
>
20+
<Form.SelectItem value={ApplicationStatus.SUBMITTED}>
21+
접수
22+
</Form.SelectItem>
23+
<Form.SelectItem value={ApplicationStatus.REVIEWED}>검토</Form.SelectItem>
24+
<Form.SelectItem value={ApplicationStatus.ACCEPTED}>합격</Form.SelectItem>
25+
<Form.SelectItem value={ApplicationStatus.REJECTED}>
26+
불합격
27+
</Form.SelectItem>
28+
</Form.Select>
29+
)
30+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { ApplicationSidePanel } from './ui/side-panel'
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
'use client'
2+
3+
import { useForm } from 'react-hook-form'
4+
5+
import {
6+
ApplicationStatus,
7+
ApplicationStatusSelect,
8+
} from 'entities/job-post-resume-relation'
9+
import { Form } from 'shared/form'
10+
import { Button, Separator } from 'shared/ui'
11+
12+
type Props = {
13+
values: {
14+
status?: ApplicationStatus
15+
memo?: string
16+
}
17+
}
18+
19+
export const ApplicationSidePanel = ({ values }: Props) => {
20+
const form = useForm({
21+
values,
22+
})
23+
24+
return (
25+
<div className="h-fit min-h-[329px] w-[250px] shrink-0 rounded-2xl border border-gray-300 p-6">
26+
<Form {...form}>
27+
<div className="mb-3 flex h-[38px] items-center gap-2">
28+
<Form.Control name="status">
29+
<label className="title-small font-bold text-gray-900">
30+
현재 채용 단계:
31+
</label>
32+
<ApplicationStatusSelect />
33+
</Form.Control>
34+
</div>
35+
<p className="body-large mb-5 font-normal text-gray-900">
36+
채용 단계를 변경하면 지원자에게 알림으로 결과를 알려줘요
37+
</p>
38+
<Separator className="mb-5" />
39+
<div className="mb-6 flex flex-col gap-2">
40+
<Form.Control name="memo">
41+
<label className="title-small font-bold text-gray-900">
42+
한 줄 메모
43+
</label>
44+
<Form.TextArea
45+
className="body-large placeholder:body-large h-12 border-0 px-0 py-1 font-normal placeholder:font-normal placeholder:underline"
46+
placeholder="지원자에 대해 기억하고 싶은 점이 있다면 적어주세요 (최대 100자)"
47+
/>
48+
</Form.Control>
49+
</div>
50+
<Button variant="primary" fullWidth size="large">
51+
저장하기
52+
</Button>
53+
</Form>
54+
</div>
55+
)
56+
}

0 commit comments

Comments
 (0)