|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
|
import { useState, useRef, useEffect } from 'react';
|
|
|
|
|
import { NavLink, useLocation } from "react-router-dom";
|
|
|
|
|
import { useState, useEffect } from 'react';
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
|
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio, Modal, App, Select } from 'antd';
|
|
|
|
@ -73,7 +73,7 @@ function Newest() {
|
|
|
|
|
allowClear
|
|
|
|
|
placeholder="Select a guide"
|
|
|
|
|
optionFilterProp="children"
|
|
|
|
|
defaultValue={city.tourGuideId}
|
|
|
|
|
defaultValue={guideSelectOptions.length == 0 ? null : city.tourGuideId}
|
|
|
|
|
onChange={(guideId) => {
|
|
|
|
|
reservationStore.setupCityGuide(city.cityId, guideId);
|
|
|
|
|
}}
|
|
|
|
@ -88,8 +88,7 @@ function Newest() {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// const href = useHref();
|
|
|
|
|
// const isMountedRef = useRef(false);
|
|
|
|
|
const location = useLocation();
|
|
|
|
|
const { reservationStore } = useStore();
|
|
|
|
|
const { reservationList, reservationPage, referenceNo, arrivalDateRange, cityList, guideList } = reservationStore;
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
@ -106,10 +105,14 @@ function Newest() {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
onSearchClick();
|
|
|
|
|
console.info('Newest...');
|
|
|
|
|
}, [123]);
|
|
|
|
|
useEffect (() => {
|
|
|
|
|
if (location.search !== '?back') {
|
|
|
|
|
onSearchClick();
|
|
|
|
|
}
|
|
|
|
|
return () => {
|
|
|
|
|
console.info('unmount...');
|
|
|
|
|
};
|
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
|
|
const showCityGuideModal = (reservation) => {
|
|
|
|
|
setDataLoading(true);
|
|
|
|
|