|
|
|
@@ -1,6 +1,7 @@ |
|
|
|
import React from "react"; |
|
|
|
import PropTypes from "prop-types"; |
|
|
|
import { selectDoneProcessError } from "../../store/selectors/processSelectors"; |
|
|
|
import { selectAuthUser} from "../../store/selectors/userSelectors" |
|
|
|
import { setDoneProcessReq } from "../../store/actions/processes/processAction"; |
|
|
|
import { useDispatch, useSelector } from "react-redux"; |
|
|
|
import { formatDateSrb, formatTimeSrb } from "../../util/helpers/dateHelpers"; |
|
|
|
@@ -18,13 +19,19 @@ const Selection = (props) => { |
|
|
|
const applicants = props.selection.selectionProcesses; |
|
|
|
const errorMessage = useSelector(selectDoneProcessError); |
|
|
|
const dispatch = useDispatch(); |
|
|
|
const user = useSelector(selectAuthUser); |
|
|
|
|
|
|
|
|
|
|
|
const dropItem = (e, selId) => { |
|
|
|
var data = e.dataTransfer.getData("text/plain"); |
|
|
|
const selectionProcess = JSON.parse(data); |
|
|
|
if (selectionProcess.selectionLevelId !== selId) { |
|
|
|
dispatch(setDoneProcessReq({ id: selectionProcess.id })); |
|
|
|
dispatch(setDoneProcessReq({ |
|
|
|
id: selectionProcess.id, |
|
|
|
name: "radnom name", |
|
|
|
applicantId: selectionProcess.applicant.applicantId, |
|
|
|
schedulerId: user.id |
|
|
|
})); |
|
|
|
} |
|
|
|
if (errorMessage) { |
|
|
|
console.log(errorMessage) |
|
|
|
@@ -42,7 +49,7 @@ const Selection = (props) => { |
|
|
|
<button>{item.status}</button> |
|
|
|
</div> |
|
|
|
<div className="date"> |
|
|
|
<p>{formatDateSrb(item.date)} <span className="grey">|</span> {formatTimeSrb(item.date)}</p> |
|
|
|
{item.date !== null && item.date !== "" && <p>{formatDateSrb(item.date)} <span className="grey">|</span> {formatTimeSrb(item.date)}</p>} |
|
|
|
</div> |
|
|
|
<div className="full-name"> |
|
|
|
<p>{item.applicant.firstName + " " + item.applicant.lastName}</p> |