Skip to content

Commit

Permalink
first check if research consent no answer is state gender
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlamallama committed Oct 26, 2023
1 parent a288d13 commit 7f67761
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion go-app-ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,12 @@ go.app = function () {
};

if (typeof self.im.user.answers.state_research_consent != "undefined"){
if (answers.state_research_consent === "state_gender"){
if (answers.state_research_consent_no === "state_gender"){
payload.data.research_consent = false;
payload.data.follow_up_optin = false;

}
else if (answers.state_research_consent === "state_gender"){
payload.data.research_consent = true;
payload.data.follow_up_optin = true;
}
Expand Down
7 changes: 6 additions & 1 deletion src/ussd_tb_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,12 @@ go.app = function () {
};

if (typeof self.im.user.answers.state_research_consent != "undefined"){
if (answers.state_research_consent === "state_gender"){
if (answers.state_research_consent_no === "state_gender"){
payload.data.research_consent = false;
payload.data.follow_up_optin = false;

}
else if (answers.state_research_consent === "state_gender"){
payload.data.research_consent = true;
payload.data.follow_up_optin = true;
}
Expand Down

0 comments on commit 7f67761

Please sign in to comment.