Skip to content

Commit

Permalink
Support #35538 - Molecular Analysis Run view page bug and test coverage
Browse files Browse the repository at this point in the history
- Moved the 2 hooks inside useMolecularAnalysRun to their own hooks.
- Updated imports.
  • Loading branch information
brandonandre committed Jan 14, 2025
1 parent c609a70 commit ca47741
Show file tree
Hide file tree
Showing 5 changed files with 879 additions and 858 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import { DinaMessage, useDinaIntl } from "../../intl/dina-ui-intl";
import { GroupSelectField } from "../group-select/GroupSelectField";
import { AttachmentReadOnlySection } from "../object-store/attachment-list/AttachmentReadOnlySection";
import { QualityControlSection } from "../seqdb/molecular-analysis-workflow/QualityControlSection";
import {
SequencingRunItem,
useMolecularAnalysisRunView
} from "./useMolecularAnalysisRun";
import { SequencingRunItem } from "./useMolecularAnalysisRun";
import { SeqdbMessage } from "../../intl/seqdb-intl";
import { useMolecularAnalysisRunView } from "./useMolecularAnalysisRunView";

export function MolecularAnalysisRunFormFields() {
const { initialValues } = useDinaFormContext();
const { formatMessage } = useDinaIntl();

const {
loading,
sequencingRunItems,
Expand All @@ -26,6 +25,7 @@ export function MolecularAnalysisRunFormFields() {
} = useMolecularAnalysisRunView({
molecularAnalysisRunId: initialValues.id
});

return loading ? (
<LoadingSpinner loading={true} />
) : (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PcrBatchItem, SeqReaction } from "../../types/seqdb-api";
import { PcrBatchItem } from "../../types/seqdb-api";
import { MolecularAnalysisRunItem } from "../../types/seqdb-api/resources/molecular-analysis/MolecularAnalysisRunItem";
import { useEffect, useState } from "react";
import {
Expand All @@ -16,7 +16,7 @@ import { useDinaIntl } from "../../intl/dina-ui-intl";
import { ColumnDef } from "@tanstack/react-table";
import { MetagenomicsBatchItem } from "packages/dina-ui/types/seqdb-api/resources/metagenomics/MetagenomicsBatchItem";
import { MetagenomicsBatch } from "packages/dina-ui/types/seqdb-api/resources/metagenomics/MetagenomicsBatch";
import { useMolecularAnalysisRunColumns } from "./useMolecularAnalysisRun";
import { useMolecularAnalysisRunColumns } from "./useMolecularAnalysisRunColumns";

export interface UseMetagenomicsWorkflowMolecularAnalysisRunProps {
metagenomicsBatchId: string;
Expand Down
Loading

0 comments on commit ca47741

Please sign in to comment.