|
|
|
@ -63,49 +63,45 @@ function Newest() {
|
|
|
|
|
function cityGuideRender(text, city) {
|
|
|
|
|
return (
|
|
|
|
|
<Select
|
|
|
|
|
showSearch
|
|
|
|
|
style={{
|
|
|
|
|
width: 280,
|
|
|
|
|
}}
|
|
|
|
|
placeholder="Select a guide"
|
|
|
|
|
optionFilterProp="children"
|
|
|
|
|
onChange={(value) => {
|
|
|
|
|
console.log(`selected ${value}`);
|
|
|
|
|
}}
|
|
|
|
|
onSearch={(value) => {
|
|
|
|
|
console.log('search:', value);
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) =>
|
|
|
|
|
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
|
|
|
}
|
|
|
|
|
options={[
|
|
|
|
|
{
|
|
|
|
|
value: 'jack',
|
|
|
|
|
label: 'Jack',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'lucy',
|
|
|
|
|
label: 'Lucy',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 'tom',
|
|
|
|
|
label: 'Tom',
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
showSearch
|
|
|
|
|
style={{
|
|
|
|
|
width: 280,
|
|
|
|
|
}}
|
|
|
|
|
bordered={false}
|
|
|
|
|
placeholder="Select a guide"
|
|
|
|
|
optionFilterProp="children"
|
|
|
|
|
onChange={(value) => {
|
|
|
|
|
console.log(`selected ${value}`);
|
|
|
|
|
}}
|
|
|
|
|
onSearch={(value) => {
|
|
|
|
|
console.log('search:', value);
|
|
|
|
|
}}
|
|
|
|
|
filterOption={(input, option) =>
|
|
|
|
|
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
|
|
|
|
}
|
|
|
|
|
options={toJS(guideSelectOptions)}
|
|
|
|
|
/>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
const { reservationStore } = useStore();
|
|
|
|
|
const { reservationList, reservationPage, cityList } = reservationStore;
|
|
|
|
|
const { reservationList, reservationPage, cityList, guideList } = reservationStore;
|
|
|
|
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
|
|
|
const [arrivalDateRange, onDateRangeChange] = useState([]);
|
|
|
|
|
const [referenceNo, onNumberChange] = useState('');
|
|
|
|
|
const [dataLoading, setDataLoading] = useState(false);
|
|
|
|
|
const { notification } = App.useApp();
|
|
|
|
|
|
|
|
|
|
const guideSelectOptions = guideList.map((data, index) => {
|
|
|
|
|
return {
|
|
|
|
|
value: data.guideName,
|
|
|
|
|
label: data.guideName
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const showCityGuideModal = (reservation) => {
|
|
|
|
|
setDataLoading(true);
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
reservationStore.fetchGuideList();
|
|
|
|
|
reservationStore.fetchCityList(reservation.referenceId)
|
|
|
|
|
.catch(ex => {
|
|
|
|
|
notification.error({
|
|
|
|
|