diff --git a/src/config.js b/src/config.js index 02b6d3c..b5b178d 100644 --- a/src/config.js +++ b/src/config.js @@ -1,5 +1,4 @@ import React from "react"; -export const stores_Context = React.createContext(); export const DATE_FORMAT = "YYYY-MM-DD"; export const HT_HOST = process.env.NODE_ENV == "production" ? "https://p9axztuwd7x8a7.mycht.cn" : "http://202.103.68.100:890"; \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx index f10e104..65bc461 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -16,6 +16,7 @@ import ErrorPage from "@/views/error-page"; import ReservationNewest from "@/views/reservation/Newest"; import ReservationDetail from "@/views/reservation/Detail"; import ReservationPrint from "@/views/reservation/Print"; +import ReservationNameCard from "@/views/reservation/NameCard"; import FeedbackIndex from "@/views/feedback/Index"; import FeedbackDetail from "@/views/feedback/Detail"; @@ -39,6 +40,7 @@ const router = createBrowserRouter([ { path: "reservation/newest", element: }, { path: "reservation/:reservationId", element: }, { path: "reservation/:reservationId/print", element: }, + { path: "reservation/:reservationId/name-card", element: }, { path: "feedback", element: }, { path: "feedback/:feedbackId", element: }, ] diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js index 104f416..fc870c0 100644 --- a/src/stores/Reservation.js +++ b/src/stores/Reservation.js @@ -15,7 +15,7 @@ class Reservation { { key: '1', id: '1', - referenceNumber: '中华游111029-N111025076', + referenceNumber: '111029-N111025076', arrivalDate: '2023-04-08', pax: '5AD 1CH', status: 'Confirm', @@ -25,7 +25,7 @@ class Reservation { { key: '2', id: '3', - referenceNumber: '中华游111029-N111025076', + referenceNumber: '111029-N111025076', arrivalDate: '2023-04-08', pax: '5AD 1CH', status: 'Confirm', @@ -35,13 +35,23 @@ class Reservation { { key: '3', id: '3', - referenceNumber: '中华游111029-N111025076', + referenceNumber: '111029-N111025076', arrivalDate: '2023-05-08', pax: '3AD', status: 'Confirm', reservationDate: '2023-01-08 19:31', guide: 'Giffigan', }, + { + key: '3', + id: '3', + referenceNumber: '111029-N111025076', + arrivalDate: '2023-05-08', + pax: '3AD', + status: 'Confirm', + reservationDate: '2023-01-08 19:31', + guide: 'Laurie Notaro', + }, ]; }); } diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx index 0abebec..9dcfe22 100644 --- a/src/views/reservation/Detail.jsx +++ b/src/views/reservation/Detail.jsx @@ -51,21 +51,18 @@ function Detail() { - Booking Number: 220629-W220420009; Arrival date: 2023-12-15; Guide: Giffigan + Reference Number: 220629-W220420009; Arrival date: 2023-12-15; Tour guide: Giffigan - + - + - - - - + diff --git a/src/views/reservation/NameCard.jsx b/src/views/reservation/NameCard.jsx new file mode 100644 index 0000000..35169ae --- /dev/null +++ b/src/views/reservation/NameCard.jsx @@ -0,0 +1,72 @@ +import { useParams, useNavigate } from "react-router-dom"; +import { useEffect } from 'react'; +import { observer } from "mobx-react"; +import { toJS } from "mobx"; +import moment from "moment"; +import { Row, Col, Space, Table, Typography, List, Watermark } from 'antd'; +import { useStore } from '../../stores/StoreContext.js'; + +const { Title } = Typography; + +const itineraryListColumns = [ + { + title: 'Day', + dataIndex: 'day', + key: 'day', + }, + { + title: 'Place & Transport', + dataIndex: 'placeTransport', + key: 'placeTransport', + }, + { + title: 'Today’s Activities', + dataIndex: 'todayActivities', + key: 'todayActivities', + }, + { + title: 'Accommodation', + dataIndex: 'accommodation', + key: 'accommodation', + }, + { + title: 'Meals', + dataIndex: 'meals', + key: 'meals', + }, +]; + +function NameCard() { + const navigate = useNavigate(); + const { reservationId } = useParams(); + const { reservationStore } = useStore(); + const { itineraryList, customerList } = reservationStore; + + useEffect(() => { + console.info('Detail.useEffect: ' + reservationId); + }, [reservationId]); + + return ( + + + + + Mr. Prasanna Venkatesa + + + + + Nathan Group + + + + + (4 Persons) + + + + + ); +} + +export default observer(NameCard); \ No newline at end of file diff --git a/src/views/reservation/Newest.jsx b/src/views/reservation/Newest.jsx index f0d8de3..9f22b7b 100644 --- a/src/views/reservation/Newest.jsx +++ b/src/views/reservation/Newest.jsx @@ -80,7 +80,6 @@ function Newest() { return ( <> @@ -99,7 +98,7 @@ function Newest() { key: 'city' }, { - title: 'Guide', + title: 'Tour Guide', dataIndex: 'guide', key: 'guide' }