Browse Source

Merge branch 'feature/1809_Day_component_UI' of Neca/HRCenter into FE_dev

pull/74/head
safet.purkovic 3 years ago
parent
commit
9d984c6ca2

+ 4
- 1
src/AppRoutes.js View File

@@ -16,7 +16,8 @@ import {
USER_DETAILS_PAGE,
CANDIDATES_DETAILS_PAGE,
SELECTION_PROCESS_PAGE,
SELECTION_PROCESS_OF_APPLICANT_PAGE
SELECTION_PROCESS_OF_APPLICANT_PAGE,
SCHEDULE_PAGE
} from "./constants/pages";

// import LoginPage from './pages/LoginPage/LoginPage';
@@ -38,6 +39,7 @@ import UserDetails from "./pages/UsersPage/UserDetails";
import CandidateDetailsPage from "./pages/CandidatesPage/CandidateDetailsPage";
import SelectionProcessPage from "./pages/SelectionProcessPage/SelectionProcessPage";
import SelectionProcessOfApplicantPage from "./pages/SelectionProcessPage/SelectionProcessOfApplicantPage";
import SchedulePage from "./pages/SchedulePage/SchedulePage";

const AppRoutes = () => (
<Switch>
@@ -60,6 +62,7 @@ const AppRoutes = () => (
<PrivateRoute exact path={CANDIDATES_DETAILS_PAGE} component={CandidateDetailsPage} />
<PrivateRoute exact path={SELECTION_PROCESS_PAGE} component={SelectionProcessPage} />
<PrivateRoute exact path={SELECTION_PROCESS_OF_APPLICANT_PAGE} component={SelectionProcessOfApplicantPage} />
<PrivateRoute exact path={SCHEDULE_PAGE} component={SchedulePage} />
<Redirect from="*" to={NOT_FOUND_PAGE} />
</Switch>
);

+ 89
- 0
src/assets/styles/components/_day-component.scss View File

@@ -0,0 +1,89 @@
.day-component-container {
display: flex;
flex-direction: column;
height: 143px;
width: 174px;
border: 1px solid #f4f4f4;
padding: 17px;
}

.day-component-container:hover {
height: 151px;
width: 184px;
left: 489px;
top: 244px;
border-radius: 12px;
background: linear-gradient(0deg, #e8f7ff, #e8f7ff),
linear-gradient(0deg, #226cb0, #226cb0);
border: 1px solid #226cb0;
}
.day-component-day-informations-container {
display: flex;
height: fit-content;
margin-bottom: 5px;
}

.day-component-day-number {
//styleName: Bold Paragraph;
font-family: Source Sans Pro;
font-size: 16px;
font-weight: 600;
line-height: 20px;
letter-spacing: 0em;
text-align: left;
color: linear-gradient(0deg, #353535, #353535),
linear-gradient(0deg, #272727, #272727);
}

.day-component-day-name {
//styleName: Small paragraph;
font-family: Source Sans Pro;
font-size: 12px;
font-weight: 400;
line-height: 15px;
letter-spacing: 0em;
text-align: left;
align-self: flex-end;
margin-left: 3px;
}

.day-component-interviews-container {
display: flex;
}

.day-component-interviews-time {
font-family: Source Sans Pro;
font-size: 12px;
font-weight: 400;
line-height: 15px;
letter-spacing: 0em;
text-align: left;
align-self: flex-end;
}

.day-component-interviews-name {
font-family: Source Sans Pro;
font-size: 16px;
font-weight: 600;
line-height: 20px;
letter-spacing: 0em;
text-align: left;
color: #353535;
margin-left: 3px;
}

.day-component-more {
height: 15px;
width: fit-content;
font-family: Source Sans Pro;
font-size: 12px;
font-weight: 400;
line-height: 15px;
letter-spacing: 0em;
text-align: left;
color: #226CB0;
font-style: normal;
text-decoration-line: underline;
cursor: pointer;
margin-top: 21px;
}

+ 3
- 0
src/assets/styles/components/_schedulePage.scss View File

@@ -0,0 +1,3 @@
.schedule-page-container{
display: flex;
}

+ 1
- 1
src/components/MUI/NavbarComponent.js View File

@@ -39,7 +39,7 @@ const NavbarComponent = () => {
"ads",
"selectionFlow",
"candidates",
"planer",
"schedule",
"patterns",
"stats",
"users",

+ 37
- 0
src/components/Schedules/DayComponent.js View File

@@ -0,0 +1,37 @@
import React from "react";
import PropTypes from "prop-types";

const DayComponent = ({ numberOfDay, nameOfDay, interviews }) => {
const interviewsToShow = interviews.slice(0, 2);
return (
<div className="day-component-container">
<div className="day-component-day-informations-container">
<p className="day-component-day-number">{numberOfDay}</p>
<p className="day-component-day-name">{nameOfDay}</p>
</div>
{interviewsToShow.map((interview, index) => (
<div
key={index}
className="day-component-interviews-container"
style={{ marginTop: "4px" }}
>
<p className="day-component-interviews-time">{interview.time}</p>
<p className="day-component-interviews-name">{interview.type}</p>
</div>
))}
{interviews.length > 2 && (
<span className="day-component-more">
+{interviews.length - 2} stavke
</span>
)}
</div>
);
};

DayComponent.propTypes = {
numberOfDay: PropTypes.number,
nameOfDay: PropTypes.string,
interviews: PropTypes.array,
};

export default DayComponent;

+ 1
- 0
src/constants/pages.js View File

@@ -13,3 +13,4 @@ export const FORGOT_PASSWORD_CONFIRMATION_PAGE = '/forgot-password-confirmation'
export const RESET_PASSWORD_PAGE = '/reset-password';
export const SELECTION_PROCESS_PAGE = '/selectionFlow';
export const SELECTION_PROCESS_OF_APPLICANT_PAGE = '/selectionflow/:id';
export const SCHEDULE_PAGE = '/schedule'

+ 1
- 1
src/i18n/resources/rs.js View File

@@ -115,7 +115,7 @@ export default {
ads: 'Oglasi',
selectionFlow: 'Tok Selekcije',
candidates: 'Kandidati',
planer: 'Planer',
schedule: 'Planer',
patterns: 'Šabloni',
stats: 'Statistika',
users: 'Korisnici',

+ 1
- 0
src/main.scss View File

@@ -26,6 +26,7 @@
@import './assets/styles/components/rules';
@import './assets/styles/components/nav';
@import './assets/styles/components/ads';
@import './assets/styles/components/day-component';
@import './assets/styles/layout';
@import './assets/styles/overwrite';
@import './assets/styles/utility';

+ 17
- 0
src/pages/SchedulePage/SchedulePage.js View File

@@ -0,0 +1,17 @@
import React from "react";
import DayComponent from "../../components/Schedules/DayComponent";

const SchedulePage = () => {
const interviews = [
{ time: "13:30", type: "HR intervju" },
{ time: "14:30", type: "Screening test" },
{ time: "15:30", type: "HR intervju" },
];
return (
<div className="schedule-page-container">
<DayComponent numberOfDay={1} nameOfDay="sre" interviews={interviews} />
</div>
);
};

export default SchedulePage;

Loading…
Cancel
Save