| fullWidth, | fullWidth, | ||||
| responsive, | responsive, | ||||
| }) => { | }) => { | ||||
| const { activeProcessUnsuccess, setActiveProcessUnsuccess } = useContext(SelectionContext); | |||||
| const {t} = useTranslation() | |||||
| const { activeProcessUnsuccess, setActiveProcessUnsuccess } = | |||||
| useContext(SelectionContext); | |||||
| const { t } = useTranslation(); | |||||
| const theme = useTheme(); | const theme = useTheme(); | ||||
| const fullScreen = useMediaQuery(theme.breakpoints.down("md")); | const fullScreen = useMediaQuery(theme.breakpoints.down("md")); | ||||
| </DialogTitle> | </DialogTitle> | ||||
| <DialogContent> | <DialogContent> | ||||
| <form className="modal-content comment"> | <form className="modal-content comment"> | ||||
| <p style={{width:'100%', textAlign:'left', alignSelf:'flex-start', marginBottom:'10px'}}>Komentar (opciono):</p> | |||||
| <p | |||||
| style={{ | |||||
| width: "100%", | |||||
| textAlign: "left", | |||||
| alignSelf: "flex-start", | |||||
| marginBottom: "10px", | |||||
| }} | |||||
| > | |||||
| {t("dialogs.comment")} | |||||
| </p> | |||||
| <Editor | <Editor | ||||
| onInit={(evt, editor) => (editorContent.current = editor)} | onInit={(evt, editor) => (editorContent.current = editor)} | ||||
| style={{ height: "20px" }} | style={{ height: "20px" }} |
| {formatTimeSrb(interview.date)} | {formatTimeSrb(interview.date)} | ||||
| </p> | </p> | ||||
| <p className="day-component-interviews-name"> | <p className="day-component-interviews-name"> | ||||
| {interview.selectionLevel.name} | |||||
| {interview.selectionLevel.name === "HR intervju" && t("processes.hr")} | |||||
| {interview.selectionLevel.name === "Screening test" && t("processes.st")} | |||||
| {interview.selectionLevel.name === "Tehnicki intervju" && t("processes.ti")} | |||||
| {interview.selectionLevel.name === "Konacna odluka" && t("processes.fd")} | |||||
| </p> | </p> | ||||
| </div> | </div> | ||||
| ))} | ))} |
| }} | }} | ||||
| > | > | ||||
| <p className="day-details-name"> | <p className="day-details-name"> | ||||
| {selectionProcess.selectionLevel.name} | |||||
| {selectionProcess.selectionLevel.name === "HR intervju" && t("processes.hr")} | |||||
| {selectionProcess.selectionLevel.name === "Screening test" && t("processes.st")} | |||||
| {selectionProcess.selectionLevel.name === "Tehnicki intervju" && t("processes.ti")} | |||||
| {selectionProcess.selectionLevel.name === "Konacna odluka" && t("processes.fd")} | |||||
| </p> | </p> | ||||
| <p | <p | ||||
| className="day-details-applicant" | className="day-details-applicant" |
| onDrop={(e) => dropItem(e, props.selection.id)} | onDrop={(e) => dropItem(e, props.selection.id)} | ||||
| > | > | ||||
| <div className="selection-card-title"> | <div className="selection-card-title"> | ||||
| <h3 style={{ marginRight: "50px" }}>{props.selection.name}</h3> | |||||
| <h3 style={{ marginRight: "50px" }}> | |||||
| {props.selection.name === "HR intervju" && t("processes.hr")} | |||||
| {props.selection.name === "Screening test" && t("processes.st")} | |||||
| {props.selection.name === "Tehnicki intervju" && t("processes.ti")} | |||||
| {props.selection.name === "Konacna odluka" && t("processes.fd")} | |||||
| </h3> | |||||
| {props.order === 0 ? ( | {props.order === 0 ? ( | ||||
| <IconButton | <IconButton | ||||
| sx={{ marginRight: "35px" }} | sx={{ marginRight: "35px" }} |
| import { useTranslation } from "react-i18next"; | import { useTranslation } from "react-i18next"; | ||||
| // import Button from "../Button/Button"; | // import Button from "../Button/Button"; | ||||
| const options = ["Zakazan", "Odrađen", "Čeka na zakazivanje", "Neuspešno"]; | |||||
| // const options = ["Zakazan", "Odrađen", "Čeka na zakazivanje", "Neuspešno"]; | |||||
| const SelectionCard = (props) => { | const SelectionCard = (props) => { | ||||
| const [showForm, setShowForm] = useState(false); | const [showForm, setShowForm] = useState(false); | ||||
| const [selected, setSelected] = useState(props.item.status); | const [selected, setSelected] = useState(props.item.status); | ||||
| const { t } = useTranslation(); | const { t } = useTranslation(); | ||||
| const { success } = useSelector((s) => s.statusUpdate); | |||||
| const options = [ | |||||
| t("processStatus.scheduled"), // Zakazan | |||||
| t("processStatus.finished"), // Odradjen | |||||
| t("processStatus.waitingAppointment"), // Ceka na zakazivanje | |||||
| t("processStatus.unsuccesfully"), // Neuspesno | |||||
| ]; | |||||
| const { success } = useSelector((s) => s.statusUpdate); // Razjasniti!!! | |||||
| const { | const { | ||||
| setActiveProcess, | setActiveProcess, | ||||
| setActiveInterview, | setActiveInterview, | ||||
| const select = (e) => { | const select = (e) => { | ||||
| e.stopPropagation(); | e.stopPropagation(); | ||||
| if (e.target.value === "Zakazan") { | |||||
| if (e.target.value === t("processStatus.scheduled")) { // Izmena - "Zakazan" | |||||
| // setovanje context state-a | // setovanje context state-a | ||||
| setActiveProcess({ process: props.item, status: "Zakazan" }); | setActiveProcess({ process: props.item, status: "Zakazan" }); | ||||
| } | } | ||||
| // poseban blok u slucaju da treba prikazati odredjeni modal kada je izabrano 'NEUSPESNO' | // poseban blok u slucaju da treba prikazati odredjeni modal kada je izabrano 'NEUSPESNO' | ||||
| else if (e.target.value === "Neuspešno") { | |||||
| else if (e.target.value === t("processStatus.unsuccesfully")) { // Izmena - "Neuspešno" | |||||
| setActiveProcessUnsuccess(props.item); | setActiveProcessUnsuccess(props.item); | ||||
| } else if (e.target.value === "Odrađen") { | |||||
| } else if (e.target.value === t("processStatus.finished")) { // Izmena - "Odrađen" | |||||
| // ukoliko nije zadnji nivo selekcije kreirati proces za sledeci nivo | // ukoliko nije zadnji nivo selekcije kreirati proces za sledeci nivo | ||||
| // u suprotnom samo promeniti status u odradjeno | // u suprotnom samo promeniti status u odradjeno | ||||
| if (props.item.selectionLevelId !== 4) | if (props.item.selectionLevelId !== 4) | ||||
| <div | <div | ||||
| className={`sel-item-inner ${props.item.scheduler && "withScheduler"}`} | className={`sel-item-inner ${props.item.scheduler && "withScheduler"}`} | ||||
| > | > | ||||
| {showForm ? ( | |||||
| {showForm ? ( // Prikaz select menija i odabir zeljenog statusa | |||||
| <form data-testid="status-select"> | <form data-testid="status-select"> | ||||
| <FormControl> | <FormControl> | ||||
| <InputLabel id="demo-simple-select-label">Status</InputLabel> | <InputLabel id="demo-simple-select-label">Status</InputLabel> | ||||
| paddingRight: "5px", | paddingRight: "5px", | ||||
| }} | }} | ||||
| > | > | ||||
| {options.map((n, index) => ( | |||||
| {options.map((n, index) => ( // Ispis statusnih opcija! | |||||
| <MenuItem key={index} sx={{ textAlign: "left" }} value={n}> | <MenuItem key={index} sx={{ textAlign: "left" }} value={n}> | ||||
| {n} | {n} | ||||
| </MenuItem> | </MenuItem> | ||||
| data-testid="status-btn" | data-testid="status-btn" | ||||
| className={props.item.status === "Neuspešno" ? "unsucc" : ""} | className={props.item.status === "Neuspešno" ? "unsucc" : ""} | ||||
| > | > | ||||
| {props.item.status} | |||||
| {props.item.status === "Zakazan" && t("processStatus.scheduled")} | |||||
| {props.item.status === "Odrađen" && t("processStatus.finished")} | |||||
| {props.item.status === "Čeka na zakazivanje" && t("processStatus.waitingAppointment")} | |||||
| {props.item.status === "Neuspešno" && t("processStatus.unsuccesfully")} | |||||
| </button> | </button> | ||||
| </div> | </div> | ||||
| )} | )} |
| interviewerName2: "Interviewer's name", | interviewerName2: "Interviewer's name", | ||||
| duration: "Duration", | duration: "Duration", | ||||
| appointment: "Appointment", | appointment: "Appointment", | ||||
| comment: "Your comment (optional)" | |||||
| }, | }, | ||||
| schedule: { | schedule: { | ||||
| items: "items", | items: "items", | ||||
| patternsMade:"Patterns made", | patternsMade:"Patterns made", | ||||
| noPatterns:"There are currently no patterns added", | noPatterns:"There are currently no patterns added", | ||||
| addPattern:"Add pattern", | addPattern:"Add pattern", | ||||
| editing2:"Editing mode" | |||||
| editing2:"Editing mode", | |||||
| titleFieldPlaceholder: "ex. Date of HR interview", | |||||
| addingPatternButton: "ADD PATTERN", | |||||
| }, | }, | ||||
| stats:{ | stats:{ | ||||
| statistic:"Statistic", | statistic:"Statistic", | ||||
| number:"Number", | number:"Number", | ||||
| contacted:"Number of contacted:", | contacted:"Number of contacted:", | ||||
| registered:"Registered by positions" | registered:"Registered by positions" | ||||
| } | |||||
| }, | |||||
| processStatus: { | |||||
| scheduled: "Scheduled", | |||||
| finished: "Done", | |||||
| waitingAppointment: "Waiting for an appointment", | |||||
| unsuccesfully: "Unsuccessfully", | |||||
| waitingAnswer: "Waiting for an answer", | |||||
| }, | |||||
| processes: { // Header naslovi procesa | |||||
| hr: "HR interview", | |||||
| st: "Screening test", | |||||
| ti: "Technical interview", | |||||
| fd: "Final decision", | |||||
| }, | |||||
| }; | }; |
| nav: { | nav: { | ||||
| navigation: "Navigacija", | navigation: "Navigacija", | ||||
| ads: "Oglasi", | |||||
| jobs: "Oglasi", | |||||
| selectionFlow: "Tok Selekcije", | selectionFlow: "Tok Selekcije", | ||||
| candidates: "Kandidati", | candidates: "Kandidati", | ||||
| schedule: "Planer", | schedule: "Planer", | ||||
| duties: "Glavna zaduženja", | duties: "Glavna zaduženja", | ||||
| conditions: "Uslovi", | conditions: "Uslovi", | ||||
| offer: "Šta nudimo", | offer: "Šta nudimo", | ||||
| archivingAds:"Arhiviranje oglasa", | |||||
| archivingAdQuestion:"Da li ste sigurni da želite da arhivirate oglas?", | |||||
| archivingAds: "Arhiviranje oglasa", | |||||
| archivingAdQuestion: "Da li ste sigurni da želite da arhivirate oglas?", | |||||
| }, | }, | ||||
| // selection: { | // selection: { | ||||
| // title: "Tok Selekcije", | // title: "Tok Selekcije", | ||||
| tableView: "Tablični prikaz", | tableView: "Tablični prikaz", | ||||
| search: "Pretraga", | search: "Pretraga", | ||||
| position: "Pozicija", | position: "Pozicija", | ||||
| deleteCandidate:"Brisanje kandidata", | |||||
| deleteCandidateQuestion:"Da li ste sigurni da želite da obrišete kandidata?" | |||||
| deleteCandidate: "Brisanje kandidata", | |||||
| deleteCandidateQuestion: | |||||
| "Da li ste sigurni da želite da obrišete kandidata?", | |||||
| }, | }, | ||||
| dialogs: { | dialogs: { | ||||
| candidateName: "Ime kandidata", | candidateName: "Ime kandidata", | ||||
| interviewerName2: "Ime intervjuera", | interviewerName2: "Ime intervjuera", | ||||
| duration: "Trajanje", | duration: "Trajanje", | ||||
| appointment: "Termin", | appointment: "Termin", | ||||
| comment: "Vaš komentar (opciono)" | |||||
| }, | }, | ||||
| schedule: { | schedule: { | ||||
| items: "stavke", | items: "stavke", | ||||
| noInterviewer: "Proces nema intervjuera.", | noInterviewer: "Proces nema intervjuera.", | ||||
| title: "Tok selekcije", | title: "Tok selekcije", | ||||
| subtitle: "Svi kandidati", | subtitle: "Svi kandidati", | ||||
| addInterviewer:"Dodavanje intervjuera", | |||||
| selection:"Selekcija", | |||||
| changeInterviewer:"Promena intervjuera", | |||||
| addCandidate:"Dodavanje kandidata", | |||||
| interview:"HR intervju", | |||||
| filterDate:"Datum" | |||||
| addInterviewer: "Dodavanje intervjuera", | |||||
| selection: "Selekcija", | |||||
| changeInterviewer: "Promena intervjuera", | |||||
| addCandidate: "Dodavanje kandidata", | |||||
| interview: "HR intervju", | |||||
| filterDate: "Datum", | |||||
| }, | }, | ||||
| patterns: { | patterns: { | ||||
| made: "Napravljen", | made: "Napravljen", | ||||
| patternsMade: "Napravljeni Šabloni", | patternsMade: "Napravljeni Šabloni", | ||||
| noPatterns: "Trenutno nema dodatih sablona", | noPatterns: "Trenutno nema dodatih sablona", | ||||
| addPattern: "Dodaj Šablon", | addPattern: "Dodaj Šablon", | ||||
| editing2:"Režim uređivanja" | |||||
| editing2: "Režim uređivanja", | |||||
| titleFieldPlaceholder: "ex. Datum HR intervjua", | |||||
| addingPatternButton: "DODAJ ŠABLON", | |||||
| }, | }, | ||||
| stats: { | stats: { | ||||
| statistic: "Statistika", | statistic: "Statistika", | ||||
| contacted: "Broj kontaktiranih:", | contacted: "Broj kontaktiranih:", | ||||
| registered: "Prijavljeni po pozicijama", | registered: "Prijavljeni po pozicijama", | ||||
| }, | }, | ||||
| processStatus: { | |||||
| scheduled: "Zakazan", | |||||
| finished: "Odrađen", | |||||
| waitingAppointment: "Čeka na zakazivanje", | |||||
| unsuccesfully: "Neuspešno", | |||||
| waitingAnswer: "Čeka se odgovor", | |||||
| }, | |||||
| processes: { // Header naslovi procesa | |||||
| hr: "HR intervju", | |||||
| st: "Screening test", | |||||
| ti: "Tehnicki intervju", | |||||
| fd: "Konacna odluka", | |||||
| }, | |||||
| }; | }; |
| <label>{t("common.title")}</label> | <label>{t("common.title")}</label> | ||||
| <input | <input | ||||
| type="text" | type="text" | ||||
| placeholder="ex. Datum HR intervjua" | |||||
| placeholder={t("patterns.titleFieldPlaceholder")} | |||||
| onChange={(e) => setAddPatternTitle(e.target.value)} | onChange={(e) => setAddPatternTitle(e.target.value)} | ||||
| value={addPatternTitle} | value={addPatternTitle} | ||||
| /> | /> | ||||
| /> | /> | ||||
| </div> | </div> | ||||
| <div className="add-pattern-modal-form-control"> | <div className="add-pattern-modal-form-control"> | ||||
| <input type="submit" value="DODAJ ŠABLON" /> | |||||
| <input type="submit" value={t("patterns.addingPatternButton")} /> | |||||
| </div> | </div> | ||||
| </form> | </form> | ||||
| </CustomModal> | </CustomModal> |
| const [toggleInitModal, setToggleInitModal] = useState(false); | const [toggleInitModal, setToggleInitModal] = useState(false); | ||||
| // const errorMessage = useSelector(selectProcessesError); | // const errorMessage = useSelector(selectProcessesError); | ||||
| const process = useSelector(selectDoneProcess); | const process = useSelector(selectDoneProcess); | ||||
| const processes = useSelector(selectProcesses); | |||||
| const processes = useSelector(selectProcesses); | |||||
| // const doneErrorMessage = useSelector(selectDoneProcessError); | // const doneErrorMessage = useSelector(selectDoneProcessError); | ||||
| const { t } = useTranslation(); | const { t } = useTranslation(); | ||||
| const dispatch = useDispatch(); | const dispatch = useDispatch(); | ||||
| handleClose={handleToggleFiltersDrawer} | handleClose={handleToggleFiltersDrawer} | ||||
| statuses={statuses} | statuses={statuses} | ||||
| /> | /> | ||||
| <StatusDialog | |||||
| <StatusDialog // Adding an interviewer dialog | |||||
| open={activeProcess !== null} | open={activeProcess !== null} | ||||
| title={t("selection.addInterviewer")} | title={t("selection.addInterviewer")} | ||||
| subtitle={t("selection.selection")} | subtitle={t("selection.selection")} | ||||
| setActiveProcessUnsuccess(null); | setActiveProcessUnsuccess(null); | ||||
| }} | }} | ||||
| /> | /> | ||||
| <InterviewerDialog | |||||
| <InterviewerDialog // Change of interviewer dialog | |||||
| open={activeInterview !== null} | open={activeInterview !== null} | ||||
| title={t("selection.changeInterviewer")} | title={t("selection.changeInterviewer")} | ||||
| subtitle={t("selection.selection")} | subtitle={t("selection.selection")} | ||||
| setActiveInterview(null); | setActiveInterview(null); | ||||
| }} | }} | ||||
| /> | /> | ||||
| <InterviewDialog | |||||
| <InterviewDialog // Adding Candidate dialog | |||||
| open={toggleInitModal} | open={toggleInitModal} | ||||
| title={t("selection.addCandidate")} | title={t("selection.addCandidate")} | ||||
| subtitle={t("selection.interview")} | subtitle={t("selection.interview")} |