The way that the dashboard currently does batch operations is to iterate
through the entire list of checked items and do an API call for each
one. This works OK but is quite inefficient, and our new batch view
allows doing it all in a single HTTP request.
This change moves the close operations (submitted and discarded) over to
that new endpoint. While I was doing this, I updated it a bit to clean
up the code (preferring promises and async/await over callbacks, and
using the _
template string formatter). I also changed the finish
button on the dialog at the end of the process from "Thanks!" to "Close"
because that's always driven me batty.