Refactor selectTestReport into selectReport

This commit is contained in:
Oliver Walters 2021-02-12 20:38:30 +11:00
parent 12821b80fb
commit ba85ff63bf

View File

@ -1,10 +1,10 @@
{% load i18n %} {% load i18n %}
function selectTestReport(reports, items, options={}) { function selectReport(reports, items, options={}) {
/** /**
* Present the user with the available test reports, * Present the user with the available reports,
* and allow them to select which test report to print. * and allow them to select which report to print.
* *
* The intent is that the available report templates have been requested * The intent is that the available report templates have been requested
* (via AJAX) from the server. * (via AJAX) from the server.
@ -44,7 +44,7 @@ function selectTestReport(reports, items, options={}) {
html += ` html += `
<div class='alert alert-block alert-info'> <div class='alert alert-block alert-info'>
${items.length} {% trans "stock items selected" %} ${items.length} {% trans "items selected" %}
</div>`; </div>`;
} }
@ -121,7 +121,7 @@ function printTestReports(items, options={}) {
} }
// Select report template to print // Select report template to print
selectTestReport( selectReport(
response, response,
items, items,
{ {