Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CE-1231 Add * for required fields #752

Open
wants to merge 4 commits into
base: release/yellow-boring-sponge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ export const AuthoizationOutcomeForm: FC<props> = ({ id, type, value, leadIdenti
return (
<>
<div className="comp-details-form">
<div className="section-legend">
<span className="required-ind">*</span> at least one of these fields is required
</div>
<div
className="comp-details-form-row"
id="authroization-authroized-site-id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const AuthoizationOutcome: FC = () => {
id="ceeb-authorization"
>
<div className="comp-details-section-header">
<h3>Authorization</h3>
<h3>Authorization{editable && <span className="required-ind">*</span>}</h3>
{!editable && (
<div className="comp-details-section-header-actions">
<Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ export const DecisionForm: FC<props> = ({
className="comp-details-form-row"
id="decision-schedule-sector-type"
>
<label htmlFor="outcome-decision-schedule-secto">WDR schedule/IPM sector type</label>
<label htmlFor="outcome-decision-schedule-secto">
WDR schedule/IPM sector type<span className="required-ind">*</span>
</label>
<div className="comp-details-input full-width">
<CompSelect
id="outcome-decision-schedule-sector"
Expand All @@ -342,7 +344,9 @@ export const DecisionForm: FC<props> = ({
className="comp-details-form-row"
id="decision-sector-category"
>
<label htmlFor="outcome-decision-sector-category">Sector/Category</label>
<label htmlFor="outcome-decision-sector-category">
Sector/Category<span className="required-ind">*</span>
</label>
<div className="comp-details-input full-width">
<CompSelect
id="outcome-decision-sector-category"
Expand All @@ -363,7 +367,9 @@ export const DecisionForm: FC<props> = ({
className="comp-details-form-row"
id="decision-discharge-type"
>
<label htmlFor="outcome-decision-discharge">Discharge type</label>
<label htmlFor="outcome-decision-discharge">
Discharge type<span className="required-ind">*</span>
</label>
<div className="comp-details-input full-width">
<CompSelect
id="outcome-decision-discharge"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ export const HWCRComplaintAssessment: FC<Props> = ({
(!selectedAssessmentTypes || selectedAssessmentTypes?.length <= 0) &&
(!selectedAssessmentCat1Types || selectedAssessmentCat1Types?.length <= 0)
) {
setAssessmentRequiredErrorMessage("One or more assessment is required");
setAssessmentRequiredErrorMessage("One or more animal actions is required");
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,9 @@ export const CreateAnimalOutcome: FC<props> = ({ index, assignedOfficer: officer
</legend>

<div className="comp-details-form-row">
<label htmlFor="select-species">Species</label>
<label htmlFor="select-species">
Species<span className="required-ind">*</span>
</label>
<div className="comp-details-input full-width">
<CompSelect
id="select-species"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ export const EditOutcome: FC<props> = ({ id, index, outcome, assignedOfficer: of
Animal Information
</legend>
<div className="comp-details-form-row">
<label htmlFor="select-species">Species</label>
<label htmlFor="select-species">
Species<span className="required-ind">*</span>
</label>

<CompSelect
id="select-species"
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/assets/sass/complaint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,12 @@
flex: 1 1 auto;
}
}

.section-legend {
color: $gray-500;
margin-bottom: 16px;
font-size: 14px;
}
}

.comp-details-form-row {
Expand Down
Loading