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

Db contrib/waltz 7123 survey fix #7126

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading