|
|
@ -1,59 +1,43 @@
|
|
|
|
import { useParams } from "react-router-dom";
|
|
|
|
import { NavLink } from "react-router-dom";
|
|
|
|
import { useEffect } from 'react';
|
|
|
|
import { useEffect } from 'react';
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import { toJS } from "mobx";
|
|
|
|
import moment from "moment";
|
|
|
|
import { Row, Col, Space, Button, Table, Input, Typography, DatePicker, Radio } from 'antd';
|
|
|
|
import { Row, Col, Space, Button, Table, Tag, Typography, DatePicker } from 'antd';
|
|
|
|
|
|
|
|
import { useStore } from '../../stores/StoreContext.js';
|
|
|
|
import { useStore } from '../../stores/StoreContext.js';
|
|
|
|
|
|
|
|
|
|
|
|
const { Title } = Typography;
|
|
|
|
const { Title } = Typography;
|
|
|
|
|
|
|
|
|
|
|
|
const reservationListColumns = [
|
|
|
|
const reservationListColumns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Name',
|
|
|
|
title: 'Reference number',
|
|
|
|
dataIndex: 'name',
|
|
|
|
dataIndex: 'referenceNumber',
|
|
|
|
key: 'name',
|
|
|
|
key: 'Reference number',
|
|
|
|
render: (text) => <a>{text}</a>,
|
|
|
|
render: (text, record) => <NavLink to={`/reservation/${record.id}`}>{text}</NavLink>,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Age',
|
|
|
|
title: 'Arrival date',
|
|
|
|
dataIndex: 'age',
|
|
|
|
dataIndex: 'arrivalDate',
|
|
|
|
key: 'age',
|
|
|
|
key: 'Arrival date',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Address',
|
|
|
|
title: 'Pax',
|
|
|
|
dataIndex: 'address',
|
|
|
|
key: 'Pax',
|
|
|
|
key: 'address',
|
|
|
|
dataIndex: 'pax'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Tags',
|
|
|
|
title: 'Status',
|
|
|
|
key: 'tags',
|
|
|
|
key: 'Status',
|
|
|
|
dataIndex: 'tags',
|
|
|
|
dataIndex: 'status'
|
|
|
|
render: (_, { tags }) => (
|
|
|
|
|
|
|
|
<>
|
|
|
|
|
|
|
|
{tags.map((tag) => {
|
|
|
|
|
|
|
|
let color = tag.length > 5 ? 'geekblue' : 'green';
|
|
|
|
|
|
|
|
if (tag === 'loser') {
|
|
|
|
|
|
|
|
color = 'volcano';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
<Tag color={color} key={tag}>
|
|
|
|
|
|
|
|
{tag.toUpperCase()}
|
|
|
|
|
|
|
|
</Tag>
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
</>
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: 'Action',
|
|
|
|
title: 'Reservation date',
|
|
|
|
key: 'action',
|
|
|
|
key: 'Reservation date',
|
|
|
|
render: (_, record) => (
|
|
|
|
dataIndex: 'reservationDate'
|
|
|
|
<Space size="middle">
|
|
|
|
},
|
|
|
|
<a>Invite {record.name}</a>
|
|
|
|
{
|
|
|
|
<a>Delete</a>
|
|
|
|
title: 'Guide',
|
|
|
|
</Space>
|
|
|
|
key: 'Guide',
|
|
|
|
),
|
|
|
|
dataIndex: 'guide'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
@ -68,18 +52,41 @@ function Newest() {
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
<Title level={3}>Newest Plans</Title>
|
|
|
|
<Title level={3}>Newest Reservations</Title>
|
|
|
|
<Row gutter={{ md: 24 }} justify="end">
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
|
|
|
<Col span={5}>
|
|
|
|
|
|
|
|
<Input placeholder="Reference number" />
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
<Col span={6}>
|
|
|
|
<Col span={6}>
|
|
|
|
<Space direction="horizontal" style={{ width: '100%' }}>
|
|
|
|
<Space direction="horizontal">
|
|
|
|
Group Date:
|
|
|
|
Arrival Date
|
|
|
|
<DatePicker.RangePicker
|
|
|
|
<DatePicker.RangePicker
|
|
|
|
allowClear={false}
|
|
|
|
allowClear={true}
|
|
|
|
|
|
|
|
inputReadOnly={true}
|
|
|
|
|
|
|
|
placeholder={['Arrival Date', '']}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</Space>
|
|
|
|
|
|
|
|
</Col>
|
|
|
|
|
|
|
|
<Col span={8}>
|
|
|
|
|
|
|
|
<Space direction="horizontal">
|
|
|
|
|
|
|
|
快速选择
|
|
|
|
|
|
|
|
<Radio.Group
|
|
|
|
|
|
|
|
options={[
|
|
|
|
|
|
|
|
{ label: '未确认', value: '1' },
|
|
|
|
|
|
|
|
{ label: '已确认', value: '2' },
|
|
|
|
|
|
|
|
{ label: '未录入导游', value: '3' },
|
|
|
|
|
|
|
|
{ label: '有变更', value: '4' },
|
|
|
|
|
|
|
|
{ label: '已取消', value: '5' },
|
|
|
|
|
|
|
|
{ label: '全部', value: '6' },
|
|
|
|
|
|
|
|
]}
|
|
|
|
|
|
|
|
value={'6'}
|
|
|
|
|
|
|
|
optionType="button"
|
|
|
|
|
|
|
|
buttonStyle="solid"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
<Col span={12}>
|
|
|
|
<Col span={4}>
|
|
|
|
<Button type='primary' onClick={() => plan.fetchRecent()}>Search</Button>
|
|
|
|
<Button type='primary' onClick={() => reservationStore.fetchRecent()}>Search</Button>
|
|
|
|
</Col>
|
|
|
|
</Col>
|
|
|
|
</Row>
|
|
|
|
</Row>
|
|
|
|
<Row>
|
|
|
|
<Row>
|
|
|
|