Skip to content

Commit

Permalink
Merge pull request #1007 from TIP-Global-Health/develop
Browse files Browse the repository at this point in the history
WIP: Developments starting December 20, 2023
  • Loading branch information
anvmn authored Feb 15, 2024
2 parents c8fc0a4 + 997c74f commit 677237a
Show file tree
Hide file tree
Showing 113 changed files with 11,073 additions and 3,000 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
- checkout
- run: ci-scripts/install_ddev.sh
- run: ci-scripts/install_drupal.sh
- run: ddev simpletest
- run: ci-scripts/circleci_wait.sh ddev simpletest
28 changes: 28 additions & 0 deletions ci-scripts/circleci_wait.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
# circleci_wait.sh

CMD="$*"

TIMEOUT=2700
INTERVAL=240
$CMD &
CMD_PID=$!

TIME_PASSED=0
while [ $TIME_PASSED -lt $TIMEOUT ]; do
sleep $INTERVAL
TIME_PASSED=$((TIME_PASSED + INTERVAL))
echo "Still running... (elapsed time: ${TIME_PASSED}s)"

# Check if the command is still active
if ! kill -0 $CMD_PID 2> /dev/null; then
echo "Command completed"
wait $CMD_PID
EXIT_STATUS=$?
exit $EXIT_STATUS
fi
done

echo "Timeout reached, terminating process"
kill $CMD_PID
exit 1
3 changes: 3 additions & 0 deletions client/src/assets/images/icon-house-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions client/src/assets/scss/_custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ h3.ui.header {
background-size: 128px 128px;
}

