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 {
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 ) => {
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments