Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
Easy Quest - Smart Recruitment Tool with AI
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
22_23 - J 36
Easy Quest - Smart Recruitment Tool with AI
Commits
5eda1d85
Commit
5eda1d85
authored
Apr 18, 2023
by
H.M.C. Nadunithara Wijerathne
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'IT19953298' into 'master'
Fix UI See merge request
!5
parents
44b973f1
b4bbfb19
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
19 deletions
+30
-19
src/common/lib/util.ts
src/common/lib/util.ts
+1
-2
src/common/types.ts
src/common/types.ts
+1
-1
src/components/Application/Applicant.tsx
src/components/Application/Applicant.tsx
+2
-2
src/components/Application/Interview.tsx
src/components/Application/Interview.tsx
+8
-2
src/components/Jobs.tsx
src/components/Jobs.tsx
+8
-6
src/views/Application.tsx
src/views/Application.tsx
+8
-4
src/views/Applications.view.tsx
src/views/Applications.view.tsx
+2
-2
No files found.
src/common/lib/util.ts
View file @
5eda1d85
import
{
import
{
AddressType
,
AddressType
,
ApplicationType
,
CandidateType
,
CandidateType
,
OrganizationType
,
OrganizationType
,
Reducers
,
Reducers
,
...
@@ -53,7 +52,7 @@ export const getUserId = (state: Reducers): string => {
...
@@ -53,7 +52,7 @@ export const getUserId = (state: Reducers): string => {
return
profile
.
_id
as
string
;
return
profile
.
_id
as
string
;
};
};
export
const
getStatusColor
=
(
status
?:
ApplicationType
[
"
status
"
]
)
=>
{
export
const
getStatusColor
=
(
status
?:
string
)
=>
{
const
color
=
const
color
=
status
===
"
Accepted
"
status
===
"
Accepted
"
?
"
text-bg-success
"
?
"
text-bg-success
"
...
...
src/common/types.ts
View file @
5eda1d85
...
@@ -216,7 +216,7 @@ export type ApplicationPayloadType = {
...
@@ -216,7 +216,7 @@ export type ApplicationPayloadType = {
_id
:
string
;
_id
:
string
;
candidate
:
CandidateType
;
candidate
:
CandidateType
;
job
:
string
;
job
:
string
;
status
:
"
Pending
"
|
"
Accepted
"
|
"
In progress
"
|
"
Rejected
"
;
status
:
string
;
interview
?:
{
interview
?:
{
date
:
string
;
date
:
string
;
time
:
string
;
time
:
string
;
...
...
src/components/Application/Applicant.tsx
View file @
5eda1d85
...
@@ -57,7 +57,7 @@ const Applicant = ({ application }: OwnProps) => {
...
@@ -57,7 +57,7 @@ const Applicant = ({ application }: OwnProps) => {
<
textarea
<
textarea
className=
"form-control"
className=
"form-control"
rows=
{
3
}
rows=
{
3
}
value=
{
getAddress
(
candidate
.
contacts
.
address
)
}
value=
{
getAddress
(
candidate
.
contacts
?
.
address
)
}
disabled
disabled
/>
/>
</
div
>
</
div
>
...
@@ -71,7 +71,7 @@ const Applicant = ({ application }: OwnProps) => {
...
@@ -71,7 +71,7 @@ const Applicant = ({ application }: OwnProps) => {
type=
"text"
type=
"text"
className=
"form-control"
className=
"form-control"
name=
"phone"
name=
"phone"
value=
{
candidate
.
contacts
?.
phone
}
value=
{
candidate
.
contacts
?.
phone
||
""
}
disabled
disabled
/>
/>
</
div
>
</
div
>
...
...
src/components/Application/Interview.tsx
View file @
5eda1d85
...
@@ -20,7 +20,7 @@ import {
...
@@ -20,7 +20,7 @@ import {
import
Progress
from
"
../Progress
"
;
import
Progress
from
"
../Progress
"
;
import
{
fileStorage
}
from
"
../../common/config
"
;
import
{
fileStorage
}
from
"
../../common/config
"
;
import
{
useDispatch
}
from
"
react-redux
"
;
import
{
useDispatch
}
from
"
react-redux
"
;
import
{
updateApplication
}
from
"
../../common/actions/common
"
;
import
{
getJobs
,
updateApplication
}
from
"
../../common/actions/common
"
;
import
{
getVerificationColor
}
from
"
../../common/lib/util
"
;
import
{
getVerificationColor
}
from
"
../../common/lib/util
"
;
type
OwnProps
=
{
type
OwnProps
=
{
...
@@ -46,6 +46,10 @@ const Interview = ({ application }: OwnProps) => {
...
@@ -46,6 +46,10 @@ const Interview = ({ application }: OwnProps) => {
const
_video
=
useRef
<
ReactPlayer
>
(
null
);
const
_video
=
useRef
<
ReactPlayer
>
(
null
);
const
_hiddenFileInput
=
useRef
<
HTMLInputElement
>
(
null
);
const
_hiddenFileInput
=
useRef
<
HTMLInputElement
>
(
null
);
useEffect
(()
=>
{
dispatch
(
getJobs
());
},
[]);
const
onPressStartFacialExpression
=
()
=>
{
const
onPressStartFacialExpression
=
()
=>
{
setIsFacialAnalyzing
(
true
);
setIsFacialAnalyzing
(
true
);
const
url
=
`ws://127.0.0.1:8000/facial/ws/emotions?application_id=
${
application
.
_id
}
`
;
const
url
=
`ws://127.0.0.1:8000/facial/ws/emotions?application_id=
${
application
.
_id
}
`
;
...
@@ -214,7 +218,9 @@ const Interview = ({ application }: OwnProps) => {
...
@@ -214,7 +218,9 @@ const Interview = ({ application }: OwnProps) => {
</strong>
</strong>
);
);
}
}
return null;
return (
<strong className="text-primary">Voice verification: Pending</strong>
);
};
};
return (
return (
...
...
src/components/Jobs.tsx
View file @
5eda1d85
...
@@ -52,12 +52,14 @@ const Jobs = ({ jobs, onSelectJob, selectedIndex }: OwnProps) => {
...
@@ -52,12 +52,14 @@ const Jobs = ({ jobs, onSelectJob, selectedIndex }: OwnProps) => {
Salary :
{
job
.
salary
.
min
}
-
{
job
.
salary
.
max
}
{
job
.
salary
.
currency
}{
"
"
}
Salary :
{
job
.
salary
.
min
}
-
{
job
.
salary
.
max
}
{
job
.
salary
.
currency
}{
"
"
}
</
p
>
</
p
>
<
p
className=
"desc"
>
{
job
.
description
.
slice
(
0
,
200
)
}
...
</
p
>
<
p
className=
"desc"
>
{
job
.
description
.
slice
(
0
,
200
)
}
...
</
p
>
{
userType
===
USER_TYPE
.
ORGANIZATION
&&
(
<
p
className=
"desc mt-2"
>
<
p
className=
"desc mt-2"
>
<
label
>
Applicattions :
</
label
>
{
"
"
}
<
label
>
Applicattions :
</
label
>
{
"
"
}
<
a
href=
{
`/applications?jobId=${job._id}`
}
>
<
a
href=
{
`/applications?jobId=${job._id}`
}
>
(
{
job
.
applications
?.
length
}
) Candidates
(
{
job
.
applications
?.
length
}
) Candidates
</
a
>
</
a
>
</
p
>
</
p
>
)
}
</
div
>
</
div
>
);
);
};
};
...
...
src/views/Application.tsx
View file @
5eda1d85
...
@@ -14,24 +14,24 @@ const Application = () => {
...
@@ -14,24 +14,24 @@ const Application = () => {
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
const
[
searchParams
]
=
useSearchParams
();
const
[
searchParams
]
=
useSearchParams
();
const
[
selectedTab
,
setSelectedTab
]
=
useState
(
"
Candidate
"
);
const
[
selectedTab
,
setSelectedTab
]
=
useState
(
"
Candidate
"
);
const
[
status
,
setStatus
]
=
useState
(
"
Pending
"
);
const
job
=
useOutletContext
<
JobPayloadType
>
();
const
job
=
useOutletContext
<
JobPayloadType
>
();
const
applicationId
=
searchParams
.
get
(
"
applicationId
"
);
const
applicationId
=
searchParams
.
get
(
"
applicationId
"
);
const
application
=
(
job
.
applications
as
ApplicationPayloadType
[])?.
find
(
const
application
=
(
job
.
applications
as
ApplicationPayloadType
[])?.
find
(
(
_application
)
=>
_application
.
_id
===
applicationId
(
_application
)
=>
_application
.
_id
===
applicationId
);
);
const
[
status
,
setStatus
]
=
useState
(
application
?.
status
);
const
statusValues
=
useMemo
(()
=>
{
const
statusValues
=
useMemo
(()
=>
{
if
(
status
===
"
Pending
"
)
{
if
(
status
===
"
Pending
"
)
{
return
[
"
Schedule
"
,
"
Reject
"
];
return
[
"
Schedule
"
,
"
Reject
"
];
}
else
if
(
status
===
"
Schedule
"
)
{
}
else
if
(
status
===
"
In progress
"
)
{
return
[
"
Accept
"
,
"
Reject
"
];
return
[
"
Accept
"
,
"
Reject
"
];
}
else
if
(
status
===
"
Rejected
"
)
{
}
else
if
(
status
===
"
Rejected
"
)
{
return
[
"
Pending
"
,
"
Schedule
"
];
return
[
"
Pending
"
,
"
Schedule
"
];
}
else
{
}
else
{
return
[];
return
[];
}
}
},
[
status
]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
application
)
{
if
(
application
)
{
...
@@ -54,6 +54,7 @@ const Application = () => {
...
@@ -54,6 +54,7 @@ const Application = () => {
}
else
if
(
status
===
"
Reject
"
)
{
}
else
if
(
status
===
"
Reject
"
)
{
applicationStatus
=
"
Rejected
"
;
applicationStatus
=
"
Rejected
"
;
}
}
dispatch
(
dispatch
(
updateApplication
({
updateApplication
({
applicationId
:
application
.
_id
,
applicationId
:
application
.
_id
,
...
@@ -64,7 +65,9 @@ const Application = () => {
...
@@ -64,7 +65,9 @@ const Application = () => {
};
};
const
onChangeStatus
=
(
e
:
ChangeEvent
<
HTMLSelectElement
>
)
=>
{
const
onChangeStatus
=
(
e
:
ChangeEvent
<
HTMLSelectElement
>
)
=>
{
if
(
e
.
target
.
value
!==
"
select
"
)
{
setStatus
(
e
.
target
.
value
);
setStatus
(
e
.
target
.
value
);
}
};
};
const
renderOptions
=
(
option
:
string
,
index
:
number
)
=>
(
const
renderOptions
=
(
option
:
string
,
index
:
number
)
=>
(
...
@@ -92,6 +95,7 @@ const Application = () => {
...
@@ -92,6 +95,7 @@ const Application = () => {
value=
{
status
}
value=
{
status
}
onChange=
{
onChangeStatus
}
onChange=
{
onChangeStatus
}
>
>
<
option
value=
"select"
>
Select
</
option
>
{
statusValues
.
map
(
renderOptions
)
}
{
statusValues
.
map
(
renderOptions
)
}
</
select
>
</
select
>
<
button
<
button
...
...
src/views/Applications.view.tsx
View file @
5eda1d85
...
@@ -13,7 +13,7 @@ const Applications = () => {
...
@@ -13,7 +13,7 @@ const Applications = () => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
job
)
{
if
(
job
)
{
sortApplications
(
"
skills
"
,
job
);
sortApplications
(
"
total
"
,
job
);
}
}
},
[
job
]);
},
[
job
]);
...
@@ -91,9 +91,9 @@ const Applications = () => {
...
@@ -91,9 +91,9 @@ const Applications = () => {
aria-label="Default select example"
aria-label="Default select example"
onChange={onSelectSort}
onChange={onSelectSort}
>
>
<option value="total">Total score</option>
<option value="skills">Skills score</option>
<option value="skills">Skills score</option>
<option value="similarity">Similarity</option>
<option value="similarity">Similarity</option>
<option value="total">Total score</option>
</select>
</select>
</div>
</div>
</div>
</div>
...
...
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