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:
@ -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", () => {
|
||||
|
@ -249,6 +249,7 @@ class SummaryEditor {
|
||||
this.#formAccount.dataset.code = this.#selectedAccount.dataset.code;
|
||||
this.#formAccount.dataset.text = this.#selectedAccount.dataset.text;
|
||||
this.#formAccount.innerText = this.#selectedAccount.dataset.text;
|
||||
JournalEntryForm.validateAccount();
|
||||
}
|
||||
this.#formSummary.dataset.value = this.summary.value;
|
||||
this.#formSummary.innerText = this.summary.value;
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user