Skip to content
Merged
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
clockIn/out
  • Loading branch information
daros10 committed Mar 16, 2020
commit aeb6fbad280d83101daa7f4b69ddb3f59a0f03ac
3 changes: 3 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { NavbarComponent } from './components/shared/navbar/navbar.component';
import { UserComponent } from './components/shared/user/user.component';
import { SidebarComponent } from './components/shared/sidebar/sidebar.component';
import { ClockComponent } from './components/shared/clock/clock.component';
import { TimeClockComponent } from './components/optionsSidebar/time-clock/time-clock.component';


@NgModule({
declarations: [
Expand All @@ -15,6 +17,7 @@ import { ClockComponent } from './components/shared/clock/clock.component';
UserComponent,
SidebarComponent,
ClockComponent,
TimeClockComponent
],
imports: [
BrowserModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="text-center mt-5">
<div class="text-center mt-3">

<div class="card">
<div class="card-header">
Expand Down Expand Up @@ -53,9 +53,7 @@ <h6 class="text-left"><strong>Projects</strong></h6>
</li>
</ul>
<br>


<form>
<form *ngIf="!isClockIn">
<div class="form-group row">
<label for="inputActivity" class="col-sm-2 col-form-label text-center"><strong>Activity</strong></label>
<div class="col-sm-10">
Expand All @@ -75,9 +73,7 @@ <h6 class="text-left"><strong>Projects</strong></h6>
</div>
</div>
</form>

<hr>

<div class="container">
<div class="row">
<div class="col text-left">
Expand All @@ -86,13 +82,10 @@ <h6 class="text-left"><strong>Projects</strong></h6>
</button>
</div>
<div class="col text-right">
<button class="btn btn-success btn-lg" type="button" (click)="employeClockIn()">Clock In</button>
<button *ngIf="isClockIn" class="btn btn-success btn-lg" type="button" (click)="employeClockIn()">Clock In</button>
<button *ngIf="!isClockIn" class="btn btn-danger btn-lg" type="button" (click)="employeClockIn()">Clock Out</button>
</div>

</div>

</div>

</div>

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,17 @@ import { Component, OnInit } from '@angular/core';
templateUrl: './time-clock.component.html',
styleUrls: ['./time-clock.component.css']
})
export class TimeClockComponent implements OnInit {
export class TimeClockComponent {

isClockIn: boolean;

constructor() {
this.isClockIn = false;
this.isClockIn = true;
}

employeClockIn(): boolean {
this.isClockIn = true;
this.isClockIn = !this.isClockIn;
console.log('valor es' + this.isClockIn);
return this.isClockIn;
}

ngOnInit(): void {
}

}