Replaced the function-based JavaScript with the object-oriented TransactionForm, CurrencySubForm, DebitCreditSideSubForm, JournalEntrySubForm, and JournalEntryForm classes for the transaction form.

This commit is contained in:
2023-03-13 17:17:01 +08:00
parent 2b84f64554
commit be0ae5eba4
9 changed files with 1035 additions and 637 deletions

@ -105,7 +105,7 @@ class AccountSelector {
AccountSelector.#formAccount.innerText = "";
AccountSelector.#formAccount.dataset.code = "";
AccountSelector.#formAccount.dataset.text = "";
validateJournalEntryAccount();
JournalEntryForm.validateAccount();
};
for (const option of this.#options) {
option.onclick = () => {
@ -113,7 +113,7 @@ class AccountSelector {
AccountSelector.#formAccount.innerText = option.dataset.content;
AccountSelector.#formAccount.dataset.code = option.dataset.code;
AccountSelector.#formAccount.dataset.text = option.dataset.content;
validateJournalEntryAccount();
JournalEntryForm.validateAccount();
};
}
this.#query.addEventListener("input", () => {