.icon-task-home-visit {
background-image: url(#{$img-path}icon-house-white.svg);
background-size: 92px 92px;
}

// Tasks horizontal scroll

.ui.task.segment {
Expand Down Expand Up @@ -1778,6 +1783,62 @@ input::placeholder {

}

.icon-feeding {
.active &:after {
background-image: url(#{$img-path}icon-feeding-white.svg);
}

.completed &:after {
background-image: url(#{$img-path}icon-feeding-white.svg), url(#{$img-path}icon-completed-circle.svg);
}

&:after {
background-image: url(#{$img-path}icon-feeding-gray.svg);
}
}

.icon-caring {
.active &:after {
background-image: url(#{$img-path}icon-caring-white.svg);
}

.completed &:after {
background-image: url(#{$img-path}icon-caring-white.svg), url(#{$img-path}icon-completed-circle.svg);
}

&:after {
background-image: url(#{$img-path}icon-caring-gray.svg);
}
}

.icon-hygiene {
.active &:after {
background-image: url(#{$img-path}icon-hygiene-white.svg);
}

.completed &:after {
background-image: url(#{$img-path}icon-hygiene-white.svg), url(#{$img-path}icon-completed-circle.svg);
}

&:after {
background-image: url(#{$img-path}icon-hygiene-gray.svg);
}
}

.icon-food-security {
.active &:after {
background-image: url(#{$img-path}icon-food-security-white.svg);
}

.completed &:after {
background-image: url(#{$img-path}icon-food-security-white.svg), url(#{$img-path}icon-completed-circle.svg);
}

&:after {
background-image: url(#{$img-path}icon-food-security-gray.svg);
}
}

.icon-height {
.active &:after {
background-image: url(#{$img-path}icon-height-white.svg);
Expand Down
39 changes: 29 additions & 10 deletions client/src/assets/scss/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
margin-top: 50px;
}

.ui.grid .column.row.center {
justify-content: center;
}

.ui.segment {

.content .very.basic.table {
Expand Down Expand Up @@ -97,7 +101,7 @@
}
}

&.chw-filters {
&.page-filters {
background-color: transparent;
min-height: 40px;
padding: 25px 0;
Expand Down Expand Up @@ -129,6 +133,19 @@
}
}

&.page-filters.center {
justify-content: center;
}

&.page-filters.nurse {
border-bottom: none;
margin-bottom: 0;
}

&.page-filters.nurse.center {
justify-content: center;
}

&.donut-chart {
margin-top: 40px;

Expand Down Expand Up @@ -197,14 +214,6 @@
width: 400px;
}

svg.pie-chart.fever {
height: 500px;
left: -235px;
position: absolute;
top: 4px;
width: 500px;
}

.legend {
width: 50%;
display: flex;
Expand Down Expand Up @@ -232,7 +241,7 @@
}
}

&.donut-chart.fever {
&.donut-chart.left {
min-height: 300px;

.row .content {
Expand Down Expand Up @@ -702,3 +711,13 @@
}
}
}

.dashboard.prenatal {

.separator {
border: 2px solid $color-white;
margin-top: 15px;
margin-bottom: 15px;
width: 100%;
}
}
8 changes: 8 additions & 0 deletions client/src/assets/scss/_new.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2366,6 +2366,14 @@ div.page-activity.well-child {
}
}
}

.form-input.select {
background: $color-white;
border: 2px solid $color-light-gray;
color: $color-text;
padding: 5px;
width: 50%;
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions client/src/elm/App/Update.elm
Original file line number Diff line number Diff line change
Expand Up @@ -928,9 +928,9 @@ update msg model =
-- When accessing Dashboard page, reset
-- the page to initial state - selected month,
-- for example will be set to current month.
UserPage (DashboardPage MainPage) ->
UserPage (DashboardPage PageMain) ->
Pages.Dashboard.Model.Reset model.villageId
|> MsgPageDashboard MainPage
|> MsgPageDashboard PageMain
|> MsgLoggedIn
|> List.singleton

Expand Down
47 changes: 11 additions & 36 deletions client/src/elm/App/View.elm
Original file line number Diff line number Diff line change
Expand Up @@ -404,42 +404,17 @@ viewUserPage page deviceName site features geoInfo reverseGeoInfo model configur
|> flexPageWrapper configured.config model

DashboardPage subPage ->
let
viewDashboardPage =
Pages.Dashboard.View.view model.language
subPage
currentDate
healthCenterId
isChw
(Tuple.second loggedInModel.nurse)
loggedInModel.dashboardPage
model.indexedDb
|> Html.map (MsgLoggedIn << MsgPageDashboard subPage)
|> flexPageWrapper configured.config model

viewPageNotFound =
Pages.PageNotFound.View.viewPage model.language (SetActivePage PinCodePage) (UserPage <| DashboardPage subPage)
in
case subPage of
MainPage ->
-- Main page is common for Nurse and CHw.
viewDashboardPage

NursePage _ ->
if isChw then
-- Only Nursed may access Nursed pages.
viewPageNotFound

else
viewDashboardPage

ChwPage _ ->
if isChw then
viewDashboardPage

else
-- Only CHW may access CHW pages.
viewPageNotFound
Pages.Dashboard.View.view model.language
subPage
currentDate
site
healthCenterId
isChw
(Tuple.second loggedInModel.nurse)
loggedInModel.dashboardPage
model.indexedDb
|> Html.map (MsgLoggedIn << MsgPageDashboard subPage)
|> flexPageWrapper configured.config model

GlobalCaseManagementPage ->
Pages.GlobalCaseManagement.View.view model.language
Expand Down
2 changes: 1 addition & 1 deletion client/src/elm/Backend/AcuteIllnessEncounter/Decoder.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Backend.AcuteIllnessEncounter.Decoder exposing (decodeAcuteIllnessDiagnosis, decodeAcuteIllnessEncounter)
module Backend.AcuteIllnessEncounter.Decoder exposing (decodeAcuteIllnessDiagnosis, decodeAcuteIllnessEncounter, decodeAcuteIllnessEncounterType)

import Backend.AcuteIllnessEncounter.Model exposing (..)
import Backend.AcuteIllnessEncounter.Utils exposing (acuteIllnessDiagnosisFromString)
Expand Down
2 changes: 1 addition & 1 deletion client/src/elm/Backend/AcuteIllnessEncounter/Encoder.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Backend.AcuteIllnessEncounter.Encoder exposing (encodeAcuteIllnessDiagnosis, encodeAcuteIllnessEncounter)
module Backend.AcuteIllnessEncounter.Encoder exposing (encodeAcuteIllnessDiagnosis, encodeAcuteIllnessEncounter, encodeAcuteIllnessEncounterType)

import Backend.AcuteIllnessEncounter.Model exposing (..)
import Backend.AcuteIllnessEncounter.Utils exposing (acuteIllnessDiagnosisToString)
Expand Down
Loading

0 comments on commit 677237a

Please sign in to comment.