Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Time-Tracking-Application-Client-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kaustubh Negi
Time-Tracking-Application-Client-End
Commits
3ec79e06
Commit
3ec79e06
authored
Feb 27, 2023
by
Kaustubh Negi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
27-02-2023 See merge request
!5
parents
411fe443
dc3703e1
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
530 additions
and
38 deletions
+530
-38
attend.component.ts
src/app/attend/attend.component.ts
+1
-0
logout.component.css
src/app/logout/logout.component.css
+256
-2
logout.component.html
src/app/logout/logout.component.html
+25
-22
logout.component.ts
src/app/logout/logout.component.ts
+69
-2
test-dashboard.component.html
src/app/test-dashboard/test-dashboard.component.html
+28
-10
test-dashboard.component.ts
src/app/test-dashboard/test-dashboard.component.ts
+5
-0
test-login.component.css
src/app/test-login/test-login.component.css
+145
-1
test-login.component.ts
src/app/test-login/test-login.component.ts
+1
-1
No files found.
src/app/attend/attend.component.ts
View file @
3ec79e06
...
...
@@ -50,6 +50,7 @@ export class AttendComponent implements OnInit {
console
.
log
(
this
.
endTime
+
" From the stopTimer() function"
);
this
.
endDay
();
clearInterval
(
this
.
interval
);
// this.endDay();
}
...
...
src/app/logout/logout.component.css
View file @
3ec79e06
This diff is collapsed.
Click to expand it.
src/app/logout/logout.component.html
View file @
3ec79e06
<div
class =
"logout-page"
>
<div
class =
"container"
>
<div
class =
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
<h4>
You have worked for this much hours kindly please fill your timesheet
</h4>
<h4>
You have worked for "{{ hours_worked }}" hours kindly please fill your timesheet
</h4>
</div>
<div
class=
"col-md-12"
>
<div
class=
"table-responsive tablenw"
>
...
...
@@ -18,9 +18,6 @@
<th>
Activity
</th>
<th>
</th>
</tr>
<tr
*
ngFor=
"let input of inputs; let i = index"
>
<td>
...
...
@@ -77,18 +74,18 @@
</div>
<div
class =
"col-md-1
3
"
>
<div
class =
"col-md-1
2
"
>
<div
class=
"logout-inner"
>
<div
class =
"row"
>
<div
class=
"col-md-3"
>
<div
class=
"form-group"
>
<label>
Total Time Usage:
</label>
<div
class=
"form-control"
*
ngIf=
"inputs.length>0 && isValidInput() && totalTime <= 1440"
></div>
<label>
Total Time Usage:
</label>
<!-- <div class="form-control" *ngIf="inputs.length>0 && isValidInput() && totalTime <= 1440" ></div> -->
<div
class=
"form-control"
>
1000
</div>
<div
class=
"form-control"
>
{{minutes_worked}}
</div>
</div>
</div>
...
...
@@ -109,7 +106,7 @@
<div
class =
"col-md-3"
>
<div
class=
"form-group"
>
<label>
Remaining Time:
</label>
<div
class=
"form-control"
>
{{
1440
-totalTime}}
</div>
<div
class=
"form-control"
>
{{
minutes_worked
-totalTime}}
</div>
</div>
</div>
...
...
@@ -129,6 +126,20 @@
</div>
</div>
</div>
</div>
<!-- <div class = "col-md-13">
<div class= "logout-inner">
<div class = "row">
...
...
@@ -162,11 +173,3 @@
</div> -->
</div>
</div>
</div>
\ No newline at end of file
src/app/logout/logout.component.ts
View file @
3ec79e06
...
...
@@ -7,24 +7,31 @@ import { HttpClient } from '@angular/common/http';
@
Component
({
selector
:
'app-logout'
,
templateUrl
:
'./logout.component.html'
,
// styleUrls: ['./logout.component.css',
]
styleUrls
:
[
'./logout.component.css'
,
'./assets/css/bootstrap.min.css'
,
'./assets/css/custom.css'
,
'./assets/css/font-awesome.min.css'
]
styleUrls
:
[
'./logout.component.css'
,
'./assets/css/font-awesome.min.css'
]
//
styleUrls: ['./logout.component.css','./assets/css/bootstrap.min.css', './assets/css/custom.css', './assets/css/font-awesome.min.css']
})
export
class
LogoutComponent
implements
OnInit
{
inputs
:
{
description
:
string
,
time
:
number
,
activity
:
string
}[]
=
[{
description
:
''
,
time
:
0
,
activity
:
''
}];
hours_worked
:
number
=
0
;
activityName
:
string
[]
=
[];
activityId
:
string
[]
=
[];
jsonString
:
any
=
[]
@
Output
()
currentTimeChange
=
new
EventEmitter
<
Date
>
();
minutes_worked
:
number
=
0
;
constructor
(
private
http
:
HttpClient
)
{
}
ngOnInit
()
{
this
.
fetchActivities
();
this
.
getHours
();
this
.
getMinutes
();
}
fetchActivities
()
{
...
...
@@ -93,5 +100,65 @@ postInput() {
});
}
getMinutes
():
void
{
let
token
:
string
=
""
;
let
json
:
string
|
null
=
localStorage
.
getItem
(
"response"
);
if
(
json
)
{
console
.
log
(
"json "
+
json
);
token
=
JSON
.
parse
(
json
).
token
;
console
.
log
(
token
);
}
const
headers
=
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
`Bearer
${
token
}
`
};
const
url
=
'http://localhost:3000/api/minutes'
;
this
.
http
.
get
(
url
,
{
headers
}).
subscribe
(
(
data
:
any
)
=>
{
const
minutes
=
data
.
minutes
;
this
.
minutes_worked
=
minutes
;
console
.
log
(
'Minutes worked:'
,
minutes
);
// do something with the minutes value
},
(
error
)
=>
{
console
.
error
(
'Error:'
,
error
);
// handle the error
}
);
}
getHours
():
void
{
let
token
:
string
=
""
;
let
json
:
string
|
null
=
localStorage
.
getItem
(
"response"
);
if
(
json
)
{
console
.
log
(
"json "
+
json
);
token
=
JSON
.
parse
(
json
).
token
;
console
.
log
(
token
);
}
const
headers
=
{
'Content-Type'
:
'application/json'
,
'Authorization'
:
`Bearer
${
token
}
`
};
const
url
=
'http://localhost:3000/api/hours'
;
this
.
http
.
get
(
url
,
{
headers
}).
subscribe
(
(
data
:
any
)
=>
{
const
hours
=
data
.
hours
;
this
.
hours_worked
=
hours
;
console
.
log
(
'Hours worked:'
,
hours
);
// do something with the hours value
},
(
error
)
=>
{
console
.
error
(
'Error:'
,
error
);
// handle the error
}
);
}
}
src/app/test-dashboard/test-dashboard.component.html
View file @
3ec79e06
...
...
@@ -11,9 +11,9 @@
<div
class=
"left-menu"
>
<nav
class=
'animated bounceInDown'
>
<ul>
<li><a
(
click
)="
toggleDashb
(
)"
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-grid"
><rect
x=
"3"
y=
"3"
width=
"7"
height=
"7"
></rect><rect
x=
"14"
y=
"3"
width=
"7"
height=
"7"
></rect><rect
x=
"14"
y=
"14"
width=
"7"
height=
"7"
></rect><rect
x=
"3"
y=
"14"
width=
"7"
height=
"7"
></rect></svg>
Dashboard
</a></li>
<li><a
(
click
)="
toggleAttend
(
)"
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-clipboard"
><path
d=
"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
></path><rect
x=
"8"
y=
"2"
width=
"8"
height=
"4"
rx=
"1"
ry=
"1"
></rect></svg>
Attendance
</a></li>
<li><a
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-clock"
><circle
cx=
"12"
cy=
"12"
r=
"10"
></circle><polyline
points=
"12 6 12 12 16 14"
></polyline></svg>
Timesheet
</a></li>
<li><a
(
click
)="
selectView
('
dashboard
'
)"
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-grid"
><rect
x=
"3"
y=
"3"
width=
"7"
height=
"7"
></rect><rect
x=
"14"
y=
"3"
width=
"7"
height=
"7"
></rect><rect
x=
"14"
y=
"14"
width=
"7"
height=
"7"
></rect><rect
x=
"3"
y=
"14"
width=
"7"
height=
"7"
></rect></svg>
Dashboard
</a></li>
<li><a
(
click
)="
selectView
('
attendance
'
)"
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-clipboard"
><path
d=
"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"
></path><rect
x=
"8"
y=
"2"
width=
"8"
height=
"4"
rx=
"1"
ry=
"1"
></rect></svg>
Attendance
</a></li>
<li><a
(
click
)="
selectView
('
timesheet
')"
><svg
width=
"24"
height=
"24"
viewBox=
"0 0 24 24"
fill=
"none"
stroke=
"currentColor"
stroke-width=
"2"
stroke-linecap=
"round"
stroke-linejoin=
"round"
class=
"feather feather-clock"
><circle
cx=
"12"
cy=
"12"
r=
"10"
></circle><polyline
points=
"12 6 12 12 16 14"
></polyline></svg>
Timesheet
</a></li>
<!-- <li class='sub-menu'>
...
...
@@ -172,21 +172,39 @@
<div
class=
"dashboard-main"
></div>
<app-logout>
<div
class=
"dashboard-main"
>
<div
*
ngIf=
"selectedView === 'dashboard'"
>
<app-dashb></app-dashb>
</div>
<div
*
ngIf=
"selectedView === 'attendance'"
>
<app-attend></app-attend>
</div>
<div
*
ngIf=
"selectedView === 'timesheet'"
>
<app-logout></app-logout>
</div>
<!-- <div>
<app-logout>
</app-logout>
</div> -->
<!-- <div *ngIf="false">
<app-test-logout></app-test-logout>
</div> -->
<!-- <div>here to place all your content</div> -->
<div
*
ngIf=
"showDashb"
>
<
!-- <
div *ngIf="showDashb">
<app-dashb></app-dashb>
</div>
</div>
-->
<div
*
ngIf=
"showAttend"
>
<
!-- <
div *ngIf="showAttend">
<app-attend></app-attend>
</div>
</div>
-->
<!-- <mat-form-field>
<mat-select [formControl]="selectedOptions" multiple>
...
...
@@ -218,7 +236,7 @@
</mat-form-field> -->
</div>
</div>
...
...
src/app/test-dashboard/test-dashboard.component.ts
View file @
3ec79e06
...
...
@@ -59,6 +59,7 @@ export class TestDashboardComponent implements AfterViewInit {
public
isVisible
=
false
;
selectedView
:
string
=
'dashboard'
;
toggleSubMenu
()
{
this
.
isShown
=
!
this
.
isShown
;
...
...
@@ -81,6 +82,10 @@ export class TestDashboardComponent implements AfterViewInit {
this
.
showAttend
=
!
this
.
showAttend
;
}
selectView
(
view
:
string
)
{
this
.
selectedView
=
view
;
}
// test code
...
...
src/app/test-login/test-login.component.css
View file @
3ec79e06
...
...
@@ -173,3 +173,147 @@ margin-top: 25px;
.logout-page h4 {
font-size: 20px;
font-weight:10px;} */
/* @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,900&display=swap');
*{
margin: 0;
padding: 0;
list-style: none;
text-decoration: none;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
html, body{
font-family: 'Poppins', sans-serif;
}
.login-page { width:100%; }
.logoin-bg {background:#0168F3;
width: 100%;
float: left;
height: 100%;}
.login {box-shadow:0px 0px 10px #00000029;background:#fff;width:430px;border-radius:5px; margin:auto; margin-top:70px; padding:25px;}
.login .logo {width:100%; text-align:center;}
.login .welc-login {width:170px; text-align:left;line-height: 36px; font-weight:300;font-size:22px; color:#606060;margin-top:20px;}
.login .welc-login span {font-weight:600;font-size:24px; display:block;}
.login .form {width:100%;margin-top:25px;}
.login .form .form-group {margin-top:25px;}
.login .form .form-group label {font-size: 14px;color: #606060;margin-bottom: 10px;font-weight: 400;}
.login .form .form-group .form-control {background:#EFEFEF; border:#E2E2E2 1px solid; color:#606060;}
.login .form .form-group .btn {background: #0168f3;color: #fff;border-radius: 3px;width: 100%;border: 1px solid #0168f3;}
.login .form .form-group .btn:hover {border: 1px solid #0168f3; background:#fff; color:#0168f3;}
@media (max-width:767px) {
} */
@import
url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,900&display=swap')
;
*
{
margin
:
0
;
padding
:
0
;
list-style
:
none
;
text-decoration
:
none
;
box-sizing
:
border-box
;
}
html
,
body
{
font-family
:
'Poppins'
,
sans-serif
;
}
.login-page
{
width
:
100%
;
}
.login-bg
{
background
:
#0168F3
;
background-size
:
cover
;
/* make background image cover the entire container */
width
:
100%
;
height
:
100vh
;
/* set height to viewport height */
}
.login
{
box-shadow
:
0px
0px
10px
#00000029
;
background
:
#fff
;
width
:
430px
;
border-radius
:
5px
;
margin
:
auto
;
margin-top
:
70px
;
padding
:
25px
;
}
.login
.logo
{
width
:
100%
;
text-align
:
center
;
}
.login
.welc-login
{
width
:
170px
;
text-align
:
left
;
line-height
:
36px
;
font-weight
:
300
;
font-size
:
22px
;
color
:
#606060
;
margin-top
:
20px
;
}
.login
.welc-login
span
{
font-weight
:
600
;
font-size
:
24px
;
display
:
block
;
}
.login
.form
{
width
:
100%
;
margin-top
:
25px
;
}
.login
.form
.form-group
{
margin-top
:
25px
;
}
.login
.form
.form-group
label
{
font-size
:
14px
;
color
:
#606060
;
margin-bottom
:
10px
;
font-weight
:
400
;
}
.login
.form
.form-group
.form-control
{
background
:
#EFEFEF
;
border
:
#E2E2E2
1px
solid
;
color
:
#606060
;
}
.login
.form
.form-group
.btn
{
background
:
#0168f3
;
color
:
#fff
;
border-radius
:
3px
;
width
:
100%
;
border
:
1px
solid
#0168f3
;
}
.login
.form
.form-group
.btn
:hover
{
border
:
1px
solid
#0168f3
;
background
:
#fff
;
color
:
#0168f3
;
}
@media
(
max-width
:
200px
)
{
/* Mobile styles go here */
}
src/app/test-login/test-login.component.ts
View file @
3ec79e06
...
...
@@ -8,7 +8,7 @@ import { Input } from '@angular/core';
@
Component
({
selector
:
'app-test-login'
,
templateUrl
:
'./test-login.component.html'
,
styleUrls
:
[
'./
test-login.component.css'
,
'./
assets/css/bootstrap.min.css'
,
'./assets/css/custom.css'
,
'./assets/css/font-awesome.min.css'
]
styleUrls
:
[
'./assets/css/bootstrap.min.css'
,
'./assets/css/custom.css'
,
'./assets/css/font-awesome.min.css'
]
})
export
class
TestLoginComponent
implements
OnInit
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment