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

BUGFIX : Change the mock data to make it work with hint button + Minor Display Issue #264

Merged
merged 3 commits into from
Jan 12, 2023
Merged
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
11 changes: 11 additions & 0 deletions web/frontend/src/mocks/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const mockForm1: any = {
MaxN: 2,
MinN: 1,
Choices: ['tomato', 'salad', 'onion'],
Hint: '',
},
],
Ranks: [
Expand All @@ -52,6 +53,7 @@ const mockForm1: any = {
MaxN: 3,
MinN: 3,
Choices: ['BC', 'SV', 'Parmentier'],
Hint: '',
},
],
},
Expand All @@ -64,13 +66,15 @@ const mockForm1: any = {
MaxN: 1,
MinN: 1,
Choices: ['1', '2', '3', '4', '5'],
Hint: '',
},
{
Title: 'How did you find the teaching ?',
ID: (0x41e2).toString(),
MaxN: 1,
MinN: 1,
Choices: ['bad', 'normal', 'good'],
Hint: 'Be honest. This is anonymous anyway',
},
],
Texts: [
Expand All @@ -82,6 +86,7 @@ const mockForm1: any = {
MinN: 1,
Regex: '',
Choices: ['TA1', 'TA2'],
Hint: '',
},
],
},
Expand Down Expand Up @@ -129,6 +134,7 @@ const mockForm2: any = {
MaxN: 1,
MinN: 1,
Choices: ['1', '2', '3', '4', '5'],
Hint: '',
},
],
Texts: [
Expand All @@ -140,6 +146,7 @@ const mockForm2: any = {
MinN: 2,
Choices: ['TA1', 'TA2'],
Regex: '^[A-Z][a-z]+$',
Hint: '',
},
],

Expand All @@ -157,6 +164,7 @@ const mockForm2: any = {
MaxN: 3,
MinN: 0,
Choices: ['tomato', 'salad', 'onion', 'falafel'],
Hint: '',
},
],

Expand All @@ -167,13 +175,15 @@ const mockForm2: any = {
MaxN: 4,
MinN: 1,
Choices: ['Esplanade', 'Giacometti', 'Arcadie', 'Montreux Jazz Cafe'],
Hint: '',
},
{
Title: 'IN or SC ?',
ID: (0xbeef).toString(),
MaxN: 2,
MinN: 1,
Choices: ['IN', 'SC'],
Hint: 'The right answer is IN ;-)',
},
],
Texts: [],
Expand All @@ -200,6 +210,7 @@ const mockForm3: any = {
MaxLength: 50,
Regex: '',
Choices: ['Firstname', 'Main 🍕', 'Drink 🧃', 'Dessert 🍰'],
Hint: 'If you change opinion call me before 11:30 a.m.',
},
],
Subjects: [],
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/ballot/components/Rank.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const Rank: FC<RankProps> = ({ rank, answers }) => {
<div>
<h3 className="text-lg break-words text-gray-600 w-96">{rank.Title}</h3>
</div>
<div>
<div className="text-right">
<HintButton text={rank.Hint} />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/ballot/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Select: FC<SelectProps> = ({ select, answers, setAnswers }) => {
<div>
<h3 className="text-lg break-words text-gray-600 w-96">{select.Title}</h3>
</div>
<div>
<div className="text-right">
<HintButton text={select.Hint} />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/pages/ballot/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const Text: FC<TextProps> = ({ text, answers, setAnswers }) => {
<div>
<h3 className="text-lg break-words text-gray-600 w-96">{text.Title}</h3>
</div>
<div>
<div className="text-right">
<HintButton text={text.Hint} />
</div>
</div>
Expand Down