diff --git a/waltz-ng/client/measurable-category/components/taxonomy-changes/taxonomy-changes-section.js b/waltz-ng/client/measurable-category/components/taxonomy-changes/taxonomy-changes-section.js index 4a9fe48e71..eaf44cecbb 100644 --- a/waltz-ng/client/measurable-category/components/taxonomy-changes/taxonomy-changes-section.js +++ b/waltz-ng/client/measurable-category/components/taxonomy-changes/taxonomy-changes-section.js @@ -49,16 +49,13 @@ function controller(serviceBroker) { .execute( CORE_API.TaxonomyManagementStore.findAllChangesByDomain, [vm.parentEntityRef]) - .then(r => { - vm.items = _ - .chain(r.data) - .filter(d => d.status === "EXECUTED") - .orderBy( - [d => d.lastUpdatedAt, d => d.createdAt], - ["desc", "desc"]) - .value(); - console.log(vm.items) - }); + .then(r => vm.items = _ + .chain(r.data) + .filter(d => d.status === "EXECUTED") + .orderBy( + [d => d.lastUpdatedAt, d => d.createdAt], + ["desc", "desc"]) + .value()); } }; diff --git a/waltz-ng/client/survey/components/survey-run-create-general.js b/waltz-ng/client/survey/components/survey-run-create-general.js index 6e50943eb4..48135e6cce 100644 --- a/waltz-ng/client/survey/components/survey-run-create-general.js +++ b/waltz-ng/client/survey/components/survey-run-create-general.js @@ -57,6 +57,7 @@ const initialState = { "ORG_UNIT": [exactScope, childrenScope], "MEASURABLE": [exactScope, childrenScope] }, + availableInvolvementKinds: [], surveyRun: { selectorEntity: null, dueDate: null, @@ -98,6 +99,13 @@ function controller(appGroupStore, involvementKindStore, serviceBroker) { vm.$onChanges = () => { if (vm.surveyTemplate) { vm.allowedEntityKinds = mkAllowedEntityKinds(vm.surveyTemplate.targetEntityKind); + involvementKindStore + .findAll() + .then(involvementKinds => vm.availableInvolvementKinds = _ + .filter( + involvementKinds, + d => d.subjectKind === vm.surveyTemplate.targetEntityKind)); + } }; @@ -107,14 +115,6 @@ function controller(appGroupStore, involvementKindStore, serviceBroker) { vm.availableAppGroups = [].concat(publicGroups, privateGroups); }); - - involvementKindStore.findAll() - .then(involvementKinds => { - vm.availableInvolvementKinds = _.filter( - involvementKinds, - d => d.subjectKind === vm.surveyTemplate.targetEntityKind); - }); - vm.$onInit = () => { serviceBroker.loadViewData(CORE_API.RoleStore.findAllRoles) .then(r => vm.customRoles = _.filter(r.data, d => d.isCustom));