From d8079812b056c2cee0902364c043dcff364902e1 Mon Sep 17 00:00:00 2001 From: Amy Chen Date: Mon, 25 Mar 2024 09:31:17 -0700 Subject: [PATCH] fix text, styling fix --- portal/static/js/src/profile.js | 12 ++++++++++-- portal/static/less/eproms.less | 3 +++ portal/templates/profile/profile_macros.html | 6 +++--- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/portal/static/js/src/profile.js b/portal/static/js/src/profile.js index 59376af9a..70e2ff539 100644 --- a/portal/static/js/src/profile.js +++ b/portal/static/js/src/profile.js @@ -6,7 +6,7 @@ import ProcApp from "./modules/Procedures.js"; import Utility from "./modules/Utility.js"; import ClinicalQuestions from "./modules/ClinicalQuestions.js"; import Consent from "./modules/Consent.js"; -import {sortArrayByField} from "./modules/Utility.js"; +import {sortArrayByField, getUrlParameter} from "./modules/Utility.js"; import { EPROMS_SUBSTUDY_ID, EPROMS_SUBSTUDY_TITLE, @@ -1478,7 +1478,11 @@ export default (function() { }, getSubStudyOptoutDomainsDisplay: function() { if (!this.hasSubStudyOptOutDomains()) return ""; - return this.subStudyTriggers.optout_domains.map((item) => item.replace(/_/g, ' ')).join(", "); + const arrOptoutDomains = this.subStudyTriggers.optout_domains; + if (!arrOptoutDomains || !arrOptoutDomains.length) return ""; + return arrOptoutDomains.map( + (item) => item.replace(/_/g, " ") + ).join(", "); }, setPrevPostTxResponses: function(qnrId) { if (!qnrId) { @@ -1566,6 +1570,9 @@ export default (function() { if (!this.subStudyTriggers.data || !this.subStudyTriggers.data.action_state) { return ""; } + const paramActionState = getUrlParameter("trigger_action_state"); + // for debugging + if (paramActionState) return paramActionState.toLowerCase(); return String(this.subStudyTriggers.data.action_state).toLowerCase(); }, hasMissedPostTxAction: function() { @@ -1658,6 +1665,7 @@ export default (function() { * if the triggers are considered proccessed. check to see if they have been resolved */ if ( + self.subStudyTriggers.data && self.subStudyTriggers.data.resolution && self.subStudyTriggers.data.resolution.qnr_id ){ diff --git a/portal/static/less/eproms.less b/portal/static/less/eproms.less index 4a2365198..5ac7b37e1 100644 --- a/portal/static/less/eproms.less +++ b/portal/static/less/eproms.less @@ -3931,6 +3931,9 @@ section.header { #noTriggersSection { .item { margin-bottom: 8px; + p { + line-height: 1.45; + } } margin-bottom: 4px; border-bottom: 1px solid darken(@muterColor, 10%); diff --git a/portal/templates/profile/profile_macros.html b/portal/templates/profile/profile_macros.html index 26911abd9..6a13dd055 100644 --- a/portal/templates/profile/profile_macros.html +++ b/portal/templates/profile/profile_macros.html @@ -874,9 +874,9 @@

{% if person and person.username %}{{ _("for") + " " + pe {% macro postInterventionOptoutDomains() %}

- {{_("NOTE: The participant has chosen not to be contacted about some issues.")}} + {{_("NOTE: The participant has chosen not to be contacted about some issues.")}}
- {{_("High distressed areas (Do not contact): ")}} + {{_("High distressed areas ( Do not contact ): ")}}

@@ -911,7 +911,7 @@

{{_("Actions Required ( -
{{_("No high distress areas indicated")}}
+
{{_("No action required")}}
{{postInterventionOptoutDomains()}}