Skip to content

Commit eff7ad6

Browse files
committed
feat: two new question categories for custom questions
1 parent 28f028e commit eff7ad6

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

src/bot/events/healthcheck/healthcheck-modal-builder.ts

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ export function createHealthCheckModalBlocks(
5151
plainHeader(questionTypeToText(QuestionType.TEAM_HEALTH)),
5252
...teamHealth.map((question) => createSelectSectionBlock(question, existingAnswers)),
5353
]),
54+
...addIfArray(grouped.ME, (me) => [
55+
plainHeader(questionTypeToText(QuestionType.ME)),
56+
...me.map((question) => createSelectSectionBlock(question, existingAnswers)),
57+
]),
58+
...addIfArray(grouped.SURROUNDINGS, (surroundings) => [
59+
plainHeader(questionTypeToText(QuestionType.SURROUNDINGS)),
60+
...surroundings.map((question) => createSelectSectionBlock(question, existingAnswers)),
61+
]),
5462
...addIfArray(grouped.SPEED, (speed) => [
5563
plainHeader(questionTypeToText(QuestionType.SPEED)),
5664
...speed.map((question) => createSelectSectionBlock(question, existingAnswers)),

src/components/graphs/GlobalScoreGraph.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ type Props = {
2121
const colors = {
2222
score: 'rgba(0, 103, 197, 0.65)',
2323
[QuestionType.TEAM_HEALTH]: 'rgba(139, 69, 19, 0.65)',
24+
[QuestionType.ME]: 'rgba(255,116,12,0.65)',
25+
[QuestionType.SURROUNDINGS]: 'rgba(136,0,4,0.65)',
2426
[QuestionType.SPEED]: 'rgba(102, 102, 51, 0.65)',
2527
[QuestionType.TECH]: 'rgba(128, 0, 128, 0.65)',
2628
[QuestionType.OTHER]: 'rgba(255, 140, 0, 0.65)',

src/safe-types.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
export enum QuestionType {
22
TEAM_HEALTH = 'TEAM_HEALTH',
3+
ME = 'ME',
4+
SURROUNDINGS = 'SURROUNDINGS',
35
SPEED = 'SPEED',
46
TECH = 'TECH',
57
OTHER = 'OTHER',

src/utils/asked.ts

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ import { QuestionType } from '../safe-types'
22

33
export function questionTypeToText(type: QuestionType): string {
44
switch (type) {
5+
case QuestionType.ME:
6+
return 'Meg'
7+
case QuestionType.SURROUNDINGS:
8+
return 'Omgivelsene'
59
case QuestionType.TEAM_HEALTH:
610
return 'Teamhelse'
711
case QuestionType.SPEED:

0 commit comments

Comments
 (0)