diff --git a/public/WinterInternBanner.webp b/public/WinterInternBanner.webp
new file mode 100644
index 0000000..502e347
Binary files /dev/null and b/public/WinterInternBanner.webp differ
diff --git a/src/apis/applications/index.ts b/src/apis/applications/index.ts
index 65c1083..c1b2c95 100644
--- a/src/apis/applications/index.ts
+++ b/src/apis/applications/index.ts
@@ -1,6 +1,10 @@
-import { useMutation, useQuery } from "@tanstack/react-query";
+import {
+ useMutation,
+ UseMutationOptions,
+ useQuery,
+} from "@tanstack/react-query";
import { useToastStore } from "@team-return/design-system";
-import { AxiosError } from "axios";
+import { Axios, AxiosError } from "axios";
import { useRouter } from "next/navigation";
import { instance } from "../axios";
import {
@@ -109,3 +113,19 @@ export function useGetRejectionReason(applicationid: string) {
return data;
});
}
+
+export function useDeleteApplication(applicationId: number) {
+ const { append } = useToastStore();
+ return useMutation(
+ async () => instance.delete(`${router}/${applicationId}`),
+ {
+ onSuccess: () => {
+ append({
+ title: "",
+ message: "지원이 취소되었습니다",
+ type: "GREEN",
+ });
+ },
+ }
+ );
+}
diff --git a/src/app/recruitments/apply/page.tsx b/src/app/recruitments/apply/page.tsx
index e7fbd8b..e6160ef 100644
--- a/src/app/recruitments/apply/page.tsx
+++ b/src/app/recruitments/apply/page.tsx
@@ -3,7 +3,7 @@
import { useApplyToCompany, useReapply } from "@/apis/applications";
import {
ApplyRequestItmeType,
- AttachmentsType
+ AttachmentsType,
} from "@/apis/applications/type";
import { useCreatePresignedURL } from "@/apis/file";
import { useGetRecruitmentsDetail } from "@/apis/recruitments";
@@ -17,7 +17,7 @@ import ShadowBox from "@/components/recruitments/apply/ShadowBox";
import TitleBox from "@/components/recruitments/apply/TitleBox";
import URLItem from "@/components/recruitments/apply/URLItem";
import UrlListComponent from "@/components/recruitments/apply/UrlListComponent";
-import useMoadl from "@/hook/useModal";
+import useModal from "@/hook/useModal";
import { Icon, useToastStore } from "@team-return/design-system";
import { useSearchParams } from "next/navigation";
import { useEffect, useState } from "react";
@@ -25,7 +25,7 @@ import { useEffect, useState } from "react";
export default function Apply() {
const param = useSearchParams();
const applicationId = param.get("application");
- const { Modal, openModal, closeModal } = useMoadl();
+ const { Modal, openModal, closeModal } = useModal();
const { mutate: onApplyToCompany, isLoading: applyIsLoading } =
useApplyToCompany(param.get("id")!);
const { mutate: onReapply, isLoading: reapplyIsLoading } =
@@ -133,7 +133,7 @@ export default function Apply() {
제출서류 : {recruitmentsDetial?.submit_document}
-
+
-
- ※ 파일 첨부 시 파일 확장자를 확인해 주시기 바랍니다.
-
-
- pdf, ppt, pptx, hwp, zip, txt, mp4, png, jpg, svg
-
+
+ ※ 파일 첨부 시 파일 확장자를 확인해 주시기 바랍니다.
+
+
+ pdf, ppt, pptx, hwp, zip, txt, mp4, png, jpg, svg
+
{
@@ -213,10 +213,10 @@ export default function Apply() {
-
{
onUploadFile(fileList);
+ closeModal();
}}
>
지원하기
diff --git a/src/components/Carousel.tsx b/src/components/Carousel.tsx
index dc2154b..4743abc 100644
--- a/src/components/Carousel.tsx
+++ b/src/components/Carousel.tsx
@@ -6,8 +6,13 @@ import CircleBtn from "./CircleBtn";
//=======================================================================================================
import PopularCompanyBanner from "@public/PopularCompanyBanner.webp";
+import WinterInternBanner from "@public/WinterInternBanner.webp";
import { useRouter } from "next/navigation";
const BannerList = [
+ {
+ img: WinterInternBanner,
+ url: "",
+ },
{
img: PopularCompanyBanner,
url: "/companies/detail/?id=9",
diff --git a/src/components/common/Header.tsx b/src/components/common/Header.tsx
index 2bc67fc..c10cf11 100644
--- a/src/components/common/Header.tsx
+++ b/src/components/common/Header.tsx
@@ -52,7 +52,10 @@ function Header() {
//알림모달
}}
>
-
+
{profile?.student_name}
-
+
{/* */}
diff --git a/src/components/mypage/AppliedICompanyItem.tsx b/src/components/mypage/AppliedICompanyItem.tsx
index 3ae5c8b..e7ae611 100644
--- a/src/components/mypage/AppliedICompanyItem.tsx
+++ b/src/components/mypage/AppliedICompanyItem.tsx
@@ -1,10 +1,18 @@
-import { useGetRejectionReason } from "@/apis/applications";
+import {
+ useDeleteApplication,
+ useGetRejectionReason,
+} from "@/apis/applications";
import { ApplicationItemType } from "@/apis/applications/type";
+import useModal from "@/hook/useModal";
+import { getApplyKebabItems } from "@/util/object/kebabMenuItems";
+import { KebabItemType } from "@/util/type/kebabMenu";
import { Icon } from "@team-return/design-system";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useCallback, useRef, useState } from "react";
import FileDownload from "../common/Button/FIleDownload";
+import FillBtn from "../common/Button/FillBtn";
+import KebabMenu from "../common/Dropdown/KebabMenu";
import ApplicationStatus from "./ApplicationStatus";
export default function APpliedCompanyItem({
@@ -18,6 +26,18 @@ export default function APpliedCompanyItem({
const parentRef = useRef(null);
const childRef = useRef(null);
const [isCollapse, setIsCollapse] = useState(false);
+ const { Modal, openModal, closeModal } = useModal();
+ const { mutate: deleteApplication } = useDeleteApplication(application_id);
+ const KebabItems: KebabItemType[] = getApplyKebabItems(
+ () => {
+ navigator.push(
+ `/recruitments/apply/?id=${recruitment_id}&application=${application_id}`
+ );
+ },
+ () => {
+ openModal();
+ }
+ );
const handleButtonClick = useCallback(
(event: React.MouseEvent) => {
@@ -66,22 +86,36 @@ export default function APpliedCompanyItem({
/>
+
{(application_status === "REQUESTED" ||
application_status === "REJECTED") && (
-
{
- event.stopPropagation();
- navigator.push(
- `/recruitments/apply/?id=${recruitment_id}&application=${application_id}`
- );
- }}
- className="underline text-caption leading-caption font-r text-[#7f7f7f] cursor-pointer"
- >
- 재지원하기
-
+ <>
+
+
+ 지원 취소
+
+ {company}에 지원을 취소하겠습니까?
+
+
+
+ 취소
+
+
{
+ deleteApplication();
+ closeModal();
+ location.reload();
+ }}
+ >
+ 확인
+
+
+
+ >
)}
-
-
{
diff --git a/src/util/object/kebabMenuItems.ts b/src/util/object/kebabMenuItems.ts
index f9dedf2..9760005 100644
--- a/src/util/object/kebabMenuItems.ts
+++ b/src/util/object/kebabMenuItems.ts
@@ -68,3 +68,23 @@ export const getCompanyKebabItems = (
},
];
};
+
+export const getApplyKebabItems = (
+ onClickReSupport?: () => void,
+ onClickCancelApplication?: () => void
+): KebabItemType[] => {
+ return [
+ {
+ label: "재지원",
+ onClick: () => {
+ onClickReSupport && onClickReSupport();
+ },
+ },
+ {
+ label: "지원 취소",
+ onClick: () => {
+ onClickCancelApplication && onClickCancelApplication();
+ },
+ },
+ ];
+};