Skip to content

Commit 1d79433

Browse files
codigodehoywilc0519
authored andcommitted
feat: TT-593 added the ngOnChanges event
1 parent 601da91 commit 1d79433

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/app/modules/reports/components/time-range-form/time-range-form.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { ToastrService } from 'ngx-toastr';
22
import { formatDate } from '@angular/common';
3-
import { SimpleChanges } from '@angular/core';
4-
import { Component, Input, OnInit } from '@angular/core';
3+
import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
54
import { FormControl, FormGroup } from '@angular/forms';
65
import { DATE_FORMAT } from 'src/environments/environment';
76
import * as entryActions from '../../../time-clock/store/entry.actions';
@@ -13,7 +12,8 @@ import * as moment from 'moment';
1312
selector: 'app-time-range-form',
1413
templateUrl: './time-range-form.component.html',
1514
})
16-
export class TimeRangeFormComponent implements OnInit {
15+
16+
export class TimeRangeFormComponent implements OnInit, OnChanges {
1717

1818
@Input() userId: string;
1919

@@ -31,7 +31,7 @@ export class TimeRangeFormComponent implements OnInit {
3131
this.setInitialDataOnScreen();
3232
}
3333

34-
OnChanges(changes: SimpleChanges){
34+
ngOnChanges(changes: SimpleChanges): void{
3535
if (!changes.userId.firstChange){
3636
this.onSubmit();
3737
}

src/app/modules/shared/components/search-user/search-user.component.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '../../../../../styles/colors.scss';
2-
31
label {
42
width: 225px;
53
}

0 commit comments

Comments
 (0)