mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
24 lines
501 B
JavaScript
24 lines
501 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 order_ids = [];
|
|
document
|
|
.querySelectorAll("#listing_orders input[name='order_ids[]']:checked")
|
|
.forEach((checkbox) => {
|
|
order_ids.push(checkbox.value);
|
|
});
|
|
return order_ids;
|
|
}
|
|
}
|