Skip to content
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

๐Ÿ”€ :: 1.0 ๋ฆด๋ฆฌ์ฆˆ #30

Merged
merged 70 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
4ceee62
feat :: ๊ธฐ์—…, ๋ชจ์ง‘์˜๋ขฐ์„œ ๋ฆฌ์ŠคํŠธ ์Šค์ผˆ๋ ˆํ†ค UI ์ถ”๊ฐ€
KANGYONGSU23 Nov 13, 2023
43551a9
feat :: ๋ถ๋งˆํฌ api ์ž‘์„ฑ
KANGYONGSU23 Nov 15, 2023
e15f983
feat :: ๋ถ๋งˆํฌ
KANGYONGSU23 Nov 16, 2023
1987c34
file :: ํŒŒ์ผ ์œ„์น˜ ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 17, 2023
a5836f5
fix :: ๋„ค์ด๋ฐ ์ฒด์ธ์ง€
KANGYONGSU23 Nov 17, 2023
3493f0b
fix :: Array.from ์ ์šฉ
KANGYONGSU23 Nov 17, 2023
267d06d
fix :: ๊ตฌ์กฐ๋ถ„ํ•ด ํ• ๋‹น
KANGYONGSU23 Nov 17, 2023
188ff36
file :: ๋„ค์ด๋ฐ ์ฒด์ธ์ง€
KANGYONGSU23 Nov 17, 2023
33f2f00
๐Ÿ”€ :: ๊ธฐ์—…, ๋ชจ์ง‘์˜๋ขฐ์„œ ๋ฆฌ์ŠคํŠธ ์Šค์ผˆ๋ ˆํ†ค UI ์ถ”๊ฐ€
KANGYONGSU23 Nov 17, 2023
908ffd0
Merge branch 'develop' into feature/Bookmark
Nov 17, 2023
9bf8227
fix :: conflicts ํ•ด๊ฒฐ
Nov 17, 2023
648eadc
fix :: queryClient ์ˆ˜์ •
KANGYONGSU23 Nov 17, 2023
98761f2
๐Ÿ”€ :: ๋ชจ์ง‘์˜๋ขฐ์„œ ๋ถ๋งˆํฌ
KANGYONGSU23 Nov 17, 2023
79253df
feat :: ์ง€์›ํ•˜๊ธฐ ํผ๋ธ”๋ฆฌ์‹ฑ
KANGYONGSU23 Nov 22, 2023
6ec73e0
Merge branch 'hotfix' into develop
Nov 22, 2023
b0f8f46
feat :: api ์—ฐ๋™
KANGYONGSU23 Nov 23, 2023
79ee73a
feat :: Loading ์• ๋‹ˆ๋ฉ”์ด์…˜
KANGYONGSU23 Nov 23, 2023
1c8a970
update :: ๋””์ž์ธ์‹œ์Šคํ…œ ๋ฒ„์ „ ์—…
KANGYONGSU23 Nov 23, 2023
627b411
fix :: useModal ์ˆ˜์ •
KANGYONGSU23 Nov 23, 2023
1cb8124
feat :: ๊ธฐ์—…์ง€์› API ์—ฐ๋™
KANGYONGSU23 Nov 23, 2023
85a52b2
feat :: openModal์‹œ ์Šคํฌ๋กค ๋ฐฉ์ง€
KANGYONGSU23 Nov 23, 2023
d30423c
faet :: ํผ๋ธ”๋ฆฌ์‹ฑ
KANGYONGSU23 Nov 24, 2023
113f9e2
delete :: console ์ •๋ฆฌ
KANGYONGSU23 Nov 24, 2023
c906d5f
fix :: ๋ธŒ๋žœ์น˜ ์ด๋ฆ„ ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 24, 2023
5fee56c
ci ์˜ค๋ฅ˜ ์ˆ˜์ •
KANGYONGSU23 Nov 24, 2023
30fc764
ci ์˜ค๋ฅ˜ ์ˆ˜์ •
KANGYONGSU23 Nov 24, 2023
0ef4f02
fix :: ci ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
KANGYONGSU23 Nov 24, 2023
fc8f744
Merge branch 'develop' into feature/Apply
Nov 24, 2023
4e2ad61
fix :: tailwind css ์ ์šฉ
KANGYONGSU23 Nov 24, 2023
2853210
feat :: kebab๋ฉ”๋‰ด ๋“œ๋กญ๋‹ค์šด
KANGYONGSU23 Nov 24, 2023
4722c3b
feat :: profile ์ •๋ณด
KANGYONGSU23 Nov 24, 2023
a08147c
delete :: ์ฝ”๋“œ์ •๋ฆฌ
KANGYONGSU23 Nov 24, 2023
b6fc12b
feat :: api์—ฐ๋™
KANGYONGSU23 Nov 25, 2023
1ce5a2d
feat :: fileDownload
KANGYONGSU23 Nov 25, 2023
04cf849
feat :: ํผ๋ธ”๋ฆฌ์‹ฑ
KANGYONGSU23 Nov 25, 2023
5a8bc51
fix :: z-index ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 25, 2023
8588c96
feat :: "์ง€์›ํ•œ ๊ธฐ์—…์ด ์—†์–ด์š”"
KANGYONGSU23 Nov 25, 2023
36fc1f6
fix :: ์ฝ”๋ฉ˜ํŠธ ๋ฐ˜์˜
KANGYONGSU23 Nov 25, 2023
9aae2f0
fix :: ์ฃผ์„์ฒ˜๋ฆฌ
KANGYONGSU23 Nov 25, 2023
f7325b8
fix :: ์ด๋„˜ ์ˆ˜์ •
KANGYONGSU23 Nov 25, 2023
4e30d48
file :: kebabItems ํŒŒ์ผ๋ถ„๋ฆฌ
KANGYONGSU23 Nov 25, 2023
7be24af
fix :: nullish ์ ์šฉ
KANGYONGSU23 Nov 25, 2023
4f2db7b
feat :: ํ•„ํ„ฐ๊ฐ€ ์ ์šฉ ๋์„ ๋•Œ๋งŒ querystring ์ ์šฉ
KANGYONGSU23 Nov 26, 2023
d4d5565
feat :: useQueryString ์ œ๋„ค๋ฆญํƒ€์ž… ์ ์šฉ
KANGYONGSU23 Nov 26, 2023
e653fce
feat :: ๊ธฐ์—…ํŽ˜์ด์ง€ useQueryString ์ ์šฉ
KANGYONGSU23 Nov 26, 2023
d74a5f5
feat :: ๊ฒจ์šธ์ธํ„ด ํ•„ํ„ฐ ์ ์šฉ
KANGYONGSU23 Nov 26, 2023
14cc1b9
feat :: ๋ชจ์ง‘์˜๋ขฐ ํ…Œ์ด๋ธ” ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ ์šฉ
KANGYONGSU23 Nov 26, 2023
4a8397d
Merge branch 'feature/TableAnimation' into develop
Nov 26, 2023
74e0f9c
fix :: ๊ธฐ์—… ๋ฆฌ์ŠคํŠธ ํŽ˜์ด์ง€์— ๋งˆ์ง„ ๋ฐ”ํ…€ ์ถ”๊ฐ€
KANGYONGSU23 Nov 26, 2023
9a46df6
Merge pull request #29 from Team-return/feature/Intern
KANGYONGSU23 Nov 27, 2023
b049e09
fix :: Loading ์• ๋‹ˆ๋ฉ”์ด์…˜ ์˜คํƒ€์ˆ˜์ •
KANGYONGSU23 Nov 27, 2023
5b8a844
fix :: APIํ•จ์ˆ˜ ์ด๋ฆ„ -> ์นด๋ฉœ์ผ€์ด์Šค๋กœ ํ†ต์ผ
KANGYONGSU23 Nov 27, 2023
b1ca416
fix :: ๋ˆ„๋ฝ๋œ apiํ•จ์ˆ˜๋ช… ์ˆ˜์ •
KANGYONGSU23 Nov 27, 2023
30af9c0
delete :: ์ฃผ์„์ œ๊ฑฐ
KANGYONGSU23 Nov 27, 2023
b789bcd
fix :: ์ฝ”๋ฉ˜ํŠธ ๋ฐ˜์˜
KANGYONGSU23 Nov 27, 2023
40e81f7
Merge branch 'develop' into feature/Apply
Nov 28, 2023
425035b
fix :: conflict ํ•ด๊ฒฐ
KANGYONGSU23 Nov 28, 2023
7b06338
fix :: import ์ˆ˜์ •
KANGYONGSU23 Nov 28, 2023
e2d20be
fix :: build ์˜ค๋ฅ˜ ํ•ด๊ฒฐ
KANGYONGSU23 Nov 28, 2023
3fc467e
๐Ÿ”€ :: ์ง€์›ํ•˜๊ธฐ
KANGYONGSU23 Nov 28, 2023
c4c8cba
Merge branch 'develop' into feature/MyPage
Nov 28, 2023
81780f4
fix :: apiํ•จ์ˆ˜๋ช… ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 28, 2023
c2ca788
fix :: conflict ํ•ด๊ฒฐ
KANGYONGSU23 Nov 28, 2023
82a2e66
๐Ÿ”€ :: ๋งˆ์ดํŽ˜์ด์ง€
KANGYONGSU23 Nov 28, 2023
7486320
fix :: ๋ฉ”์ธ์— ๋จธ์ง€ํ•˜๊ธฐ ์ „ ๋งˆ๋ฌด๋ฆฌ ์ž‘์—…
Nov 28, 2023
cbd5623
fix :: ์—๋Ÿฌ ํ•ธ๋“ค๋ง
KANGYONGSU23 Nov 28, 2023
6c54228
feat :: ๋ถ๋งˆํฌ ์กฐํšŒ ๊ฐœ์„ 
KANGYONGSU23 Nov 28, 2023
d319daf
update :: ๋””์ž์ธ์‹œ์Šคํ…œ ์—…๋ฐ์ดํŠธ
KANGYONGSU23 Nov 28, 2023
a96828d
feat :: banner ์•„์ดํ…œ ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 28, 2023
9f7650a
fix :: ์ด๋ฏธ์ง€ ํ™•์žฅ์ž ๋ณ€๊ฒฝ
KANGYONGSU23 Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@next/font": "^13.5.2",
"@tanstack/react-query": "^4.33.0",
"@team-return/design-system": "^1.1.8",
"@team-return/design-system": "^1.1.15",
"axios": "^1.4.0",
"debug": "^4.3.4",
"next": "13.4.7",
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions public/Clip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions public/Docs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/PopularCompanyBanner.webp
Binary file not shown.
Binary file added public/WinterIntrenBanner.webp
Binary file not shown.
Binary file removed public/test-banner-1.png
Binary file not shown.
63 changes: 63 additions & 0 deletions src/apis/applications/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import { useToastStore } from "@team-return/design-system";
import { AxiosError } from "axios";
import { useRouter } from "next/navigation";
import { instance } from "../axios";
import { ApplicationsResponseType, ApplyRequestItmeType } from "./type";

const router = "/applications";

export default function useApplyToCompany(recruitmentId: string) {
const navigator = useRouter();
const { append } = useToastStore();
return useMutation(
async function (body: ApplyRequestItmeType[]) {
return await instance.post(`${router}/${recruitmentId}`, {
attachments: body,
});
},
{
onSuccess: () => {
navigator.push("/mypage");
},
onError: (error: AxiosError) => {
switch (error.response?.status) {
case 401:
append({
title: "",
message: "3ํ•™๋…„์ด ์•„๋‹Œ ํ•™์ƒ์€ ์ง€์›ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.",
type: "RED",
});
break;
case 404:
append({
title: "",
message: "๋ชจ์ง‘์˜๋ขฐ์„œ๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.",
type: "RED",
});
break;
case 409:
append({
title: "",
message:
"์ด๋ฏธ ํ•ด๋‹น ๋ชจ์ง‘์˜๋ขฐ์— ์ง€์›ํ–ˆ๊ฑฐ๋‚˜ ์Šน์ธ๋œ ์ง€์›์š”์ฒญ์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.",
type: "RED",
});

default:
break;
}
},
}
);
}


export function useGetApplications() {
return useQuery(["GetApplications"], async () => {
const { data } = await instance.get<ApplicationsResponseType>(
`${router}/students`
);
return data;
});
}
29 changes: 29 additions & 0 deletions src/apis/applications/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
export type AttachmentsType = "FILE" | "URL";

