diff --git a/next.config.ts b/next.config.ts index e3a6f7f..cc2b3c3 100644 --- a/next.config.ts +++ b/next.config.ts @@ -3,6 +3,7 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { trailingSlash: true, reactStrictMode: true, + output: "export", images: { unoptimized: true, remotePatterns: [ diff --git a/out/404.html b/out/404.html index 1415f57..f0533b8 100644 --- a/out/404.html +++ b/out/404.html @@ -1 +1 @@ -
\ No newline at end of file + \ No newline at end of file diff --git a/out/404/index.html b/out/404/index.html index 1415f57..f0533b8 100644 --- a/out/404/index.html +++ b/out/404/index.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/out/_next/static/chunks/128-3c9bcabe88f052bd.js b/out/_next/static/chunks/128-442130cb49ab6588.js similarity index 89% rename from out/_next/static/chunks/128-3c9bcabe88f052bd.js rename to out/_next/static/chunks/128-442130cb49ab6588.js index 4bb90aa..2bcfb82 100644 --- a/out/_next/static/chunks/128-3c9bcabe88f052bd.js +++ b/out/_next/static/chunks/128-442130cb49ab6588.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[128],{5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},40028:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_writing.ffd8228f.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJFBMVEVMaXH/+/T/+fD/////+O7/+fP/9uj/8+j++fH/9ej/9ur///kIwlvCAAAAC3RSTlMAWVEetG03LeKI+v1cFJwAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAqSURBVHicY2BABozsEJqNhQPC52ZhAvO5uTnBAkxcrBAVzKxMjIzMCK0AD3AAcukMBiwAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},44127:(e,t,l)=>{l.d(t,{A:()=>b});var a=l(74848);l(96540);var s=l(29965),i=l.n(s);let r={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},b=e=>{let t,l,{labelType:s="SHOPPING",labelSize:b,customLabelContainerClass:m,customLabelTextClass:u}=e,h="bg-color-blue-100",g="text-color-blue-300";switch(s){case"SHOPPING":t=r,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=o,l="맛집 탐방형";break;case"ACTIVITY":t=c,l="액티비티/탐험형";break;case"CULTURE":t=n,l="문화/역사탐방형";break;case"FESTIVAL":t=d,l="축제참여형";break;case"RELAXATION":t=x,l="휴양형";break;case"REQUEST":t=p,l="지정 견적",h="bg-color-red-100",g="text-color-red-200";break;case"PENDING":l="견적 대기",h="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",h="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;default:l="지정 라벨 없음",h="bg-color-gray-100",g="hidden"}return(0,a.jsxs)("div",{className:"".concat(h," ").concat(m," ").concat("sm"===b?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(i(),{src:t,alt:"".concat(s," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(g," ").concat(u," ").concat("sm"===b?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},98649:(e,t,l)=>{l.d(t,{A:()=>b});var a=l(74848),s=l(96540),i=l(44127),r=l(79241),o=l(97665),c=l(97286),n=l(82309),d=l(3329),x=l(30777),p=l(98599);function b(e){var t,l;let{data:b,closeModal:m}=e,[u,h]=(0,s.useState)(0),[g,A]=(0,s.useState)(""),[N,v]=(0,s.useState)(!1),w=(0,o.jE)(),{data:j}=(0,c.I)({queryKey:["userprofile"],queryFn:r.A.getUserInfo}),f=(0,n.n)({mutationFn:()=>(0,p.P6)(b.id,{price:u,content:g}),onSuccess:e=>{e.success?(alert(e.message),h(0),A(""),w.invalidateQueries({queryKey:["receiveRequest"]})):alert(e.message),m()}});if(!b)return null;let y=(0,d.nk)(b.tripDate),k=(0,x.r)(b.serviceArea),E=(null==j?void 0:j.id)===(null===(t=b.assignees[0])||void 0===t?void 0:t.id)?(0,a.jsx)(i.A,{labelType:"REQUEST"}):"",U=0!==u&&g.length>=10;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(i.A,{labelType:b.tripType}),E]}),(0,a.jsxs)("div",{className:"mb-8 mt-6 w-[560px] rounded-[8px] border border-color-line-200 py-6 mobile:mt-6 mobile:w-[327px] mobile:border-none mobile:py-[10px] tablet:mt-6 tablet:w-[327px] tablet:border-none tablet:py-[10px]",children:[(0,a.jsx)("p",{className:"mb-2 px-[18px] text-2xl semibold mobile:px-0 mobile:text-2lg tablet:pl-0 tablet:text-2lg",children:b.title}),(0,a.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] pl-[18px] text-md font-medium text-color-gray-500 mobile:px-0 mobile:text-sm tablet:pl-0 tablet:text-sm",children:[null===(l=b.dreamer)||void 0===l?void 0:l.nickName," 고객님"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 ",children:[(0,a.jsxs)("div",{className:"col-span-2 mb-2 flex items-center gap-1 pl-[18px] mobile:pl-0 mobile:text-sm tablet:gap-[8px] tablet:pl-0",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg text-color-gray-500 mobile:text-md tablet:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md tablet:text-md",children:y})]}),(0,a.jsxs)("div",{className:"mobile-tablet:gap2 flex items-center gap-1 pl-[18px] mobile-tablet:pl-0",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg text-color-gray-500 mobile:text-md tablet:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md tablet:text-md",children:k})]})]})]})]}),(0,a.jsxs)("div",{className:"mb-[64px] mobile:mb-10 tablet:mb-10",children:[(0,a.jsx)("p",{className:"text-2xl semibold",children:"견적 코코넛을 입력해 주세요"}),(0,a.jsx)("input",{type:"number",placeholder:"코코넛 갯수 입력",value:u||"",onChange:e=>h(Number(e.target.value)),className:"mt-4 h-[64x] w-[560px] rounded-[16px] bg-color-background-200 p-[14px] text-xl mobile:h-[48px] mobile:w-[327px] mobile:text-lg tablet:h-[54px] tablet:w-[327px] tablet:text-lg"})]}),(0,a.jsxs)("div",{className:"mb-10 mobile:mb-6 tablet:mb-6",children:[(0,a.jsx)("p",{className:"text-2xl semibold mobile:text-2lg tablet:text-2lg",children:"코멘트를 입력해 주세요"}),(0,a.jsx)("textarea",{placeholder:"최소 10글자 이상 입력해 주세요",value:g,onChange:e=>{A(e.target.value),v(!1)},onBlur:()=>{g.length<10&&v(!0)},className:"mt-4 h-[160px] w-[560px] resize-none rounded-[16px] bg-color-background-200 p-[14px] text-xl mobile:h-[160px] mobile:w-[327px] mobile:text-lg tablet:h-[160px] tablet:w-[327px] tablet:text-lg"}),N&&(0,a.jsx)("p",{className:"text-md bold text-red-500",children:"10글자 이상 작성해 주세요"})]}),(0,a.jsx)("button",{className:"h-[64px] w-[560px] rounded-[16px] text-xl semibold text-white ".concat(U?"bg-color-blue-300":"cursor-not-allowed bg-color-gray-100"," mobile:h-[48px] mobile:w-[327px] mobile:text-lg tablet:h-[54px] tablet:w-[327px] tablet:text-lg"),disabled:!U||f.isPending,onClick:()=>{U&&f.mutate()},children:f.isPending?"보내는 중...":"견적 보내기"})]})}},68264:(e,t,l)=>{l.d(t,{A:()=>m});var a=l(74848),s=l(29965),i=l.n(s),r=l(40028),o=l(44127),c=l(97286),n=l(79241),d=l(3329),x=l(30777),p=l(91106),b=l.n(p);function m(e){var t;let{data:l,onSendQuotation:s,onReject:p,oneButton:m=!1,twoButton:u=!1}=e,{data:h}=(0,c.I)({queryKey:["userprofile"],queryFn:n.A.getUserInfo}),g=(0,d.fw)(l.updatedAt),A=(0,d.nk)(l.tripDate),N=(0,x.r)(l.serviceArea),v=(null==h?void 0:h.id)===(null===(t=l.assignees[0])||void 0===t?void 0:t.id)?(0,a.jsx)(o.A,{labelType:"REQUEST"}):"";return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"mb-12 w-full rounded-[16px] border border-color-line-100 px-4 pb-[12px] pt-[20px] shadow-md mobile:mx-[auto] mobile:mb-6 mobile:px-[14px] mobile:py-[16px] tablet:mx-[auto] tablet:mb-8 ",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)(b(),{href:"/plan-detail/".concat(l.id),children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between text-xs text-color-gray-500",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(o.A,{labelType:l.tripType}),v]}),(0,a.jsx)("div",{className:"",children:g})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xl semibold",children:l.title}),(0,a.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] text-md font-medium",children:[l.dreamer.nickName," 님"]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mobile:grid mobile:grid-cols-2 mobile:gap-[0px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 mobile:col-span-2 mobile:mb-2",children:[(0,a.jsx)("p",{className:"rounded-1 whitespace-nowrap bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md",children:A})]}),(0,a.jsx)("p",{className:"text-color-line-200 mobile:hidden",children:"ㅣ"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("p",{className:"rounded-1 whitespace-nowrap bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md",children:N})]})]})]})]}),(0,a.jsxs)("div",{className:"mt-8 flex items-center justify-between gap-[11px] mobile:mt-5 mobile:flex-col mobile-tablet:gap-[8px]",children:[(0,a.jsxs)("button",{onClick:s,className:"flex w-full items-center justify-center gap-[10px] rounded-[16px] bg-color-blue-300 p-4 mobile:p-3 tablet:p-3 ".concat(u?"hidden":""),children:[(0,a.jsx)("p",{className:"whitespace-nowrap text-xl semibold text-white",children:"견적 보내기"}),(0,a.jsx)(i(),{src:r.A,alt:"send",width:24,height:24})]}),(0,a.jsx)("button",{onClick:p,className:"w-full items-center justify-center rounded-[16px] border border-color-blue-300 bg-white p-4 text-xl semibold text-color-blue-300 mobile:p-3 tablet:p-3 ".concat(m?"hidden":""," "),children:"반려"})]})]})})})}},98599:(e,t,l)=>{l.d(t,{Ay:()=>o,Fo:()=>c,P6:()=>i,fk:()=>r});var a=l(6220),s=l(84996);let i=async(e,t)=>{try{return await s.F.post("/plans/".concat(e,"/quotes"),t),{success:!0,message:"견적이 성공적으로 보내졌습니다."}}catch(e){var l,i,r;if((null===(l=e.response)||void 0===l?void 0:l.status)===a.p9)return{success:!1,message:"이미 제출한 견적입니다."};if((null===(i=e.response)||void 0===i?void 0:i.status)===a.p2||(null===(r=e.response)||void 0===r?void 0:r.status)===a.AY)return{success:!1,message:"잘못된 접근입니다."};return{success:!1,message:"견적 보내기에 실패했습니다. 다시 시도해주세요."}}},r=async e=>{try{return await s.F.delete("/plans/".concat(e,"/assign")),{success:!0,message:"요청이 반려되었습니다."}}catch(e){var t;if([a.qH,a.AY,a.p2].includes(null===(t=e.response)||void 0===t?void 0:t.status))return{success:!1,message:"잘못된 방식으로 접근하셨습니다."};return{success:!1,message:"요청 반려에 실패했습니다."}}},o=async function(){let{isAssigned:e,tripType:t,keyword:l,orderBy:i,page:r=1,pageSize:o=5,id:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let a="",n=[];e&&n.push("isAssigned=".concat(e)),t&&t.length>0&&t.forEach(e=>{n.push("tripType=".concat(e))}),l&&n.push("keyword=".concat(encodeURIComponent(l))),i&&n.push("orderBy=".concat(i)),c&&n.push("id=".concat(c)),n.push("page=".concat(r)),n.push("pageSize=".concat(o)),a=n.length>0?"?".concat(n.join("&")):"";let d=await s.F.get("/plans/maker".concat(a));if(!d)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,groupByCount:[],list:[]};return d}catch(e){var n;if((null===(n=e.response)||void 0===n?void 0:n.status)===a.AY)throw Error("해당 Maker의 아이디가 잘못되었습니다.");throw console.error("받은 요청 조회 실패",e),e}},c=async e=>{try{return await s.F.get("/plans/".concat(e))}catch(e){var t;if((null===(t=e.response)||void 0===t?void 0:t.status)===a.p2)throw Error("존재하지 않는 플랜입니다.");throw console.error("플랜 상세 조회 실패",e),e}}},4107:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(77528),s=l(74848),i=l(96540),r=l(86715),o=l(12828),c=l(5279),n=l(29965),d=l.n(n);let x=e=>t=>{let l=(0,r.useRouter)(),[n,x]=(0,i.useState)(null),[p,b]=(0,i.useState)(!0);return((0,i.useEffect)(()=>{let e=(0,o.iD)();if(e){if("/login"===l.pathname||"/signup"===l.pathname){l.push("/");return}x(e)}else"/login"!==l.pathname&&"/signup"!==l.pathname&&l.push("/login");b(!1)},[l]),p)?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,s.jsx)(d(),{src:c.A,alt:"로딩 중"})}):n||"/login"===l.pathname||"/signup"===l.pathname?(0,s.jsx)(e,(0,a._)({},t)):null}},30777:(e,t,l)=>{l.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[128],{5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},40028:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_writing.ffd8228f.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAJFBMVEVMaXH/+/T/+fD/////+O7/+fP/9uj/8+j++fH/9ej/9ur///kIwlvCAAAAC3RSTlMAWVEetG03LeKI+v1cFJwAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAqSURBVHicY2BABozsEJqNhQPC52ZhAvO5uTnBAkxcrBAVzKxMjIzMCK0AD3AAcukMBiwAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8}},44127:(e,t,l)=>{l.d(t,{A:()=>b});var a=l(74848);l(96540);var s=l(29965),i=l.n(s);let r={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},p={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},b=e=>{let t,l,{labelType:s="SHOPPING",labelSize:b,customLabelContainerClass:m,customLabelTextClass:u}=e,h="bg-color-blue-100",g="text-color-blue-300";switch(s){case"SHOPPING":t=r,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=o,l="맛집 탐방형";break;case"ACTIVITY":t=c,l="액티비티/탐험형";break;case"CULTURE":t=n,l="문화/역사탐방형";break;case"FESTIVAL":t=d,l="축제참여형";break;case"RELAXATION":t=x,l="휴양형";break;case"REQUEST":t=p,l="지정 견적",h="bg-color-red-100",g="text-color-red-200";break;case"PENDING":l="견적 대기",h="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",h="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;default:l="지정 라벨 없음",h="bg-color-gray-100",g="hidden"}return(0,a.jsxs)("div",{className:"".concat(h," ").concat(m," ").concat("sm"===b?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(i(),{src:t,alt:"".concat(s," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(g," ").concat(u," ").concat("sm"===b?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},98649:(e,t,l)=>{l.d(t,{A:()=>b});var a=l(74848),s=l(96540),i=l(44127),r=l(79241),o=l(97665),c=l(97286),n=l(82309),d=l(3329),x=l(30777),p=l(98599);function b(e){var t,l;let{data:b,closeModal:m}=e,[u,h]=(0,s.useState)(0),[g,A]=(0,s.useState)(""),[N,v]=(0,s.useState)(!1),w=(0,o.jE)(),{data:f}=(0,c.I)({queryKey:["userprofile"],queryFn:r.A.getUserInfo}),j=(0,n.n)({mutationFn:()=>(0,p.P6)(b.id,{price:u,content:g}),onSuccess:e=>{e.success?(alert(e.message),h(0),A(""),w.invalidateQueries({queryKey:["receiveRequest"]})):alert(e.message),m()}});if(!b)return null;let y=(0,d.nk)(b.tripDate),k=(0,x.r)(b.serviceArea),E=(null==f?void 0:f.id)===(null===(t=b.assignees[0])||void 0===t?void 0:t.id)?(0,a.jsx)(i.A,{labelType:"REQUEST"}):"",U=0!==u&&g.length>=10;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(i.A,{labelType:b.tripType}),E]}),(0,a.jsxs)("div",{className:"mb-8 mt-6 w-[560px] rounded-[8px] border border-color-line-200 py-6 mobile:mt-6 mobile:w-[327px] mobile:border-none mobile:py-[10px] tablet:mt-6 tablet:w-[327px] tablet:border-none tablet:py-[10px]",children:[(0,a.jsx)("p",{className:"mb-2 px-[18px] text-2xl semibold mobile:px-0 mobile:text-2lg tablet:pl-0 tablet:text-2lg",children:b.title}),(0,a.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] pl-[18px] text-md font-medium text-color-gray-500 mobile:px-0 mobile:text-sm tablet:pl-0 tablet:text-sm",children:[null===(l=b.dreamer)||void 0===l?void 0:l.nickName," 고객님"]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 ",children:[(0,a.jsxs)("div",{className:"col-span-2 mb-2 flex items-center gap-1 pl-[18px] mobile:pl-0 mobile:text-sm tablet:gap-[8px] tablet:pl-0",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg text-color-gray-500 mobile:text-md tablet:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md tablet:text-md",children:y})]}),(0,a.jsxs)("div",{className:"mobile-tablet:gap2 flex items-center gap-1 pl-[18px] mobile-tablet:pl-0",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg text-color-gray-500 mobile:text-md tablet:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md tablet:text-md",children:k})]})]})]})]}),(0,a.jsxs)("div",{className:"mb-[64px] mobile:mb-10 tablet:mb-10",children:[(0,a.jsx)("p",{className:"text-2xl semibold",children:"견적 코코넛을 입력해 주세요"}),(0,a.jsx)("input",{type:"number",placeholder:"코코넛 갯수 입력",value:u||"",onChange:e=>h(Number(e.target.value)),className:"mt-4 h-[64x] w-[560px] rounded-[16px] bg-color-background-200 p-[14px] text-xl mobile:h-[48px] mobile:w-[327px] mobile:text-lg tablet:h-[54px] tablet:w-[327px] tablet:text-lg"})]}),(0,a.jsxs)("div",{className:"mb-10 mobile:mb-6 tablet:mb-6",children:[(0,a.jsx)("p",{className:"text-2xl semibold mobile:text-2lg tablet:text-2lg",children:"코멘트를 입력해 주세요"}),(0,a.jsx)("textarea",{placeholder:"최소 10글자 이상 입력해 주세요",value:g,onChange:e=>{A(e.target.value),v(!1)},onBlur:()=>{g.length<10&&v(!0)},className:"mt-4 h-[160px] w-[560px] resize-none rounded-[16px] bg-color-background-200 p-[14px] text-xl mobile:h-[160px] mobile:w-[327px] mobile:text-lg tablet:h-[160px] tablet:w-[327px] tablet:text-lg"}),N&&(0,a.jsx)("p",{className:"text-md bold text-red-500",children:"10글자 이상 작성해 주세요"})]}),(0,a.jsx)("button",{className:"h-[64px] w-[560px] rounded-[16px] text-xl semibold text-white ".concat(U?"bg-color-blue-300":"cursor-not-allowed bg-color-gray-100"," mobile:h-[48px] mobile:w-[327px] mobile:text-lg tablet:h-[54px] tablet:w-[327px] tablet:text-lg"),disabled:!U||j.isPending,onClick:()=>{U&&j.mutate()},children:j.isPending?"보내는 중...":"견적 보내기"})]})}},68264:(e,t,l)=>{l.d(t,{A:()=>m});var a=l(74848),s=l(29965),i=l.n(s),r=l(40028),o=l(44127),c=l(97286),n=l(79241),d=l(3329),x=l(30777),p=l(91106),b=l.n(p);function m(e){var t;let{data:l,onSendQuotation:s,onReject:p,oneButton:m=!1,twoButton:u=!1}=e,{data:h}=(0,c.I)({queryKey:["userprofile"],queryFn:n.A.getUserInfo}),g=(0,d.fw)(l.updatedAt),A=(0,d.nk)(l.tripDate),N=(0,x.r)(l.serviceArea),v=(null==h?void 0:h.id)===(null===(t=l.assignees[0])||void 0===t?void 0:t.id)?(0,a.jsx)(o.A,{labelType:"REQUEST"}):"";return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"mb-12 w-full rounded-[16px] border border-color-line-100 px-4 pb-[12px] pt-[20px] shadow-md mobile:mx-[auto] mobile:mb-6 mobile:px-[14px] mobile:py-[16px] tablet:mx-[auto] tablet:mb-8 ",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)(b(),{href:"/plan-detail/".concat(l.id),children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center justify-between text-xs text-color-gray-500",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(o.A,{labelType:l.tripType}),v]}),(0,a.jsx)("div",{className:"",children:g})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xl semibold",children:l.title}),(0,a.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] text-md font-medium",children:[l.dreamer.nickName," 님"]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mobile:grid mobile:grid-cols-2 mobile:gap-[0px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1 mobile:col-span-2 mobile:mb-2",children:[(0,a.jsx)("p",{className:"rounded-1 whitespace-nowrap bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md",children:A})]}),(0,a.jsx)("p",{className:"text-color-line-200 mobile:hidden",children:"ㅣ"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("p",{className:"rounded-1 whitespace-nowrap bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md",children:N})]})]})]})]}),(0,a.jsxs)("div",{className:"mt-8 flex items-center justify-between gap-[11px] mobile:mt-5 mobile:flex-col mobile-tablet:gap-[8px]",children:[(0,a.jsxs)("button",{onClick:s,className:"flex w-full items-center justify-center gap-[10px] rounded-[16px] bg-color-blue-300 p-4 mobile:p-3 tablet:p-3 ".concat(u?"hidden":""),children:[(0,a.jsx)("p",{className:"whitespace-nowrap text-xl semibold text-white",children:"견적 보내기"}),(0,a.jsx)(i(),{src:r.A,alt:"send",width:24,height:24})]}),(0,a.jsx)("button",{onClick:p,className:"w-full items-center justify-center rounded-[16px] border border-color-blue-300 bg-white p-4 text-xl semibold text-color-blue-300 mobile:p-3 tablet:p-3 ".concat(m?"hidden":""," "),children:"반려"})]})]})})})}},98599:(e,t,l)=>{l.d(t,{Ay:()=>o,Fo:()=>c,P6:()=>i,fk:()=>r});var a=l(6220),s=l(84996);let i=async(e,t)=>{try{return await s.F.post("/plans/".concat(e,"/quotes"),t),{success:!0,message:"견적이 성공적으로 보내졌습니다."}}catch(e){var l,i,r;if((null===(l=e.response)||void 0===l?void 0:l.status)===a.p9)return{success:!1,message:"이미 제출한 견적입니다."};if((null===(i=e.response)||void 0===i?void 0:i.status)===a.p2||(null===(r=e.response)||void 0===r?void 0:r.status)===a.AY)return{success:!1,message:"잘못된 접근입니다."};return{success:!1,message:"견적 보내기에 실패했습니다. 다시 시도해주세요."}}},r=async e=>{try{return await s.F.delete("/plans/".concat(e,"/assign")),{success:!0,message:"요청이 반려되었습니다."}}catch(e){var t;if([a.qH,a.AY,a.p2].includes(null===(t=e.response)||void 0===t?void 0:t.status))return{success:!1,message:"잘못된 방식으로 접근하셨습니다."};return{success:!1,message:"요청 반려에 실패했습니다."}}},o=async function(){let{isAssigned:e,tripType:t,keyword:l,orderBy:i,page:r=1,pageSize:o=5,id:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let a="",n=[];e&&n.push("isAssigned=".concat(e)),t&&t.length>0&&t.forEach(e=>{n.push("tripType=".concat(e))}),l&&n.push("keyword=".concat(encodeURIComponent(l))),i&&n.push("orderBy=".concat(i)),c&&n.push("id=".concat(c)),n.push("page=".concat(r)),n.push("pageSize=".concat(o)),a=n.length>0?"?".concat(n.join("&")):"";let d=await s.F.get("/plans/maker".concat(a));if(!d)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,groupByCount:[],list:[]};return d}catch(e){var n;if((null===(n=e.response)||void 0===n?void 0:n.status)===a.AY)throw Error("해당 Maker의 아이디가 잘못되었습니다.");throw console.error("받은 요청 조회 실패",e),e}},c=async e=>{try{return await s.F.get("/plans/".concat(e))}catch(e){var t;if((null===(t=e.response)||void 0===t?void 0:t.status)===a.p2)throw Error("존재하지 않는 플랜입니다.");throw console.error("플랜 상세 조회 실패",e),e}}},4107:(e,t,l)=>{l.d(t,{A:()=>p});var a=l(77528),s=l(74848),i=l(96540),r=l(86715),o=l(12828),c=l(5279),n=l(29965),d=l.n(n),x=l(23504);let p=(e,t)=>l=>{let n=(0,r.useRouter)(),[p,b]=(0,i.useState)(null),[m,u]=(0,i.useState)(!0),{role:h}=(0,x.A)();return((0,i.useEffect)(()=>{let e=(0,o.iD)();if(e){if("/login"===n.pathname||"/signup"===n.pathname){n.push("/");return}if(t){let e=Array.isArray(t)?t:[t];if("guest"!==h&&!e.includes(h)){n.push("/");return}}b(e)}else"/login"!==n.pathname&&"/signup"!==n.pathname&&n.push("/login");u(!1)},[n,h,t]),m)?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,s.jsx)(d(),{src:c.A,alt:"로딩 중"})}):p||"/login"===n.pathname||"/signup"===n.pathname?(0,s.jsx)(e,(0,a._)({},l)):null}},30777:(e,t,l)=>{l.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/31-6879affb74a2f17d.js b/out/_next/static/chunks/31-46cf36ab808bb0e1.js similarity index 56% rename from out/_next/static/chunks/31-6879affb74a2f17d.js rename to out/_next/static/chunks/31-46cf36ab808bb0e1.js index 015af88..69fa483 100644 --- a/out/_next/static/chunks/31-6879affb74a2f17d.js +++ b/out/_next/static/chunks/31-46cf36ab808bb0e1.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31],{5279:(e,t,r)=>{r.d(t,{A:()=>i});let i={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(74848);r(96540);var l=r(29965),s=r.n(l);let a={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},b=e=>{let t,r,{labelType:l="SHOPPING",labelSize:b,customLabelContainerClass:p,customLabelTextClass:x}=e,g="bg-color-blue-100",m="text-color-blue-300";switch(l){case"SHOPPING":t=a,r="기념품/쇼핑형";break;case"FOOD_TOUR":t=n,r="맛집 탐방형";break;case"ACTIVITY":t=o,r="액티비티/탐험형";break;case"CULTURE":t=c,r="문화/역사탐방형";break;case"FESTIVAL":t=d,r="축제참여형";break;case"RELAXATION":t=h,r="휴양형";break;case"REQUEST":t=u,r="지정 견적",g="bg-color-red-100",m="text-color-red-200";break;case"PENDING":r="견적 대기",g="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;case"CONFIRMED":r="견적 확정",g="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;default:r="지정 라벨 없음",g="bg-color-gray-100",m="hidden"}return(0,i.jsxs)("div",{className:"".concat(g," ").concat(p," ").concat("sm"===b?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,i.jsx)(s(),{src:t,alt:"".concat(l," label"),width:24,height:24}),(0,i.jsx)("p",{className:"".concat(m," ").concat(x," ").concat("sm"===b?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:r})]})}},21507:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(74848),l=r(44127),s=r(3329),a=r(30777),n=r(91106),o=r.n(n);function c(e){let{data:t}=e,r=(0,s.nk)(t.plan.tripDate),n=(0,a.r)(t.plan.serviceArea),c=t.isAssigned?(0,i.jsx)(l.A,{labelType:"REQUEST"}):"";return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"relative mb-8 flex flex-col rounded-[16px] border border-color-line-100 px-6 pb-3 pt-5 shadow-md",children:[(0,i.jsx)("div",{className:"mb-4 flex items-center justify-between text-xs text-color-gray-500",children:(0,i.jsxs)("div",{className:"flex items-center gap-3",children:["PENDING"===t.plan.status?(0,i.jsx)(l.A,{labelType:"PENDING"}):"CONFIRMED"===t.plan.status?(0,i.jsx)(l.A,{labelType:"CONFIRMED"}):void 0,(0,i.jsx)(l.A,{labelType:t.plan.tripType}),c]})}),(0,i.jsx)(o(),{href:"/quotation-detail/".concat(t.id),children:(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-xl semibold",children:t.plan.title}),(0,i.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] text-md font-medium",children:[t.dreamer.nickName," 고객님"]}),(0,i.jsxs)("div",{className:"flex flex-col gap-1 mobile:grid mobile:grid-cols-2 mobile:gap-0 tablet:flex-row",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1 mobile:col-span-2 mobile:mb-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행일"}),(0,i.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md",children:r})]}),(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행지"}),(0,i.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md",children:n})]})]}),(0,i.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,i.jsx)("p",{className:"medium text-2lg",children:"견적 코코넛"}),(0,i.jsxs)("p",{className:"text-2xl bold",children:[t.price.toLocaleString(),"개"]})]})]})}),"PENDING"!==t.plan.status&&!1===t.isConfirmed&&(0,i.jsx)("div",{className:"absolute left-0 top-0 flex h-full w-full flex-col items-center justify-center gap-4 rounded-[16px] bg-color-black-400 bg-opacity-50 text-white",children:(0,i.jsx)("p",{children:"반려된 견적입니다."})}),"COMPLETED"===t.plan.status&&!0===t.isConfirmed&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"absolute left-0 top-0 flex h-full w-full flex-col items-center justify-center gap-4 rounded-[16px] bg-color-black-400 bg-opacity-50 text-white",children:[(0,i.jsx)("p",{children:"여행 완료된 플랜입니다."}),(0,i.jsx)(o(),{href:"/quotation-detail/".concat(t.id),children:(0,i.jsx)("button",{className:"z-40 rounded-[16px] border border-color-blue-200 bg-color-blue-100 px-[18px] py-[10px] text-lg semibold text-color-blue-300",children:"견적 상세 보기"})})]})})]})})}},48426:(e,t,r)=>{r.d(t,{I:()=>a,U:()=>s});var i=r(84996),l=r(6220);let s=async function(){let{isSent:e,page:t=1,pageSize:r=10}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let l="",s=[];"boolean"==typeof e&&s.push("isSent=".concat(e)),s.push("page=".concat(t)),s.push("pageSize=".concat(r)),l=s.length>0?"?".concat(s.join("&")):"";let a=await i.F.get("/quotes".concat(l));if(!a)return{totalCount:0,list:[]};return a}catch(e){throw console.error("견적 목록 조회 실패",e),e}},a=async e=>{try{return await i.F.get("/quotes/".concat(e))}catch(e){var t,r;if((null===(t=e.response)||void 0===t?void 0:t.status)===l.p2)throw Error("존재하지 않는 견적입니다.");if((null===(r=e.response)||void 0===r?void 0:r.status)===l.AY)throw Error("잘못된 접근입니다.");throw console.error("견적 상세 조회 실패",e),e}}},4107:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(77528),l=r(74848),s=r(96540),a=r(86715),n=r(12828),o=r(5279),c=r(29965),d=r.n(c);let h=e=>t=>{let r=(0,a.useRouter)(),[c,h]=(0,s.useState)(null),[u,b]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{let e=(0,n.iD)();if(e){if("/login"===r.pathname||"/signup"===r.pathname){r.push("/");return}h(e)}else"/login"!==r.pathname&&"/signup"!==r.pathname&&r.push("/login");b(!1)},[r]),u)?(0,l.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,l.jsx)(d(),{src:o.A,alt:"로딩 중"})}):c||"/login"===r.pathname||"/signup"===r.pathname?(0,l.jsx)(e,(0,i._)({},t)):null}},30777:(e,t,r)=>{r.d(t,{r:()=>i});let i=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]},91553:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(1651),l=r(58959),s=class extends i.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,l.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,l.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:a,isError:n,isRefetchError:o}=i,c=r.fetchMeta?.fetchMore?.direction,d=n&&"forward"===c,h=s&&"forward"===c,u=n&&"backward"===c,b=s&&"backward"===c;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,l.rB)(t,r.data),hasPreviousPage:(0,l.RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:h,isFetchPreviousPageError:u,isFetchingPreviousPage:b,isRefetchError:o&&!d&&!u,isRefetching:a&&!h&&!b}}},a=r(76099);function n(e,t){return(0,a.t)(e,s,t)}},85692:(e,t,r)=>{r.d(t,{Wx:()=>c});var i=r(96540),l=Object.defineProperty,s=new Map,a=new WeakMap,n=0,o=void 0;function c({threshold:e,delay:t,trackVisibility:r,rootMargin:l,root:d,triggerOnce:h,skip:u,initialInView:b,fallbackInView:p,onChange:x}={}){var g;let[m,f]=i.useState(null),N=i.useRef(x),[v,w]=i.useState({inView:!!b,entry:void 0});N.current=x,i.useEffect(()=>{let i;if(!u&&m)return i=function(e,t,r={},i=o){if(void 0===window.IntersectionObserver&&void 0!==i){let l=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}let{id:l,observer:c,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(a.has(r)||(n+=1,a.set(r,n.toString())),a.get(r)):"0":e[t]}`}).toString(),r=s.get(t);if(!r){let i;let l=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var r;let s=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(r=l.get(t.target))||r.forEach(e=>{e(s,t)})})},e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:a,elements:l},s.set(t,r)}return r}(r),h=d.get(e)||[];return d.has(e)||d.set(e,h),h.push(t),c.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(d.delete(e),c.unobserve(e)),0===d.size&&(c.disconnect(),s.delete(l))}}(m,(e,t)=>{w({inView:e,entry:t}),N.current&&N.current(e,t),t.isIntersecting&&h&&i&&(i(),i=void 0)},{root:d,rootMargin:l,threshold:e,trackVisibility:r,delay:t},p),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,m,d,l,h,u,r,p,t]);let j=null==(g=v.entry)?void 0:g.target,y=i.useRef(void 0);m||!j||h||u||y.current===j||(y.current=j,w({inView:!!b,entry:void 0}));let E=[f,v.inView,v.entry];return E.ref=E[0],E.inView=E[1],E.entry=E[2],E}i.Component}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[31],{5279:(e,t,r)=>{r.d(t,{A:()=>i});let i={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(74848);r(96540);var l=r(29965),s=r.n(l);let a={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},p=e=>{let t,r,{labelType:l="SHOPPING",labelSize:p,customLabelContainerClass:b,customLabelTextClass:x}=e,g="bg-color-blue-100",m="text-color-blue-300";switch(l){case"SHOPPING":t=a,r="기념품/쇼핑형";break;case"FOOD_TOUR":t=n,r="맛집 탐방형";break;case"ACTIVITY":t=o,r="액티비티/탐험형";break;case"CULTURE":t=c,r="문화/역사탐방형";break;case"FESTIVAL":t=d,r="축제참여형";break;case"RELAXATION":t=h,r="휴양형";break;case"REQUEST":t=u,r="지정 견적",g="bg-color-red-100",m="text-color-red-200";break;case"PENDING":r="견적 대기",g="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;case"CONFIRMED":r="견적 확정",g="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;default:r="지정 라벨 없음",g="bg-color-gray-100",m="hidden"}return(0,i.jsxs)("div",{className:"".concat(g," ").concat(b," ").concat("sm"===p?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,i.jsx)(s(),{src:t,alt:"".concat(l," label"),width:24,height:24}),(0,i.jsx)("p",{className:"".concat(m," ").concat(x," ").concat("sm"===p?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:r})]})}},21507:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(74848),l=r(44127),s=r(3329),a=r(30777),n=r(91106),o=r.n(n);function c(e){let{data:t}=e,r=(0,s.nk)(t.plan.tripDate),n=(0,a.r)(t.plan.serviceArea),c=t.isAssigned?(0,i.jsx)(l.A,{labelType:"REQUEST"}):"";return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"relative mb-8 flex flex-col rounded-[16px] border border-color-line-100 px-6 pb-3 pt-5 shadow-md",children:[(0,i.jsx)("div",{className:"mb-4 flex items-center justify-between text-xs text-color-gray-500",children:(0,i.jsxs)("div",{className:"flex items-center gap-3",children:["PENDING"===t.plan.status?(0,i.jsx)(l.A,{labelType:"PENDING"}):"CONFIRMED"===t.plan.status?(0,i.jsx)(l.A,{labelType:"CONFIRMED"}):void 0,(0,i.jsx)(l.A,{labelType:t.plan.tripType}),c]})}),(0,i.jsx)(o(),{href:"/quotation-detail/".concat(t.id),children:(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-xl semibold",children:t.plan.title}),(0,i.jsxs)("p",{className:"mb-[18px] border-b border-color-line-200 pb-[18px] text-md font-medium",children:[t.dreamer.nickName," 고객님"]}),(0,i.jsxs)("div",{className:"flex flex-col gap-1 mobile:grid mobile:grid-cols-2 mobile:gap-0 tablet:flex-row",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1 mobile:col-span-2 mobile:mb-2",children:[(0,i.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행일"}),(0,i.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile:text-md",children:r})]}),(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-1 text-2lg font-normal text-color-gray-500 mobile:text-md",children:"여행지"}),(0,i.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium text-color-black-300 mobile:text-md",children:n})]})]}),(0,i.jsxs)("div",{className:"mt-4 flex items-center justify-end gap-2",children:[(0,i.jsx)("p",{className:"medium text-2lg",children:"견적 코코넛"}),(0,i.jsxs)("p",{className:"text-2xl bold",children:[t.price.toLocaleString(),"개"]})]})]})}),"PENDING"!==t.plan.status&&!1===t.isConfirmed&&(0,i.jsx)("div",{className:"absolute left-0 top-0 flex h-full w-full flex-col items-center justify-center gap-4 rounded-[16px] bg-color-black-400 bg-opacity-50 text-white",children:(0,i.jsx)("p",{children:"반려된 견적입니다."})}),"COMPLETED"===t.plan.status&&!0===t.isConfirmed&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:"absolute left-0 top-0 flex h-full w-full flex-col items-center justify-center gap-4 rounded-[16px] bg-color-black-400 bg-opacity-50 text-white",children:[(0,i.jsx)("p",{children:"여행 완료된 플랜입니다."}),(0,i.jsx)(o(),{href:"/quotation-detail/".concat(t.id),children:(0,i.jsx)("button",{className:"z-40 rounded-[16px] border border-color-blue-200 bg-color-blue-100 px-[18px] py-[10px] text-lg semibold text-color-blue-300",children:"견적 상세 보기"})})]})})]})})}},48426:(e,t,r)=>{r.d(t,{I:()=>a,U:()=>s});var i=r(84996),l=r(6220);let s=async function(){let{isSent:e,page:t=1,pageSize:r=10}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let l="",s=[];"boolean"==typeof e&&s.push("isSent=".concat(e)),s.push("page=".concat(t)),s.push("pageSize=".concat(r)),l=s.length>0?"?".concat(s.join("&")):"";let a=await i.F.get("/quotes".concat(l));if(!a)return{totalCount:0,list:[]};return a}catch(e){throw console.error("견적 목록 조회 실패",e),e}},a=async e=>{try{return await i.F.get("/quotes/".concat(e))}catch(e){var t,r;if((null===(t=e.response)||void 0===t?void 0:t.status)===l.p2)throw Error("존재하지 않는 견적입니다.");if((null===(r=e.response)||void 0===r?void 0:r.status)===l.AY)throw Error("잘못된 접근입니다.");throw console.error("견적 상세 조회 실패",e),e}}},4107:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(77528),l=r(74848),s=r(96540),a=r(86715),n=r(12828),o=r(5279),c=r(29965),d=r.n(c),h=r(23504);let u=(e,t)=>r=>{let c=(0,a.useRouter)(),[u,p]=(0,s.useState)(null),[b,x]=(0,s.useState)(!0),{role:g}=(0,h.A)();return((0,s.useEffect)(()=>{let e=(0,n.iD)();if(e){if("/login"===c.pathname||"/signup"===c.pathname){c.push("/");return}if(t){let e=Array.isArray(t)?t:[t];if("guest"!==g&&!e.includes(g)){c.push("/");return}}p(e)}else"/login"!==c.pathname&&"/signup"!==c.pathname&&c.push("/login");x(!1)},[c,g,t]),b)?(0,l.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,l.jsx)(d(),{src:o.A,alt:"로딩 중"})}):u||"/login"===c.pathname||"/signup"===c.pathname?(0,l.jsx)(e,(0,i._)({},r)):null}},30777:(e,t,r)=>{r.d(t,{r:()=>i});let i=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]},91553:(e,t,r)=>{r.d(t,{q:()=>n});var i=r(1651),l=r(58959),s=class extends i.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,l.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,l.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:a,isError:n,isRefetchError:o}=i,c=r.fetchMeta?.fetchMore?.direction,d=n&&"forward"===c,h=s&&"forward"===c,u=n&&"backward"===c,p=s&&"backward"===c;return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,l.rB)(t,r.data),hasPreviousPage:(0,l.RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:h,isFetchPreviousPageError:u,isFetchingPreviousPage:p,isRefetchError:o&&!d&&!u,isRefetching:a&&!h&&!p}}},a=r(76099);function n(e,t){return(0,a.t)(e,s,t)}},85692:(e,t,r)=>{r.d(t,{Wx:()=>c});var i=r(96540),l=Object.defineProperty,s=new Map,a=new WeakMap,n=0,o=void 0;function c({threshold:e,delay:t,trackVisibility:r,rootMargin:l,root:d,triggerOnce:h,skip:u,initialInView:p,fallbackInView:b,onChange:x}={}){var g;let[m,f]=i.useState(null),N=i.useRef(x),[v,w]=i.useState({inView:!!p,entry:void 0});N.current=x,i.useEffect(()=>{let i;if(!u&&m)return i=function(e,t,r={},i=o){if(void 0===window.IntersectionObserver&&void 0!==i){let l=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}let{id:l,observer:c,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(a.has(r)||(n+=1,a.set(r,n.toString())),a.get(r)):"0":e[t]}`}).toString(),r=s.get(t);if(!r){let i;let l=new Map,a=new IntersectionObserver(t=>{t.forEach(t=>{var r;let s=t.isIntersecting&&i.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(r=l.get(t.target))||r.forEach(e=>{e(s,t)})})},e);i=a.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:a,elements:l},s.set(t,r)}return r}(r),h=d.get(e)||[];return d.has(e)||d.set(e,h),h.push(t),c.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(d.delete(e),c.unobserve(e)),0===d.size&&(c.disconnect(),s.delete(l))}}(m,(e,t)=>{w({inView:e,entry:t}),N.current&&N.current(e,t),t.isIntersecting&&h&&i&&(i(),i=void 0)},{root:d,rootMargin:l,threshold:e,trackVisibility:r,delay:t},b),()=>{i&&i()}},[Array.isArray(e)?e.toString():e,m,d,l,h,u,r,b,t]);let j=null==(g=v.entry)?void 0:g.target,y=i.useRef(void 0);m||!j||h||u||y.current===j||(y.current=j,w({inView:!!p,entry:void 0}));let E=[f,v.inView,v.entry];return E.ref=E[0],E.inView=E[1],E.entry=E[2],E}i.Component}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/355-4edd15751f67906e.js b/out/_next/static/chunks/355-9ac718180b689915.js similarity index 83% rename from out/_next/static/chunks/355-4edd15751f67906e.js rename to out/_next/static/chunks/355-9ac718180b689915.js index a6ab282..a59b7c8 100644 --- a/out/_next/static/chunks/355-4edd15751f67906e.js +++ b/out/_next/static/chunks/355-9ac718180b689915.js @@ -1 +1 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[355],{5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},85030:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_luggage_frown.ef196676.svg",height:655,width:705,blurWidth:0,blurHeight:0}},28061:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_star.6ad8be01.svg",height:48,width:48,blurWidth:0,blurHeight:0}},7027:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_star_md.608aacd5.svg",height:24,width:24,blurWidth:0,blurHeight:0}},44127:(e,t,l)=>{l.d(t,{A:()=>h});var a=l(74848);l(96540);var s=l(29965),r=l.n(s);let i={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},b={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},h=e=>{let t,l,{labelType:s="SHOPPING",labelSize:h,customLabelContainerClass:m,customLabelTextClass:p}=e,u="bg-color-blue-100",g="text-color-blue-300";switch(s){case"SHOPPING":t=i,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=c,l="맛집 탐방형";break;case"ACTIVITY":t=n,l="액티비티/탐험형";break;case"CULTURE":t=o,l="문화/역사탐방형";break;case"FESTIVAL":t=d,l="축제참여형";break;case"RELAXATION":t=x,l="휴양형";break;case"REQUEST":t=b,l="지정 견적",u="bg-color-red-100",g="text-color-red-200";break;case"PENDING":l="견적 대기",u="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",u="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;default:l="지정 라벨 없음",u="bg-color-gray-100",g="hidden"}return(0,a.jsxs)("div",{className:"".concat(u," ").concat(m," ").concat("sm"===h?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(r(),{src:t,alt:"".concat(s," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(g," ").concat(p," ").concat("sm"===h?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},51761:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(74848),s=l(96540);function r(e){let{children:t,bodyClass:l}=e;return(0,s.useEffect)(()=>(l&&document.body.classList.add(l),()=>{l&&document.body.classList.remove(l)}),[l]),(0,a.jsx)(a.Fragment,{children:t})}},3319:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(74848);l(96540);let s=e=>{let{currentPage:t,totalPages:l,onPageChange:s}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,a.jsx)("button",{onClick:()=>s(t-1),disabled:1===t,className:"flex h-8 w-8 items-center justify-center text-gray-500 disabled:opacity-50",children:"<"}),(()=>{let e=[];if(l<=5)for(let r=1;r<=l;r++)e.push((0,a.jsx)("button",{onClick:()=>s(r),className:"flex h-8 w-8 items-center justify-center ".concat(t===r?"bold text-blue-500":"text-gray-500"),children:r},r));else if(t<=3){for(let l=1;l<=5;l++)e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center ".concat(t===l?"bold text-blue-500":"text-gray-500"),children:l},l));e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis")),e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:l},l))}else if(t>=l-2){e.push((0,a.jsx)("button",{onClick:()=>s(1),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:"1"},1)),e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis"));for(let r=l-4;r<=l;r++)e.push((0,a.jsx)("button",{onClick:()=>s(r),className:"flex h-8 w-8 items-center justify-center ".concat(t===r?"bold text-blue-500":"text-gray-500"),children:r},r))}else{e.push((0,a.jsx)("button",{onClick:()=>s(1),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:"1"},1)),e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis1"));for(let l=t-1;l<=t+2;l++)e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center ".concat(t===l?"bold text-blue-500":"text-gray-500"),children:l},l));e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis2")),e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:l},l))}return e})(),(0,a.jsx)("button",{onClick:()=>s(t+1),disabled:t===l,className:"flex h-8 w-8 items-center justify-center text-gray-500 disabled:opacity-50",children:">"})]})}},93779:(e,t,l)=>{l.d(t,{A:()=>g});var a=l(74848),s=l(29965),r=l.n(s),i=l(5279),c=l(44127),n=l(70539),o=l(96540),d=l(75361),x=l(3329),b=l(60972);function h(e){var t,l,s;let{planDetail:i,closeModal:c}=e,[n,h]=(0,o.useState)(0),[m,p]=(0,o.useState)("");async function u(){try{var e;await b.A.createReview({makerId:(null===(e=i.quotes)||void 0===e?void 0:e[0].maker.id)||"",rating:n,content:m,planId:i.id}),alert("리뷰가 등록되었습니다!"),window.location.reload(),c()}catch(e){console.log("리뷰 등록에 실패 하였습니다. ".concat(e))}}let g=m.length<10||0===n;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"border-color bg-body.bg-gray my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"flex h-20 w-20 flex-shrink-0 items-center mobile-tablet:h-[46px] mobile-tablet:w-[46px]",children:(0,a.jsx)(r(),{src:"/assets/img_avatar".concat(null===(t=i.quotes)||void 0===t?void 0:t[0].maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400"})}),(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsxs)("div",{className:"w-full flex-col items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:null===(l=i.quotes)||void 0===l?void 0:l[0].maker.nickName}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"여행일"}),(0,a.jsx)("p",{className:"text-color-gray-400",children:(0,x.nk)(i.tripDate)})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"플랜가"}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:[null===(s=i.quotes)||void 0===s?void 0:s[0].price,"원"]})]})]})]})})]}),(0,a.jsx)("p",{className:"mb-2 font-medium",children:"평점을 선택해주세요"}),(0,a.jsx)(d.A,{initialRating:n,onRatingChange:e=>{h(e)}})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"mb-2 block font-medium",children:"상세 후기를 작성해주세요"}),(0,a.jsx)("textarea",{className:"w-full rounded-md border p-2 focus:ring-2 focus:ring-blue-400",placeholder:"최소 10자 이상 입력해주세요",rows:4,value:m,onChange:e=>{p(e.target.value)}})]}),(0,a.jsx)("button",{className:"w-full rounded-xl py-2 text-white ".concat(g?"bg-gray-300":"bg-blue-500"),disabled:g,onClick:u,children:"리뷰 등록"})]})}var m=l(86715);function p(){return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-12 w-64",children:(0,a.jsx)("p",{className:"semibold mobile-tablet:medium text-2lg",children:"여행을 완료하시겠습니까?"})}),(0,a.jsx)("button",{className:"semibold px-21 w-full rounded-xl bg-blue-500 py-3 text-lg text-white",children:"여행 완료 확정"})]})}function u(e){var t,l,s,d,b,u;let{planDetail:g}=e,f=(0,m.useRouter)(),[j,v]=(0,o.useState)(!1),[y,w]=(0,o.useState)(!1),N=f.asPath.includes("completed-trip"),k=f.asPath.includes("reviewable-trip"),_=()=>v(!1);return g?(0,a.jsxs)("div",{className:"mb-[32px] flex flex-col rounded-2xl bg-color-gray-50 px-6 py-7 mobile-tablet:px-3 mobile-tablet:py-4",children:[(0,a.jsx)("div",{className:"justify-left flex items-center gap-[12px] mobile-tablet:mt-[6px]",children:(0,a.jsx)(c.A,{labelType:"SHOPPING",customLabelContainerClass:"rounded-lg"})}),(0,a.jsxs)("div",{className:"border-color bg-body.bg-gray my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"flex h-20 w-20 flex-shrink-0 items-center mobile-tablet:h-[46px] mobile-tablet:w-[46px]",children:(0,a.jsx)(r(),{src:"/assets/img_avatar".concat(null===(l=g.quotes)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400"})}),(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsxs)("div",{className:"w-full flex-col items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:g?null===(d=g.quotes)||void 0===d?void 0:null===(s=d[0])||void 0===s?void 0:s.maker.nickName:"-"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"여행일"}),(0,a.jsx)("p",{className:"text-color-gray-400",children:g?(0,x.nk)(g.tripDate):"-"})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"플랜가"}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:[g?null===(u=g.quotes)||void 0===u?void 0:null===(b=u[0])||void 0===b?void 0:b.price:"-","원"]})]})]})]})})]}),(0,a.jsxs)("div",{className:"flex justify-between gap-[11px] mobile:flex-col",children:[N&&(0,a.jsx)("button",{className:"semibold w-full text-nowrap rounded-lg bg-color-blue-300 px-[32.5px] py-4 text-xl text-gray-50 mobile:text-md tablet:text-lg mobile-tablet:px-[16px] mobile-tablet:py-[11px]",onClick:()=>w(!0),children:"여행 완료하기"}),k&&(0,a.jsx)("button",{className:"semibold w-full text-nowrap rounded-lg bg-color-blue-300 px-[32.5px] py-4 text-xl text-gray-50 mobile:text-md tablet:text-lg mobile-tablet:px-[16px] mobile-tablet:py-[11px]",onClick:()=>v(!0),children:"리뷰 작성하기"})]}),y&&(0,a.jsx)(n.A,{label:"여행 완료",closeModal:()=>w(!1),children:(0,a.jsx)(p,{})}),j&&(0,a.jsx)(n.A,{label:"리뷰 작성",closeModal:_,children:(0,a.jsx)(h,{planDetail:g,closeModal:_})})]}):(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(r(),{src:i.A,alt:"로딩 중"})})}function g(e){let{plans:t}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"items-center justify-center gap-4 pc:grid pc:grid-cols-2 mobile-tablet:flex mobile-tablet:flex-col",children:t.map(e=>(0,a.jsx)(u,{planDetail:e},e.id))})})}},40436:(e,t,l)=>{l.d(t,{A:()=>c});var a=l(74848),s=l(91106),r=l.n(s),i=l(86715);function c(){let e=(0,i.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-0 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(r(),{href:"/myreview-manage/completed-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-trip"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"완료 가능한 여행"})})}),(0,a.jsx)(r(),{href:"/myreview-manage/reviewable-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("reviewable-trip"===e?"border-b-2 border-black text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"작성 가능한 리뷰"})})}),(0,a.jsx)(r(),{href:"/myreview-manage/reviewed-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("reviewed-trip"===e?"border-b-2 border-black text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"내가 작성한 리뷰"})})})]})})}},75361:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(74848),s=l(96540),r=l(29965),i=l.n(r),c=l(28061);let n={src:"/_next/static/media/icon_star_empty.220d76f4.svg",height:48,width:48,blurWidth:0,blurHeight:0};var o=l(7027);let d={src:"/_next/static/media/icon_star_empty_md.70313ebb.svg",height:24,width:24,blurWidth:0,blurHeight:0};function x(e){let{type:t=!1,initialRating:l=0,onRatingChange:r,readonly:x=!1}=e,[b,h]=(0,s.useState)(Number(l)),[m,p]=(0,s.useState)(0);(0,s.useEffect)(()=>{h(Number(l))},[l]);let u=e=>{!x&&(h(e),r&&r(e))};return(0,a.jsx)("div",{className:"flex",children:[1,2,3,4,5].map(e=>(0,a.jsx)("button",{onClick:()=>u(e),onMouseEnter:()=>!x&&p(e),onMouseLeave:()=>!x&&p(0),disabled:x,className:" ".concat(!x&&"transition-transform hover:scale-110"),children:t?(0,a.jsx)(i(),{src:(m||b)>=e?o.A:d,alt:"별점 ".concat(e,"점"),width:20,height:20}):(0,a.jsx)(i(),{src:(m||b)>=e?c.A:n,alt:"별점 ".concat(e,"점"),width:28,height:28})},e))})}},1997:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(84996);let s={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:l=1,pageSize:s=5}=e;try{let e="",r=[];t.length>0&&t.forEach(e=>{r.push("status=".concat(e))}),r.push("page=".concat(l)),r.push("pageSize=".concat(s)),e=r.length>0?"?".concat(r.join("&")):"";let i=await a.F.get("/plans/dreamer".concat(e));if(!i)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return i}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(s))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?reviewed=false".concat(s))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},60972:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(84996);let s={createReview:async e=>{try{return await a.F.post("/reviews",e)}catch(e){throw console.error("리뷰 등록 실패",e),e}},getMyReviews:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="?page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/reviews/me".concat(s))}catch(e){throw console.error("리뷰 목록 조회 실패",e),e}}}},4107:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(77528),s=l(74848),r=l(96540),i=l(86715),c=l(12828),n=l(5279),o=l(29965),d=l.n(o);let x=e=>t=>{let l=(0,i.useRouter)(),[o,x]=(0,r.useState)(null),[b,h]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{let e=(0,c.iD)();if(e){if("/login"===l.pathname||"/signup"===l.pathname){l.push("/");return}x(e)}else"/login"!==l.pathname&&"/signup"!==l.pathname&&l.push("/login");h(!1)},[l]),b)?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,s.jsx)(d(),{src:n.A,alt:"로딩 중"})}):o||"/login"===l.pathname||"/signup"===l.pathname?(0,s.jsx)(e,(0,a._)({},t)):null}}}]); \ No newline at end of file +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[355],{5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},85030:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_luggage_frown.ef196676.svg",height:655,width:705,blurWidth:0,blurHeight:0}},28061:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_star.6ad8be01.svg",height:48,width:48,blurWidth:0,blurHeight:0}},7027:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_star_md.608aacd5.svg",height:24,width:24,blurWidth:0,blurHeight:0}},44127:(e,t,l)=>{l.d(t,{A:()=>h});var a=l(74848);l(96540);var s=l(29965),r=l.n(s);let i={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},b={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},h=e=>{let t,l,{labelType:s="SHOPPING",labelSize:h,customLabelContainerClass:m,customLabelTextClass:p}=e,u="bg-color-blue-100",g="text-color-blue-300";switch(s){case"SHOPPING":t=i,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=c,l="맛집 탐방형";break;case"ACTIVITY":t=n,l="액티비티/탐험형";break;case"CULTURE":t=o,l="문화/역사탐방형";break;case"FESTIVAL":t=d,l="축제참여형";break;case"RELAXATION":t=x,l="휴양형";break;case"REQUEST":t=b,l="지정 견적",u="bg-color-red-100",g="text-color-red-200";break;case"PENDING":l="견적 대기",u="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",u="bg-color-gray-100 pr-2 pl-2",g="text-color-blue-400";break;default:l="지정 라벨 없음",u="bg-color-gray-100",g="hidden"}return(0,a.jsxs)("div",{className:"".concat(u," ").concat(m," ").concat("sm"===h?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(r(),{src:t,alt:"".concat(s," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(g," ").concat(p," ").concat("sm"===h?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},51761:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(74848),s=l(96540);function r(e){let{children:t,bodyClass:l}=e;return(0,s.useEffect)(()=>(l&&document.body.classList.add(l),()=>{l&&document.body.classList.remove(l)}),[l]),(0,a.jsx)(a.Fragment,{children:t})}},3319:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(74848);l(96540);let s=e=>{let{currentPage:t,totalPages:l,onPageChange:s}=e;return(0,a.jsxs)("div",{className:"flex items-center justify-center gap-1",children:[(0,a.jsx)("button",{onClick:()=>s(t-1),disabled:1===t,className:"flex h-8 w-8 items-center justify-center text-gray-500 disabled:opacity-50",children:"<"}),(()=>{let e=[];if(l<=5)for(let r=1;r<=l;r++)e.push((0,a.jsx)("button",{onClick:()=>s(r),className:"flex h-8 w-8 items-center justify-center ".concat(t===r?"bold text-blue-500":"text-gray-500"),children:r},r));else if(t<=3){for(let l=1;l<=5;l++)e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center ".concat(t===l?"bold text-blue-500":"text-gray-500"),children:l},l));e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis")),e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:l},l))}else if(t>=l-2){e.push((0,a.jsx)("button",{onClick:()=>s(1),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:"1"},1)),e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis"));for(let r=l-4;r<=l;r++)e.push((0,a.jsx)("button",{onClick:()=>s(r),className:"flex h-8 w-8 items-center justify-center ".concat(t===r?"bold text-blue-500":"text-gray-500"),children:r},r))}else{e.push((0,a.jsx)("button",{onClick:()=>s(1),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:"1"},1)),e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis1"));for(let l=t-1;l<=t+2;l++)e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center ".concat(t===l?"bold text-blue-500":"text-gray-500"),children:l},l));e.push((0,a.jsx)("span",{className:"px-1",children:"..."},"ellipsis2")),e.push((0,a.jsx)("button",{onClick:()=>s(l),className:"flex h-8 w-8 items-center justify-center text-gray-500",children:l},l))}return e})(),(0,a.jsx)("button",{onClick:()=>s(t+1),disabled:t===l,className:"flex h-8 w-8 items-center justify-center text-gray-500 disabled:opacity-50",children:">"})]})}},93779:(e,t,l)=>{l.d(t,{A:()=>g});var a=l(74848),s=l(29965),r=l.n(s),i=l(5279),c=l(44127),n=l(70539),o=l(96540),d=l(75361),x=l(3329),b=l(60972);function h(e){var t,l,s;let{planDetail:i,closeModal:c}=e,[n,h]=(0,o.useState)(0),[m,p]=(0,o.useState)("");async function u(){try{var e;await b.A.createReview({makerId:(null===(e=i.quotes)||void 0===e?void 0:e[0].maker.id)||"",rating:n,content:m,planId:i.id}),alert("리뷰가 등록되었습니다!"),window.location.reload(),c()}catch(e){console.log("리뷰 등록에 실패 하였습니다. ".concat(e))}}let g=m.length<10||0===n;return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("div",{className:"border-color bg-body.bg-gray my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"flex h-20 w-20 flex-shrink-0 items-center mobile-tablet:h-[46px] mobile-tablet:w-[46px]",children:(0,a.jsx)(r(),{src:"/assets/img_avatar".concat(null===(t=i.quotes)||void 0===t?void 0:t[0].maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400"})}),(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsxs)("div",{className:"w-full flex-col items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:null===(l=i.quotes)||void 0===l?void 0:l[0].maker.nickName}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"여행일"}),(0,a.jsx)("p",{className:"text-color-gray-400",children:(0,x.nk)(i.tripDate)})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"플랜가"}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:[null===(s=i.quotes)||void 0===s?void 0:s[0].price,"원"]})]})]})]})})]}),(0,a.jsx)("p",{className:"mb-2 font-medium",children:"평점을 선택해주세요"}),(0,a.jsx)(d.A,{initialRating:n,onRatingChange:e=>{h(e)}})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"mb-2 block font-medium",children:"상세 후기를 작성해주세요"}),(0,a.jsx)("textarea",{className:"w-full rounded-md border p-2 focus:ring-2 focus:ring-blue-400",placeholder:"최소 10자 이상 입력해주세요",rows:4,value:m,onChange:e=>{p(e.target.value)}})]}),(0,a.jsx)("button",{className:"w-full rounded-xl py-2 text-white ".concat(g?"bg-gray-300":"bg-blue-500"),disabled:g,onClick:u,children:"리뷰 등록"})]})}var m=l(86715);function p(){return(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"mb-12 w-64",children:(0,a.jsx)("p",{className:"semibold mobile-tablet:medium text-2lg",children:"여행을 완료하시겠습니까?"})}),(0,a.jsx)("button",{className:"semibold px-21 w-full rounded-xl bg-blue-500 py-3 text-lg text-white",children:"여행 완료 확정"})]})}function u(e){var t,l,s,d,b,u;let{planDetail:g}=e,f=(0,m.useRouter)(),[j,v]=(0,o.useState)(!1),[y,w]=(0,o.useState)(!1),N=f.asPath.includes("completed-trip"),k=f.asPath.includes("reviewable-trip"),_=()=>v(!1);return g?(0,a.jsxs)("div",{className:"mb-[32px] flex flex-col rounded-2xl bg-color-gray-50 px-6 py-7 mobile-tablet:px-3 mobile-tablet:py-4",children:[(0,a.jsx)("div",{className:"justify-left flex items-center gap-[12px] mobile-tablet:mt-[6px]",children:(0,a.jsx)(c.A,{labelType:"SHOPPING",customLabelContainerClass:"rounded-lg"})}),(0,a.jsxs)("div",{className:"border-color bg-body.bg-gray my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"flex h-20 w-20 flex-shrink-0 items-center mobile-tablet:h-[46px] mobile-tablet:w-[46px]",children:(0,a.jsx)(r(),{src:"/assets/img_avatar".concat(null===(l=g.quotes)||void 0===l?void 0:null===(t=l[0])||void 0===t?void 0:t.maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400"})}),(0,a.jsx)("div",{className:"flex w-full",children:(0,a.jsxs)("div",{className:"w-full flex-col items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:g?null===(d=g.quotes)||void 0===d?void 0:null===(s=d[0])||void 0===s?void 0:s.maker.nickName:"-"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"여행일"}),(0,a.jsx)("p",{className:"text-color-gray-400",children:g?(0,x.nk)(g.tripDate):"-"})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)("p",{children:"플랜가"}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:[g?null===(u=g.quotes)||void 0===u?void 0:null===(b=u[0])||void 0===b?void 0:b.price:"-","원"]})]})]})]})})]}),(0,a.jsxs)("div",{className:"flex justify-between gap-[11px] mobile:flex-col",children:[N&&(0,a.jsx)("button",{className:"semibold w-full text-nowrap rounded-lg bg-color-blue-300 px-[32.5px] py-4 text-xl text-gray-50 mobile:text-md tablet:text-lg mobile-tablet:px-[16px] mobile-tablet:py-[11px]",onClick:()=>w(!0),children:"여행 완료하기"}),k&&(0,a.jsx)("button",{className:"semibold w-full text-nowrap rounded-lg bg-color-blue-300 px-[32.5px] py-4 text-xl text-gray-50 mobile:text-md tablet:text-lg mobile-tablet:px-[16px] mobile-tablet:py-[11px]",onClick:()=>v(!0),children:"리뷰 작성하기"})]}),y&&(0,a.jsx)(n.A,{label:"여행 완료",closeModal:()=>w(!1),children:(0,a.jsx)(p,{})}),j&&(0,a.jsx)(n.A,{label:"리뷰 작성",closeModal:_,children:(0,a.jsx)(h,{planDetail:g,closeModal:_})})]}):(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(r(),{src:i.A,alt:"로딩 중"})})}function g(e){let{plans:t}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"items-center justify-center gap-4 pc:grid pc:grid-cols-2 mobile-tablet:flex mobile-tablet:flex-col",children:t.map(e=>(0,a.jsx)(u,{planDetail:e},e.id))})})}},40436:(e,t,l)=>{l.d(t,{A:()=>c});var a=l(74848),s=l(91106),r=l.n(s),i=l(86715);function c(){let e=(0,i.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-0 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(r(),{href:"/myreview-manage/completed-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-trip"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"완료 가능한 여행"})})}),(0,a.jsx)(r(),{href:"/myreview-manage/reviewable-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("reviewable-trip"===e?"border-b-2 border-black text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"작성 가능한 리뷰"})})}),(0,a.jsx)(r(),{href:"/myreview-manage/reviewed-trip",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("reviewed-trip"===e?"border-b-2 border-black text-color-black-500":""),children:(0,a.jsx)("p",{className:"text-nowrap",children:"내가 작성한 리뷰"})})})]})})}},75361:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(74848),s=l(96540),r=l(29965),i=l.n(r),c=l(28061);let n={src:"/_next/static/media/icon_star_empty.220d76f4.svg",height:48,width:48,blurWidth:0,blurHeight:0};var o=l(7027);let d={src:"/_next/static/media/icon_star_empty_md.70313ebb.svg",height:24,width:24,blurWidth:0,blurHeight:0};function x(e){let{type:t=!1,initialRating:l=0,onRatingChange:r,readonly:x=!1}=e,[b,h]=(0,s.useState)(Number(l)),[m,p]=(0,s.useState)(0);(0,s.useEffect)(()=>{h(Number(l))},[l]);let u=e=>{!x&&(h(e),r&&r(e))};return(0,a.jsx)("div",{className:"flex",children:[1,2,3,4,5].map(e=>(0,a.jsx)("button",{onClick:()=>u(e),onMouseEnter:()=>!x&&p(e),onMouseLeave:()=>!x&&p(0),disabled:x,className:" ".concat(!x&&"transition-transform hover:scale-110"),children:t?(0,a.jsx)(i(),{src:(m||b)>=e?o.A:d,alt:"별점 ".concat(e,"점"),width:20,height:20}):(0,a.jsx)(i(),{src:(m||b)>=e?c.A:n,alt:"별점 ".concat(e,"점"),width:28,height:28})},e))})}},1997:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(84996);let s={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:l=1,pageSize:s=5}=e;try{let e="",r=[];t.length>0&&t.forEach(e=>{r.push("status=".concat(e))}),r.push("page=".concat(l)),r.push("pageSize=".concat(s)),r.push("orderBy=RECENT"),e=r.length>0?"?".concat(r.join("&")):"";let i=await a.F.get("/plans/dreamer".concat(e));if(!i)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return i}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){if(e.response&&404===e.response.status)return window.location.href="/404",Promise.reject(Error("해당 여행 플랜을 찾을 수 없습니다."));throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(s))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?reviewed=false".concat(s))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},60972:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(84996);let s={createReview:async e=>{try{return await a.F.post("/reviews",e)}catch(e){throw console.error("리뷰 등록 실패",e),e}},getMyReviews:async e=>{try{let{page:t=1,pageSize:l=6}=e,s="?page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/reviews/me".concat(s))}catch(e){throw console.error("리뷰 목록 조회 실패",e),e}}}},4107:(e,t,l)=>{l.d(t,{A:()=>b});var a=l(77528),s=l(74848),r=l(96540),i=l(86715),c=l(12828),n=l(5279),o=l(29965),d=l.n(o),x=l(23504);let b=(e,t)=>l=>{let o=(0,i.useRouter)(),[b,h]=(0,r.useState)(null),[m,p]=(0,r.useState)(!0),{role:u}=(0,x.A)();return((0,r.useEffect)(()=>{let e=(0,c.iD)();if(e){if("/login"===o.pathname||"/signup"===o.pathname){o.push("/");return}if(t){let e=Array.isArray(t)?t:[t];if("guest"!==u&&!e.includes(u)){o.push("/");return}}h(e)}else"/login"!==o.pathname&&"/signup"!==o.pathname&&o.push("/login");p(!1)},[o,u,t]),m)?(0,s.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,s.jsx)(d(),{src:n.A,alt:"로딩 중"})}):b||"/login"===o.pathname||"/signup"===o.pathname?(0,s.jsx)(e,(0,a._)({},l)):null}}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/375-9b57dab88c1e450e.js b/out/_next/static/chunks/375-9b57dab88c1e450e.js deleted file mode 100644 index e7b4cde..0000000 --- a/out/_next/static/chunks/375-9b57dab88c1e450e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[375],{5279:(e,t,r)=>{r.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,r)=>{r.d(t,{A:()=>p});var a=r(74848);r(96540);var l=r(29965),n=r.n(l);let s={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},i={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},p=e=>{let t,r,{labelType:l="SHOPPING",labelSize:p,customLabelContainerClass:b,customLabelTextClass:g}=e,x="bg-color-blue-100",m="text-color-blue-300";switch(l){case"SHOPPING":t=s,r="기념품/쇼핑형";break;case"FOOD_TOUR":t=i,r="맛집 탐방형";break;case"ACTIVITY":t=c,r="액티비티/탐험형";break;case"CULTURE":t=o,r="문화/역사탐방형";break;case"FESTIVAL":t=d,r="축제참여형";break;case"RELAXATION":t=h,r="휴양형";break;case"REQUEST":t=u,r="지정 견적",x="bg-color-red-100",m="text-color-red-200";break;case"PENDING":r="견적 대기",x="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;case"CONFIRMED":r="견적 확정",x="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;default:r="지정 라벨 없음",x="bg-color-gray-100",m="hidden"}return(0,a.jsxs)("div",{className:"".concat(x," ").concat(b," ").concat("sm"===p?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(n(),{src:t,alt:"".concat(l," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(m," ").concat(g," ").concat("sm"===p?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:r})]})}},51761:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(74848),l=r(96540);function n(e){let{children:t,bodyClass:r}=e;return(0,l.useEffect)(()=>(r&&document.body.classList.add(r),()=>{r&&document.body.classList.remove(r)}),[r]),(0,a.jsx)(a.Fragment,{children:t})}},11739:(e,t,r)=>{r.d(t,{A:()=>p});var a=r(74848),l=r(96540),n=r(86715),s=r(3329),i=r(30777),c=r(44127),o=r(29965),d=r.n(o),h=r(5279);let u=(0,l.forwardRef)((e,t)=>{let{visiblePlans:r,title:o,fetchNextPage:u,hasNextPage:p,isFetchingNextPage:b,isLoading:g}=e,x=(0,n.useRouter)(),m=e=>{let t=x.pathname,r="/";t.includes("ongoing-plan")?r="/mytrip-manage/ongoing-plan/detail":t.includes("completed-plan")?r="/mytrip-manage/completed-plan/detail":t.includes("overdue-plan")&&(r="/mytrip-manage/overdue-plan/detail");let a="".concat(r,"/").concat(e);x.push(a)};return(0,l.useEffect)(()=>{if(!t||!("current"in t)||!t.current||!p)return;let e=new IntersectionObserver(e=>{e[0].isIntersecting&&p&&!b&&u()},{threshold:1});return e.observe(t.current),()=>e.disconnect()},[t,p,b,u]),(0,a.jsxs)("div",{className:"my-12 flex flex-col rounded-2xl border-color-gray-300 bg-color-gray-50 shadow",children:[(0,a.jsx)("div",{className:"semibold px-8 pt-8 text-2xl",children:"".concat(o," 플랜 목록")}),(0,a.jsx)("div",{className:"flex-col p-8",children:g?(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(d(),{src:h.A,alt:"로딩 중"})}):(0,a.jsxs)(a.Fragment,{children:[r.map(e=>(0,a.jsxs)("div",{className:"mb-3 flex justify-between rounded-2xl border-color-gray-300 bg-color-gray-50 p-2 shadow",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"semibold flex gap-2 px-2 pt-2 text-2lg",children:e.title}),(0,a.jsxs)("div",{className:"regular flex px-2 pt-2 text-lg",children:[(0,i.r)(e.serviceArea),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,s.Ns)(e.tripDate),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsx)(c.A,{labelType:e.tripType,labelSize:"sm",customLabelContainerClass:"rounded-lg"})]})]}),(0,a.jsx)("button",{className:"min-w-38 semibold text-nowrap rounded-lg border-[1px] border-solid border-color-blue-300 bg-color-gray-50 px-[32.5px] py-4 text-xl text-color-blue-300 mobile:text-md tablet:text-lg mobile-tablet:px-[16px] mobile-tablet:py-[6px]",onClick:()=>m(e.id),children:"플랜 상세"})]},e.id)),0===r.length?(0,a.jsx)("div",{className:"flex h-12 items-center justify-center rounded-xl bg-gray-200 text-center",children:"아직 플랜이 없어요!"}):!p&&r.length>0?(0,a.jsx)("div",{className:"flex h-12 items-center justify-center rounded-xl bg-gray-200 text-center",children:"모든 플랜을 확인했어요!"}):null]})})]})});u.displayName="MyPlanList";let p=u},42900:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(74848),l=r(91106),n=r.n(l),s=r(86715);function i(){let e=(0,s.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-6 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(n(),{href:"/mytrip-manage/ongoing-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("ongoing-plan"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:"진행 중인 플랜"})}),(0,a.jsx)(n(),{href:"/mytrip-manage/completed-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"종료된 플랜"})}),(0,a.jsx)(n(),{href:"/mytrip-manage/overdue-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("overdue-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"만료된 플랜"})})]})})}},1997:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(84996);let l={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:r=1,pageSize:l=5}=e;try{let e="",n=[];t.length>0&&t.forEach(e=>{n.push("status=".concat(e))}),n.push("page=".concat(r)),n.push("pageSize=".concat(l)),e=n.length>0?"?".concat(n.join("&")):"";let s=await a.F.get("/plans/dreamer".concat(e));if(!s)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return s}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:r=6}=e,l="&page=".concat(t,"&pageSize=").concat(r);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(l))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:r=6}=e,l="&page=".concat(t,"&pageSize=").concat(r);return await a.F.get("/plans/dreamer?reviewed=false".concat(l))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},4107:(e,t,r)=>{r.d(t,{A:()=>h});var a=r(77528),l=r(74848),n=r(96540),s=r(86715),i=r(12828),c=r(5279),o=r(29965),d=r.n(o);let h=e=>t=>{let r=(0,s.useRouter)(),[o,h]=(0,n.useState)(null),[u,p]=(0,n.useState)(!0);return((0,n.useEffect)(()=>{let e=(0,i.iD)();if(e){if("/login"===r.pathname||"/signup"===r.pathname){r.push("/");return}h(e)}else"/login"!==r.pathname&&"/signup"!==r.pathname&&r.push("/login");p(!1)},[r]),u)?(0,l.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,l.jsx)(d(),{src:c.A,alt:"로딩 중"})}):o||"/login"===r.pathname||"/signup"===r.pathname?(0,l.jsx)(e,(0,a._)({},t)):null}},30777:(e,t,r)=>{r.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]},91553:(e,t,r)=>{r.d(t,{q:()=>i});var a=r(1651),l=r(58959),n=class extends a.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,l.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,l.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,a=super.createResult(e,t),{isFetching:n,isRefetching:s,isError:i,isRefetchError:c}=a,o=r.fetchMeta?.fetchMore?.direction,d=i&&"forward"===o,h=n&&"forward"===o,u=i&&"backward"===o,p=n&&"backward"===o;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,l.rB)(t,r.data),hasPreviousPage:(0,l.RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:h,isFetchPreviousPageError:u,isFetchingPreviousPage:p,isRefetchError:c&&!d&&!u,isRefetching:s&&!h&&!p}}},s=r(76099);function i(e,t){return(0,s.t)(e,n,t)}},85692:(e,t,r)=>{r.d(t,{Wx:()=>o});var a=r(96540),l=Object.defineProperty,n=new Map,s=new WeakMap,i=0,c=void 0;function o({threshold:e,delay:t,trackVisibility:r,rootMargin:l,root:d,triggerOnce:h,skip:u,initialInView:p,fallbackInView:b,onChange:g}={}){var x;let[m,f]=a.useState(null),v=a.useRef(g),[y,N]=a.useState({inView:!!p,entry:void 0});v.current=g,a.useEffect(()=>{let a;if(!u&&m)return a=function(e,t,r={},a=c){if(void 0===window.IntersectionObserver&&void 0!==a){let l=e.getBoundingClientRect();return t(a,{isIntersecting:a,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}let{id:l,observer:o,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(s.has(r)||(i+=1,s.set(r,i.toString())),s.get(r)):"0":e[t]}`}).toString(),r=n.get(t);if(!r){let a;let l=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var r;let n=t.isIntersecting&&a.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=n),null==(r=l.get(t.target))||r.forEach(e=>{e(n,t)})})},e);a=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:l},n.set(t,r)}return r}(r),h=d.get(e)||[];return d.has(e)||d.set(e,h),h.push(t),o.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(d.delete(e),o.unobserve(e)),0===d.size&&(o.disconnect(),n.delete(l))}}(m,(e,t)=>{N({inView:e,entry:t}),v.current&&v.current(e,t),t.isIntersecting&&h&&a&&(a(),a=void 0)},{root:d,rootMargin:l,threshold:e,trackVisibility:r,delay:t},b),()=>{a&&a()}},[Array.isArray(e)?e.toString():e,m,d,l,h,u,r,b,t]);let w=null==(x=y.entry)?void 0:x.target,j=a.useRef(void 0);m||!w||h||u||j.current===w||(j.current=w,N({inView:!!p,entry:void 0}));let P=[f,y.inView,y.entry];return P.ref=P[0],P.inView=P[1],P.entry=P[2],P}a.Component}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/375-bb92fc666996be4e.js b/out/_next/static/chunks/375-bb92fc666996be4e.js new file mode 100644 index 0000000..b777f8d --- /dev/null +++ b/out/_next/static/chunks/375-bb92fc666996be4e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[375],{5279:(e,t,r)=>{r.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,r)=>{r.d(t,{A:()=>b});var a=r(74848);r(96540);var l=r(29965),n=r.n(l);let s={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},i={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},c={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},h={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},u={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},b=e=>{let t,r,{labelType:l="SHOPPING",labelSize:b,customLabelContainerClass:p,customLabelTextClass:g}=e,x="bg-color-blue-100",m="text-color-blue-300";switch(l){case"SHOPPING":t=s,r="기념품/쇼핑형";break;case"FOOD_TOUR":t=i,r="맛집 탐방형";break;case"ACTIVITY":t=c,r="액티비티/탐험형";break;case"CULTURE":t=o,r="문화/역사탐방형";break;case"FESTIVAL":t=d,r="축제참여형";break;case"RELAXATION":t=h,r="휴양형";break;case"REQUEST":t=u,r="지정 견적",x="bg-color-red-100",m="text-color-red-200";break;case"PENDING":r="견적 대기",x="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;case"CONFIRMED":r="견적 확정",x="bg-color-gray-100 pr-2 pl-2",m="text-color-blue-400";break;default:r="지정 라벨 없음",x="bg-color-gray-100",m="hidden"}return(0,a.jsxs)("div",{className:"".concat(x," ").concat(p," ").concat("sm"===b?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(n(),{src:t,alt:"".concat(l," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(m," ").concat(g," ").concat("sm"===b?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:r})]})}},51761:(e,t,r)=>{r.d(t,{A:()=>n});var a=r(74848),l=r(96540);function n(e){let{children:t,bodyClass:r}=e;return(0,l.useEffect)(()=>(r&&document.body.classList.add(r),()=>{r&&document.body.classList.remove(r)}),[r]),(0,a.jsx)(a.Fragment,{children:t})}},11739:(e,t,r)=>{r.d(t,{A:()=>b});var a=r(74848),l=r(96540),n=r(86715),s=r(3329),i=r(30777),c=r(44127),o=r(29965),d=r.n(o),h=r(5279);let u=(0,l.forwardRef)((e,t)=>{let{visiblePlans:r,title:o,fetchNextPage:u,hasNextPage:b,isFetchingNextPage:p,isLoading:g}=e,x=(0,n.useRouter)(),m=e=>{let t=x.pathname,r="/";t.includes("ongoing-plan")?r="/mytrip-manage/ongoing-plan/detail":t.includes("completed-plan")?r="/mytrip-manage/completed-plan/detail":t.includes("overdue-plan")&&(r="/mytrip-manage/overdue-plan/detail");let a="".concat(r,"/").concat(e);x.push(a)};return(0,l.useEffect)(()=>{if(!t||!("current"in t)||!t.current||!b)return;let e=new IntersectionObserver(e=>{e[0].isIntersecting&&b&&!p&&u()},{threshold:1});return e.observe(t.current),()=>e.disconnect()},[t,b,p,u]),(0,a.jsxs)("div",{className:"my-12 flex flex-col rounded-2xl border-color-gray-300 bg-color-gray-50 shadow",children:[(0,a.jsx)("div",{className:"semibold px-8 pt-8 text-2xl mobile-tablet:px-4 mobile-tablet:pt-4 mobile-tablet:text-xl",children:"".concat(o," 플랜 목록")}),(0,a.jsx)("div",{className:"flex-col p-8 mobile-tablet:p-4",children:g?(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(d(),{src:h.A,alt:"로딩 중"})}):(0,a.jsxs)(a.Fragment,{children:[r.map(e=>(0,a.jsxs)("div",{className:"mb-3 flex justify-between rounded-2xl border-color-gray-300 bg-color-gray-50 p-2 shadow mobile-tablet:flex-col",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"semibold flex gap-2 px-2 pt-2 text-2lg",children:e.title}),(0,a.jsxs)("div",{className:"regular flex text-nowrap px-2 pt-2 text-lg mobile-tablet:flex-col mobile-tablet:text-md",children:[(0,a.jsxs)("div",{className:"flex mobile-tablet:mb-2",children:[(0,a.jsx)("p",{children:(0,i.r)(e.serviceArea)}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsx)("p",{children:(0,s.Ns)(e.tripDate)})]}),(0,a.jsx)("p",{className:"text-color-line-200 mobile-tablet:hidden",children:"ㅣ"}),(0,a.jsx)("div",{className:"inline-block max-w-max text-nowrap mobile-tablet:mb-2",children:(0,a.jsx)(c.A,{labelType:e.tripType,labelSize:"sm",customLabelContainerClass:"rounded-lg"})})]})]}),(0,a.jsx)("button",{className:"semibold text-nowrap rounded-lg border-[1px] border-solid border-color-blue-300 bg-color-gray-50 px-5 py-4 text-lg text-color-blue-300 mobile-tablet:mt-1 mobile-tablet:px-4 mobile-tablet:py-1 mobile-tablet:text-md",onClick:()=>m(e.id),children:"플랜 상세"})]},e.id)),0===r.length?(0,a.jsx)("div",{className:"flex h-12 items-center justify-center rounded-xl bg-gray-200 text-center",children:"아직 플랜이 없어요!"}):!b&&r.length>0?(0,a.jsx)("div",{className:"flex h-12 items-center justify-center rounded-xl bg-gray-200 text-center",children:"모든 플랜을 확인했어요!"}):null]})})]})});u.displayName="MyPlanList";let b=u},42900:(e,t,r)=>{r.d(t,{A:()=>i});var a=r(74848),l=r(91106),n=r.n(l),s=r(86715);function i(){let e=(0,s.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-6 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(n(),{href:"/mytrip-manage/ongoing-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("ongoing-plan"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:"진행 중인 플랜"})}),(0,a.jsx)(n(),{href:"/mytrip-manage/completed-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"종료된 플랜"})}),(0,a.jsx)(n(),{href:"/mytrip-manage/overdue-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("overdue-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"만료된 플랜"})})]})})}},1997:(e,t,r)=>{r.d(t,{A:()=>l});var a=r(84996);let l={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:r=1,pageSize:l=5}=e;try{let e="",n=[];t.length>0&&t.forEach(e=>{n.push("status=".concat(e))}),n.push("page=".concat(r)),n.push("pageSize=".concat(l)),n.push("orderBy=RECENT"),e=n.length>0?"?".concat(n.join("&")):"";let s=await a.F.get("/plans/dreamer".concat(e));if(!s)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return s}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){if(e.response&&404===e.response.status)return window.location.href="/404",Promise.reject(Error("해당 여행 플랜을 찾을 수 없습니다."));throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:r=6}=e,l="&page=".concat(t,"&pageSize=").concat(r);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(l))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:r=6}=e,l="&page=".concat(t,"&pageSize=").concat(r);return await a.F.get("/plans/dreamer?reviewed=false".concat(l))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},4107:(e,t,r)=>{r.d(t,{A:()=>u});var a=r(77528),l=r(74848),n=r(96540),s=r(86715),i=r(12828),c=r(5279),o=r(29965),d=r.n(o),h=r(23504);let u=(e,t)=>r=>{let o=(0,s.useRouter)(),[u,b]=(0,n.useState)(null),[p,g]=(0,n.useState)(!0),{role:x}=(0,h.A)();return((0,n.useEffect)(()=>{let e=(0,i.iD)();if(e){if("/login"===o.pathname||"/signup"===o.pathname){o.push("/");return}if(t){let e=Array.isArray(t)?t:[t];if("guest"!==x&&!e.includes(x)){o.push("/");return}}b(e)}else"/login"!==o.pathname&&"/signup"!==o.pathname&&o.push("/login");g(!1)},[o,x,t]),p)?(0,l.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,l.jsx)(d(),{src:c.A,alt:"로딩 중"})}):u||"/login"===o.pathname||"/signup"===o.pathname?(0,l.jsx)(e,(0,a._)({},r)):null}},30777:(e,t,r)=>{r.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]},91553:(e,t,r)=>{r.d(t,{q:()=>i});var a=r(1651),l=r(58959),n=class extends a.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,l.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,l.PL)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,a=super.createResult(e,t),{isFetching:n,isRefetching:s,isError:i,isRefetchError:c}=a,o=r.fetchMeta?.fetchMore?.direction,d=i&&"forward"===o,h=n&&"forward"===o,u=i&&"backward"===o,b=n&&"backward"===o;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,l.rB)(t,r.data),hasPreviousPage:(0,l.RQ)(t,r.data),isFetchNextPageError:d,isFetchingNextPage:h,isFetchPreviousPageError:u,isFetchingPreviousPage:b,isRefetchError:c&&!d&&!u,isRefetching:s&&!h&&!b}}},s=r(76099);function i(e,t){return(0,s.t)(e,n,t)}},85692:(e,t,r)=>{r.d(t,{Wx:()=>o});var a=r(96540),l=Object.defineProperty,n=new Map,s=new WeakMap,i=0,c=void 0;function o({threshold:e,delay:t,trackVisibility:r,rootMargin:l,root:d,triggerOnce:h,skip:u,initialInView:b,fallbackInView:p,onChange:g}={}){var x;let[m,f]=a.useState(null),y=a.useRef(g),[v,N]=a.useState({inView:!!b,entry:void 0});y.current=g,a.useEffect(()=>{let a;if(!u&&m)return a=function(e,t,r={},a=c){if(void 0===window.IntersectionObserver&&void 0!==a){let l=e.getBoundingClientRect();return t(a,{isIntersecting:a,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}let{id:l,observer:o,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return`${t}_${"root"===t?(r=e.root)?(s.has(r)||(i+=1,s.set(r,i.toString())),s.get(r)):"0":e[t]}`}).toString(),r=n.get(t);if(!r){let a;let l=new Map,s=new IntersectionObserver(t=>{t.forEach(t=>{var r;let n=t.isIntersecting&&a.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=n),null==(r=l.get(t.target))||r.forEach(e=>{e(n,t)})})},e);a=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:l},n.set(t,r)}return r}(r),h=d.get(e)||[];return d.has(e)||d.set(e,h),h.push(t),o.observe(e),function(){h.splice(h.indexOf(t),1),0===h.length&&(d.delete(e),o.unobserve(e)),0===d.size&&(o.disconnect(),n.delete(l))}}(m,(e,t)=>{N({inView:e,entry:t}),y.current&&y.current(e,t),t.isIntersecting&&h&&a&&(a(),a=void 0)},{root:d,rootMargin:l,threshold:e,trackVisibility:r,delay:t},p),()=>{a&&a()}},[Array.isArray(e)?e.toString():e,m,d,l,h,u,r,p,t]);let w=null==(x=v.entry)?void 0:x.target,j=a.useRef(void 0);m||!w||h||u||j.current===w||(j.current=w,N({inView:!!b,entry:void 0}));let P=[f,v.inView,v.entry];return P.ref=P[0],P.inView=P[1],P.entry=P[2],P}a.Component}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/698-4ee869d52e4bfad5.js b/out/_next/static/chunks/698-4ee869d52e4bfad5.js deleted file mode 100644 index f22b7a9..0000000 --- a/out/_next/static/chunks/698-4ee869d52e4bfad5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[698],{37682:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_active_star.6ad8be01.svg",height:48,width:48,blurWidth:0,blurHeight:0}},39075:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_like_red.d2a2d0a8.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAG1BMVEVMaXH/Umf/T2X/TmL/TWP/S2D/TGX/SGT/U2jVokD9AAAACXRSTlMA/fFVJDA1H40x2ZUOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAALklEQVR4nE2LuREAIBCEYH3O/it2NFESAgZ4zKp53ExswFJdwIg6bktOAXr/VjYO3ABcnaR1dgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},83621:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_link.0502e909.svg",height:64,width:64,blurWidth:0,blurHeight:0}},5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,l)=>{l.d(t,{A:()=>p});var a=l(74848);l(96540);var r=l(29965),s=l.n(r);let c={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},i={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},m={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},p=e=>{let t,l,{labelType:r="SHOPPING",labelSize:p,customLabelContainerClass:b,customLabelTextClass:h}=e,g="bg-color-blue-100",u="text-color-blue-300";switch(r){case"SHOPPING":t=c,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=i,l="맛집 탐방형";break;case"ACTIVITY":t=o,l="액티비티/탐험형";break;case"CULTURE":t=n,l="문화/역사탐방형";break;case"FESTIVAL":t=x,l="축제참여형";break;case"RELAXATION":t=d,l="휴양형";break;case"REQUEST":t=m,l="지정 견적",g="bg-color-red-100",u="text-color-red-200";break;case"PENDING":l="견적 대기",g="bg-color-gray-100 pr-2 pl-2",u="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",g="bg-color-gray-100 pr-2 pl-2",u="text-color-blue-400";break;default:l="지정 라벨 없음",g="bg-color-gray-100",u="hidden"}return(0,a.jsxs)("div",{className:"".concat(g," ").concat(b," ").concat("sm"===p?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(s(),{src:t,alt:"".concat(r," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(u," ").concat(h," ").concat("sm"===p?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},51761:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(74848),r=l(96540);function s(e){let{children:t,bodyClass:l}=e;return(0,r.useEffect)(()=>(l&&document.body.classList.add(l),()=>{l&&document.body.classList.remove(l)}),[l]),(0,a.jsx)(a.Fragment,{children:t})}},34595:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(74848),r=l(3329),s=l(30777),c=l(44127);function i(e){let{planDetail:t}=e;return(0,a.jsx)("div",{className:"flex flex-col gap-y-[32px] mobile:gap-y-4",children:(0,a.jsxs)("div",{className:"w-fill border-color semibol flex flex-col gap-y-1 rounded-2xl border-[1px] bg-color-background-200 px-10 py-8 text-xl mobile:px-[16px] mobile:py-[16px] mobile-tablet:text-md",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"createdAt",children:"플랜요청일"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?(0,r.nk)(t.createdAt):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"tripType",children:"여행 유형"}),(0,a.jsx)("div",{className:"text-color-black-400",children:(0,a.jsx)(c.A,{labelType:(null==t?void 0:t.tripType)||"-",customLabelContainerClass:"rounded-lg"})})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"tripDate",children:"여행 날짜"}),(0,a.jsx)("div",{className:"flex-1 flex-wrap text-color-black-400",children:t?(0,r.nk)(t.tripDate):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"serviceArea",children:"여행지"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?(0,s.r)(t.serviceArea):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"details",children:"세부 요청 사항"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?t.details:"-"})]})]})})}},96184:(e,t,l)=>{l.d(t,{A:()=>y});var a=l(74848),r=l(42900),s=l(51761),c=l(34595),i=l(69060),o=l(86715),n=l(97286),x=l(29965),d=l.n(x),m=l(44127),p=l(39075),b=l(37682),h=l(83621),g=l(91106),u=l.n(g),j=l(3329);function N(e){let{quotationDetail:t,planDetail:l}=e;return(0,a.jsxs)("div",{className:"mb-[32px] flex flex-col rounded-2xl bg-color-gray-50 px-6 py-7 shadow mobile-tablet:px-3 mobile-tablet:py-4",children:[(0,a.jsx)("div",{className:"justify-left flex items-center gap-[12px] mobile-tablet:mt-[6px]",children:(0,a.jsx)(m.A,{labelType:l.tripType,customLabelContainerClass:"rounded-lg"})}),(0,a.jsxs)("div",{className:"my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"md:w-24 md:h-24 flex h-20 w-20 content-center items-center mobile:h-12 mobile:w-12",children:(0,a.jsx)(d(),{src:"/assets/img_avatar".concat(t.maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400 mobile-tablet:border-[1px]"})}),(0,a.jsxs)("div",{className:"flex w-full",children:[(0,a.jsxs)("div",{className:"w-full flex-col content-around items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:t.maker.nickName}),(0,a.jsxs)("div",{className:"flex content-center items-center gap-4 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 items-center gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)(d(),{src:b.A,alt:"별점",className:"color-red-200 h-6 w-6 mobile-tablet:h-[14px] mobile-tablet:w-[14px]"}),(0,a.jsx)("p",{children:t.maker.averageRating}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:["(",t.maker.totalReviews,")"]})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsx)("div",{className:"medium flex flex-shrink-0 items-center gap-[6px] object-center text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:(0,a.jsxs)(u(),{href:t.maker.gallery,target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex mobile-tablet:h-[14px] mobile-tablet:w-[14px]",children:(0,a.jsx)(d(),{src:h.A,alt:"링크이미지",width:30,height:30})}),(0,a.jsx)("p",{className:"content-center text-color-gray-400",children:"SNS"})]})}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsxs)("p",{children:[t.maker.totalConfirms,"건"]}),(0,a.jsx)("p",{className:"text-color-gray-400",children:"확정"})]})]})]}),(0,a.jsx)("div",{className:"medium flex-col text-2lg text-color-blue-400 mobile-tablet:mr-[10px] mobile-tablet:text-sm",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d(),{src:p.A,alt:"좋아요",width:24,height:24,className:"color-red-200 h-[24px] w-[24px]"}),(0,a.jsx)("p",{children:t.maker.totalFollows})]})})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-[12px] mobile-tablet:grid mobile-tablet:grid-cols-3 mobile-tablet:gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mobile-tablet:col-span-3 mobile-tablet:mb-3",children:[(0,a.jsx)("p",{className:"regular whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-[4px] text-2lg text-color-gray-500 mobile-tablet:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile-tablet:text-md",children:(0,j.nk)(l.tripDate)})]}),(0,a.jsx)("p",{className:"text-color-line-200 mobile-tablet:hidden",children:"ㅣ"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-[4px] text-2lg font-normal leading-[26px] text-color-gray-500 mobile-tablet:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium leading-[26px] text-color-black-300 mobile-tablet:text-md",children:l.serviceArea})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-4 py-6",children:[(0,a.jsx)("p",{className:"medium text-2lg mobile-tablet:text-md",children:"견적 금액"}),(0,a.jsxs)("p",{className:"bold text-2xl mobile-tablet:text-2lg",children:[t.price.toLocaleString(),"원"]})]})]})]})}var f=l(5279);function A(e){let{planDetail:t}=e,{id:l}=(0,o.useRouter)().query,{data:r,isLoading:s}=(0,n.I)({queryKey:["Quotations",l],queryFn:()=>i.i.getQuotations({planId:l}),enabled:!!l});return s?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(d(),{src:f.A,alt:"로딩 중"})}):(null==r?void 0:r.list)&&0!==r.list.length?(0,a.jsx)("div",{className:"lg:grid-cols-2 grid w-full grid-cols-1 items-center justify-center gap-4 mobile-tablet:flex mobile-tablet:flex-col",children:r.list.map(e=>(0,a.jsx)(N,{quotationDetail:e,planDetail:t},e.id))}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center text-center text-xl text-color-gray-500",children:[(0,a.jsx)("p",{children:"아직 받은 견적이 없어요!"}),(0,a.jsx)("br",{}),(0,a.jsx)("p",{children:"지정견적요청을 해보세요!"})]})}function y(e){let{planDetail:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A,{}),(0,a.jsx)(s.A,{bodyClass:"bg-gray",children:(0,a.jsxs)("div",{className:"my-16 rounded-2xl bg-color-gray-50 p-10",children:[(0,a.jsx)("p",{className:"semibold text-2xl",children:"플랜 정보"}),(0,a.jsxs)("div",{className:"my-10 rounded-2xl border-gray-300 p-5 shadow",children:[(0,a.jsx)("div",{className:"semibold mb-3 text-2xl text-color-black-500",children:t.title}),(0,a.jsx)(c.A,{planDetail:t})]}),(0,a.jsxs)("div",{className:"flex-col",children:[(0,a.jsx)("p",{className:"semibold mb-10 text-2xl",children:"견적 정보"}),(0,a.jsx)(A,{planDetail:t})]})]})})]}):(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(d(),{src:f.A,alt:"로딩 중"})})}},42900:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(74848),r=l(91106),s=l.n(r),c=l(86715);function i(){let e=(0,c.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-6 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(s(),{href:"/mytrip-manage/ongoing-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("ongoing-plan"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:"진행 중인 플랜"})}),(0,a.jsx)(s(),{href:"/mytrip-manage/completed-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"종료된 플랜"})}),(0,a.jsx)(s(),{href:"/mytrip-manage/overdue-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("overdue-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"만료된 플랜"})})]})})}},1997:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(84996);let r={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:l=1,pageSize:r=5}=e;try{let e="",s=[];t.length>0&&t.forEach(e=>{s.push("status=".concat(e))}),s.push("page=".concat(l)),s.push("pageSize=".concat(r)),e=s.length>0?"?".concat(s.join("&")):"";let c=await a.F.get("/plans/dreamer".concat(e));if(!c)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return c}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,r="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(r))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,r="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?reviewed=false".concat(r))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},69060:(e,t,l)=>{l.d(t,{i:()=>r});var a=l(84996);let r={getQuotations:async function(){let{page:e=1,pageSize:t=10,planId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let r="",s=[];s.push("page=".concat(e)),s.push("pageSize=".concat(t)),r=s.length>0?"?".concat(s.join("&")):"";let c=await a.F.get("/plans/".concat(l,"/quotes").concat(r));if(!c)return{totalCount:0,list:[]};return c}catch(e){throw console.error("견적 목록 조회 실패",e),e}},getQuotationDetail:async e=>{try{return await a.F.get("/plans/".concat(e,"/qoutes"))}catch(e){throw console.error("견적 상세 조회 실패",e),e}},confirmQuotation:async(e,t)=>{try{return await a.F.patch("quotes/".concat(t,"/confirm"),e)}catch(e){throw console.error("견적 확정에 실패 하였습니다.",e),e}}}},4107:(e,t,l)=>{l.d(t,{A:()=>d});var a=l(77528),r=l(74848),s=l(96540),c=l(86715),i=l(12828),o=l(5279),n=l(29965),x=l.n(n);let d=e=>t=>{let l=(0,c.useRouter)(),[n,d]=(0,s.useState)(null),[m,p]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{let e=(0,i.iD)();if(e){if("/login"===l.pathname||"/signup"===l.pathname){l.push("/");return}d(e)}else"/login"!==l.pathname&&"/signup"!==l.pathname&&l.push("/login");p(!1)},[l]),m)?(0,r.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,r.jsx)(x(),{src:o.A,alt:"로딩 중"})}):n||"/login"===l.pathname||"/signup"===l.pathname?(0,r.jsx)(e,(0,a._)({},t)):null}},30777:(e,t,l)=>{l.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/698-7a33c36260947b7e.js b/out/_next/static/chunks/698-7a33c36260947b7e.js new file mode 100644 index 0000000..c63b68f --- /dev/null +++ b/out/_next/static/chunks/698-7a33c36260947b7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[698],{37682:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_active_star.6ad8be01.svg",height:48,width:48,blurWidth:0,blurHeight:0}},39075:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_like_red.d2a2d0a8.png",height:24,width:24,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAG1BMVEVMaXH/Umf/T2X/TmL/TWP/S2D/TGX/SGT/U2jVokD9AAAACXRSTlMA/fFVJDA1H40x2ZUOAAAACXBIWXMAAAsTAAALEwEAmpwYAAAALklEQVR4nE2LuREAIBCEYH3O/it2NFESAgZ4zKp53ExswFJdwIg6bktOAXr/VjYO3ABcnaR1dgAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8}},83621:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_link.0502e909.svg",height:64,width:64,blurWidth:0,blurHeight:0}},5279:(e,t,l)=>{l.d(t,{A:()=>a});let a={src:"/_next/static/media/icon_loading.05325840.gif",height:45,width:256,blurWidth:0,blurHeight:0}},44127:(e,t,l)=>{l.d(t,{A:()=>p});var a=l(74848);l(96540);var r=l(29965),s=l.n(r);let c={src:"/_next/static/media/label_shopping.937adf02.svg",height:24,width:24,blurWidth:0,blurHeight:0},i={src:"/_next/static/media/label_food_tour.400ea208.svg",height:24,width:24,blurWidth:0,blurHeight:0},o={src:"/_next/static/media/label_activity.99e9b5b7.svg",height:24,width:24,blurWidth:0,blurHeight:0},n={src:"/_next/static/media/label_culture.9a006b68.svg",height:24,width:24,blurWidth:0,blurHeight:0},x={src:"/_next/static/media/label_festival.3554371c.svg",height:24,width:24,blurWidth:0,blurHeight:0},d={src:"/_next/static/media/label_relaxation.99c0940d.svg",height:24,width:24,blurWidth:0,blurHeight:0},m={src:"/_next/static/media/label_File_dock.3966b988.svg",height:24,width:24,blurWidth:0,blurHeight:0},p=e=>{let t,l,{labelType:r="SHOPPING",labelSize:p,customLabelContainerClass:b,customLabelTextClass:h}=e,g="bg-color-blue-100",u="text-color-blue-300";switch(r){case"SHOPPING":t=c,l="기념품/쇼핑형";break;case"FOOD_TOUR":t=i,l="맛집 탐방형";break;case"ACTIVITY":t=o,l="액티비티/탐험형";break;case"CULTURE":t=n,l="문화/역사탐방형";break;case"FESTIVAL":t=x,l="축제참여형";break;case"RELAXATION":t=d,l="휴양형";break;case"REQUEST":t=m,l="지정 견적",g="bg-color-red-100",u="text-color-red-200";break;case"PENDING":l="견적 대기",g="bg-color-gray-100 pr-2 pl-2",u="text-color-blue-400";break;case"CONFIRMED":l="견적 확정",g="bg-color-gray-100 pr-2 pl-2",u="text-color-blue-400";break;default:l="지정 라벨 없음",g="bg-color-gray-100",u="hidden"}return(0,a.jsxs)("div",{className:"".concat(g," ").concat(b," ").concat("sm"===p?"h-[26px]":""," rounded-1 flex items-center py-1 pr-[5px] pl-[3px] mobile-tablet:h-[26px] mobile-tablet:pt-[2px] mobile-tablet:pr-[4px] mobile-tablet:pb-[2px] mobile-tablet:pl-[2px] gap-[4px] mobile-tablet:gap-[2px] "),children:[t&&(0,a.jsx)(s(),{src:t,alt:"".concat(r," label"),width:24,height:24}),(0,a.jsx)("p",{className:"".concat(u," ").concat(h," ").concat("sm"===p?"text-xs":""," text-lg semibold leading-[24px] mobile-tablet:text-[13px] mobile-tablet:leading-[22px]"),children:l})]})}},51761:(e,t,l)=>{l.d(t,{A:()=>s});var a=l(74848),r=l(96540);function s(e){let{children:t,bodyClass:l}=e;return(0,r.useEffect)(()=>(l&&document.body.classList.add(l),()=>{l&&document.body.classList.remove(l)}),[l]),(0,a.jsx)(a.Fragment,{children:t})}},34595:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(74848),r=l(3329),s=l(30777),c=l(44127);function i(e){let{planDetail:t}=e;return(0,a.jsx)("div",{className:"flex flex-col gap-y-[32px] mobile:gap-y-4",children:(0,a.jsxs)("div",{className:"w-fill border-color semibol flex flex-col gap-y-1 rounded-2xl border-[1px] bg-color-background-200 px-10 py-8 text-xl mobile:px-[16px] mobile:py-[16px] mobile-tablet:text-md",children:[(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"createdAt",children:"플랜요청일"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?(0,r.nk)(t.createdAt):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"tripType",children:"여행 유형"}),(0,a.jsx)("div",{className:"text-nowrap text-color-black-400",children:(0,a.jsx)(c.A,{labelType:(null==t?void 0:t.tripType)||"-",customLabelContainerClass:"rounded-lg"})})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"tripDate",children:"여행 날짜"}),(0,a.jsx)("div",{className:"flex-1 flex-wrap text-color-black-400",children:t?(0,r.nk)(t.tripDate):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"serviceArea",children:"여행지"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?(0,s.r)(t.serviceArea):"-"})]}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)("label",{className:"w-[150px] text-color-gray-300",htmlFor:"details",children:"세부 요청 사항"}),(0,a.jsx)("div",{className:"text-color-black-400",children:t?t.details:"-"})]})]})})}},96184:(e,t,l)=>{l.d(t,{A:()=>y});var a=l(74848),r=l(42900),s=l(51761),c=l(34595),i=l(69060),o=l(86715),n=l(97286),x=l(29965),d=l.n(x),m=l(44127),p=l(39075),b=l(37682),h=l(83621),g=l(91106),u=l.n(g),j=l(3329);function N(e){let{quotationDetail:t,planDetail:l}=e;return(0,a.jsxs)("div",{className:"mb-[32px] flex flex-col rounded-2xl bg-color-gray-50 px-6 py-7 shadow mobile-tablet:px-3 mobile-tablet:py-4",children:[(0,a.jsx)("div",{className:"justify-left flex items-center gap-[12px] mobile-tablet:mt-[6px]",children:(0,a.jsx)(m.A,{labelType:l.tripType,customLabelContainerClass:"rounded-lg"})}),(0,a.jsxs)("div",{className:"my-6 flex gap-6 rounded-md border-[1px] px-[18px] py-4 mobile-tablet:my-[14px] mobile-tablet:gap-3 mobile-tablet:px-[10px]",children:[(0,a.jsx)("div",{className:"md:w-24 md:h-24 flex h-20 w-20 content-center items-center mobile:h-12 mobile:w-12",children:(0,a.jsx)(d(),{src:"/assets/img_avatar".concat(t.maker.image.split("_")[1],".svg"),alt:"프로필사진",width:80,height:80,className:"rounded-full border-2 border-color-blue-400 mobile-tablet:border-[1px]"})}),(0,a.jsxs)("div",{className:"flex w-full",children:[(0,a.jsxs)("div",{className:"w-full flex-col content-around items-center justify-between text-xs text-color-black-500",children:[(0,a.jsx)("p",{className:"semibold text-xl mobile-tablet:text-lg",children:t.maker.nickName}),(0,a.jsxs)("div",{className:"flex content-center items-center gap-4 mobile-tablet:gap-1",children:[(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 items-center gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsx)(d(),{src:b.A,alt:"별점",className:"color-red-200 h-6 w-6 mobile-tablet:h-[14px] mobile-tablet:w-[14px]"}),(0,a.jsx)("p",{children:t.maker.averageRating}),(0,a.jsxs)("p",{className:"text-color-gray-400",children:["(",t.maker.totalReviews,")"]})]}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsx)("div",{className:"medium flex flex-shrink-0 items-center gap-[6px] object-center text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:(0,a.jsxs)(u(),{href:t.maker.gallery,target:"_blank",rel:"noopener noreferrer",className:"flex items-center",children:[(0,a.jsx)("div",{className:"flex mobile-tablet:h-[14px] mobile-tablet:w-[14px]",children:(0,a.jsx)(d(),{src:h.A,alt:"링크이미지",width:30,height:30})}),(0,a.jsx)("p",{className:"content-center text-color-gray-400",children:"SNS"})]})}),(0,a.jsx)("p",{className:"text-color-line-200",children:"ㅣ"}),(0,a.jsxs)("div",{className:"medium flex flex-shrink-0 gap-[6px] text-lg mobile-tablet:gap-[5px] mobile-tablet:text-sm",children:[(0,a.jsxs)("p",{children:[t.maker.totalConfirms,"건"]}),(0,a.jsx)("p",{className:"text-color-gray-400",children:"확정"})]})]})]}),(0,a.jsx)("div",{className:"medium flex-col text-2lg text-color-blue-400 mobile-tablet:mr-[10px] mobile-tablet:text-sm",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d(),{src:p.A,alt:"좋아요",width:24,height:24,className:"color-red-200 h-[24px] w-[24px]"}),(0,a.jsx)("p",{children:t.maker.totalFollows})]})})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-[12px] mobile-tablet:grid mobile-tablet:grid-cols-3 mobile-tablet:gap-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mobile-tablet:col-span-3 mobile-tablet:mb-3",children:[(0,a.jsx)("p",{className:"regular whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-[4px] text-2lg text-color-gray-500 mobile-tablet:text-md",children:"여행일"}),(0,a.jsx)("p",{className:"medium text-2lg text-color-black-300 mobile-tablet:text-md",children:(0,j.nk)(l.tripDate)})]}),(0,a.jsx)("p",{className:"text-color-line-200 mobile-tablet:hidden",children:"ㅣ"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("p",{className:"whitespace-nowrap rounded-[4px] bg-color-background-400 px-[6px] py-[4px] text-2lg font-normal leading-[26px] text-color-gray-500 mobile-tablet:text-md",children:"여행지"}),(0,a.jsx)("p",{className:"whitespace-nowrap text-2lg font-medium leading-[26px] text-color-black-300 mobile-tablet:text-md",children:l.serviceArea})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-4 py-6",children:[(0,a.jsx)("p",{className:"medium text-2lg mobile-tablet:text-md",children:"견적 금액"}),(0,a.jsxs)("p",{className:"bold text-2xl mobile-tablet:text-2lg",children:[t.price.toLocaleString(),"원"]})]})]})]})}var f=l(5279);function A(e){let{planDetail:t}=e,{id:l}=(0,o.useRouter)().query,{data:r,isLoading:s}=(0,n.I)({queryKey:["Quotations",l],queryFn:()=>i.i.getQuotations({planId:l}),enabled:!!l});return s?(0,a.jsx)("div",{className:"flex items-center justify-center",children:(0,a.jsx)(d(),{src:f.A,alt:"로딩 중"})}):(null==r?void 0:r.list)&&0!==r.list.length?(0,a.jsx)("div",{className:"lg:grid-cols-2 grid w-full grid-cols-1 items-center justify-center gap-4 mobile-tablet:flex mobile-tablet:flex-col",children:r.list.map(e=>(0,a.jsx)(N,{quotationDetail:e,planDetail:t},e.id))}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center text-center text-xl text-color-gray-500",children:[(0,a.jsx)("p",{children:"아직 받은 견적이 없어요!"}),(0,a.jsx)("br",{}),(0,a.jsx)("p",{children:"지정견적요청을 해보세요!"})]})}function y(e){let{planDetail:t}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A,{}),(0,a.jsx)(s.A,{bodyClass:"bg-gray",children:(0,a.jsxs)("div",{className:"my-16 rounded-2xl bg-color-gray-50 p-10",children:[(0,a.jsx)("p",{className:"semibold text-2xl",children:"플랜 정보"}),(0,a.jsxs)("div",{className:"my-10 rounded-2xl border-gray-300 p-5 shadow",children:[(0,a.jsx)("div",{className:"semibold mb-3 text-2xl text-color-black-500",children:t.title}),(0,a.jsx)(c.A,{planDetail:t})]}),(0,a.jsxs)("div",{className:"flex-col",children:[(0,a.jsx)("p",{className:"semibold mb-10 text-2xl",children:"견적 정보"}),(0,a.jsx)(A,{planDetail:t})]})]})})]}):(0,a.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,a.jsx)(d(),{src:f.A,alt:"로딩 중"})})}},42900:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(74848),r=l(91106),s=l.n(r),c=l(86715);function i(){let e=(0,c.useRouter)().pathname.split("/").pop();return(0,a.jsx)("div",{className:"relative left-1/2 w-screen -translate-x-1/2 bg-color-background-100 px-[260px] mobile:px-6 tablet:px-[72px]",children:(0,a.jsxs)("div",{className:"max-w-screen-xl semibold mx-auto flex gap-[32px] px-[16px] text-xl text-color-gray-400 mobile-tablet:gap-[24px] mobile-tablet:text-md",children:[(0,a.jsx)(s(),{href:"/mytrip-manage/ongoing-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("ongoing-plan"===e?"border-b-2 border-color-black-500 text-color-black-500":""),children:"진행 중인 플랜"})}),(0,a.jsx)(s(),{href:"/mytrip-manage/completed-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("completed-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"종료된 플랜"})}),(0,a.jsx)(s(),{href:"/mytrip-manage/overdue-plan",children:(0,a.jsx)("button",{className:"py-[16px] ".concat("overdue-plan"===e?"border-b-2 border-black text-color-black-500":""),children:"만료된 플랜"})})]})})}},1997:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(84996);let r={planRequest:async e=>{try{return await a.F.post("/plans",e)}catch(e){throw console.error("여행 요청 실패",e),e}},getPlanList:async e=>{let{status:t=[],page:l=1,pageSize:r=5}=e;try{let e="",s=[];t.length>0&&t.forEach(e=>{s.push("status=".concat(e))}),s.push("page=".concat(l)),s.push("pageSize=".concat(r)),s.push("orderBy=RECENT"),e=s.length>0?"?".concat(s.join("&")):"";let c=await a.F.get("/plans/dreamer".concat(e));if(!c)return console.warn("데이터가 없습니다. 빈 데이터를 반환합니다."),{totalCount:0,list:[]};return c}catch(e){throw console.error("여행 조회 실패",e),e}},getPlanDetail:async e=>{try{return await a.F.get("/plans/".concat(e))}catch(e){if(e.response&&404===e.response.status)return window.location.href="/404",Promise.reject(Error("해당 여행 플랜을 찾을 수 없습니다."));throw console.error("여행 데이터 요청 실패",e),e}},getPendingPlan:async()=>{try{return(await a.F.get("/plans/dreamer?status=PENDING")).list}catch(e){console.error("지정 플랜 조회 실패",e)}},postPlanRequest:async(e,t)=>{try{return await a.F.post("/plans/".concat(e,"/assign"),{assigneeId:t})}catch(e){if(e.response&&409===e.response.status)throw Error("이미 지정 견적을 요청하셨습니다!")}},getStatistics:async e=>{try{return await a.F.get("/plans/groupCount".concat(e?"?serviceArea=".concat(e):""))}catch(e){throw console.error("통계 자료 조회 실패",e),e}},getReadyToCompletePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,r="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?readyToComplete=true".concat(r))}catch(e){console.error("완료 플랜 조회 실패",e)}},getReviewablePlan:async e=>{try{let{page:t=1,pageSize:l=6}=e,r="&page=".concat(t,"&pageSize=").concat(l);return await a.F.get("/plans/dreamer?reviewed=false".concat(r))}catch(e){console.error("리뷰 작성 가능 플랜 조회 실패",e)}},deletePlan:async e=>{try{return await a.F.delete("/plans/".concat(e))}catch(e){console.error("플랜 취소 실패",e)}}}},69060:(e,t,l)=>{l.d(t,{i:()=>r});var a=l(84996);let r={getQuotations:async function(){let{page:e=1,pageSize:t=10,planId:l=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{let r="",s=[];s.push("page=".concat(e)),s.push("pageSize=".concat(t)),r=s.length>0?"?".concat(s.join("&")):"";let c=await a.F.get("/plans/".concat(l,"/quotes").concat(r));if(!c)return{totalCount:0,list:[]};return c}catch(e){throw console.error("견적 목록 조회 실패",e),e}},getQuotationDetail:async e=>{try{return await a.F.get("/plans/".concat(e,"/qoutes"))}catch(e){throw console.error("견적 상세 조회 실패",e),e}},confirmQuotation:async(e,t)=>{try{return await a.F.patch("quotes/".concat(t,"/confirm"),e)}catch(e){throw console.error("견적 확정에 실패 하였습니다.",e),e}}}},4107:(e,t,l)=>{l.d(t,{A:()=>m});var a=l(77528),r=l(74848),s=l(96540),c=l(86715),i=l(12828),o=l(5279),n=l(29965),x=l.n(n),d=l(23504);let m=(e,t)=>l=>{let n=(0,c.useRouter)(),[m,p]=(0,s.useState)(null),[b,h]=(0,s.useState)(!0),{role:g}=(0,d.A)();return((0,s.useEffect)(()=>{let e=(0,i.iD)();if(e){if("/login"===n.pathname||"/signup"===n.pathname){n.push("/");return}if(t){let e=Array.isArray(t)?t:[t];if("guest"!==g&&!e.includes(g)){n.push("/");return}}p(e)}else"/login"!==n.pathname&&"/signup"!==n.pathname&&n.push("/login");h(!1)},[n,g,t]),b)?(0,r.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,r.jsx)(x(),{src:o.A,alt:"로딩 중"})}):m||"/login"===n.pathname||"/signup"===n.pathname?(0,r.jsx)(e,(0,a._)({},l)):null}},30777:(e,t,l)=>{l.d(t,{r:()=>a});let a=e=>({SEOUL:"서울",BUSAN:"부산",INCHEON:"인천",DAEGU:"대구",DAEJEON:"대전",GWANGJU:"광주",ULSAN:"울산",SEJONG:"세종",GYEONGGI:"경기",GANGWON:"강원",CHUNGBUK:"충북",CHUNGNAM:"충남",JEONBUK:"전북",JEONNAM:"전남",GYEONGBUK:"경북",GYEONGNAM:"경남",JEJU:"제주"})[e]}}]); \ No newline at end of file diff --git a/out/_next/static/chunks/pages/_app-51a03fc43cb24a90.js b/out/_next/static/chunks/pages/_app-51a03fc43cb24a90.js deleted file mode 100644 index ad006c6..0000000 --- a/out/_next/static/chunks/pages/_app-51a03fc43cb24a90.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{40377:function(e,t){var r,n,i;!function(s){"use strict";var o=s.setTimeout,a=s.clearTimeout,u=s.XMLHttpRequest,l=s.XDomainRequest,c=s.ActiveXObject,h=s.EventSource,f=s.document,d=s.Promise,p=s.fetch,y=s.Response,m=s.TextDecoder,g=s.TextEncoder,b=s.AbortController;if("undefined"==typeof window||void 0===f||"readyState"in f||null!=f.body||(f.readyState="loading",window.addEventListener("load",function(e){f.readyState="complete"},!1)),null==u&&null!=c&&(u=function(){return new c("Microsoft.XMLHTTP")}),void 0==Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return new Date().getTime()}),void 0==b){var v=p;p=function(e,t){var r=t.signal;return v(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then(function(e){var t=e.body.getReader();return r._reader=t,r._aborted&&r._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}})},b=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function w(){this.bitsNeeded=0,this.codePoint=0}w.prototype.decode=function(e){function t(e,t,r){if(1===r)return e>=128>>t&&e<