File tree Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Expand file tree Collapse file tree 3 files changed +10
-18
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import { NavbarComponent } from './components/shared/navbar/navbar.component';
77import { UserComponent } from './components/shared/user/user.component' ;
88import { SidebarComponent } from './components/shared/sidebar/sidebar.component' ;
99import { ClockComponent } from './components/shared/clock/clock.component' ;
10+ import { TimeClockComponent } from './components/optionsSidebar/time-clock/time-clock.component' ;
11+
1012
1113@NgModule ( {
1214 declarations : [
@@ -15,6 +17,7 @@ import { ClockComponent } from './components/shared/clock/clock.component';
1517 UserComponent ,
1618 SidebarComponent ,
1719 ClockComponent ,
20+ TimeClockComponent
1821 ] ,
1922 imports : [
2023 BrowserModule ,
Original file line number Diff line number Diff line change 1- < div class ="text-center mt-5 ">
1+ < div class ="text-center mt-3 ">
22
33 < div class ="card ">
44 < div class ="card-header ">
@@ -53,9 +53,7 @@ <h6 class="text-left"><strong>Projects</strong></h6>
5353 </ li >
5454 </ ul >
5555 < br >
56-
57-
58- < form >
56+ < form *ngIf ="!isClockIn ">
5957 < div class ="form-group row ">
6058 < label for ="inputActivity " class ="col-sm-2 col-form-label text-center "> < strong > Activity</ strong > </ label >
6159 < div class ="col-sm-10 ">
@@ -75,9 +73,7 @@ <h6 class="text-left"><strong>Projects</strong></h6>
7573 </ div >
7674 </ div >
7775 </ form >
78-
7976 < hr >
80-
8177 < div class ="container ">
8278 < div class ="row ">
8379 < div class ="col text-left ">
@@ -86,13 +82,10 @@ <h6 class="text-left"><strong>Projects</strong></h6>
8682 </ button >
8783 </ div >
8884 < div class ="col text-right ">
89- < button class ="btn btn-success btn-lg " type ="button " (click) ="employeClockIn() "> Clock In</ button >
85+ < button *ngIf ="isClockIn " class ="btn btn-success btn-lg " type ="button " (click) ="employeClockIn() "> Clock In</ button >
86+ < button *ngIf ="!isClockIn " class ="btn btn-danger btn-lg " type ="button " (click) ="employeClockIn() "> Clock Out</ button >
9087 </ div >
91-
9288 </ div >
93-
9489 </ div >
95-
9690 </ div >
97-
9891 </ div >
Original file line number Diff line number Diff line change @@ -5,21 +5,17 @@ import { Component, OnInit } from '@angular/core';
55 templateUrl : './time-clock.component.html' ,
66 styleUrls : [ './time-clock.component.css' ]
77} )
8- export class TimeClockComponent implements OnInit {
8+ export class TimeClockComponent {
99
1010 isClockIn : boolean ;
1111
1212 constructor ( ) {
13- this . isClockIn = false ;
13+ this . isClockIn = true ;
1414 }
1515
1616 employeClockIn ( ) : boolean {
17- this . isClockIn = true ;
17+ this . isClockIn = ! this . isClockIn ;
1818 console . log ( 'valor es' + this . isClockIn ) ;
1919 return this . isClockIn ;
2020 }
21-
22- ngOnInit ( ) : void {
23- }
24-
2521}
You can’t perform that action at this time.
0 commit comments