File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -135,9 +135,7 @@ const ComplexDetailPage: React.FC = () => {
135135 complex . goals . map ( ( goal : Goal ) => (
136136 < GoalCard key = { goal . id } >
137137 < GoalTitle > { t ( 'surfaceGoal' ) } </ GoalTitle >
138- < GoalContent > { goal . surface_goal } </ GoalContent >
139- < GoalTitle > { t ( 'underlyingGoal' ) } </ GoalTitle >
140- < GoalContent > { goal . underlying_goal } </ GoalContent >
138+ < GoalContent > { goal . content } </ GoalContent >
141139 < ActionsButton
142140 onClick = { ( ) => navigate ( `/goals/${ goal . id } /actions` ) }
143141 >
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ export interface Complex {
55 category : string ;
66 created_at : string ;
77 updated_at : string ;
8- goals : Goal [ ] ;
8+ goals ? : Goal [ ] ;
99}
1010
1111export interface ComplexInput {
@@ -16,16 +16,50 @@ export interface ComplexInput {
1616export interface Goal {
1717 id : number ;
1818 complex_id : number ;
19- surface_goal : string ;
20- underlying_goal : string ;
19+ content : string ;
2120 created_at : string ;
2221 updated_at : string ;
2322}
2423
25- export interface ActionInput {
24+ export interface Action {
25+ id : number ;
26+ goal_id : number ;
2627 content : string ;
2728 completed_at ?: string ;
28- category : string ;
2929 created_at : string ;
3030 updated_at : string ;
31+ gains ?: GainItem [ ] ;
32+ losses ?: LossItem [ ] ;
33+ }
34+
35+ export interface GainItem {
36+ id : number ;
37+ action_id : number ;
38+ type : 'quantitative' | 'qualitative' ;
39+ description : string ;
40+ }
41+
42+ export interface LossItem {
43+ id : number ;
44+ action_id : number ;
45+ type : 'quantitative' | 'qualitative' ;
46+ description : string ;
47+ }
48+
49+ export interface ActionInput {
50+ goal_id : number ;
51+ content : string ;
52+ completed_at ?: string ;
53+ gains ?: GainItemInput [ ] ;
54+ losses ?: LossItemInput [ ] ;
55+ }
56+
57+ export interface GainItemInput {
58+ type : 'quantitative' | 'qualitative' ;
59+ description : string ;
60+ }
61+
62+ export interface LossItemInput {
63+ type : 'quantitative' | 'qualitative' ;
64+ description : string ;
3165}
You can’t perform that action at this time.
0 commit comments