Skip to content

Commit

Permalink
Merge pull request #6699 from davidwatkins73/waltz-6698-survey-issuan…
Browse files Browse the repository at this point in the history
…ce-bug

Waltz 6698 survey issuance bug
  • Loading branch information
jessica-woodland-scott-db authored Aug 7, 2023
2 parents c0a24cf + 19a2b9a commit ea27b96
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());

}
};
Expand Down
16 changes: 8 additions & 8 deletions waltz-ng/client/survey/components/survey-run-create-general.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const initialState = {
"ORG_UNIT": [exactScope, childrenScope],
"MEASURABLE": [exactScope, childrenScope]
},
availableInvolvementKinds: [],
surveyRun: {
selectorEntity: null,
dueDate: null,
Expand Down Expand Up @@ -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));

}
};

Expand All @@ -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));
Expand Down

0 comments on commit ea27b96

Please sign in to comment.