Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMPRO opt out UI #4335

Merged
merged 40 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
96d8ccf
EMPRO opt out UI
Aug 14, 2023
22f2335
add error message display
Sep 5, 2023
96dc098
refactor, bug fix
Sep 12, 2023
1d68f28
TN-3236, sequential hard trigger counts kept in trigger_states.trigge…
pbugni Sep 6, 2023
e6f4c32
expand migration downgrade step, to remove all sequential hard domain…
pbugni Sep 20, 2023
c419436
add debugging into to exception text
pbugni Nov 17, 2023
2e67aef
add exception to catch details for bogus records
pbugni Nov 29, 2023
8b456b3
add `sanity_check()` to /timewarp - confirm invariants before and aft…
pbugni Nov 29, 2023
98fb482
rework alembic migration order to reapply hard trigger migration again
pbugni Jan 25, 2024
ae92158
refactor to reuse same migration again, with patched code in place
pbugni Jan 25, 2024
b57f478
refactor email generation to common empro_messages module.
pbugni Mar 13, 2024
f9afc90
progress towards regenerating a user's trigger_states table on EMPRO …
pbugni Mar 13, 2024
0facf6e
correct order of migrations with work done outside branch.
pbugni Mar 13, 2024
85e635a
allow for minor EMPRO consent changes and withdrawal calls w/o raisin…
pbugni Mar 13, 2024
20490b7
minor refactor typo; initialize variable only set on a match before t…
pbugni Mar 14, 2024
1aaf5a2
alert on production, purge on dev/test, problem trigger_states rows f…
pbugni Mar 15, 2024
31ae28d
Merge branch 'develop' of https://github.com/uwcirg/true_nth_usa_port…
Mar 15, 2024
6633f56
Merge branch 'feature/sequential-hard-triggers-fix' of https://github…
Mar 15, 2024
792e2c6
add error check
Mar 15, 2024
8ec3f85
add call to API, bug fixes and styling fixes
Mar 18, 2024
a305711
Delete portal/eproms/static/css/eproms.css
achen2401 Mar 18, 2024
93dd9ac
sequence check fix
Mar 18, 2024
bf86dc3
Merge branch 'feature/opt-out-UI' of https://github.com/uwcirg/true_n…
Mar 18, 2024
ae34c63
fix error check, styling fixes
Mar 18, 2024
dfd9c3a
fix text
Mar 18, 2024
5ce76ea
update test data with real example
Mar 19, 2024
100b0b8
bug fix, refactor
Mar 19, 2024
05c6b72
fix text per feedback, runtime error fix
Mar 19, 2024
793fcc4
fix based on feedback
Mar 19, 2024
cc23b5a
fix study check
Mar 19, 2024
b51e912
minor refactor, styling fix
Mar 19, 2024
6014adf
Update empro.js
achen2401 Mar 20, 2024
3912144
Merge branch 'feature/sequential-hard-triggers-fix' of https://github…
Mar 20, 2024
9807d67
add successful save feedback from API call, styling fix
Mar 20, 2024
b5fe8d5
remove commented out code
Mar 20, 2024
b937fb6
remove un-needed import, fix after save code
Mar 20, 2024
43dd921
Merge branch 'feature/sequential-hard-triggers-fix' of https://github…
Mar 20, 2024
bbb111c
Merge branch 'feature/sequential-hard-triggers-fix' of https://github…
Mar 21, 2024
71a0967
use PUT
Mar 21, 2024
aa356aa
fix opt out submit data
Mar 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions portal/eproms/templates/eproms/assessment_engine.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@
<div class="error error-message"></div>
</div>
{% endif %}
{%- from "eproms/assessment_engine/ae_macros.html" import empro_thankyou_modal, empro_optout_modal -%}
{{empro_optout_modal(user)}}
{{empro_thankyou_modal(user)}}

Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
<section class="portal-main portal-flex-container">
{%- block body -%}{%- endblock -%}
</section>
<div class="loading-container hide"><div class="content"><i class="fa fa-spinner fa-spin fa-2x"></i> Loading ...</div></div>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- from "eproms/assessment_engine/ae_macros.html" import render_header, render_greeting, render_card_content, render_call_to_button, due_card, completed_card, empro_due, empro_completed, empro_expired, completed_cards -%}
{%- from "eproms/assessment_engine/ae_macros.html" import render_header, render_greeting, render_card_content, render_call_to_button, due_card, completed_card, empro_due, empro_completed, empro_expired, completed_cards -%}
{% extends "eproms/assessment_engine/ae_base.html" %}
<!-- baseline due -->
{% block head %}
Expand Down
78 changes: 73 additions & 5 deletions portal/eproms/templates/eproms/assessment_engine/ae_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,6 @@ <h2 class="section-title">{{_("Completed Questionnaires")}}</h2>
{% endif %}
</div>
{%- endcall -%}
{% if substudy_assessment_status.overall_status == OverallStatus.completed %}
{{empro_thankyou_modal(user)}}
{% endif %}
{%- endif -%}
{%- endmacro -%}
{%- macro empro_thankyou_card(full_name="") -%}
Expand All @@ -227,13 +224,19 @@ <h4>{{_("Your Support Team")}}</h4>

