| @@ -34,8 +34,9 @@ const CommentProcessDialog = ({ | |||
| fullWidth, | |||
| responsive, | |||
| }) => { | |||
| const { activeProcessUnsuccess, setActiveProcessUnsuccess } = useContext(SelectionContext); | |||
| const {t} = useTranslation() | |||
| const { activeProcessUnsuccess, setActiveProcessUnsuccess } = | |||
| useContext(SelectionContext); | |||
| const { t } = useTranslation(); | |||
| const theme = useTheme(); | |||
| const fullScreen = useMediaQuery(theme.breakpoints.down("md")); | |||
| @@ -139,7 +140,16 @@ const CommentProcessDialog = ({ | |||
| </DialogTitle> | |||
| <DialogContent> | |||
| <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 | |||
| onInit={(evt, editor) => (editorContent.current = editor)} | |||
| style={{ height: "20px" }} | |||
| @@ -22,7 +22,10 @@ const DayComponent = ({ numberOfDay, nameOfDay, interviews, onClick }) => { | |||
| {formatTimeSrb(interview.date)} | |||
| </p> | |||
| <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> | |||
| </div> | |||
| ))} | |||
| @@ -118,7 +118,10 @@ const DayDetailsComponent = ({ | |||
| }} | |||
| > | |||
| <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 | |||
| className="day-details-applicant" | |||
| @@ -89,7 +89,12 @@ const Selection = (props) => { | |||
| onDrop={(e) => dropItem(e, props.selection.id)} | |||
| > | |||
| <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 ? ( | |||
| <IconButton | |||
| sx={{ marginRight: "35px" }} | |||
| @@ -17,14 +17,21 @@ import { | |||
| import { useTranslation } from "react-i18next"; | |||
| // 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 [showForm, setShowForm] = useState(false); | |||
| const [selected, setSelected] = useState(props.item.status); | |||
| 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 { | |||
| setActiveProcess, | |||
| setActiveInterview, | |||
| @@ -46,14 +53,14 @@ const SelectionCard = (props) => { | |||
| const select = (e) => { | |||
| e.stopPropagation(); | |||
| if (e.target.value === "Zakazan") { | |||
| if (e.target.value === t("processStatus.scheduled")) { // Izmena - "Zakazan" | |||
| // setovanje context state-a | |||
| setActiveProcess({ process: props.item, status: "Zakazan" }); | |||
| } | |||
| // 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); | |||
| } 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 | |||
| // u suprotnom samo promeniti status u odradjeno | |||
| if (props.item.selectionLevelId !== 4) | |||
| @@ -104,7 +111,7 @@ const SelectionCard = (props) => { | |||
| <div | |||
| className={`sel-item-inner ${props.item.scheduler && "withScheduler"}`} | |||
| > | |||
| {showForm ? ( | |||
| {showForm ? ( // Prikaz select menija i odabir zeljenog statusa | |||
| <form data-testid="status-select"> | |||
| <FormControl> | |||
| <InputLabel id="demo-simple-select-label">Status</InputLabel> | |||
| @@ -122,7 +129,7 @@ const SelectionCard = (props) => { | |||
| paddingRight: "5px", | |||
| }} | |||
| > | |||
| {options.map((n, index) => ( | |||
| {options.map((n, index) => ( // Ispis statusnih opcija! | |||
| <MenuItem key={index} sx={{ textAlign: "left" }} value={n}> | |||
| {n} | |||
| </MenuItem> | |||
| @@ -141,7 +148,10 @@ const SelectionCard = (props) => { | |||
| data-testid="status-btn" | |||
| 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> | |||
| </div> | |||
| )} | |||
| @@ -245,6 +245,7 @@ export default { | |||
| interviewerName2: "Interviewer's name", | |||
| duration: "Duration", | |||
| appointment: "Appointment", | |||
| comment: "Your comment (optional)" | |||
| }, | |||
| schedule: { | |||
| items: "items", | |||
| @@ -275,7 +276,9 @@ export default { | |||
| patternsMade:"Patterns made", | |||
| noPatterns:"There are currently no patterns added", | |||
| addPattern:"Add pattern", | |||
| editing2:"Editing mode" | |||
| editing2:"Editing mode", | |||
| titleFieldPlaceholder: "ex. Date of HR interview", | |||
| addingPatternButton: "ADD PATTERN", | |||
| }, | |||
| stats:{ | |||
| statistic:"Statistic", | |||
| @@ -284,5 +287,18 @@ export default { | |||
| number:"Number", | |||
| contacted:"Number of contacted:", | |||
| 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", | |||
| }, | |||
| }; | |||
| @@ -140,7 +140,7 @@ export default { | |||
| nav: { | |||
| navigation: "Navigacija", | |||
| ads: "Oglasi", | |||
| jobs: "Oglasi", | |||
| selectionFlow: "Tok Selekcije", | |||
| candidates: "Kandidati", | |||
| schedule: "Planer", | |||
| @@ -182,8 +182,8 @@ export default { | |||
| duties: "Glavna zaduženja", | |||
| conditions: "Uslovi", | |||
| 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: { | |||
| // title: "Tok Selekcije", | |||
| @@ -273,8 +273,9 @@ export default { | |||
| tableView: "Tablični prikaz", | |||
| search: "Pretraga", | |||
| 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: { | |||
| candidateName: "Ime kandidata", | |||
| @@ -282,6 +283,7 @@ export default { | |||
| interviewerName2: "Ime intervjuera", | |||
| duration: "Trajanje", | |||
| appointment: "Termin", | |||
| comment: "Vaš komentar (opciono)" | |||
| }, | |||
| schedule: { | |||
| items: "stavke", | |||
| @@ -295,12 +297,12 @@ export default { | |||
| noInterviewer: "Proces nema intervjuera.", | |||
| title: "Tok selekcije", | |||
| 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: { | |||
| made: "Napravljen", | |||
| @@ -312,7 +314,9 @@ export default { | |||
| patternsMade: "Napravljeni Šabloni", | |||
| noPatterns: "Trenutno nema dodatih sablona", | |||
| addPattern: "Dodaj Šablon", | |||
| editing2:"Režim uređivanja" | |||
| editing2: "Režim uređivanja", | |||
| titleFieldPlaceholder: "ex. Datum HR intervjua", | |||
| addingPatternButton: "DODAJ ŠABLON", | |||
| }, | |||
| stats: { | |||
| statistic: "Statistika", | |||
| @@ -322,4 +326,17 @@ export default { | |||
| contacted: "Broj kontaktiranih:", | |||
| 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", | |||
| }, | |||
| }; | |||
| @@ -169,7 +169,7 @@ const PatternsPage = ({ history }) => { | |||
| <label>{t("common.title")}</label> | |||
| <input | |||
| type="text" | |||
| placeholder="ex. Datum HR intervjua" | |||
| placeholder={t("patterns.titleFieldPlaceholder")} | |||
| onChange={(e) => setAddPatternTitle(e.target.value)} | |||
| value={addPatternTitle} | |||
| /> | |||
| @@ -197,7 +197,7 @@ const PatternsPage = ({ history }) => { | |||
| /> | |||
| </div> | |||
| <div className="add-pattern-modal-form-control"> | |||
| <input type="submit" value="DODAJ ŠABLON" /> | |||
| <input type="submit" value={t("patterns.addingPatternButton")} /> | |||
| </div> | |||
| </form> | |||
| </CustomModal> | |||
| @@ -34,7 +34,7 @@ const SelectionProcessPage = ({ history }) => { | |||
| const [toggleInitModal, setToggleInitModal] = useState(false); | |||
| // const errorMessage = useSelector(selectProcessesError); | |||
| const process = useSelector(selectDoneProcess); | |||
| const processes = useSelector(selectProcesses); | |||
| const processes = useSelector(selectProcesses); | |||
| // const doneErrorMessage = useSelector(selectDoneProcessError); | |||
| const { t } = useTranslation(); | |||
| const dispatch = useDispatch(); | |||
| @@ -117,7 +117,7 @@ const SelectionProcessPage = ({ history }) => { | |||
| handleClose={handleToggleFiltersDrawer} | |||
| statuses={statuses} | |||
| /> | |||
| <StatusDialog | |||
| <StatusDialog // Adding an interviewer dialog | |||
| open={activeProcess !== null} | |||
| title={t("selection.addInterviewer")} | |||
| subtitle={t("selection.selection")} | |||
| @@ -135,7 +135,7 @@ const SelectionProcessPage = ({ history }) => { | |||
| setActiveProcessUnsuccess(null); | |||
| }} | |||
| /> | |||
| <InterviewerDialog | |||
| <InterviewerDialog // Change of interviewer dialog | |||
| open={activeInterview !== null} | |||
| title={t("selection.changeInterviewer")} | |||
| subtitle={t("selection.selection")} | |||
| @@ -144,7 +144,7 @@ const SelectionProcessPage = ({ history }) => { | |||
| setActiveInterview(null); | |||
| }} | |||
| /> | |||
| <InterviewDialog | |||
| <InterviewDialog // Adding Candidate dialog | |||
| open={toggleInitModal} | |||
| title={t("selection.addCandidate")} | |||
| subtitle={t("selection.interview")} | |||