mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
21 lines
466 B
JavaScript
21 lines
466 B
JavaScript
import ApplicationController from "./application_controller";
|
|
|
|
export default class extends ApplicationController {
|
|
connect() {
|
|
super.connect();
|
|
}
|
|
|
|
// abstract
|
|
confirm(action) {
|
|
this.stimulate(action, this.getOrdersIds());
|
|
}
|
|
|
|
// private
|
|
getOrdersIds() {
|
|
const checkboxes = document.querySelectorAll(
|
|
"#listing_orders input[name='order_ids[]']:checked"
|
|
);
|
|
return Array.from(checkboxes).map((checkbox) => checkbox.value);
|
|
}
|
|
}
|