Skip to content

Commit

Permalink
Merge pull request #565 from biomage-ltd/disable-button
Browse files Browse the repository at this point in the history
[BIOMAGE-1516] Disable 'Process Project' button when sample files are missing
  • Loading branch information
StefanBabukov authored Nov 25, 2021
2 parents 1cc50f7 + ec8a5fe commit d8ac6be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/components/data-management/LaunchAnalysisButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ const LaunchAnalysisButton = () => {
// Check if all files for a given tech has been uploaded
const { fileNames } = sample;
if (
fileUploadSpecifications[sample.type].requiredFiles.every(
(file) => !fileNames.includes(file),
!fileUploadSpecifications[sample.type].requiredFiles.every(
(file) => fileNames.includes(file),
)
) { return false; }

Expand Down
6 changes: 3 additions & 3 deletions src/components/data-management/SamplesTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ const SamplesTable = forwardRef((props, ref) => {
// this situation should be included into the SamplesTable.jsx tests
const sampleFiles = samples[sampleUuid]?.files || {};

const barcodesFile = sampleFiles['barcodes.tsv.gz'] ?? { upload: { status: UploadStatus.UPLOADING } };
const genesFile = sampleFiles['features.tsv.gz'] ?? { upload: { status: UploadStatus.UPLOADING } };
const matrixFile = sampleFiles['matrix.mtx.gz'] ?? { upload: { status: UploadStatus.UPLOADING } };
const barcodesFile = sampleFiles['barcodes.tsv.gz'] ?? { upload: { status: UploadStatus.FILE_NOT_FOUND } };
const genesFile = sampleFiles['features.tsv.gz'] ?? { upload: { status: UploadStatus.FILE_NOT_FOUND } };
const matrixFile = sampleFiles['matrix.mtx.gz'] ?? { upload: { status: UploadStatus.FILE_NOT_FOUND } };

const barcodesData = { sampleUuid, file: barcodesFile };
const genesData = { sampleUuid, file: genesFile };
Expand Down

0 comments on commit d8ac6be

Please sign in to comment.