From 2ed36722349bad1c5784aa2a2d81011aa29a6c53 Mon Sep 17 00:00:00 2001 From: eunhak Date: Thu, 24 Oct 2024 01:24:02 +0900 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=EB=A7=A4=EA=B0=81=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20=EC=83=81=ED=92=88=20=EC=98=88=EC=99=B8=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../contentlist/ProductBookmarkContentList.tsx | 11 ++++++++++- .../product/contentlist/ProductDealContentList.tsx | 11 ++++++++++- .../contentlist/ProductEndRecruitmentContentList.tsx | 11 ++++++++++- .../contentlist/ProductRecruitmentContentList.tsx | 11 ++++++++++- src/types/Diviend.ts | 3 +++ 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/components/product/contentlist/ProductBookmarkContentList.tsx b/src/components/product/contentlist/ProductBookmarkContentList.tsx index 373431e6..03f08716 100644 --- a/src/components/product/contentlist/ProductBookmarkContentList.tsx +++ b/src/components/product/contentlist/ProductBookmarkContentList.tsx @@ -36,7 +36,16 @@ const ProductBookmarkContentList = ({
{content?.map((item) => ( -
+
{ + if (item.sale) { + alert('현재는 매각이 완료 된 상품입니다'); + // console.log(item.sale) + window.location.reload(); + } + }}>
diff --git a/src/components/product/contentlist/ProductDealContentList.tsx b/src/components/product/contentlist/ProductDealContentList.tsx index c56b85ac..396a29ae 100644 --- a/src/components/product/contentlist/ProductDealContentList.tsx +++ b/src/components/product/contentlist/ProductDealContentList.tsx @@ -58,7 +58,16 @@ const ProductDealContentList = ({
{content?.map((item) => ( -
+
{ + if (item.sale) { + alert('현재는 매각이 완료 된 상품입니다'); + // console.log(item.sale) + window.location.reload(); + } + }}>
diff --git a/src/components/product/contentlist/ProductEndRecruitmentContentList.tsx b/src/components/product/contentlist/ProductEndRecruitmentContentList.tsx index 2cfd6454..55a682da 100644 --- a/src/components/product/contentlist/ProductEndRecruitmentContentList.tsx +++ b/src/components/product/contentlist/ProductEndRecruitmentContentList.tsx @@ -71,7 +71,16 @@ const ProductEndRecruitmentContentList = ({
{content?.map((item) => ( -
+
{ + if (item.sale) { + alert('현재는 매각이 완료 된 상품입니다'); + // console.log(item.sale) + window.location.reload(); + } + }}>
diff --git a/src/components/product/contentlist/ProductRecruitmentContentList.tsx b/src/components/product/contentlist/ProductRecruitmentContentList.tsx index a1e25e76..43ef08cc 100644 --- a/src/components/product/contentlist/ProductRecruitmentContentList.tsx +++ b/src/components/product/contentlist/ProductRecruitmentContentList.tsx @@ -86,7 +86,16 @@ const ProductRecruitmentContentList = ({
{content?.map((item) => ( -
+
{ + if (item.sale) { + alert('현재는 매각이 완료 된 상품입니다'); + // console.log(item.sale) + window.location.reload(); + } + }}>
diff --git a/src/types/Diviend.ts b/src/types/Diviend.ts index 7d9cf0ba..51dc4ea9 100644 --- a/src/types/Diviend.ts +++ b/src/types/Diviend.ts @@ -38,6 +38,7 @@ export interface IProductDetail { dividend: number; lastDivide_rate: number; bookmark: boolean; + sale: boolean; } export interface IProductEndRecruit { @@ -48,6 +49,7 @@ export interface IProductEndRecruit { totalPrice: number; sailRate: number; bookmark: boolean; + sale: boolean; } export interface IProductRecruit { @@ -59,6 +61,7 @@ export interface IProductRecruit { platform: string; recruitmentRate: number; bookmark: boolean; + sale: boolean; } interface IProductDetailSort { From 60fc48369a3de2699f2f529f36f59b256e932231 Mon Sep 17 00:00:00 2001 From: eunhak Date: Thu, 24 Oct 2024 01:24:17 +0900 Subject: [PATCH 2/6] =?UTF-8?q?feat:=20=EB=B6=80=EC=82=B0=20=EC=A7=80?= =?UTF-8?q?=ED=95=98=EC=B2=A0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/images/product/detail/subwaybusan1.svg | 1 + public/images/product/detail/subwaybusan2.svg | 1 + public/images/product/detail/subwaybusan3.svg | 1 + public/images/product/detail/subwaybusan4.svg | 1 + 4 files changed, 4 insertions(+) create mode 100644 public/images/product/detail/subwaybusan1.svg create mode 100644 public/images/product/detail/subwaybusan2.svg create mode 100644 public/images/product/detail/subwaybusan3.svg create mode 100644 public/images/product/detail/subwaybusan4.svg diff --git a/public/images/product/detail/subwaybusan1.svg b/public/images/product/detail/subwaybusan1.svg new file mode 100644 index 00000000..077f5447 --- /dev/null +++ b/public/images/product/detail/subwaybusan1.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/product/detail/subwaybusan2.svg b/public/images/product/detail/subwaybusan2.svg new file mode 100644 index 00000000..a745a14d --- /dev/null +++ b/public/images/product/detail/subwaybusan2.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/product/detail/subwaybusan3.svg b/public/images/product/detail/subwaybusan3.svg new file mode 100644 index 00000000..a713002c --- /dev/null +++ b/public/images/product/detail/subwaybusan3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/images/product/detail/subwaybusan4.svg b/public/images/product/detail/subwaybusan4.svg new file mode 100644 index 00000000..a2dcf96b --- /dev/null +++ b/public/images/product/detail/subwaybusan4.svg @@ -0,0 +1 @@ + \ No newline at end of file From 3e92d78ed31819c0eb0efa7a336b711ab1d07684 Mon Sep 17 00:00:00 2001 From: eunhak Date: Thu, 24 Oct 2024 01:25:33 +0900 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=EB=B6=81=EB=A7=88=ED=81=AC=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/product/detail/art/[id]/page.tsx | 5 ++++- src/app/product/detail/building/[id]/page.tsx | 4 ++++ src/app/product/detail/content/[id]/page.tsx | 4 ++++ src/app/product/detail/cow/[id]/page.tsx | 4 ++++ src/app/product/detail/music/[id]/page.tsx | 4 ++++ src/components/product/gnb/ArtDetailGnb.tsx | 4 ++++ src/components/product/gnb/BuildingDetailGnb.tsx | 4 ++++ src/components/product/gnb/ContentDetailGnb.tsx | 4 ++++ src/components/product/gnb/CowDetailGnb.tsx | 4 ++++ src/components/product/gnb/MusicDetailGnb.tsx | 4 ++++ 10 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/app/product/detail/art/[id]/page.tsx b/src/app/product/detail/art/[id]/page.tsx index e1a81b4f..c3a6916f 100644 --- a/src/app/product/detail/art/[id]/page.tsx +++ b/src/app/product/detail/art/[id]/page.tsx @@ -40,11 +40,14 @@ const ArtDetailpage = (props: { params: { id: string } }) => { setLocalData((prevData) => prevData ? { ...prevData, bookmark: !prevData.bookmark } : prevData ); - if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/app/product/detail/building/[id]/page.tsx b/src/app/product/detail/building/[id]/page.tsx index 538240e0..1a781db1 100644 --- a/src/app/product/detail/building/[id]/page.tsx +++ b/src/app/product/detail/building/[id]/page.tsx @@ -42,8 +42,12 @@ const BuildingDetailpage = (props: any) => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/app/product/detail/content/[id]/page.tsx b/src/app/product/detail/content/[id]/page.tsx index 41efaa4f..f2646bab 100644 --- a/src/app/product/detail/content/[id]/page.tsx +++ b/src/app/product/detail/content/[id]/page.tsx @@ -42,8 +42,12 @@ const ContentDetailpage = (props: { params: { id: string } }) => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/app/product/detail/cow/[id]/page.tsx b/src/app/product/detail/cow/[id]/page.tsx index 49152652..dfac7998 100644 --- a/src/app/product/detail/cow/[id]/page.tsx +++ b/src/app/product/detail/cow/[id]/page.tsx @@ -42,8 +42,12 @@ const CowDetailpage = (props: { params: { id: string } }) => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/app/product/detail/music/[id]/page.tsx b/src/app/product/detail/music/[id]/page.tsx index b4665f88..8816c912 100644 --- a/src/app/product/detail/music/[id]/page.tsx +++ b/src/app/product/detail/music/[id]/page.tsx @@ -42,8 +42,12 @@ const MusicDetailpage = (props: any) => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/components/product/gnb/ArtDetailGnb.tsx b/src/components/product/gnb/ArtDetailGnb.tsx index 6e985a44..76d5450f 100644 --- a/src/components/product/gnb/ArtDetailGnb.tsx +++ b/src/components/product/gnb/ArtDetailGnb.tsx @@ -39,8 +39,12 @@ const ArtDetailGnb = () => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/components/product/gnb/BuildingDetailGnb.tsx b/src/components/product/gnb/BuildingDetailGnb.tsx index 0b40228c..ec984b17 100644 --- a/src/components/product/gnb/BuildingDetailGnb.tsx +++ b/src/components/product/gnb/BuildingDetailGnb.tsx @@ -38,8 +38,12 @@ const BuildingDetailGnb = () => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/components/product/gnb/ContentDetailGnb.tsx b/src/components/product/gnb/ContentDetailGnb.tsx index 24028ac0..30d95f5f 100644 --- a/src/components/product/gnb/ContentDetailGnb.tsx +++ b/src/components/product/gnb/ContentDetailGnb.tsx @@ -37,8 +37,12 @@ const ContentDetailGnb = () => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/components/product/gnb/CowDetailGnb.tsx b/src/components/product/gnb/CowDetailGnb.tsx index 95628212..99902079 100644 --- a/src/components/product/gnb/CowDetailGnb.tsx +++ b/src/components/product/gnb/CowDetailGnb.tsx @@ -37,8 +37,12 @@ const CowDetailGnb = () => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); diff --git a/src/components/product/gnb/MusicDetailGnb.tsx b/src/components/product/gnb/MusicDetailGnb.tsx index c8b61888..da54a978 100644 --- a/src/components/product/gnb/MusicDetailGnb.tsx +++ b/src/components/product/gnb/MusicDetailGnb.tsx @@ -37,8 +37,12 @@ const MusicDetailGnb = () => { if (!bookmark) { addmutation.mutate({ productId, bookmark }); + alert('북마크 추가가 완료되었습니다'); + window.location.reload(); } else if (bookmark) { deletemutation.mutate({ productId }); + alert('북마크 삭제가 완료되었습니다'); + window.location.reload(); } } else { alert('로그인이 필요한 서비스입니다.'); From 562390451391bc92203687c9861f0ca7e6c6cb09 Mon Sep 17 00:00:00 2001 From: eunhak Date: Thu, 24 Oct 2024 01:26:04 +0900 Subject: [PATCH 4/6] =?UTF-8?q?design:=20UI=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/building/BuildingProfit.tsx | 2 +- .../product/detail/building/Map.tsx | 5 ++- .../detail/building/PublicTransport.tsx | 23 +++++++----- .../product/detail/content/MovieChart.tsx | 35 ++++++++++++------- .../product/detail/content/MovieTenChart.tsx | 35 ++++++++++++------- .../product/detail/music/MusicProfit.tsx | 4 +-- 6 files changed, 65 insertions(+), 39 deletions(-) diff --git a/src/components/product/detail/building/BuildingProfit.tsx b/src/components/product/detail/building/BuildingProfit.tsx index cf1f3a9b..9647b605 100644 --- a/src/components/product/detail/building/BuildingProfit.tsx +++ b/src/components/product/detail/building/BuildingProfit.tsx @@ -78,7 +78,7 @@ const BuildingProfit = ({ url }: { url: string }) => {
-
+
임차인 소개
{data?.lease[0]?.tenantIntroduction}
diff --git a/src/components/product/detail/building/Map.tsx b/src/components/product/detail/building/Map.tsx index 0d96d64e..3d721c36 100644 --- a/src/components/product/detail/building/Map.tsx +++ b/src/components/product/detail/building/Map.tsx @@ -128,7 +128,10 @@ const KakaoMap = () => {
{data?.location}
-
+
); }; diff --git a/src/components/product/detail/building/PublicTransport.tsx b/src/components/product/detail/building/PublicTransport.tsx index 9aeb236f..554845a8 100644 --- a/src/components/product/detail/building/PublicTransport.tsx +++ b/src/components/product/detail/building/PublicTransport.tsx @@ -47,7 +47,11 @@ const stationImageMap: { [key: string]: string } = { 분당선: '/images/product/detail/subwaybundang.svg', 경의중앙선: '/images/product/detail/subwaygyeonghye.svg', 신분당선: '/images/product/detail/subwaysinbundang.svg', - 수인분당선: '/images/product/detail/subwaysuinbundang.svg' + 수인분당선: '/images/product/detail/subwaysuinbundang.svg', + 부산1호선: '/images/product/detail/subwaybusan1.svg', + 부산2호선: '/images/product/detail/subwaybusan2.svg', + 부산3호선: '/images/product/detail/subwaybusan3.svg', + 부산4호선: '/images/product/detail/subwaybusan4.svg' }; const PublicTransport = () => { @@ -122,7 +126,7 @@ const PublicTransport = () => {
{subway.route.map((route, index) => ( {`이미지`} {
0.5km이내 주변 버스
-
{/*
정류장이름
*/}
-
-
setIsModal(!Ismodal)}> +
+
setIsModal(!Ismodal)}> {data?.nearBus.map((item, index) => { return ( -
- {item.node} +
+
+ {item.node} +
); })} diff --git a/src/components/product/detail/content/MovieChart.tsx b/src/components/product/detail/content/MovieChart.tsx index 38d1a4c8..01b833f2 100644 --- a/src/components/product/detail/content/MovieChart.tsx +++ b/src/components/product/detail/content/MovieChart.tsx @@ -28,13 +28,22 @@ ChartJS.register( ChartDataLabels ); +const filteringLabel = { + screen: '스크린 수', + showtime: '상영 횟수', + audience: '관객 수', + revenue: '수익', + rank: '순위' +} as const; +type FilteringDataKey = keyof typeof filteringLabel; + const MovieChart = () => { const pathname = usePathname(); const lastSegment = pathname.split('/').pop(); - const [filteringData, setFilteringData] = useState('screen'); + const [filteringData, setFilteringData] = useState('screen'); const handleFiltering = (e: React.ChangeEvent) => { - setFilteringData(e.target.id); + setFilteringData(e.target.id as FilteringDataKey); }; const fetchData = async () => { @@ -73,7 +82,7 @@ const MovieChart = () => { labels: dataSets.labels, datasets: [ { - label: '주가', + label: filteringLabel[filteringData], data: dataSets.data, borderColor: '#8a4af3', backgroundColor: '#8a4af3', @@ -139,51 +148,51 @@ const MovieChart = () => { -