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
ac2d1f63
Commit
ac2d1f63
authored
Mar 20, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'apiserver' into 'master'
slice Names changed See merge request
!63
parents
4ac4b136
0f0c6e16
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
27 deletions
+9
-27
index.jsx
src/components/accordion/index.jsx
+1
-1
index.jsx
src/components/leftSidebar/index.jsx
+2
-2
index.jsx
src/components/modal/index.jsx
+2
-2
index.jsx
src/pages/viewReportee/index.jsx
+2
-20
rootReducer.js
src/redux/reducers/rootReducer.js
+1
-1
viewreporteeSlice.js
src/redux/reducers/viewreporteeSlice.js
+0
-0
clearStore.js
src/utils/clearStore.js
+1
-1
No files found.
src/components/accordion/index.jsx
View file @
ac2d1f63
...
@@ -6,7 +6,7 @@ import { useSelector ,useDispatch} from "react-redux";
...
@@ -6,7 +6,7 @@ import { useSelector ,useDispatch} from "react-redux";
import
{
useEffect
}
from
"react"
;
import
{
useEffect
}
from
"react"
;
import
{
useParams
}
from
'react-router'
import
{
useParams
}
from
'react-router'
import
{
fetchReportees
}
from
"../../redux/reducers/reporteesSlice"
;
import
{
fetchReportees
}
from
"../../redux/reducers/reporteesSlice"
;
import
{
calculateDefaultScore
,
calculateInitiativeScore
}
from
"../../redux/reducers/
report
Slice"
;
import
{
calculateDefaultScore
,
calculateInitiativeScore
}
from
"../../redux/reducers/
viewreportee
Slice"
;
import
Loading
from
"../loading Component/Loading"
;
import
Loading
from
"../loading Component/Loading"
;
...
...
src/components/leftSidebar/index.jsx
View file @
ac2d1f63
...
@@ -37,7 +37,7 @@ function LeftSidebar() {
...
@@ -37,7 +37,7 @@ function LeftSidebar() {
<
div
className=
" w-[33%] flex flex-col px-[5px]"
>
<
div
className=
" w-[33%] flex flex-col px-[5px]"
>
<
div
className=
"flex mt-3 items-center justify-between"
>
<
div
className=
"flex mt-3 items-center justify-between"
>
<
p
className=
"text-xl text-blue-400 font-semibold pl-4"
>
<
p
className=
"text-xl text-blue-400 font-semibold pl-4"
>
My
Reportees
Reportees
</
p
>
</
p
>
<
input
<
input
placeholder=
"Search Reportees"
placeholder=
"Search Reportees"
...
@@ -53,7 +53,7 @@ function LeftSidebar() {
...
@@ -53,7 +53,7 @@ function LeftSidebar() {
{
reportees
?.
map
(({
empName
,
score
,
empId
})
=>
(
{
reportees
?.
map
(({
empName
,
score
,
empId
})
=>
(
<
button
onClick=
{
()
=>
dispatch
(
setViewReportee
(
empId
))
}
<
button
onClick=
{
()
=>
dispatch
(
setViewReportee
(
empId
))
}
// to=
{`/
viewreportee
`}
// to=
{`/
viewreportee
`}
className=
{
`flex items-center hover:bg-blue-400 hover:text-white bg-${viewReportee.empId == empId ? "blue-400 text-white
rounded-2xl
" : "white"
className=
{
`flex items-center hover:bg-blue-400 hover:text-white bg-${viewReportee.empId == empId ? "blue-400 text-white" : "white"
} p-2 justify-between mb-1 w-full`
}
} p-2 justify-between mb-1 w-full`
}
key=
{
empId
}
key=
{
empId
}
>
>
...
...
src/components/modal/index.jsx
View file @
ac2d1f63
...
@@ -39,8 +39,8 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
...
@@ -39,8 +39,8 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
}
}
const
handlePerformance
=
(
value
)
=>
{
const
handlePerformance
=
(
value
)
=>
{
let
appreciateScores
=
[
0
,
1
,
2
,
3
,
4
,
5
]
let
appreciateScores
=
[
1
,
2
,
3
,
4
,
5
]
let
depreciateScores
=
[
-
0
,
-
1
,
-
2
,
-
3
,
-
4
,
-
5
]
let
depreciateScores
=
[
-
1
,
-
2
,
-
3
,
-
4
,
-
5
]
if
(
value
==
1
)
{
if
(
value
==
1
)
{
setActivityData
({
...
activityData
,
score
:
0
})
setActivityData
({
...
activityData
,
score
:
0
})
setScoreRender
(
appreciateScores
)
setScoreRender
(
appreciateScores
)
...
...
src/pages/viewReportee/index.jsx
View file @
ac2d1f63
...
@@ -3,20 +3,16 @@ import { useSelector, useDispatch } from "react-redux";
...
@@ -3,20 +3,16 @@ import { useSelector, useDispatch } from "react-redux";
import
{
useParams
,
useNavigate
}
from
"react-router"
;
import
{
useParams
,
useNavigate
}
from
"react-router"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
{
base_url
}
from
"../../utils/constants"
;
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
{
fetchReports
}
from
"../../redux/reducers/reportSlice"
;
import
{
fetchReportees
}
from
"../../redux/reducers/reporteesSlice"
;
import
{
fetchReportees
}
from
"../../redux/reducers/reporteesSlice"
;
import
Accordion
from
"../../components/accordion"
;
import
Accordion
from
"../../components/accordion"
;
import
{
scoreColor
}
from
'../../utils/commonFunctions'
;
import
{
scoreColor
}
from
'../../utils/commonFunctions'
;
import
DateRangePicker
from
"../../components/dateRangePicker/DateRangePicker"
;
function
Viewreportee
()
{
function
Viewreportee
()
{
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
const
navigate
=
useNavigate
();
const
navigate
=
useNavigate
();
// const { id } = useParams();
// const empId = Number(id)
const
{
reportees
,
viewReportee
}
=
useSelector
((
state
)
=>
state
.
reportees
);
const
{
reportees
,
viewReportee
}
=
useSelector
((
state
)
=>
state
.
reportees
);
const
user
=
useSelector
((
state
)
=>
state
.
userDetails
.
user
)
const
user
=
useSelector
((
state
)
=>
state
.
userDetails
.
user
)
// const [empDetails, setEmpDetails] = useState(null);
const
{
reports
,
loading
,
error
}
=
useSelector
((
state
)
=>
state
.
reports
);
const
{
reports
,
loading
,
error
}
=
useSelector
((
state
)
=>
state
.
reports
);
const
[
open
,
setOpen
]
=
useState
({
"accordianOne"
:
false
,
"accordianTwo"
:
false
});
const
[
open
,
setOpen
]
=
useState
({
"accordianOne"
:
false
,
"accordianTwo"
:
false
});
...
@@ -78,21 +74,7 @@ function Viewreportee() {
...
@@ -78,21 +74,7 @@ function Viewreportee() {
}
}
}
}
useEffect
(()
=>
{
// if (viewReportee !== undefined || null && reportees.length > 0) {
// const emp = reportees?.filter((item) => item.empId === Number(viewReportee.empId));
// setEmpDetails(emp[0]);
// const data = {
// "empId": Number(viewReportee.empId),
// "fromDate": "",
// "toDate": ""
// }
// dispatch(fetchReports(data))
// }
// return (() => {
// setEmpDetails(null)
// })
},
[
viewReportee
,
reportees
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
user
)
{
if
(
user
)
{
...
...
src/redux/reducers/rootReducer.js
View file @
ac2d1f63
import
{
combineReducers
}
from
'redux'
;
import
{
combineReducers
}
from
'redux'
;
import
reporteesReducer
from
'./reporteesSlice'
;
import
reporteesReducer
from
'./reporteesSlice'
;
import
userReducer
from
'./userSlice'
;
import
userReducer
from
'./userSlice'
;
import
reportReducer
from
'./
report
Slice'
;
import
reportReducer
from
'./
viewreportee
Slice'
;
const
rootReducer
=
combineReducers
({
const
rootReducer
=
combineReducers
({
...
...
src/redux/reducers/
report
Slice.js
→
src/redux/reducers/
viewreportee
Slice.js
View file @
ac2d1f63
File moved
src/utils/clearStore.js
View file @
ac2d1f63
import
{
resetUser
}
from
'../redux/reducers/userSlice'
;
import
{
resetUser
}
from
'../redux/reducers/userSlice'
;
import
{
resetReportees
}
from
'../redux/reducers/reporteesSlice'
;
import
{
resetReportees
}
from
'../redux/reducers/reporteesSlice'
;
import
{
resetReports
}
from
'../redux/reducers/
report
Slice'
;
import
{
resetReports
}
from
'../redux/reducers/
viewreportee
Slice'
;
const
clearStore
=
(
dispatch
)
=>
{
const
clearStore
=
(
dispatch
)
=>
{
dispatch
(
resetUser
());
dispatch
(
resetUser
());
...
...
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