Skip to content

Commit

Permalink
uppercase age groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Borislav Kavalov committed Oct 7, 2024
1 parent 7df0631 commit d16a33b
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 28 deletions.
8 changes: 4 additions & 4 deletions backend/src/main/java/bg/kidsground/domain/AgeGroup.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

public enum AgeGroup {

ZERO_TO_THREE("zero_to_three"),
THREE_TO_SIX("three_to_six"),
THREE_TO_TWELVE("three_to_twelve"),
SIX_TO_TWELVE("six_to_twelve");
ZERO_TO_THREE("ZERO_TO_THREE"),
THREE_TO_SIX("THREE_TO_SIX"),
THREE_TO_TWELVE("THREE_TO_TWELVE"),
SIX_TO_TWELVE("SIX_TO_TWELVE");

public final String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public void testGetById_NotFound() {
public void testFindAllApproved() {
// Given
Playground playground = new Playground();
playground.setAgeGroups(List.of(AgeGroup.SIX_TO_TWELVE));
playground.setCreatedByUser(user);
playground.setNew(false);
when(playgroundRepository.findByIsNewFalse()).thenReturn(Collections.singletonList(playground));
Expand All @@ -134,6 +135,7 @@ public void testFindAllApproved() {

// Then
assertEquals(1, result.size());
assertEquals(result.get(0).getAgeGroups(), List.of(AgeGroup.SIX_TO_TWELVE));
verify(playgroundRepository, times(1)).findByIsNewFalse();
}

Expand Down
Binary file added frontend/public/SIX_TO_TWELVE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/THREE_TO_SIX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/THREE_TO_TWELVE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/ZERO_TO_THREE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions frontend/src/Components/Common/InfoCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ export const InfoCard = (props) => {

const hasFenceResults = props.hasFence ? "Оградена" : "Неоградена"
const ageGroups = Object.freeze({
zero_to_three: "0 и 3",
three_to_six: "3 и 6",
three_to_twelve: "3 и 12",
six_to_twelve: "6 и 12"
ZERO_TO_THREE: "0 и 3",
THREE_TO_SIX: "3 и 6",
THREE_TO_TWELVE: "3 и 12",
SIX_TO_TWELVE: "6 и 12"
})

const shades = Object.freeze({
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/Components/Pages/EditPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -337,23 +337,23 @@ export const EditPage = () => {
<br />
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="zero_to_three" name="age_group" value="zero_to_three" checked={age_group.includes('zero_to_three')} />
<label for="zero_to_three">0-3г. (С придружител)</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="ZERO_TO_THREE" name="age_group" value="ZERO_TO_THREE" checked={age_group.includes('ZERO_TO_THREE')} />
<label for="ZERO_TO_THREE">0-3г. (С придружител)</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="three_to_six" name="age_group" value="three_to_six" checked={age_group.includes('three_to_six')} />
<label for="three_to_six">3-6г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="THREE_TO_SIX" name="age_group" value="THREE_TO_SIX" checked={age_group.includes('THREE_TO_SIX')} />
<label for="THREE_TO_SIX">3-6г.</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="three_to_twelve" name="age_group" value="three_to_twelve" checked={age_group.includes('three_to_twelve')} />
<label for="three_to_twelve">3-12г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="THREE_TO_TWELVE" name="age_group" value="THREE_TO_TWELVE" checked={age_group.includes('THREE_TO_TWELVE')} />
<label for="THREE_TO_TWELVE">3-12г.</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="six_to_twelve" name="age_group" value="six_to_twelve" checked={age_group.includes('six_to_twelve')} />
<label for="six_to_twelve">6-12г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="SIX_TO_TWELVE" name="age_group" value="SIX_TO_TWELVE" checked={age_group.includes('SIX_TO_TWELVE')} />
<label for="SIX_TO_TWELVE">6-12г.</label>
</div>
<br />
</div>
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/Components/Pages/PlaygroundFormPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,23 +314,23 @@ export const PlaygroundFormPage = () => {
<br />
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="zero_to_three" name="age_group" value="zero_to_three" />
<label for="zero_to_three">0-3г. (С придружител)</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="ZERO_TO_THREE" name="age_group" value="ZERO_TO_THREE" />
<label for="ZERO_TO_THREE">0-3г. (С придружител)</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="three_to_six" name="age_group" value="three_to_six" />
<label for="three_to_six">3-6г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="THREE_TO_SIX" name="age_group" value="THREE_TO_SIX" />
<label for="THREE_TO_SIX">3-6г.</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="three_to_twelve" name="age_group" value="three_to_twelve" />
<label for="three_to_twelve">3-12г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="THREE_TO_TWELVE" name="age_group" value="THREE_TO_TWELVE" />
<label for="THREE_TO_TWELVE">3-12г.</label>
</div>
<br />
<div className="choice">
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="six_to_twelve" name="age_group" value="six_to_twelve" />
<label for="six_to_twelve">6-12г.</label>
<input type="checkbox" onChange={changeAgeGroup} className="playground-input playground-input-radio" id="SIX_TO_TWELVE" name="age_group" value="SIX_TO_TWELVE" />
<label for="SIX_TO_TWELVE">6-12г.</label>
</div>
<br />
</div>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/Components/Pages/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export const ProfilePage = () => {
const navigate = useNavigate();

const ageGroups = Object.freeze({
zero_to_three: "от 0 до 3",
three_to_six: "от 3 до 6",
three_to_twelve: "от 3 до 12",
six_to_twelve: "от 6 до 12"
ZERO_TO_THREE: "0 и 3",
THREE_TO_SIX: "3 и 6",
THREE_TO_TWELVE: "3 и 12",
SIX_TO_TWELVE: "6 и 12"
})

const shades = Object.freeze({
Expand Down
Binary file added frontend/src/static/SIX_TO_TWELVE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/static/THREE_TO_SIX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/static/THREE_TO_TWELVE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/src/static/ZERO_TO_THREE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d16a33b

Please sign in to comment.