Skip to content

Commit 5a59987

Browse files
committed
Add optional note about multisample requests
1 parent efab66d commit 5a59987

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/Common/Form/NewForm.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useAuth } from '../../Utils/Auth';
1111
import { WithID } from '../../Utils/WithID';
1212
import { Body, Card, ContentWrapper, Header, Page, Title } from '../Layout';
1313
import { ShortText } from './NewTextField';
14-
import { FieldContext, useFieldContext, Warning } from './Question';
14+
import { FieldContext, Note, useFieldContext, Warning } from './Question';
1515
import { TeamField } from './RequestInfoFields';
1616

1717
type RequestStub = { title: string; teamId: number };
@@ -62,6 +62,8 @@ export function NewForm({
6262
);
6363
}
6464

65+
const requestObject = requests.get(requestType);
66+
6567
return (
6668
<FieldContext.Provider value={state}>
6769
<ContentWrapper>
@@ -77,10 +79,20 @@ export function NewForm({
7779
className="space-y-8"
7880
>
7981
<Section title="General information">
80-
<ShortText q="What should be this request called?" id="Title" />
82+
<ShortText
83+
q="Request Title"
84+
id="Title"
85+
description="A title for this request: simple, unique, and easy to search for"
86+
/>
8187
<TeamField id="TeamId" />
88+
{requestObject?.showMultipleSamplesNote ? (
89+
<Note>
90+
Please, combine samples into one request if the requested analysis follows
91+
the same logic.
92+
</Note>
93+
) : null}
8294
</Section>
83-
{requests.get(requestType)?.formComponent}
95+
{requestObject?.formComponent}
8496
<div className="h-0.5 w-full bg-gray-200" />
8597
<div className="flex justify-end flex-row w-full space-x-6 relative">
8698
{children}

0 commit comments

Comments
 (0)