使用文本显示客人名字列表

release
Jimmy Liow 2 years ago
parent ad12b25a88
commit 718b656357

@ -17,6 +17,7 @@ class Reservation {
.append('GroupNo', referenceNo) .append('GroupNo', referenceNo)
.append('DateStart', fromDate) .append('DateStart', fromDate)
.append('DateEnd', thruDate) .append('DateEnd', thruDate)
.append('RsTotal', this.reservationPage.total)
.append('PageNum', this.reservationPage.size) .append('PageNum', this.reservationPage.size)
.append('PageIndex', this.reservationPage.current) .append('PageIndex', this.reservationPage.current)
.build(); .build();
@ -98,28 +99,6 @@ class Reservation {
itineraryList = [ itineraryList = [
]; ];
customerList = [];
// {
// title: 'Crane / Gemma Chelse',
// description: 'Gender: Male Nationality: United States Passport: 655844449 Expiration Date: 2030-09-07 Birth Date: 1979-12-23',
// },
// {
// title: 'McCracken / Ryan Lee',
// description: 'Gender: Female Nationality: United States Passport: 655844450 Expiration Date: 2030-09-07 Birth Date: 1983-05-17',
// },
// {
// title: 'Ramlakhan / Darryl',
// description: 'Gender: Female Nationality: United States Passport: 661810034 Expiration Date: 2026-03-16 Birth Date: 2006-07-12',
// },
// {
// title: 'Ramlakhan / Reanne',
// description: 'Gender: Male Nationality: United States Passport: 593422145 Expiration Date: 2023-04-25 Birth Date: 2012-03-26',
// },
// {
// title: 'Alexander Daich',
// description: 'Gender: Male Nationality: United States Passport: 593422145 Expiration Date: 2023-04-25 Birth Date: 2012-03-26s',
// },
// ];
customerNames = ''; customerNames = '';
} }

@ -74,33 +74,21 @@ function Detail() {
</Col> </Col>
</Row> </Row>
<Row gutter={{ md: 24 }}> <Row gutter={{ md: 24 }}>
<Col span={24}> <Col span={24}><Space direction="vertical" style={{ width: '100%' }}>
<Title level={5}>Itinerary Overview</Title> <Title level={5}>Itinerary Overview</Title>
</Col>
</Row>
<Row>
<Col span={24}>
<Table <Table
bordered
pagination={false} pagination={false}
dataSource={toJS(itineraryList)} columns={itineraryListColumns} dataSource={toJS(itineraryList)} columns={itineraryListColumns}
/> />
</Space>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span={24}> <Col span={24}><Space direction="vertical" style={{ width: '100%' }}>
<List <Title level={5}>Customer Names (Full name as it appears on passport)</Title>
header={<><Title level={5}>Customer Names (Full name as it appears on passport)</Title><span>{customerNames}</span></>} <TextArea rows={4} value={customerNames} readOnly maxLength={6} />
itemLayout="horizontal" </Space>
dataSource={toJS(customerList)}
renderItem={(item, index) => (
<List.Item>
<List.Item.Meta
title={<span>{index + 1}. {item.title}</span>}
description={item.description}
/>
</List.Item>
)}
/>
</Col> </Col>
</Row> </Row>
<Row> <Row>

@ -62,9 +62,9 @@ function Newest() {
const { reservationStore } = useStore(); const { reservationStore } = useStore();
const { reservationList, reservationPage } = reservationStore; const { reservationList, reservationPage } = reservationStore;
const [isModalOpen, setIsModalOpen] = useState(false); const [isModalOpen, setIsModalOpen] = useState(false);
const [selectedDateRange, onDateRangeChange] = useState([]); const [arrivalDateRange, onDateRangeChange] = useState([]);
const [referenceNo, onNumberChange] = useState(''); const [referenceNo, onNumberChange] = useState('');
const [tableLoading, setTableLoading] = useState(false); const [dataLoading, setDataLoading] = useState(false);
const { notification } = App.useApp(); const { notification } = App.useApp();
const showModal = () => { const showModal = () => {
@ -77,9 +77,9 @@ function Newest() {
setIsModalOpen(false); setIsModalOpen(false);
}; };
const onSearchClick = (current) => { const onSearchClick = (current=1) => {
setTableLoading(true); setDataLoading(true);
reservationStore.fetchReservationList(current, referenceNo, selectedDateRange[0], selectedDateRange[1]) reservationStore.fetchReservationList(current, referenceNo, arrivalDateRange[0], arrivalDateRange[1])
.catch(ex => { .catch(ex => {
notification.error({ notification.error({
message: `Notification`, message: `Notification`,
@ -89,7 +89,7 @@ function Newest() {
}); });
}) })
.finally(() => { .finally(() => {
setTableLoading(false); setDataLoading(false);
}); });
} }
@ -196,7 +196,7 @@ function Newest() {
</Space> </Space>
</Col> </Col>
<Col span={14}> <Col span={14}>
<Button type='primary' onClick={() => onSearchClick(1)}>Search</Button> <Button type='primary' onClick={() => onSearchClick()} loading={dataLoading}>Search</Button>
</Col> </Col>
</Row> </Row>
<Row> <Row>
@ -204,7 +204,7 @@ function Newest() {
<Table <Table
title={() => 'Reservations without the tour guide information will be highlighted in red if the arrival date is within 3 days.'} title={() => 'Reservations without the tour guide information will be highlighted in red if the arrival date is within 3 days.'}
bordered bordered
loading={tableLoading} loading={dataLoading}
pagination={{ pagination={{
position: ['bottomCenter'], position: ['bottomCenter'],
current: reservationPage.current, current: reservationPage.current,

Loading…
Cancel
Save