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
57668c5c
Commit
57668c5c
authored
Feb 23, 2023
by
Kaustubh Negi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
23-02-2023
parent
2b43bb90
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
logout.component.ts
src/app/logout/logout.component.ts
+21
-0
No files found.
src/app/logout/logout.component.ts
View file @
57668c5c
...
@@ -66,11 +66,32 @@ fetchActivities() {
...
@@ -66,11 +66,32 @@ fetchActivities() {
saveInputs
()
{
saveInputs
()
{
// Code to save the inputs
// Code to save the inputs
console
.
log
(
this
.
inputs
);
console
.
log
(
this
.
inputs
);
this
.
postInput
();
}
}
onInputChange
(
index
:
number
,
field
:
string
,
value
:
string
|
number
)
{
onInputChange
(
index
:
number
,
field
:
string
,
value
:
string
|
number
)
{
console
.
log
(
`Input at index
${
index
}
for field
${
field
}
changed to
${
value
}
`
);
console
.
log
(
`Input at index
${
index
}
for field
${
field
}
changed to
${
value
}
`
);
}
}
//
postInput
()
{
// const data = [1, 2, 3];
const
url
=
'http://localhost:3000/daysactivity'
;
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
}
`
};
this
.
http
.
post
(
url
,
{
inputs
:
this
.
inputs
},{
headers
}).
subscribe
(
response
=>
{
console
.
log
(
response
);
});
}
}
}
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