Skip to content

Commit

Permalink
fix: added form component to service
Browse files Browse the repository at this point in the history
  • Loading branch information
KattisLej committed Oct 22, 2024
1 parent c54e874 commit a0ee978
Showing 1 changed file with 3 additions and 61 deletions.
64 changes: 3 additions & 61 deletions system/frontend/src/components/Service/Service.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FormEventHandler } from "react";
import { InputField, Field, useFields } from "../Fields";
import { useFields } from "../Fields";
import { useClient } from "../../modules/Client";
import {Form} from "../Form/Form";

export function Service(_props: {}) {
const fieldDefs = useFields()
Expand All @@ -24,66 +25,7 @@ export function Service(_props: {}) {
<h2 className="title is-size-4-mobile has-text-centered">Input</h2>
<div className="columns is-centered">
<div className="column is-two-thirds">
<form onSubmit={handleSubmit}>
<fieldset className="box">
<legend className="label is-size-5 has-text-weight-medium has-text-grey-dark">Source sequences for target design</legend>
<Field id="source_sequence.gene_transcript_name_or_fasta" widget={((props) => (<InputField {...props} type="textarea" rows={5}/>))}/>
<div className="columns is-vcentered">
<div className="column">
<Field id="source_sequence.attribute_identifier" />
</div>
<div className="column">
<Field id="source_sequence.feature_identifier" />
</div>
</div>
<Field id="source_sequence.fasta_source_sequence_absent" />
</fieldset>
<fieldset className="box">
<legend className="label is-size-5 has-text-weight-medium has-text-grey-dark">Probe design</legend>
<div className="columns is-vcentered">
<div className="column">
<Field id="probe_design.probe_arm_length" />
</div>
<div className="column">
<Field id="probe_design.min_genome_distance" />
</div>
</div>
<Field id="probe_design.use_hamming_distance" />
<Field id="probe_design.only_one_unique_arm" />
<Field id="probe_design.allow_overlapping_probes" />
</fieldset>
<fieldset className="box">
<legend className="label is-size-5 has-text-weight-medium has-text-grey-dark">Color code</legend>
<div className="columns is-vcentered">
<div className="column">
<Field id="color_code.amount_of_colors" />
</div>
<div className="column">
<Field id="color_code.length_of_code" />
</div>
</div>
</fieldset>
<fieldset className="box">
<legend className="label is-size-5 has-text-weight-medium has-text-grey-dark">Anchor and spacer sequences</legend>
<div className="columns is-vcentered">
<div className="column">
<Field id="anchor_and_spacer.anchor" widget={((props) => (<InputField {...props} type="textarea" rows={1}/>))}/>
</div>
<div className="column">
<Field id="anchor_and_spacer.spacer_left" widget={((props) => (<InputField {...props} type="textarea" rows={1}/>))}/>
</div>
<div className="column">
<Field id="anchor_and_spacer.spacer_right" widget={((props) => (<InputField {...props} type="textarea" rows={1}/>))}/>
</div>
</div>
</fieldset>
<fieldset className="box">
<legend className="label is-size-5 has-text-weight-medium has-text-grey-dark">Genome</legend>
<Field id="genome.genome" />
</fieldset>
<button type="submit" className="button is-pulled-right has-background-grey has-text-white">Launch analysis</button>
<button type="submit" className="button is-pulled-right has-background-grey has-text-white">Show example</button>
</form>
<Form handleSubmit={handleSubmit}/>
</div>
</div>
</div>
Expand Down

0 comments on commit a0ee978

Please sign in to comment.