Skip to content

Conversation

daros10
Copy link
Contributor

@daros10 daros10 commented Mar 19, 2020

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).

Copy link
Contributor

@enriquezrene enriquezrene left a 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'

@@ -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.">
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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 ) {
Copy link
Contributor

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;
}

Copy link
Contributor Author

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;
Copy link
Contributor

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 []

Copy link
Contributor Author

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() {
Copy link
Contributor

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 :(

Copy link
Contributor Author

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() {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@enriquezrene enriquezrene merged commit e6e4e9a into master Mar 24, 2020
@enriquezrene enriquezrene deleted the Time-Clock-Timer-Component branch March 24, 2020 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants