Skip to content

Commit

Permalink
Notification error should be below
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnasambu committed Aug 12, 2024
1 parent e615655 commit 41f1411
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
23 changes: 12 additions & 11 deletions src/results/result-form-field.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ const ResultFormField: React.FC<ResultFormFieldProps> = ({

return (
<>
{Object.keys(errors).length > 0 && (
<InlineNotification
className={styles.emptyFormError}
lowContrast
title={t("error", "Error")}
subtitle={
t("pleaseFillField", "Please fill at least one field") + "."
}
hideCloseButton
/>
)}
{isTextOrNumeric(concept) && (
<Controller
control={control}
Expand Down Expand Up @@ -189,6 +178,18 @@ const ResultFormField: React.FC<ResultFormFieldProps> = ({
);
}
})}

{Object.keys(errors).length > 0 && (
<InlineNotification
className={styles.emptyFormError}
lowContrast
title={t("error", "Error")}
subtitle={
t("pleaseFillField", "Please fill at least one field") + "."
}
hideCloseButton
/>
)}
</>
);
};
Expand Down
5 changes: 4 additions & 1 deletion src/results/result-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@
margin-top: auto;
}

.emptyFormError {
margin-top: 10px;
}

.form {
display: flex;
flex-direction: column;
justify-content: space-between;
height: calc(100vh - 6rem);
}

:global(.omrs-breakpoint-lt-desktop) .form {
Expand Down

0 comments on commit 41f1411

Please sign in to comment.