Skip to content

Commit

Permalink
Revert "TN-3298 add delayed response option due to holiday checkbox t…
Browse files Browse the repository at this point in the history
…o post tx"

This reverts commit 95cdb53.
  • Loading branch information
Amy Chen committed Jun 12, 2024
1 parent 3c700fe commit 07518c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 65 deletions.
13 changes: 0 additions & 13 deletions portal/config/eproms/Questionnaire.json
Original file line number Diff line number Diff line change
Expand Up @@ -8332,19 +8332,6 @@
"linkId": "ironman_ss_post_tx.2",
"text": "Date action taken"
},
{
"type": "open-choice",
"linkId": "ironman_ss_post_tx.2.1",
"option": [
{
"valueCoding": {
"code": "ironman_ss_post_tx.2.1",
"display": "Delayed due to local public holiday"
}
}
],
"required": false
},
{
"type": "choice",
"linkId": "ironman_ss_post_tx.3",
Expand Down
6 changes: 1 addition & 5 deletions portal/static/js/src/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1607,10 +1607,6 @@ export default (function() {
if (this.getPostTxActionStatus() === EMPRO_TRIGGER_WITHDRAWN_STATE) return true; // subject withdrawn
return this.getPostTxActionStatus() === "completed" || this.subStudyTriggers.data.resolution;
},
getDataRequiredAttribute:function(element) {
if (!element) return null;
return element.hasOwnProperty("required") ? String(element.required) : "true";
},
onResponseChangeFieldEvent: function(event) {
let targetElement = $(event.target);
let containerIdentifier = "#postTxQuestionnaireContainer";
Expand Down Expand Up @@ -1639,7 +1635,7 @@ export default (function() {
}
let answeredNum = 0;
$(`${containerIdentifier} .question`).each(function() {
if ($(this).find("[answered]").length || $(this).find("[dataRequired='false']").length) {
if ($(this).find("[answered]").length) {
answeredNum++;
}
});
Expand Down
31 changes: 0 additions & 31 deletions portal/static/less/eproms.less
Original file line number Diff line number Diff line change
Expand Up @@ -3993,12 +3993,6 @@ section.header {
}
.question {
margin-bottom: 24px;
display: flex;
align-items: flex-start;
&:has(.title:empty) {
margin-top: -24px;
margin-bottom: 0;
}
.title {
display: inline-block;
margin-right: 8px;
Expand All @@ -4009,11 +4003,6 @@ section.header {
color: @baseColor;
}
}
.flex {
input {
margin: 0;
}
}
}
.choices {
margin-top: 8px;
Expand All @@ -4027,11 +4016,6 @@ section.header {
}
}
}
.question:first-of-type {
.choices {
margin-top: 0;
}
}
select,
.data-datepicker {
display: inline-block;
Expand Down Expand Up @@ -5505,21 +5489,6 @@ body.vis-on-callback { /* allow page-specific presentation of content after load
max-width: 100%;
}
}
.flex-align-center {
align-items: center;
}
.flex-row-gap-1x {
row-gap: 8px
}
.flex-column-gap-1x {
column-gap: 8px
}
.flex-column {
display: flex;
flex-direction: column;
align-items: flex-start;
row-gap: 8px;
}
.flex-in-between {
display: flex;
justify-content: space-between;
Expand Down
25 changes: 9 additions & 16 deletions portal/templates/profile/profile_macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ <h4 id="communicationsLoc" class="profile-item-title index-item">{{ _("Communica
<div class="help-block with-errors"></div>
</div>
</div>
{{saveLoaderDiv("clinics")}}
{{saveLoaderDiv("clinics")}}
{% endcall %}
<div class="get-orgs-error error-message"></div>
<div class="get-demo-error error-message"></div>
Expand Down Expand Up @@ -937,24 +937,20 @@ <h5 class="muted" v-show="isPostTxActionRequired()">{{_("Actions Required (for C
<!-- question text -->
<span class="title" :class="item.type" v-text="item.text"></span>
<!-- date type answer-->
<div class="flex flex-column">
<input type="text" class="data-datepicker form-control answer" readonly placeholder="DD MMM YYYY"
:class="{disabled: isSubStudyTriggersResolved()}"
:dataType="item.type"
:linkId="item.linkId"
:dataRequired="getDataRequiredAttribute(item)"
@change="onResponseChangeFieldEvent"
v-if="item.type == 'date'"
>
</div>
<input type="text" class="data-datepicker form-control answer" readonly placeholder="DD MMM YYYY"
:class="{disabled: isSubStudyTriggersResolved()}"
:dataType="item.type"
:linkId="item.linkId"
@change="onResponseChangeFieldEvent"
v-if="item.type == 'date'"
>
<!-- boolean type answer-->
<input type="checkbox"
class="bool answer"
:dataType = "item.type"
:linkId="item.linkId"
@change="onResponseChangeFieldEvent"
:dataRequired="getDataRequiredAttribute(item)"
v-if="item.type == 'boolean'" />
v-if="item.type == 'boolean'">
<!-- open-choice (checkboxes) type answer -->
<div class="choices answer" v-if="item.type == 'open-choice'">
<div v-for="option in item.option">
Expand All @@ -966,7 +962,6 @@ <h5 class="muted" v-show="isPostTxActionRequired()">{{_("Actions Required (for C
:dataType="item.type"
:linkId="item.linkId"
:value="option.valueCoding.display"
:dataRequired="getDataRequiredAttribute(item)"
@change="onResponseChangeFieldEvent"
>
<span class="text" v-text="option.valueCoding.display"></span>
Expand All @@ -976,7 +971,6 @@ <h5 class="muted" v-show="isPostTxActionRequired()">{{_("Actions Required (for C
dataType="string"
:code="option.valueCoding.code"
:linkId="item.linkId"
:dataRequired="getDataRequiredAttribute(item)"
@change="onResponseChangeFieldEvent"
v-if="/other/gi.test(option.valueCoding.display)"
></textarea>
Expand All @@ -986,7 +980,6 @@ <h5 class="muted" v-show="isPostTxActionRequired()">{{_("Actions Required (for C
<select class="form-control answer" v-if="item.type == 'choice'"
:linkId="item.linkId"
:dataType="item.type"
:dataRequired="getDataRequiredAttribute(item)"
@change="onResponseChangeFieldEvent"
>
<option value="">{{_("Select")}}</option>
Expand Down

0 comments on commit 07518c5

Please sign in to comment.