Skip to content

Commit

Permalink
Move reports to top of org Reporting tab, update declaration #3005
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Oct 27, 2023
1 parent 04fccbf commit 1a9e4a5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion grails-app/assets/javascripts/forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,11 @@ function orEmptyArray(v) {
var parentContext = _.isObject(context['$parent'].data) ? context['$parent'].data : context['$parent'];
result = bindVariable(variable, parentContext);
}
// Try to evaluate against the context - used when we are evaluating pre-pop data with a filter
// expression that references a variable in the form context
else if (context['$context']) {
result = bindVariable(variable, context['$context']);
}
}

}
Expand Down Expand Up @@ -895,7 +900,8 @@ function orEmptyArray(v) {
}

constraintsInititaliser = $.Deferred();
var dataLoader = ecodata.forms.dataLoader(context, config);
var dataLoaderContext = _.extend({}, context, {$parent:context.parent});
var dataLoader = ecodata.forms.dataLoader(dataLoaderContext, config);
dataLoader.prepop(metadata.constraints.config).done(function (data) {
constraintsObservable(data);
constraintsInititaliser.resolve();
Expand Down

0 comments on commit 1a9e4a5

Please sign in to comment.