2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 21:15:41 +00:00

Add more context data to report

This commit is contained in:
Oliver Walters
2021-02-04 12:58:19 +11:00
parent cbadb2a888
commit 3ccc500e8e
2 changed files with 23 additions and 2 deletions

View File

@ -10,6 +10,15 @@ function selectTestReport(reports, items, options={}) {
* (via AJAX) from the server.
*/
// If there is only a single report available, just print!
if (reports.length == 1) {
if (options.success) {
options.success(reports[0].pk);
}
return;
}
var modal = options.modal || '#modal-form';
var report_list = makeOptionsList(