Skip to content

Commit

Permalink
Merge pull request #1370 from TIP-Global-Health/develop
Browse files Browse the repository at this point in the history
Developments starting October 21, 2024
  • Loading branch information
anvmn authored Nov 10, 2024
2 parents 9d14e49 + 0c20912 commit dc23e86
Show file tree
Hide file tree
Showing 5 changed files with 1,050 additions and 223 deletions.
2 changes: 1 addition & 1 deletion client/src/assets/scss/_new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ button.ui.primary.button.individual-assessment {
height: 60px;
margin-left: auto;
margin-right: auto;
width: 80%;
width: 90%;

.icon {
background-size: 50px 50px;
Expand Down
4 changes: 4 additions & 0 deletions client/src/elm/Backend/ResilienceMessage/Model.elm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ type ResilienceMessageOrder
| ResilienceMessage6
| ResilienceMessage7
| ResilienceMessage8
| ResilienceMessage9
| ResilienceMessage10
| ResilienceMessage11
| ResilienceMessage12


type alias Model =
Expand Down
103 changes: 95 additions & 8 deletions client/src/elm/Backend/ResilienceMessage/Utils.elm
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ resilienceMessageOrderToString value =
ResilienceMessage8 ->
"8"

ResilienceMessage9 ->
"9"

ResilienceMessage10 ->
"10"

ResilienceMessage11 ->
"11"

ResilienceMessage12 ->
"12"


resilienceMessageOrderFromString : String -> Maybe ResilienceMessageOrder
resilienceMessageOrderFromString value =
Expand Down Expand Up @@ -115,6 +127,18 @@ resilienceMessageOrderFromString value =
"8" ->
Just ResilienceMessage8

"9" ->
Just ResilienceMessage9

"10" ->
Just ResilienceMessage10

"11" ->
Just ResilienceMessage11

"12" ->
Just ResilienceMessage12

_ ->
Nothing

Expand Down Expand Up @@ -168,12 +192,12 @@ numberOfMessagesByCategory : Dict ResilienceCategory Int
numberOfMessagesByCategory =
Dict.fromList
[ ( ResilienceCategoryIntroduction, 8 )
, ( ResilienceCategoryGrowth, 4 )
, ( ResilienceCategoryStressManagement, 4 )
, ( ResilienceCategoryMindfulness, 7 )
, ( ResilienceCategoryConnecting, 6 )
, ( ResilienceCategorySelfCare, 3 )
, ( ResilienceCategoryEndOfPeriod, 2 )
, ( ResilienceCategoryGrowth, 9 )
, ( ResilienceCategoryStressManagement, 10 )
, ( ResilienceCategoryMindfulness, 9 )
, ( ResilienceCategoryConnecting, 12 )
, ( ResilienceCategorySelfCare, 5 )
, ( ResilienceCategoryEndOfPeriod, 4 )
]


Expand Down Expand Up @@ -206,6 +230,9 @@ resolveDisplayDay category order =
ResilienceMessage8 ->
Just 2

_ ->
Nothing

ResilienceCategoryGrowth ->
case order of
ResilienceMessage1 ->
Expand All @@ -220,6 +247,21 @@ resolveDisplayDay category order =
ResilienceMessage4 ->
Just 61

ResilienceMessage5 ->
Just 70

ResilienceMessage6 ->
Just 96

ResilienceMessage7 ->
Just 100

ResilienceMessage8 ->
Just 105

ResilienceMessage9 ->
Just 107

_ ->
Nothing

Expand All @@ -246,6 +288,15 @@ resolveDisplayDay category order =
ResilienceMessage7 ->
Just 65

ResilienceMessage8 ->
Just 79

ResilienceMessage9 ->
Just 91

ResilienceMessage10 ->
Just 93

_ ->
Nothing

Expand All @@ -269,6 +320,15 @@ resolveDisplayDay category order =
ResilienceMessage6 ->
Just 47

ResilienceMessage7 ->
Just 77

ResilienceMessage8 ->
Just 84

ResilienceMessage9 ->
Just 112

_ ->
Nothing

Expand All @@ -292,8 +352,23 @@ resolveDisplayDay category order =
ResilienceMessage6 ->
Just 68

_ ->
Nothing
ResilienceMessage7 ->
Just 72

ResilienceMessage8 ->
Just 75

ResilienceMessage9 ->
Just 82

ResilienceMessage10 ->
Just 89

ResilienceMessage11 ->
Just 98

ResilienceMessage12 ->
Just 110

ResilienceCategorySelfCare ->
case order of
Expand All @@ -306,6 +381,12 @@ resolveDisplayDay category order =
ResilienceMessage3 ->
Just 58

ResilienceMessage4 ->
Just 103

ResilienceMessage5 ->
Just 114

_ ->
Nothing

Expand All @@ -317,5 +398,11 @@ resolveDisplayDay category order =
ResilienceMessage2 ->
Just 56

ResilienceMessage3 ->
Just 84

ResilienceMessage4 ->
Just 117

_ ->
Nothing
Loading

0 comments on commit dc23e86

Please sign in to comment.