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
aeb0959b
Commit
aeb0959b
authored
Mar 21, 2024
by
Venkaiah Naidu Singamchetty
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'apiserver' into 'master'
Apiserver See merge request
!73
parents
69c42b34
26bc79cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
server.js
server.js
+1
-1
index.jsx
src/components/leftSidebar/index.jsx
+4
-4
index.jsx
src/components/modal/index.jsx
+20
-6
index.jsx
src/pages/dashboard/index.jsx
+2
-2
No files found.
server.js
View file @
aeb0959b
...
...
@@ -141,7 +141,7 @@ app.post("/getreportees",async (req, res) => {
"data":{
"aName":"Approval of timesheet",
"aId":"D001",
"type":"d
efault
",
"type":"d
uties
",
"ratedBy":"Name",
"score":3,
"comments":""
...
...
src/components/leftSidebar/index.jsx
View file @
aeb0959b
...
...
@@ -51,22 +51,22 @@ function LeftSidebar() {
return
(
<
div
className=
"
w-[33%] flex flex-col px-[5px]"
>
<
div
className=
"flex mt-3 items-center justify-between"
>
<
div
className=
" w-[33%] flex flex-col px-[5px]"
>
<
div
className=
"
flex mt-3 items-center justify-between"
>
<
p
className=
"text-xl text-blue-400 font-semibold pl-4"
>
Reportees
</
p
>
<
input
placeholder=
"Search"
type=
"text"
className=
"p-2
mi-2 border rounded w-[160
px]"
className=
"p-2
border rounded w-[160px] placeholder:text-[14
px]"
value=
{
inputValue
}
onChange=
{
handleChange
}
/>
</
div
>
{
(
loading
)
?
<
Loading
/>
:
<
div
className=
"p-2 bg-[#E9EDEE] mt-4 max-h-[
8
0vh] overflow-auto"
>
<
div
className=
"p-2 bg-[#E9EDEE] mt-4 max-h-[
7
0vh] overflow-auto"
>
{
reportees
?.
map
(({
empName
,
score
,
empId
})
=>
(
<
button
onClick=
{
()
=>
dispatch
(
setViewReportee
(
empId
))
}
// to=
{`/
viewreportee
`}
...
...
src/components/modal/index.jsx
View file @
aeb0959b
...
...
@@ -16,6 +16,7 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
const
[
modalLoading
,
setModalLoading
]
=
useState
(
true
)
const
[
scoreRender
,
setScoreRender
]
=
useState
([]);
const
[
showScore
,
setShowScore
]
=
useState
(
false
)
const
[
disableAppreciate
,
setDisableAppreciate
]
=
useState
(
false
)
const
getActivitysList
=
async
(
type
)
=>
{
const
activities
=
await
axios
.
get
(
`
${
base_url
}
/activities`
)
...
...
@@ -54,7 +55,7 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
}
const
handleComments
=
(
e
)
=>
{
setActivityData
({
...
activityData
,
comments
:
e
.
target
.
value
})
setActivityData
({
...
activityData
,
comments
:
e
.
target
.
value
.
trim
()
})
}
const
handleSubmit
=
(
e
)
=>
{
...
...
@@ -78,7 +79,11 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
setActivtyType
(
str
.
charAt
(
0
).
toUpperCase
()
+
str
.
slice
(
1
).
toLowerCase
())
}
useEffect
(()
=>
{
if
(
type
===
"duties"
){
setDisableAppreciate
(
true
);
}
else
{
setDisableAppreciate
(
false
);
}
SentenceCase
(
type
)
if
(
visible
===
false
)
{
setActivityData
({
aName
:
""
,
ratedBy
:
""
,
aId
:
""
,
type
:
type
,
score
:
0
,
comments
:
""
})
...
...
@@ -108,7 +113,9 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
<
div
>
<
div
>
<
form
className=
" p-2 max-w-sm mx-auto text-[12px]"
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
div
className=
"flex items-center justify-between my-5"
>
<
div
className=
"flex items-center my-5"
>
<
label
htmlFor=
"countries"
>
SELECT ACTIVITY
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
select
disabled=
{
showCustActivity
}
className=
"bg-gray-50 ml-2 w-6/12 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 "
onChange=
{
(
e
)
=>
handleActivityName
(
e
)
}
value=
{
activityData
.
aName
}
>
<
option
id=
""
value=
""
>
Select
</
option
>
...
...
@@ -116,15 +123,19 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
activitiesList
&&
activitiesList
.
map
((
activity
)
=>
<
option
className=
" w-7/12"
key=
{
activity
.
aId
}
id=
{
activity
.
aId
}
value=
{
activity
.
aName
}
>
{
activity
.
aName
}
</
option
>)
}
</
select
>
<
button
onClick=
{
(
e
)
=>
{
handleCustBtn
(
e
)
}
}
className=
"bg-blue-400 ml-2 w-2/12 text-white py-1 rounded hover:scale-95 transition text-sm"
>
Custom
</
button
>
<
button
onClick=
{
(
e
)
=>
{
handleCustBtn
(
e
)
}
}
className=
{
`${showCustActivity && 'hidden'} bg-blue-400 ml-2 w-2/12 text-white py-1 rounded hover:scale-95 transition text-sm`
}
>
Custom
</
button
>
</
div
>
<
div
className=
{
`flex items-center ${!showCustActivity && 'hidden'}`
}
>
<
label
className=
{
`font-medium mr-2`
}
>
Custom Activity
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
input
type=
"text"
value=
{
activityData
.
aName
}
placeholder=
"Enter Activity name"
name=
"performance"
className=
{
`border border-gray-300 rounded p-2 `
}
onChange=
{
(
e
)
=>
handleCustumActivity
(
e
)
}
/>
<
button
onClick=
{
(
e
)
=>
{
handleCustBtn
(
e
)
}
}
className=
{
`${!showCustActivity && 'hidden'} bg-blue-400 ml-2 w-2/12 text-white py-1 rounded hover:scale-95 transition text-sm`
}
>
Close
</
button
>
</
div
>
<
div
className=
"flex items-center mb-4 "
>
<
label
htmlFor=
"appreciate"
className=
"
font-medium
"
>
APPRECIATION
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
input
id=
"appreciate"
type=
"radio"
value=
"appreciate"
name=
"performance"
className=
"w-4 h-4 m-3 text-blue-600 bg-gray-100 border-gray-300 "
onChange=
{
()
=>
handlePerformance
(
1
)
}
/>
<
label
htmlFor=
"appreciate"
className=
"
font-medium
"
>
APPRECIATION
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
input
id=
"appreciate"
disabled=
{
disableAppreciate
}
type=
"radio"
value=
"appreciate"
name=
"performance"
className=
"w-4 h-4 m-3 text-blue-600 bg-gray-100 border-gray-300 "
onChange=
{
()
=>
handlePerformance
(
1
)
}
/>
<
label
htmlFor=
"depreciate"
className=
"ms-2 font-medium "
>
DEPRECIATION
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
input
id=
"depreciate"
type=
"radio"
value=
"depreciate"
name=
"performance"
className=
"w-4 h-4 m-3 text-blue-600 bg-gray-100 border-gray-300 "
onChange=
{
()
=>
handlePerformance
(
-
1
)
}
/>
</
div
>
...
...
@@ -137,6 +148,9 @@ export default function MyModal({ visible, onClose, type, handleAddActivity }) {
}
</
select
>
</
div
>
<
div
className=
"flex items-center my-5"
>
<
label
htmlFor=
"comments"
className=
"block w-3/12 mb-20 text-start font-medium "
>
COMMENTS
<
span
className=
"text-[15px]"
>
*
</
span
>
:
</
label
>
<
textarea
id=
"comments"
style=
{
{
resize
:
"none"
}
}
rows=
"4"
className=
"block ml-2 p-2.5 w-9/12 bg-gray-50 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 "
placeholder=
"Comments"
onChange=
{
(
e
)
=>
handleComments
(
e
)
}
...
...
src/pages/dashboard/index.jsx
View file @
aeb0959b
...
...
@@ -111,8 +111,8 @@ function Dashboard() {
<
div
>
<
div
className=
"mb-2"
>
<
div
className=
"flex justify-end my-1 mr-2 items-center"
>
<
label
>
Search
Employee
:
</
label
>
<
input
placeholder=
"
Enter"
value=
{
inputValue
}
onChange=
{
handleChange
}
type=
"text"
className=
"p-1 px-2 border rounded ml-2
"
/>
<
label
>
Search :
</
label
>
<
input
placeholder=
"
Name/Id/Designation/Role"
value=
{
inputValue
}
onChange=
{
handleChange
}
type=
"text"
className=
"p-1 px-2 border rounded ml-2 placeholder:text-[14px]
"
/>
</
div
>
<
Table
headers=
{
headers
}
data=
{
reportees
}
loading=
{
loading
}
maxHeight=
{
88
}
/>
...
...
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