Skip to content

Commit

Permalink
change labels
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokant committed Oct 25, 2024
1 parent efabc44 commit 410715e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/frontend/src/samples/components/SampleForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export default function SampleForm() {
{({ state, handleChange, handleBlur }) => (
<HUIField>
<Label className="block">
guid - total: {state.value.length}
Guid - total: {state.value.length}
</Label>
<PastableArrayInput
state={state}
Expand All @@ -183,7 +183,7 @@ export default function SampleForm() {
{({ state, handleChange, handleBlur }) => (
<HUIField>
<Label className="block">
name - total: {state.value.length}
Sample Name - total: {state.value.length}
</Label>
<PastableArrayInput
state={state}
Expand Down Expand Up @@ -231,7 +231,7 @@ export default function SampleForm() {
<Field name="type">
{({ state, handleChange, handleBlur }) => (
<HUIField>
<Label className="block">Type</Label>
<Label className="block">Sample Type</Label>
<AsyncSelect
defaultOptions
loadOptions={sampleTypesOptions}
Expand Down
19 changes: 11 additions & 8 deletions src/frontend/src/samples/components/Table.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const sampleTypesOptions = async (input) => {
// return (await client.get(`/api/markers/?order=${config.order}&name__icontains=${input}`)).data;
// };

const locationOptions = species => async (input) => {
const locationOptions = (species) => async (input) => {
let base = `/api/locations/?order=${config.order}&species=${species?.id}`;
if (input) {
base += `&name__icontains=${input}`;
Expand All @@ -73,7 +73,7 @@ const COLUMNS = [
})
: null,
columnHelper.accessor("name", {
header: "Name",
header: "Sample Name",
cell: SimpleCellInput,
}),
columnHelper.accessor("species", {
Expand All @@ -99,14 +99,14 @@ const COLUMNS = [
cell: (props) => (
<SelectCreateCell
{...props}
loadOptions={locationOptions(props.row.getValue('species'))}
loadOptions={locationOptions(props.row.getValue("species"))}
queryKey={"locations"}
onCreate={locationCreate}
/>
),
}),
columnHelper.accessor("type", {
header: "Type",
header: "Sample Type",
cell: (props) => (
<SelectCell
{...props}
Expand Down Expand Up @@ -135,7 +135,10 @@ const COLUMNS = [
<>
<i className="fas fa-times text-red-400" />
<span className="text-sm ml-3">
<i className="fas fa-info-circle text-blue-500" title={getValue()} />
<i
className="fas fa-info-circle text-blue-500"
title={getValue()}
/>
</span>
</>
) : (
Expand All @@ -148,9 +151,9 @@ const COLUMNS = [

function handleError(e) {
if (e instanceof AxiosError) {
e.response.data.errors.forEach(err => {
toast.error(err.detail)
})
e.response.data.errors.forEach((err) => {
toast.error(err.detail);
});
} else {
toast.error("There was an error");
}
Expand Down
2 changes: 1 addition & 1 deletion src/genlab_bestilling/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def has_error(self):
]
):
raise ValidationError(
"GUID, Name, Sample Type, Species and Year are required"
"GUID, Sample Name, Sample Type, Species and Year are required"
)

if (
Expand Down

0 comments on commit 410715e

Please sign in to comment.