</div>
{%- endmacro -%}
{%- macro empro_no_contact_notice() -%}
<div class="no-contact-list-wrapper hide">
<b>Note:</b> You have chosen not to be contacted about <span id="noContactTriggerList"></span>. Your care team will not discuss these issues this month.
</div>
{%- endmacro -%}
{%- macro empro_modal_hardTrigger_supportTeam_block(organization="") -%}
<div class="item">
<h4>{{_("Your Support Team")}}</h4>
<p>{{_("You reported experiencing or feeling:")}}</p>
<ul class="hardTriggersDisplayList">
<!-- dynamically populated based on user trigger domain(s) -->
</ul>
{{empro_no_contact_notice()}}
<p><b>{{_("To help address any issues, we've informed your care team and they'll be in contact with you soon.")}}</b></p>
{% if organization %}
<p>{{_("In the meantime, if you have any questions or need assistance, please contact your team at %(organization)s directly. They're happy to help.", organization=organization)}}</p>
Expand Down Expand Up @@ -270,8 +273,8 @@ <h4>{{_("Your Health Tips")}}</h4>
<!--sub-study macro -->
{%- macro empro_thankyou_modal(user) -%}
<!-- sub-study modal for display domain topic(s), resources link and summary report link to the user -->
<div class="modal fade" tabindex="-1" role="dialog" id="emproModal" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog">
<div class="modal fade" role="dialog" id="emproModal" tabindex="-1" aria-hidden="true" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog modal-xl">
<div class="modal-content">
<button type="button" class="close" data-dismiss="modal" aria-label="{{_('Close')}}">
<span aria-hidden="true">&times;</span>
Expand Down Expand Up @@ -311,6 +314,71 @@ <h2 class="title">
</div>
{{empro_script()}}
{%- endmacro -%}
<!--sub-study optout modal macro -->
{%- macro empro_optout_modal(user) -%}
<!-- sub-study modal for display domain topic(s), resources link and summary report link to the user -->
<div class="modal fade" role="dialog" id="emproOptOutModal" data-backdrop="static" tabindex="-1" aria-hidden="true" {% if user and user.current_encounter().auth_method == 'url_authenticated'%}data-url-authenticated="true"{% endif %}>
<div class="modal-dialog modal-lg">
<div class="modal-content">
<button type="button" class="close btn-dismiss" data-dismiss="modal" aria-label="{{_('Close')}}">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-body">
<div class="header-section">
<h2 class="title">{{_("We want to check with you ...")}}</h2>
<div class="subtitle" style="margin-bottom: 8px">
{{_("About your preference to be contacted by your care team for these ongoing issues.")}}
</div>
</div>
<!-- <div class="items-section">
<div class="item wrap">
<ul>
<li>anxious</li>
<li>discouraged</li>
<li>fatigue</li>
</ul>
</div>
</div> -->
<p>{{_("We’ve noticed you’re continuing to experience challenges with the issues listed below.")}}</p>
<p class="text-warning">
<b>{{_("If you prefer not to be contacted by your care team for any (or all) of these issues, please check the box(es) below.")}}</b>
</p>
<p>
{{_("Your care team will continue to contact you as usual for other identified issues.")}}<br/>
{{_("If you have any questions or need assistance, please contact your team directly at %(organization)s. They'll be happy to help.", organization=user.organizations[0].name if user else "")}}
</p>
<div class="items-wrapper">
<p><b>{{_("Please do not contact me about:")}}</b></p>
<div class="items optout-domains-checkbox-list">
<!--
<div class="item">
<input type="checkbox">
<span>anxious</span>
</div>
<div class="item">
<input type="checkbox">
<span>discouraged</span>
</div>
-->
</div>
</div>
<div class="error-message"></div>
<div class="continue-container hide">
<button class="btn btn-default continue-button">Continue</button>
</div>
</div>
<div class="modal-footer">
<div>
<button class="btn btn-empro-primary btn-submit">Submit</button>
<button class="btn btn-default btn-dismiss">Dismiss</button>
</div>
<div class="saving-indicator-container hide"><i class="fa fa-spinner fa-spin"></i> {{_("Saving your choices...")}}</div>
<div class="save-success-indicator-container text-success hide"><i class="fa fa-check"></i> {{_("Your choices are saved successfully.")}}</div>
</div>
</div>
</div>
</div>
{%- endmacro -%}
{%- macro empro_script() -%}
<script src="{{ url_for('static', filename='js/dist/empro.bundle.js') }}" defer></script>
{%- endmacro -%}
Loading