|
|
|
@ -1,19 +1,19 @@
|
|
|
|
|
import { useParams } from "react-router-dom"
|
|
|
|
|
import { useParams } from 'react-router-dom'
|
|
|
|
|
import { useEffect, useState } from 'react'
|
|
|
|
|
import { Row, Col, Space, Button, Table, Input, Typography, Modal, Tag, App } from 'antd'
|
|
|
|
|
import {
|
|
|
|
|
FileOutlined
|
|
|
|
|
} from '@ant-design/icons';
|
|
|
|
|
} from '@ant-design/icons'
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage'
|
|
|
|
|
import useReservationStore from '@/stores/Reservation'
|
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
|
import BackBtn from '@/components/BackBtn'
|
|
|
|
|
|
|
|
|
|
const { Title, Paragraph } = Typography;
|
|
|
|
|
const { TextArea } = Input;
|
|
|
|
|
const { Title, Paragraph } = Typography
|
|
|
|
|
const { TextArea } = Input
|
|
|
|
|
|
|
|
|
|
function Detail() {
|
|
|
|
|
const { t } = useTranslation();
|
|
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
|
|
const confirmationListColumns = [
|
|
|
|
|
{
|
|
|
|
@ -43,9 +43,9 @@ function Detail() {
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
function detailTextRender(text, confirm) {
|
|
|
|
|
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, "\n——————————————————————\n");
|
|
|
|
|
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n——————————————————————\n');
|
|
|
|
|
return (
|
|
|
|
|
<div style={{whiteSpace: 'pre-line'}}>
|
|
|
|
|
<div className='whitespace-pre-line'>
|
|
|
|
|
{formattedText}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
@ -56,7 +56,7 @@ function Detail() {
|
|
|
|
|
<>
|
|
|
|
|
{confirm.attachmentList.map(attch => {
|
|
|
|
|
return (
|
|
|
|
|
<Tag bordered={false} icon={<FileOutlined />}><a href={attch.file_url} target="_blank">{attch.file_name}</a></Tag>
|
|
|
|
|
<Tag bordered={false} icon={<FileOutlined />}><a href={attch.file_url} target='_blank'>{attch.file_name}</a></Tag>
|
|
|
|
|
)}
|
|
|
|
|
)}
|
|
|
|
|
</>
|
|
|
|
@ -65,7 +65,7 @@ function Detail() {
|
|
|
|
|
|
|
|
|
|
function confirmRender(text, confirm) {
|
|
|
|
|
return (
|
|
|
|
|
<Button type="link" onClick={() => showConfirmModal(confirm)}>{t('Confirm')}</Button>
|
|
|
|
|
<Button type='link' onClick={() => showConfirmModal(confirm)}>{t('Confirm')}</Button>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -96,7 +96,7 @@ function Detail() {
|
|
|
|
|
|
|
|
|
|
const showConfirmModal = (confirm) => {
|
|
|
|
|
setIsModalOpen(true);
|
|
|
|
|
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, "\n——————————————————————\n");
|
|
|
|
|
const formattedText = confirm.PCI_ConfirmText;//.replace(/\;/g, '\n——————————————————————\n');
|
|
|
|
|
setConfirmText(formattedText);
|
|
|
|
|
selectConfirmation(confirm);
|
|
|
|
|
};
|
|
|
|
@ -140,7 +140,7 @@ function Detail() {
|
|
|
|
|
<Title level={4}>{t('group:ConfirmationDetails')}</Title>
|
|
|
|
|
<Paragraph>
|
|
|
|
|
<blockquote>
|
|
|
|
|
<div style={{whiteSpace: 'pre-line'}}>
|
|
|
|
|
<div className='whitespace-pre-line'>
|
|
|
|
|
{confirmText}
|
|
|
|
|
</div>
|
|
|
|
|
</blockquote>
|
|
|
|
@ -155,7 +155,7 @@ function Detail() {
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</Modal>
|
|
|
|
|
<Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
|
<Space direction='vertical' className='w-full'>
|
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
<Col span={20}>
|
|
|
|
|
<Title level={4}>{t('group:RefNo')}: {reservationDetail.referenceNumber}; {t('group:ArrivalDate')}: {reservationDetail.arrivalDate};</Title>
|
|
|
|
@ -165,17 +165,19 @@ function Detail() {
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row gutter={{ md: 24 }}>
|
|
|
|
|
<Col span={12} style={{height: '100%'}} >
|
|
|
|
|
<iframe id="msdoc-iframe-reservation" title="msdoc-iframe-reservation" src={reservationPreviewUrl} frameBorder="0" style={{ width: '100%', height: '600px' }}></iframe>
|
|
|
|
|
<Col span={12} className='w-full'>
|
|
|
|
|
<iframe id='msdoc-iframe-reservation' title='msdoc-iframe-reservation'
|
|
|
|
|
src={reservationPreviewUrl} frameBorder='0' style={{height: '600px'}} className='w-full'></iframe>
|
|
|
|
|
<Button type='link' target='_blank' href={reservationUrl}>{t('Download')} Itinerary</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={12} style={{height: '100%'}} >
|
|
|
|
|
<iframe id="msdoc-iframe-name-card" title="msdoc-iframe-name-card" src={nameCardPreviewUrl} frameBorder="0" style={{ width: '100%', height: '600px' }}></iframe>
|
|
|
|
|
<Col span={12} className='w-full'>
|
|
|
|
|
<iframe id='msdoc-iframe-name-card' title='msdoc-iframe-name-card'
|
|
|
|
|
src={nameCardPreviewUrl} frameBorder='0' style={{height: '600px'}} className='w-full'></iframe>
|
|
|
|
|
<Button type='link' target='_blank' href={nameCardUrl}>{t('Download')} Name Card</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={24}><Space direction="vertical" style={{ width: '100%' }}>
|
|
|
|
|
<Col span={24}><Space direction='vertical' className='w-full'>
|
|
|
|
|
<Table
|
|
|
|
|
bordered
|
|
|
|
|
loading={dataLoading}
|
|
|
|
|