From 3b48c0a4604295d70132ac71883e6e97d4bfe1d5 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Sat, 12 Dec 2020 12:30:44 -0800 Subject: [PATCH] FIx: clearTransaction did not reset state --- src/store/modules/ledger.module.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/store/modules/ledger.module.ts b/src/store/modules/ledger.module.ts index ec13d48..1ca9e52 100644 --- a/src/store/modules/ledger.module.ts +++ b/src/store/modules/ledger.module.ts @@ -62,6 +62,10 @@ const ledgerModule: Module = { ): Promise { commit('loading'); return transactionService.clearTransaction(id, data) + .then((response) => { + commit('done'); + return response; + }) .catch((error: ApiError) => { throw error; }); }, createTransaction( @@ -178,6 +182,9 @@ const ledgerModule: Module = { clear(state: LedgerState) { state.ledger = []; }, + done(state: LedgerState) { + state.status = { loaded: true }; + }, error(state: LedgerState, error: string) { // eslint-disable-next-line no-console console.error(error);