Skip to content

Commit f7067b0

Browse files
committed
TT-39 fix: creating test
1 parent 3e49991 commit f7067b0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ export class EntryFieldsComponent implements OnInit {
3232
newData;
3333
lastEntry;
3434
showTimeInbuttons = false;
35+
month = new Date().getMonth();
36+
year = new Date().getFullYear();
3537

3638
constructor(
3739
private formBuilder: FormBuilder,
@@ -50,7 +52,7 @@ export class EntryFieldsComponent implements OnInit {
5052

5153
ngOnInit(): void {
5254
this.store.dispatch(new LoadActivities());
53-
this.store.dispatch(new entryActions.LoadEntries(12, 2020));
55+
this.store.dispatch(new entryActions.LoadEntries(this.month, this.year));
5456
this.actionsSubject$
5557
.pipe(filter((action: any) => action.type === ActivityManagementActionTypes.LOAD_ACTIVITIES_SUCCESS))
5658
.subscribe((action) => {

src/app/modules/time-clock/store/entry.effects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ export class EntryEffects {
228228
ofType(actions.EntryActionTypes.UPDATE_CURRENT_OR_LAST_ENTRY),
229229
map((action: actions.UpdateCurrentOrLastEntry) => action.payload),
230230
switchMap((entry) =>
231-
this.entryService.loadEntries(new Date().getMonth() + 1).pipe(
231+
this.entryService.loadEntries(new Date().getMonth() + 1, new Date().getFullYear()).pipe(
232232
map((entries) => {
233233
const lastEntry = entries[1];
234234
const isStartTimeInLastEntry = moment(entry.start_date).isBefore(lastEntry.end_date);

0 commit comments

Comments
 (0)