Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-scorecard
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
Venkaiah Naidu Singamchetty
nisum-scorecard
Commits
50ed5e05
Commit
50ed5e05
authored
Mar 18, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'apiserver' into 'master'
score colors changedation See merge request
!49
parents
476909ea
317deadb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
18 deletions
+27
-18
index.jsx
src/components/header/index.jsx
+8
-3
index.jsx
src/components/leftSidebar/index.jsx
+3
-3
index.jsx
src/pages/dashboard/index.jsx
+4
-4
index.jsx
src/pages/layout/index.jsx
+7
-3
index.jsx
src/pages/reports/index.jsx
+3
-3
constants.js
src/utils/constants.js
+2
-2
No files found.
src/components/header/index.jsx
View file @
50ed5e05
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
useNavigate
,
Link
}
from
'react-router-dom'
;
import
{
useDispatch
,
useSelector
}
from
'react-redux'
;
import
clearStore
from
'../../utils/clearStore'
;
function
Header
()
{
function
Header
(
{
isOpen
}
)
{
const
dispatch
=
useDispatch
();
const
navigate
=
useNavigate
();
const
user
=
useSelector
((
state
)
=>
state
.
userDetails
.
user
);
...
...
@@ -13,9 +13,14 @@ function Header() {
navigate
(
'/'
);
clearStore
(
dispatch
)
}
useEffect
(()
=>
{
if
(
open
!==
false
)
setOpen
(
isOpen
)
},[
isOpen
])
return
(
<
div
className=
"flex items-center justify-between py-5 px-10"
>
<
div
className=
"flex items-center justify-between py-5 px-10"
onClick=
{
()
=>
setOpen
(
!
open
)
}
>
<
img
src=
"/logo.png"
/>
<
div
className=
"flex items-center relative"
>
<
button
className=
" -mt-1 text-2xl flex"
onClick=
{
()
=>
setOpen
(
!
open
)
}
>
...
...
src/components/leftSidebar/index.jsx
View file @
50ed5e05
...
...
@@ -27,9 +27,9 @@ function LeftSidebar() {
<
img
src=
"/man.png"
width=
"18px"
height=
"18px"
/>
<
p
className=
"w-[80%] text-left"
>
{
empName
}
</
p
>
<
p
className=
{
`w-[30px] h-[30px] rounded-full flex items-center text-white justify-center
${score === 0
? 'bg-red-5
00 ' : ''}
${score >= 1 && score < 2 ? 'bg-red-
5
00' : ''}
${score >= 2 && score < 3 ? 'bg-
yellow-5
00' : ''}
${score === 0
&& score<1 ? 'bg-red-4
00 ' : ''}
${score >= 1 && score < 2 ? 'bg-red-
3
00' : ''}
${score >= 2 && score < 3 ? 'bg-
green-4
00' : ''}
${score >= 3 && score < 4 ? 'bg-green-500 ' : ''}
${score >= 4 && score < 5 ? 'bg-green-600 ' : ''}
${score >= 5 ? 'bg-green-600 ' : ''}`
}
>
...
...
src/pages/dashboard/index.jsx
View file @
50ed5e05
...
...
@@ -75,10 +75,10 @@ function Dashboard() {
title
:
"score"
,
id
:
"score"
,
render
:
(
value
)
=>
<
span
className=
{
`w-[30px] h-[30px] rounded-full flex items-center text-white justify-center
${value === 0
? 'bg-red-5
00 ' : ''}
${value >= 1 && value < 2 ? 'bg-red-
5
00' : ''}
${value >= 2 && value < 3 ? 'bg-
yellow-5
00' : ''}
${value >= 3 && value < 4 ? 'bg-green-
4
00 ' : ''}
${value === 0
&& value<1 ? 'bg-red-4
00 ' : ''}
${value >= 1 && value < 2 ? 'bg-red-
3
00' : ''}
${value >= 2 && value < 3 ? 'bg-
green-4
00' : ''}
${value >= 3 && value < 4 ? 'bg-green-
5
00 ' : ''}
${value >= 4 && value < 5 ? 'bg-green-600 ' : ''}
${value >= 5 ? 'bg-green-600 ' : ''}
`
}
>
{
value
}
</
span
>
...
...
src/pages/layout/index.jsx
View file @
50ed5e05
import
React
from
'react'
import
React
,
{
useState
}
from
'react'
import
Header
from
'../../components/header'
;
import
Sidebar
from
'../../components/sidebar'
;
import
LeftSidebar
from
'../../components/leftSidebar'
;
function
Layout
({
children
})
{
const
[
isOpen
,
setIsOpen
]
=
useState
(
false
)
const
handleLogoutOpen
=
()
=>
{
setIsOpen
(
false
)
}
const
url
=
window
.
location
.
href
;
return
(
<
div
className=
'max-h-[84vh]'
>
<
Header
/>
<
div
className=
'max-h-[84vh]'
onClick=
{
handleLogoutOpen
}
>
<
Header
isOpen=
{
isOpen
}
/>
<
div
className=
"flex"
>
<
Sidebar
/>
<
div
className=
"bg-[#E9EDEE] w-full"
style=
{
{
height
:
"88vh"
}
}
>
...
...
src/pages/reports/index.jsx
View file @
50ed5e05
...
...
@@ -140,9 +140,9 @@ function Reports() {
</
div
>
<
div
className=
"flex flex-col justify-center items-center"
>
<
div
className=
{
`w-[40px] h-[40px] rounded-full flex items-center text-white justify-center
${empDetails?.score ===
0 ? 'bg-red-5
00 ' : ''}
${empDetails?.score >= 1 && empDetails?.score < 2 ? 'bg-red-
5
00' : ''}
${empDetails?.score >= 2 && empDetails?.score < 3 ? 'bg-
yellow-5
00' : ''}
${empDetails?.score ===
0 && empDetails?.score<1 ? 'bg-red-4
00 ' : ''}
${empDetails?.score >= 1 && empDetails?.score < 2 ? 'bg-red-
3
00' : ''}
${empDetails?.score >= 2 && empDetails?.score < 3 ? 'bg-
green-4
00' : ''}
${empDetails?.score >= 3 && empDetails?.score < 4 ? 'bg-green-500 ' : ''}
${empDetails?.score >= 4 && empDetails?.score < 5 ? 'bg-green-600 ' : ''}
${empDetails?.score >= 5 ? 'bg-green-600 ' : ''}
...
...
src/utils/constants.js
View file @
50ed5e05
// export const base_url = 'http://localhost:4000'
export
const
base_url
=
'https://nisumscorecardserverdev.netlify.app/.netlify/functions/api'
// export const base_url = 'https://nisumscorecardservertesting.netlify.app/.netlify/functions/api'
\ No newline at end of file
// export const base_url = 'https://nisumscorecardserverdev.netlify.app/.netlify/functions/api'
export
const
base_url
=
'https://nisumscorecardservertesting.netlify.app/.netlify/functions/api'
\ No newline at end of file
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