diff --git a/package.json b/package.json
index ba31435..1a7b137 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,6 @@
"preview": "vite preview"
},
"dependencies": {
- "@cyntler/react-doc-viewer": "^1.13.0",
"antd": "^5.4.2",
"mobx": "^6.9.0",
"mobx-react": "^7.6.0",
diff --git a/src/stores/Reservation.js b/src/stores/Reservation.js
index 854ab45..ef3b9e9 100644
--- a/src/stores/Reservation.js
+++ b/src/stores/Reservation.js
@@ -58,20 +58,9 @@ class Reservation {
.then(json => {
if (json.errcode == 0) {
runInAction(() => {
- this.itineraryList = (json?.VendorTour ?? []).map((data, index) => {
- return {
- key: data.GRD_SN,
- day: data.GRD_OrderDate,
- placeTransport: data.GRD_Traffic,
- todayActivities: data.GRD_LandscapeWL,
- accommodation: data.GRD_Hotel,
- meals: data.GRD_Meal_L + data.GRD_Meal_S,
- }
- });
this.reservationDetail = {
referenceNumber: json.PlanDetail[0].GRI_Name, tourGuide: json.PlanDetail[0].Guide, arrivalDate: json.PlanDetail[0].eoi_getdate
};
- this.customerNames = json.CusAndRequest[0].GCI_CustomerList;
this.confirmationList = (json?.PlanChange ?? []).map((data, index) => {
return {
key: data.PCI_SN,
@@ -214,14 +203,9 @@ class Reservation {
size: 10,
total: 0
}
-
- itineraryList = [
- ];
confirmationList = [
];
-
- customerNames = '';
}
export default Reservation;
\ No newline at end of file
diff --git a/src/views/App.jsx b/src/views/App.jsx
index 9c2bf57..4265117 100644
--- a/src/views/App.jsx
+++ b/src/views/App.jsx
@@ -31,15 +31,12 @@ function App() {
const { authStore } = useStore();
const href = useHref();
-
- let location = useLocation();
useEffect(() => {
// Check location
- console.info("location.pathname: " + location.pathname);
- console.info(location.pathname.split("/"));
- }, [location]);
+ console.info("href: " + href);
+ }, [href]);
- const splitPath = location.pathname.split("/");
+ const splitPath = href.split("/");
let defaultPath = "reservation";
if (splitPath.length > 1) {
diff --git a/src/views/reservation/Detail.jsx b/src/views/reservation/Detail.jsx
index bef6c8b..408c981 100644
--- a/src/views/reservation/Detail.jsx
+++ b/src/views/reservation/Detail.jsx
@@ -2,8 +2,7 @@ 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, Watermark, App } from 'antd';
-import DocViewer, { DocViewerRenderers } from "@cyntler/react-doc-viewer";
+import { Row, Col, Space, Button, Table, Input, Typography, Modal, App } from 'antd';
import { useStore } from '@/stores/StoreContext.js';
const { Title } = Typography;
@@ -11,29 +10,6 @@ const { TextArea } = Input;
function Detail() {
- const itineraryListColumns = [
- {
- title: 'Day',
- dataIndex: 'day',
- },
- {
- title: 'Place & Transport',
- dataIndex: 'placeTransport',
- },
- {
- title: 'Today’s Activities',
- dataIndex: 'todayActivities',
- },
- {
- title: 'Accommodation',
- dataIndex: 'accommodation',
- },
- {
- title: 'Meals',
- dataIndex: 'meals',
- },
- ];
-
const confirmationListColumns = [
{
title: 'PCI_Changetext',
@@ -75,9 +51,15 @@ function Detail() {
const { reservationId } = useParams();
const { reservationStore } = useStore();
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 { reservationDetail, confirmationList } = reservationStore;
+
+ const reservationUrl =
+ 'https://view.officeapps.live.com/op/embed.aspx?wdPrint=false&wdHideGridlines=true&wdHideComments=true&src=' +
+ encodeURIComponent('https://www.chinahighlights.com/public/reservationW220420009.doc');
+
+ const nameCardUrl =
+ 'https://view.officeapps.live.com/op/embed.aspx?wdPrint=false&wdHideGridlines=true&wdHideComments=true&src=' +
+ encodeURIComponent('https://www.chinahighlights.com/public/NameCard.doc');
const showConfirmModal = (confirm) => {
setIsModalOpen(true);
@@ -140,43 +122,14 @@ function Detail() {
- {/*
-
-
-
-
-
-
-
*/}
-
-
-
-
+
+
-
- {/*
-
- Itinerary Overview
-
-
+
+
-
-
- Customer Names (Full name as it appears on passport)
-
-
-
-
*/}
Confirmation