Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
phyuna0525 committed Dec 3, 2024
2 parents 4c7798b + fb1aaa1 commit 6461422
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 143 deletions.
6 changes: 6 additions & 0 deletions apps/company/src/apis/recruitments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
IMyRecruitmentListResponse,
IMyRecruitmentResponse,
IRecruitment,
IRecruitmentCheck,
} from "./types";

const router = "/recruitments";
Expand Down Expand Up @@ -60,3 +61,8 @@ export const recruitmentDetail = async (recruitmentId: string) => {
);
return data;
};

export const recruitmentCheck = async () => {
const { data } = await instance.get<IRecruitmentCheck>(`${router}/exists`);
return data;
};
9 changes: 7 additions & 2 deletions apps/company/src/apis/recruitments/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface IArea {
tech_codes: number[];
hiring: number;
major_task: string;
preferential_treatment: string;
preferential_treatment: string | null;
}

export type IHiringProgress =
Expand All @@ -27,7 +27,6 @@ export interface IRecruitment {
train_pay: string;
pay?: string;
benefits?: string;
preferential_treatment?: string;
additional_qualifications?: string;
military_support: boolean;
hiring_progress: IHiringProgress[];
Expand Down Expand Up @@ -55,6 +54,7 @@ export interface IMyRecruitmentResponse
recruit_year: number;
company_biz_no?: string;
areas: {
additional_qualifications: string;
id?: number;
job: { id: number; name: string }[];
tech: { id: number; name: string }[];
Expand All @@ -74,3 +74,8 @@ export interface IMyRecruitmentListResponse {
created_at: string;
}[];
}

export interface IRecruitmentCheck {
winter_intern: boolean;
experiential: boolean;
}
7 changes: 4 additions & 3 deletions apps/company/src/app/my/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import XIcon from "../../../public/No.svg";

export default function My() {
const router = useRouter();
const { data: myRecruitmentList } = useMyRecruitmentList();

const { data: myRecruitmentList, isLoading } = useMyRecruitmentList();
const hasRecruitments = !!myRecruitmentList?.my_recruitments?.length;

return (
Expand Down Expand Up @@ -98,7 +97,9 @@ export default function My() {
>
모집 의뢰서가 없습니다.
</Text>
<S.Button>추가하기</S.Button>
<Link href={"/recruitments/chose"}>
<S.Button>추가하기</S.Button>
</Link>
</div>
)}
</S.Container>
Expand Down
Loading

0 comments on commit 6461422

Please sign in to comment.