Removed the originalEntryId parameter from the onOpen method of the JavaScript OriginalEntrySelector class. It can be obtained from the JournalEntryEditor instance, and the parameter is not needed anymore.
This commit is contained in:
parent
5d0757c845
commit
d4b3fe67b9
@ -239,7 +239,7 @@ class JournalEntryEditor {
|
||||
this.#summaryEditors = SummaryEditor.getInstances(this);
|
||||
this.#accountSelectors = AccountSelector.getInstances(this);
|
||||
this.originalEntrySelector = new OriginalEntrySelector(this);
|
||||
this.#originalEntryControl.onclick = () => this.originalEntrySelector.onOpen(this.originalEntryId)
|
||||
this.#originalEntryControl.onclick = () => this.originalEntrySelector.onOpen()
|
||||
this.#originalEntryDelete.onclick = () => this.clearOriginalEntry();
|
||||
this.#summaryControl.onclick = () => this.#summaryEditors[this.entryType].onOpen();
|
||||
this.#accountControl.onclick = () => this.#accountSelectors[this.entryType].onOpen();
|
||||
|
@ -176,13 +176,12 @@ class OriginalEntrySelector {
|
||||
/**
|
||||
* The callback when the original entry selector is shown.
|
||||
*
|
||||
* @param originalEntryId {string|null} the ID of the original entry
|
||||
*/
|
||||
onOpen(originalEntryId = null) {
|
||||
onOpen() {
|
||||
this.#currencyCode = this.entryEditor.getCurrencyCode();
|
||||
this.#entryType = this.entryEditor.entryType;
|
||||
for (const option of this.#options) {
|
||||
option.setActive(option.id === originalEntryId);
|
||||
option.setActive(option.id === this.entryEditor.originalEntryId);
|
||||
}
|
||||
this.#query.value = "";
|
||||
this.#updateNetBalances();
|
||||
|
Loading…
Reference in New Issue
Block a user