Commit 0f5afbbd authored by Loic Huder's avatar Loic Huder

Merge branch 'investigation-link' into 'master'

Added investigation beamline and start date to parcel header

Closes #385

See merge request !427
parents caf2e6ac 8fefab9e
Pipeline #32324 passed with stages
in 7 minutes and 29 seconds
......@@ -112,7 +112,11 @@ function ParcelDetails(props) {
onCloseModal={handleCloseModal}
/>
)}
<ParcelHeader parcel={parcel} setAlert={setAlert} />
<ParcelHeader
parcel={parcel}
investigation={investigation}
setAlert={setAlert}
/>
<div className={styles.statusRow}>
<div className={styles.statusCol}>
......
......@@ -7,9 +7,10 @@ import ParcelResource from '../../resources/parcel';
import DownloadLabelButton from './DownloadLabelButton';
import styles from './ParcelHeader.module.css';
import { Link } from 'react-router-dom';
import { dateFormatter } from '../Investigation/utils';
function ParcelHeader(props) {
const { parcel, setAlert } = props;
const { parcel, investigation, setAlert } = props;
const { shipmentId, investigationId, _id } = parcel;
const history = useHistory();
......@@ -24,7 +25,8 @@ function ParcelHeader(props) {
<h4 className={styles.investigation}>
Investigation{' '}
<Link to={`/investigation/${investigationId}/shipping`}>
{parcel.investigationName}
{investigation.name} - {dateFormatter(investigation.startDate)} -{' '}
{investigation.visitId.toUpperCase()}
</Link>
</h4>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment