Skip to content

Commit

Permalink
deploy: 파티 코스 관리 & 회사 정보 및 약관 내용 수정 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaeHee99 committed Apr 17, 2024
2 parents eedff9e + d610f02 commit 7b59d4f
Show file tree
Hide file tree
Showing 45 changed files with 1,135 additions and 356 deletions.
10 changes: 9 additions & 1 deletion src/api/course.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { GET } from "../utils/axios";
import { DELETE, GET, POST, PUT } from "../utils/axios";

export const getCourseDetail = async (courseId) =>
await GET(`/course/${courseId}`, true);

export const postNewCourse = async (data) => await POST("/course", data, true);

export const putCourseDetail = async (courseId, body) =>
await PUT(`/course/${courseId}`, body, true);

export const deleteCourse = async (courseId) =>
await DELETE(`/course/${courseId}`, true);
2 changes: 1 addition & 1 deletion src/components/BottomRefundDriver/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function BottomRefundDriver() {
</div>
<div>
<div className="text-primary font-bold mb-1">
예약 취소 가능할 경우:
예약 취소 가능한 경우:
</div>
<div>
파티원 모두가 말랑레디 버튼을 ON으로 설정하기 전까지
Expand Down
2 changes: 1 addition & 1 deletion src/components/CourseList/CourseItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function CourseItem({
}) {
return (
<button
className={`px-5 py-2 text-xs md:text-sm border border-current rounded-full hover:bg-primary hover:text-white ${
className={`shrink-0 px-5 py-2 text-xs md:text-sm whitespace-nowrap border border-current rounded-full hover:bg-primary hover:text-white ${
courseId === selectedCourseId
? "text-white bg-primary"
: "text-darkgray"
Expand Down
2 changes: 1 addition & 1 deletion src/components/CourseList/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function CourseList({
return (
<div className="flex flex-col gap-1 my-7">
<p className="text-lg text-black font-bold">드라이버의 제안 코스</p>
<div className="flex gap-2 mt-1">
<div className="flex gap-2 mt-1 overflow-x-auto noScrollBar">
{courses.length === 0 && (
<div className="text-sm text-darkgray font-medium">
제안 코스가 없습니다.
Expand Down
2 changes: 1 addition & 1 deletion src/components/CourseMap/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function CourseMap({ markerData, reload, mapName }) {

axios
.post(
"https://apis.openapi.sk.com/tmap/routes/routeSequential30?version=1&format=json",
"https://apis.openapi.sk.com/tmap/routes/routeSequential100?version=1&format=json",
{
startName: markerData[0].name,
startX: markerData[0].lon.toString(),
Expand Down
9 changes: 1 addition & 8 deletions src/components/Credit/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ import ConfirmModal from "../ConfirmModal";
import PlusBtn from "../../assets/svg/PlusBtn.svg";
import Logo from "../../assets/images/logo.png";

function Credit({
shakeCredit,
register,
setRegister,
creditRef,
backupInputData,
}) {
function Credit({ shakeCredit, register, setRegister, creditRef }) {
const PaypleCpayAuthCheck = window.PaypleCpayAuthCheck;
const user = useSelector((state) => state.user);
const [cardInfo, setCardInfo] = useState({});
Expand Down Expand Up @@ -56,7 +50,6 @@ function Credit({
callbackFunction: paypleResult,
};

backupInputData();
PaypleCpayAuthCheck(paypleObj);
};

Expand Down
113 changes: 86 additions & 27 deletions src/components/Footer/Company/index.jsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,93 @@
import { Link } from "react-router-dom";
import { useState } from "react";
import { Link, useNavigate } from "react-router-dom";
import { useSelector, useDispatch } from "react-redux";
import { setPartyRoomId } from "../../../redux/modules/talkRoomSlice";
import { makeNewCoupleChat } from "../../../api/chat";
import CheckModal from "../../CheckModal";

function Company() {
const navigation = useNavigate();
const dispatch = useDispatch();
const user = useSelector((state) => state.user);
const [showLoginModal, setShowLoginModal] = useState(false);

const goMallangTalk = async () => {
if (!user.auth) return setShowLoginModal(true);

try {
const result = await makeNewCoupleChat(0);
dispatch(setPartyRoomId(result.payload.chatRoomId));
navigation("/talk");
} catch (e) {
console.log(e);
}
};

return (
<div className="mb-10 flex justify-center flex-col sm:flex-row gap-6 sm:gap-12 lg:gap-36 mx-5 sm:mx-12 pl-5 sm:pl-0">
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">말랑트립</p>
<p>대표: 김제윤</p>
<p className="my-1">사업자등록번호: 399-51-00784</p>
<p>경기도 의왕시 모락로 89-15 109동 403호</p>
<>
<div className="mb-10 flex justify-between flex-col md:flex-row mx-5 min-[900px]:mx-20 gap-5 pl-5 md:pl-0">
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">말랑트립</p>
<p>대표 : 김제윤</p>
<p className="my-1">사업자등록번호 : 399-51-00784</p>
<p>경기도 안양시 동안구 시민대로327번길 11-41 3층 8호실</p>
</div>
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">고객문의</p>
<p>
실시간 고객상담 :{" "}
<span
className="underline underline-offset-2 cursor-pointer"
onClick={goMallangTalk}
>
말랑톡
</span>
,{" "}
<Link
to="http://pf.kakao.com/_tfMxaG/chat"
target="_blank"
className="underline underline-offset-2"
>
공식 카카오톡
</Link>
</p>
<p className="my-1">유선 번호 : 070-8080-2665</p>
<p>기타문의 : [email protected]</p>
</div>
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">SNS</p>
<p>
INSTAGRAM :{" "}
<Link
to="https://www.instagram.com/mallang_trip/?hl=ko"
target="_blank"
className="underline underline-offset-2"
>
@mallang_trip
</Link>
</p>
<p className="my-1">
KAKAO TALK :{" "}
<Link
to="http://pf.kakao.com/_tfMxaG/chat"
target="_blank"
className="underline underline-offset-2"
>
말랑트립 카카오톡
</Link>
</p>
</div>
</div>
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">고객문의</p>
<p>실시간 고객상담: 말랑톡</p>
<p className="my-1">유선 번호: 070-8080-2665</p>
<p>기타문의: [email protected]</p>
</div>
<div className="text-xs text-darkgray">
<p className="text-sm text-boldgray font-bold mb-2.5">SNS</p>
<p>
INSTAGRAM:{" "}
<Link
to="https://www.instagram.com/mallang_trip/?hl=ko"
target="_blank"
className="hover:underline underline-offset-4"
>
@mallang_trip
</Link>
</p>
</div>
</div>

<CheckModal
showModal={showLoginModal}
setShowModal={setShowLoginModal}
message={"로그인이 필요합니다.\n로그인 하시겠습니까?"}
noText={"취소"}
yesText={"확인"}
yesHandler={() => navigation("/login")}
/>
</>
);
}

Expand Down
75 changes: 34 additions & 41 deletions src/components/Footer/Policy/index.jsx
Original file line number Diff line number Diff line change
@@ -1,74 +1,67 @@
import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";

function Policy() {
const navigation = useNavigate();
const user = useSelector((state) => state.user);

return (
<div className="mt-5 mb-24 lg:mb-5 px-3 font-medium text-xs text-darkgray">
<div className="hidden sm:flex gap-3 justify-center items-center flex-wrap">
<div className="flex gap-3 justify-center items-center flex-wrap">
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/intro")}
>
회사 소개
회사소개
</button>
<span>|</span>
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/policy/user/service")}
onClick={() =>
navigation(
`/policy/${user.role === "ROLE_DRIVER" ? "driver" : "user"}/service`
)
}
>
이용약관
</button>
<span>|</span>
<button
className="hover:underline underline-offset-2 text-primary focus:outline-none"
onClick={() => navigation("/policy/user/privacy")}
className="hover:underline underline-offset-2 font-bold focus:outline-none"
onClick={() =>
navigation(
`/policy/${user.role === "ROLE_DRIVER" ? "driver" : "user"}/privacy`
)
}
>
개인정보처리방침
</button>
<span>|</span>
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/policy/user/location")}
onClick={() =>
navigation(
`/policy/${user.role === "ROLE_DRIVER" ? "driver" : "user"}/location`
)
}
>
위치기반 서비스 이용약관
</button>
<span>|</span>
<span>통신판매업신고번호 2024-경기의왕-0056호</span>
</div>
<div className="sm:hidden">
<div className="flex gap-3 justify-center items-center flex-wrap">
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/intro")}
>
회사 소개
</button>
<span>|</span>
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/policy/user/service")}
>
이용약관
</button>
<span>|</span>
<button
className="hover:underline underline-offset-2 text-primary focus:outline-none"
onClick={() => navigation("/policy/user/privacy")}
>
개인정보처리방침
</button>
</div>
<div className="mt-2 flex gap-3 justify-center items-center flex-wrap">
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() => navigation("/policy/user/location")}
>
위치기반 서비스 이용약관
</button>
<span>|</span>
<span>통신판매업신고번호 2024-경기의왕-0056호</span>
</div>
<button
className="hover:underline underline-offset-2 focus:outline-none"
onClick={() =>
navigation(
`/policy/${user.role === "ROLE_DRIVER" ? "driver" : "user"}/refund`
)
}
>
환불 및 위약금 정책
</button>
<span>|</span>
<span>통신판매업신고번호 2024-안양동안-0716호</span>
<span>|</span>
<span>관광사업등록번호 제 2024-000003호</span>
</div>
<div className="pt-3 text-center">
Copyright ⓒ 2024 mallangtrip. All rights reserved.
Expand Down
10 changes: 6 additions & 4 deletions src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ import Policy from "./Policy";

function Footer() {
return (
<div className="cursor-default max-w-screen-xl mx-auto">
<hr className="bg-darkgray/20 mt-14 mb-7 h-px border-0 mx-5" />
<Company />
<Policy />
<div className="cursor-default bg-[#fafafa]">
<hr className="bg-[#eaeaea] mt-14 mb-7 h-px border-0" />
<div className="max-w-screen-xl mx-auto">
<Company />
<Policy />
</div>
</div>
);
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,11 @@ function Header() {
src={user.profileImg || basicProfileImage}
alt="User_Profile_Image"
/>
{uncheckedCount > 0 && <Ping top="0" left="2" />}
{uncheckedCount > 0 && (
<span className="relative top-0 right-6">
<Ping top="0" left="0" />
</span>
)}
</button>
</li>
</ul>
Expand Down
26 changes: 24 additions & 2 deletions src/components/PlaceMap/MapBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,30 @@ function MapBox({ markerData, setShowDestinationModal, setClickedData }) {
};

useEffect(() => {
if (markerData.length === 0) return;
initTmap();
if (markerData.length === 0) {
if (mapRef.current.firstChild)
mapRef.current.removeChild(mapRef.current.firstChild);

const mapWidth = Math.min(mapRef.current.offsetWidth, 900);
const mapHeight = 600;

const map = new Tmapv2.Map("TMapApp", {
center: new Tmapv2.LatLng(37.398195688134, 126.96313827598239),
width: mapWidth + "px",
height: mapHeight + "px",
zoom: 15,
zoomControl: true,
scrollwheel: /Mobi/.test(navigator.userAgent),
});

new Tmapv2.Marker({
position: new Tmapv2.LatLng(37.398195688134, 126.96313827598239),
map: map,
title: "말랑트립",
label: "말랑트립",
icon: pointMarker,
});
} else initTmap();
}, [markerData]);

return <div id="TMapApp" className="w-full mx-auto" ref={mapRef} />;
Expand Down
18 changes: 17 additions & 1 deletion src/components/PlaceMap/NewPlaceModal/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,23 @@ function NewPlaceModal({
}
document.body.classList.add("overflow-hidden");

initTmap();
if (markerData.length === 0) {
if (mapRef.current.firstChild)
mapRef.current.removeChild(mapRef.current.firstChild);

const mapWidth = mapRef.current.offsetWidth;
const mapHeight = 400;

new Tmapv2.Map("NewPlaceTMapApp", {
center: new Tmapv2.LatLng(37.398195688134, 126.96313827598239),
width: mapWidth + "px",
height: mapHeight + "px",
zoom: 14,
zoomControl: true,
scrollwheel: /Mobi/.test(navigator.userAgent),
});
} else initTmap();

setKeyword(searchKeyword);
}, [showModal]);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/CommunityPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function CommunityPage() {

useEffect(() => {
if (!isIntersecting) return;
setTimeout(() => setPage(page + 1), 1000);
setTimeout(() => setPage(page + 1), 10);
}, [isIntersecting]);

useEffect(() => {
Expand Down
Loading

0 comments on commit 7b59d4f

Please sign in to comment.