Revised the coding style with the JavaScript arrow functions for the transaction form.

This commit is contained in:
2023-03-18 17:15:51 +08:00
parent fbeec600b7
commit be10a8d99e
3 changed files with 9 additions and 27 deletions

View File

@ -106,13 +106,9 @@ class AccountSelector {
this.#more.classList.add("d-none");
this.#filterOptions();
};
this.#clearButton.onclick = () => {
this.#entryEditor.clearAccount();
};
this.#clearButton.onclick = () => this.#entryEditor.clearAccount();
for (const option of this.#options) {
option.onclick = () => {
this.#entryEditor.saveAccount(option.dataset.code, option.dataset.content, option.classList.contains("accounting-account-is-offset-needed"));
};
option.onclick = () => this.#entryEditor.saveAccount(option.dataset.code, option.dataset.content, option.classList.contains("accounting-account-is-offset-needed"));
}
this.#query.addEventListener("input", () => {
this.#filterOptions();