Skip to content

Commit 3fcf131

Browse files
committed
fix: refresh active entry on edit actions #481
1 parent bd5b8ab commit 3fcf131

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
4646
)
4747
)
4848
).subscribe((action) => {
49+
this.loadActiveEntry();
4950
this.store.dispatch(new entryActions.LoadEntries(new Date().getMonth() + 1));
5051
});
5152
}
@@ -126,6 +127,8 @@ export class TimeEntriesComponent implements OnInit, OnDestroy {
126127
this.store.pipe(select(getActiveTimeEntry)).subscribe((activeTimeEntry) => {
127128
if (activeTimeEntry) {
128129
this.activeTimeEntry = activeTimeEntry;
130+
} else {
131+
this.activeTimeEntry = null;
129132
}
130133
});
131134
}

0 commit comments

Comments
 (0)