File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
src/app/modules/time-clock Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export class EntryFieldsComponent implements OnInit {
32
32
newData ;
33
33
lastEntry ;
34
34
showTimeInbuttons = false ;
35
+ month = new Date ( ) . getMonth ( ) ;
36
+ year = new Date ( ) . getFullYear ( ) ;
35
37
36
38
constructor (
37
39
private formBuilder : FormBuilder ,
@@ -50,7 +52,7 @@ export class EntryFieldsComponent implements OnInit {
50
52
51
53
ngOnInit ( ) : void {
52
54
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 ) ) ;
54
56
this . actionsSubject$
55
57
. pipe ( filter ( ( action : any ) => action . type === ActivityManagementActionTypes . LOAD_ACTIVITIES_SUCCESS ) )
56
58
. subscribe ( ( action ) => {
Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ export class EntryEffects {
228
228
ofType ( actions . EntryActionTypes . UPDATE_CURRENT_OR_LAST_ENTRY ) ,
229
229
map ( ( action : actions . UpdateCurrentOrLastEntry ) => action . payload ) ,
230
230
switchMap ( ( entry ) =>
231
- this . entryService . loadEntries ( new Date ( ) . getMonth ( ) + 1 ) . pipe (
231
+ this . entryService . loadEntries ( new Date ( ) . getMonth ( ) + 1 , new Date ( ) . getFullYear ( ) ) . pipe (
232
232
map ( ( entries ) => {
233
233
const lastEntry = entries [ 1 ] ;
234
234
const isStartTimeInLastEntry = moment ( entry . start_date ) . isBefore ( lastEntry . end_date ) ;
You can’t perform that action at this time.
0 commit comments