Skip to content

Commit

Permalink
Pull request #393: #CTCTOWALTZ-3297:#7123:Fix for the survey question…
Browse files Browse the repository at this point in the history
… field type.

Merge in WALTZ/waltz from WALTZ/waltz-drp:fix/CTCTOWALTZ-3297-survey-issue-7123 to db-feature/waltz-7123-survey-fix

* commit 'f8b1b1bbc904c173242b17180976eb70a475e20b':
  #CTCTOWALTZ-3297:#7123:Fix for the survey question field type.
  • Loading branch information
devendra-ramesh-patil-db authored and jessica-woodland-scott-db committed Aug 14, 2024
2 parents 33afa8d + f8b1b1b commit 8f026fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 6 additions & 4 deletions waltz-ng/client/survey/survey-template-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@
required
class="form-control"
ng-options="fieldType.value as fieldType.name for fieldType in ctrl.questionFieldTypes"
ng-model="ctrl.selectedQuestionInfo.question.fieldType">
ng-model="ctrl.selectedQuestionInfo.question.fieldType"
ng-change="ctrl.onChangeQFieldType()"
>
</select>
</div>
<div ng-if="ctrl.selectedQuestionInfo.question.fieldType === 'DROPDOWN'
Expand All @@ -232,9 +234,9 @@
class="col-sm-7 col-sm-offset-2">
<div style="display: block; background-color: #F8F9F9; margin-top:10px; padding: 1em; border-radius: 2px; border: 1px solid #eee">
<select id="qCategoryId"
required
class="form-control"
ng-options="category.id as category.name for category in ctrl.measurableCategories | orderBy:'name'"
required
class="form-control"
ng-options="category.id as category.name for category in ctrl.measurableCategories | orderBy:'name'"
ng-model="ctrl.selectedQuestionInfo.question.qualifierEntity.id">
</select>
<div class='small text-muted'>
Expand Down
6 changes: 6 additions & 0 deletions waltz-ng/client/survey/survey-template-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ function controller($q,
vm.selectedQuestionInfo = null;
};

vm.onChangeQFieldType = () => {
if(vm.selectedQuestionInfo.question.fieldType !== 'MEASURABLE_MULTI_SELECT') {
delete vm.selectedQuestionInfo.question.qualifierEntity;
}
}

vm.createQuestion = (qi) => {

if(qi.question.fieldType === "MEASURABLE_MULTI_SELECT"){
Expand Down

0 comments on commit 8f026fc

Please sign in to comment.