Skip to content

Commit

Permalink
Merge pull request #549 from sanger/x1142_labware_state_visible
Browse files Browse the repository at this point in the history
The display of the labware state for the destination labware upon scanning in the Visium transfer page.
  • Loading branch information
seenanair authored Jan 31, 2024
2 parents dbced0c + 2bdc79e commit 771e528
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions cypress/e2e/pages/visiumTransfer.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ describe('Transfer Page', () => {
it('should display scanned output labware', () => {
cy.findByText('STAN-3112').should('be.visible');
cy.findByTestId('removeButton').should('exist');
cy.findByText('ACTIVE').should('be.visible');
});
it('should display filled slots in output labware as disabled', () => {
cy.findByTestId('labware-STAN-3112').within(() => {
Expand Down
25 changes: 18 additions & 7 deletions src/pages/SlotCopy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import RadioGroup, { RadioButtonInput } from '../components/forms/RadioGroup';
import LabwareScanner from '../components/labwareScanner/LabwareScanner';
import RemoveButton from '../components/buttons/RemoveButton';
import { objectKeys } from '../lib/helpers';
import { StripyCardDetail } from '../components/StripyCard';
import { LabwareStatePill } from '../components/LabwareStatePill';

type PageParams = {
title: string;
Expand Down Expand Up @@ -134,14 +136,23 @@ const SlotCopyDestinationConfigPanel: React.FC<DestinationLabwareScanPanelProps>
>
{(props) => {
return (
<div className="flex flex-row justify-end">
<div className="flex flex-col">
{props.labwares.length > 0 && (
<RemoveButton
onClick={() => {
labware?.labware.barcode && props.removeLabware(labware?.labware.barcode);
onLabwareScan?.([]);
}}
/>
<>
<div className={'flex flex-row justify-end'}>
<RemoveButton
onClick={() => {
labware?.labware.barcode && props.removeLabware(labware?.labware.barcode);
onLabwareScan?.([]);
}}
/>
</div>
{labware && labware?.labware.barcode && (
<StripyCardDetail term={'State'}>
<LabwareStatePill labware={labware?.labware} />
</StripyCardDetail>
)}
</>
)}
</div>
);
Expand Down

0 comments on commit 771e528

Please sign in to comment.