mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Fix all existing prettier issues
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import ApplicationController from "./application_controller";
|
||||
|
||||
export default class extends ApplicationController {
|
||||
static targets = ["extraParams"]
|
||||
static values = { reflex: String }
|
||||
static targets = ["extraParams"];
|
||||
static values = { reflex: String };
|
||||
|
||||
connect() {
|
||||
super.connect();
|
||||
@@ -12,7 +12,7 @@ export default class extends ApplicationController {
|
||||
let params = { bulk_ids: this.getSelectedIds() };
|
||||
|
||||
if (this.hasExtraParamsTarget) {
|
||||
Object.assign(params, this.extraFormData())
|
||||
Object.assign(params, this.extraFormData());
|
||||
}
|
||||
|
||||
this.stimulate(this.reflexValue, params);
|
||||
@@ -21,15 +21,15 @@ export default class extends ApplicationController {
|
||||
// private
|
||||
|
||||
getSelectedIds() {
|
||||
const checkboxes = document.querySelectorAll(
|
||||
"table input[name='bulk_ids[]']:checked"
|
||||
);
|
||||
const checkboxes = document.querySelectorAll("table input[name='bulk_ids[]']:checked");
|
||||
return Array.from(checkboxes).map((checkbox) => checkbox.value);
|
||||
}
|
||||
|
||||
extraFormData() {
|
||||
if (this.extraParamsTarget.constructor.name !== "HTMLFormElement") { return {} }
|
||||
if (this.extraParamsTarget.constructor.name !== "HTMLFormElement") {
|
||||
return {};
|
||||
}
|
||||
|
||||
return Object.fromEntries(new FormData(this.extraParamsTarget).entries())
|
||||
return Object.fromEntries(new FormData(this.extraParamsTarget).entries());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user