export interface ApplyRequestItmeType {
url: string;
type: AttachmentsType;
}

export type ApplicationsStatusType =
| "REQUESTED"
| "APPROVED"
| "FAILED"
| "PASS"
| "REJECTED";

export interface ApplicationItemType {
application_id: number;
company: string;
attachments: ApplyRequestItmeType[];
application_status: ApplicationsStatusType;
}

export interface ApplicationsResponseType {
applications: ApplicationItemType[];
count: number
}

export interface ApplyRequestBody {
attachments: ApplyRequestItmeType[];
}
6 changes: 3 additions & 3 deletions src/apis/auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { AuthCode, IAuthorizationResponse, SendAuthCodeType } from "./type";

const router = "/auth";

export const ReissueToken = async (refresh_token: string) => {
export const useReissueToken = async (refresh_token: string) => {
const response = await axios.put<IAuthorizationResponse>(
`${process.env.NEXT_PUBLIC_BASE_URL}${router}/reissue`,
null,
Expand All @@ -18,7 +18,7 @@ export const ReissueToken = async (refresh_token: string) => {
return response.data;
};

export const SendAuthCode = () => {
export const useSendAuthCode = () => {
const { append } = useToastStore();

return useMutation(
Expand Down Expand Up @@ -67,7 +67,7 @@ export const SendAuthCode = () => {
);
};

export const CheckAuthCode = (
export const useCheckAuthCode = (
query_string: AuthCode,
options?: Omit<
UseMutationOptions<any, AxiosError<unknown, any>, void, unknown>,
Expand Down
7 changes: 4 additions & 3 deletions src/apis/axios.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios, { AxiosError } from "axios";
import { Cookies } from "react-cookie";
import { ReissueToken } from "./auth";
import { useReissueToken } from "./auth";

export const instance = axios.create({
baseURL: process.env.NEXT_PUBLIC_BASE_URL,
Expand Down Expand Up @@ -28,6 +28,7 @@ instance.interceptors.response.use(
if (axios.isAxiosError(error) && error.response) {
const { config } = error;
const refreshToken = cookies.get("refresh_token");

if (
(error.response.data.message === "Invalid Token" ||
error.response.data.message === "Token Expired" ||
Expand All @@ -37,7 +38,7 @@ instance.interceptors.response.use(
if (!isRefreshing) {
cookies.remove("access_token");
isRefreshing = true;
ReissueToken(refreshToken)
useReissueToken(refreshToken)
.then((res) => {
isRefreshing = false;
cookies.remove("refresh_token");
Expand All @@ -61,7 +62,7 @@ instance.interceptors.response.use(
window.location.href = "/account/login";
});
}
} else {
} else if (error.response.status === 403) {
window.location.href = "/account/login";
}
}
Expand Down
26 changes: 26 additions & 0 deletions src/apis/bookmarks/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { instance } from "../axios";
import { BookmarkResponseType } from "./type";

const router = "/bookmarks";

export const useGetBookmarks = () => {
return useQuery(["GetBookmarks"], async () => {
const { data } = await instance.get<BookmarkResponseType>(`${router}`);
return data;
});
};

export const useSetBookmarks = () => {
const queryClient = useQueryClient();
return useMutation(
async (recruitmentId: number) => {
await instance.patch(`${router}/${recruitmentId}`);
},
{
onSuccess: () => {
queryClient.invalidateQueries(["getRecruitmentsList", "GetBookmarks"]);
},
}
);
};
9 changes: 9 additions & 0 deletions src/apis/bookmarks/type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface BookmarkResponseType {
bookmarks: BookmarkItemsType[];
}

export interface BookmarkItemsType {
company_name: string;
recruitment_id: number;
created_at: string;
}
21 changes: 10 additions & 11 deletions src/apis/code/index.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
import { CodeType } from "./type";
import { useQuery } from "@tanstack/react-query";
import axios from "axios";
import { CodeType, GetCodeType } from "./type";

const router = "/codes";

export const GetCode = (
export const useGetCode = (
type: CodeType,
keyword?: string,
parent_code?: number
) => {
return useQuery(
["GetCode", type, keyword, parent_code],
async () =>
await axios.get(
`${process.env.NEXT_PUBLIC_BASE_URL}${router}?type=${type}&keyword=${
keyword || ""
}&parent_code=${parent_code || ""}`
)
);
return useQuery(["GetCode", type, keyword, parent_code], async () => {
const { data } = await axios.get<GetCodeType>(
`${process.env.NEXT_PUBLIC_BASE_URL}${router}?type=${type}&keyword=${
keyword || ""
}&parent_code=${parent_code || ""}`
);
return data;
});
};
3 changes: 2 additions & 1 deletion src/apis/code/type.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
export interface GetCodeType {
codes: CodeType[];
codes: ResponesType[];
}

export interface ResponesType {
code: number;
keyword: string;
job_type: string;
}

export type CodeType = "JOB" | "TECH" | "BUSINESS_AREA";
9 changes: 5 additions & 4 deletions src/apis/companies/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ import { CompaniesDetailsType, CompaniesListResponseType } from "./type";

const router = "/companies";

export const GetCompaniesList = (queryString: string) => {
export const useGetCompaniesList = (queryString: string) => {
const { append } = useToastStore();
return useQuery(
["companiesList", queryString],
async () => {
return await instance.get<CompaniesListResponseType>(
const { data } = await instance.get<CompaniesListResponseType>(
`${router}/student?${queryString}`
);
return data;
},
{
onError: () => {
Expand All @@ -27,7 +28,7 @@ export const GetCompaniesList = (queryString: string) => {
);
};

export const GetCompaniesDetail = (id: string) => {
export const useGetCompaniesDetail = (id: string) => {
const { append } = useToastStore();
return useQuery(
["companiesDetails"],
Expand All @@ -45,7 +46,7 @@ export const GetCompaniesDetail = (id: string) => {
);
};

export const GetNumberOfCompaniesListPages = (queryString: string) => {
export const useGetNumberOfCompaniesListPages = (queryString: string) => {
const { data } = useQuery(
["getNumberOfCompaniesListPages", queryString],
async () =>
Expand Down
Loading