Skip to content

Commit a681386

Browse files
committed
feat: categories on edit
1 parent 7bb6af3 commit a681386

File tree

6 files changed

+106
-347
lines changed

6 files changed

+106
-347
lines changed

data/statementsCategories.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
{
22
"categories": [
33
{
4-
"id": "wellbeing",
4+
"id": "Wellbeing",
55
"name": "Wellness at work"
66
},
77
{
8-
"id": "parental",
8+
"id": "Parental",
99
"name": "My role as a parent and/or carer"
1010
},
1111
{
12-
"id": "religious",
12+
"id": "Religious",
1313
"name": "My religion or beliefs"
1414
},
1515
{
16-
"id": "disability",
16+
"id": "Disability",
1717
"name": "My experience as someone with a disability or long term condition"
1818
},
1919
{
20-
"id": "colleagueSharing",
20+
"id": "Colleague_Sharing",
2121
"name": "Colleague Sharing"
2222
},
2323
{
24-
"id": "employerSupport",
24+
"id": "Employer_Support",
2525
"name": "Employer Support"
2626
},
2727
{
28-
"id": "personalIntroduction",
28+
"id": "Personal_Introduction",
2929
"name": "Personal Introduction"
3030
}
3131
]

src/components/statementWizard/EditStatementModal.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const EditStatementModal: React.FC<EditStatementModalProps> = ({
7575
subject: 'border-[var(--subject-selector)]',
7676
verb: 'border-[var(--verb-selector)]',
7777
object: 'border-[var(--object-input)]',
78-
category: 'border-black',
78+
category: 'border-[var(--category-selector)]',
7979
privacy: 'border-[var(--privacy-selector)]',
8080
complement: 'border-gray-400',
8181
};
@@ -92,10 +92,28 @@ export const EditStatementModal: React.FC<EditStatementModalProps> = ({
9292
presetQuestion={{
9393
id: 'editing',
9494
category: statement.category || 'wellbeing',
95-
question: '', // Not needed for editing
95+
mainQuestion: '', // Not needed for editing
9696
steps: {
9797
subject: {
98+
question: '',
99+
preset: false,
100+
presetAnswer: null,
98101
allowDescriptors: true
102+
},
103+
verb: {
104+
question: '',
105+
preset: false,
106+
presetAnswer: null
107+
},
108+
object: {
109+
question: '',
110+
preset: false,
111+
presetAnswer: null
112+
},
113+
privacy: {
114+
question: '',
115+
preset: false,
116+
presetAnswer: null
99117
}
100118
}
101119
}}
@@ -152,7 +170,7 @@ export const EditStatementModal: React.FC<EditStatementModalProps> = ({
152170
{/* Optionally add a footer for explicit Save/Cancel */}
153171
<div className='p-4 flex justify-center gap-4'>
154172
<Button onClick={handleSave} variant='pink'>
155-
Save
173+
OK
156174
</Button>
157175
<Button onClick={onClose} variant='pink'>
158176
Cancel

src/components/statementWizard/selectors/SubjectSelector.tsx

Lines changed: 0 additions & 143 deletions
This file was deleted.

0 commit comments

Comments
 (0)