-
Notifications
You must be signed in to change notification settings - Fork 1
Time clock timer component #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird behaviour after 'clock-in' on different projects
Show error messages in-line
Typo 'requiered' it should be 'required'
… Time-Clock-Timer-Component
@@ -62,7 +57,8 @@ <h6 class="text-left"><strong>Projects</strong></h6> | |||
<div class="form-group row"> | |||
<label for="inputTechnology" class="col-sm-2 col-form-label text-center"><strong>Technology</strong></label> | |||
<div class="col-sm-10"> | |||
<input #data type="text" (keyup)="enterTechnology(data.value)" class="form-control"> | |||
<input *ngIf="!showAlertEnterTecnology" #data type="text" (keyup)="enterTechnology(data.value)" class="form-control"> | |||
<input *ngIf="showAlertEnterTecnology" #data type="text" (keyup)="enterTechnology(data.value)" class="form-control border-danger placeholder-danger " placeholder="Field technology is requiered. Enter this field for clock out."> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technology field is required. Enter this field to clock out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
.placeholder-danger::-ms-input-placeholder { | ||
/* Microsoft Edge */ | ||
color: #DC3545 !important; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why !important?
AFAIK, using this tag is discouraged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if ( this.isClockInEnable !== true ) { | ||
this.isClockIn = false; | ||
this.showFields = show; | ||
if ( this.execOnlyOneTimeCounter === 0 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ===0?
What is going to happen if not?
I'd rather do something like:
if(!isTimerStarted){
this.startTimer();
isTimerStarted = true;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -29,6 +29,9 @@ export class TimeClockComponent implements OnInit { | |||
seconds: number; | |||
interval; | |||
dataTechnology: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technologies entered are going to be a string []
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -101,10 +108,24 @@ export class TimeClockComponent implements OnInit { | |||
} | |||
|
|||
setTimeToInOut() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this function doing?
its name is weird :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function to establish arrival and departure times for employees
|
||
} | ||
|
||
setVarToEmpty() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you find a better name like: setDefaultValuesToFields
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR is related to #9.
The features implemented are:
-When you click on clockIn button, UI display a timer for indicate the time that you work, clockIn change to ClockOut and in the top you can see your entry time.
-When you click on clockOut button, the timer is paused and in the top you can see your exit time. (If the field Technology is empty the user need to enter the information to clockOut).