diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 9e3a978..e28cf66 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -71,9 +71,6 @@ class Reservation { this.reservationDetail = { referenceNumber: json.PlanDetail[0].GRI_Name, tourGuide: json.PlanDetail[0].Guide, arrivalDate: json.PlanDetail[0].eoi_getdate }; - this.meetAndGreet = { - customerNames: json.JJPInfo[0].CustomerName, referenceNumber: json.JJPInfo[0].GroupName, pax: json.JJPInfo[0].Str_PersonNum - }; this.customerNames = json.CusAndRequest[0].GCI_CustomerList; this.confirmationList = json.PlanChange.map((data, index) => { return { @@ -212,10 +209,6 @@ class Reservation { referenceNumber: '', arrivalDate: '', tourGuide: '' }; - meetAndGreet = { - referenceNumber: '', customerNames: '', pax: '' - } - reservationPage = { current: 1, size: 10, diff --git a/src/views/App.jsx b/src/views/App.jsx index e64af33..34ad535 100644 --- a/src/views/App.jsx +++ b/src/views/App.jsx @@ -34,8 +34,16 @@ function App() { useEffect(() => { // Check location console.info("location.pathname: " + location.pathname); + console.info(location.pathname.split('/')); }, [location]); + const splitPath = location.pathname.split('/'); + let defaultPath = 'reservation'; + + if (splitPath.length > 1) { + defaultPath = splitPath[1]; + } + const { token: { colorBgContainer }, } = theme.useToken(); @@ -60,12 +68,12 @@ function App() { Reservation }, - { key: "/feedback", label: Feedback }, - { key: "/invoice", label: Invoice }, - { key: "/notice", label: Notice }, + { key: "reservation", label: Reservation }, + { key: "feedback", label: Feedback }, + { key: "invoice", label: Invoice }, + { key: "notice", label: Notice }, ]} /> diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx index cd06240..bef6c8b 100644 --- a/src/views/reservation/Detail.jsx +++ b/src/views/reservation/Detail.jsx @@ -2,7 +2,8 @@ import { useParams, useNavigate } from "react-router-dom"; import { useEffect, useState } from 'react'; import { observer } from "mobx-react"; import { toJS } from "mobx"; -import { Row, Col, Space, Button, Table, Input, Typography, Modal, App } from 'antd'; +import { Row, Col, Space, Button, Table, Input, Typography, Modal, Watermark, App } from 'antd'; +import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer"; import { useStore } from '@/stores/StoreContext.js'; const { Title } = Typography; @@ -76,6 +77,7 @@ function Detail() { const [dataLoading, setDataLoading] = useState(false); const { itineraryList, customerNames, reservationDetail } = reservationStore; const confirmationList = reservationStore.confirmationList; + const docs = [{ uri: "https://www.chinahighlights.com/public/reservationW220420009.doc" }, { uri: "https://www.chinahighlights.com/public/NameCard.doc" }]; const showConfirmModal = (confirm) => { setIsModalOpen(true); @@ -138,15 +140,25 @@ function Detail() { - + {/* - + */} + + + + + + + {/* Itinerary Overview - + */} Confirmation diff --git a/src/views/reservation/NameCard.jsx b/src/views/reservation/NameCard.jsx index fd8b37e..dcbb65f 100644 --- a/src/views/reservation/NameCard.jsx +++ b/src/views/reservation/NameCard.jsx @@ -7,7 +7,6 @@ const { Title } = Typography; function NameCard() { const { reservationStore } = useStore(); - const { meetAndGreet } = reservationStore; const docs = [{ uri: "https://www.chinahighlights.com/public/NameCard.doc" }]; return ( diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index 496f4c6..b674157 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -4,6 +4,8 @@ import { observer } from "mobx-react"; import { toJS } from "mobx"; import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio, Modal, App, Select } from 'antd'; import { useStore } from '@/stores/StoreContext.js'; +import { DATE_PRESETS } from "@/config"; +import dayjs from "dayjs"; const { Title } = Typography; @@ -87,6 +89,9 @@ function Newest() { const { reservationStore } = useStore(); const { reservationList, reservationPage, cityList, guideList } = reservationStore; const [isModalOpen, setIsModalOpen] = useState(false); + + const arrivalDateFrom = dayjs().startOf("M"); + const arrivalDateThru = dayjs().endOf("M"); const [arrivalDateRange, onDateRangeChange] = useState([]); const [referenceNo, onNumberChange] = useState(''); const [dataLoading, setDataLoading] = useState(false); @@ -186,6 +191,8 @@ function Newest() { { onDateRangeChange(dateRange)}} /> diff --git a/src/views/reservation/Print.jsx b/src/views/reservation/Print.jsx index 980c57c..12dff91 100644 --- a/src/views/reservation/Print.jsx +++ b/src/views/reservation/Print.jsx @@ -9,7 +9,7 @@ import { useStore } from "../../stores/StoreContext.js"; function Print() { const navigate = useNavigate(); const { reservationId } = useParams(); - const docs = [{ uri: "https://www.chinahighlights.com/public/reservationW220420009.doc" }]; + const docs = [{ uri: "https://www.chinahighlights.com/public/reservationW220420009.doc" }, { uri: "https://www.chinahighlights.com/public/NameCard.doc" }]; useEffect(() => { console.info("Detail.useEffect: " + reservationId); @@ -18,13 +18,6 @@ function Print() { return (