Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: TT-593 added the ngOnChanges event
  • Loading branch information
codigodehoy authored and wilc0519 committed Mar 30, 2022
commit 1d794332689c420eed5e3036eb1086f6cadf19ae
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ToastrService } from 'ngx-toastr';
import { formatDate } from '@angular/common';
import { SimpleChanges } from '@angular/core';
import { Component, Input, OnInit } from '@angular/core';
import { Component, Input, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { FormControl, FormGroup } from '@angular/forms';
import { DATE_FORMAT } from 'src/environments/environment';
import * as entryActions from '../../../time-clock/store/entry.actions';
Expand All @@ -13,7 +12,8 @@ import * as moment from 'moment';
selector: 'app-time-range-form',
templateUrl: './time-range-form.component.html',
})
export class TimeRangeFormComponent implements OnInit {

export class TimeRangeFormComponent implements OnInit, OnChanges {

@Input() userId: string;

Expand All @@ -31,7 +31,7 @@ export class TimeRangeFormComponent implements OnInit {
this.setInitialDataOnScreen();
}

OnChanges(changes: SimpleChanges){
ngOnChanges(changes: SimpleChanges): void{
if (!changes.userId.firstChange){
this.onSubmit();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../../../../styles/colors.scss';

label {
width: 225px;
}
Expand Down