Untitled
unknown
plain_text
4 years ago
2.4 kB
10
Indexable
import React from 'react';
import { Link } from 'react-router-dom';
import Event from '../../../../candidates/view-candidate/CandidateInfo/components/event/Event';
import PropTypes from 'prop-types';
import { domain } from '../../../../../../constants/config';
import AppRoutes from '../../../../../../constants/routes';
const DashboardEvent = props => {
const { event, hasPermission, editEvent } = props;
return (
<div className="candidate-event-container">
<div className="can-dash-wrapper">
<div className="candidate-h">
<div className="can-dash-pic-wrapper">
<img
src={
event.candidate && event.candidate.picture
? `${domain}images/${event.candidate.picture.path}`
: '/assets/img/profile-placeholder.png'
}
alt=""
className="can-dash-image"
/>
</div>
<div className="candidate-event-info">
<p>
<Link
to={`${AppRoutes.overviewCandidate.path}/${event.candidate.id}?event=${event.id}&title=${event.candidate.name}`}
>
{event.candidate ? event.candidate.name : ''}
</Link>
</p>
<p>
<Link
to={`${AppRoutes.job.path}/${event.job.id}${AppRoutes.jobView.path}`}
>
{event.job ? event.job.title : ''}
</Link>
</p>
</div>
</div>
</div>
<Event scheduledEvent={event} hasPermission={hasPermission} editEvent={editEvent} />
</div>
);
};
DashboardEvent.propTypes = {
hasPermission: PropTypes.bool.isRequired,
event: PropTypes.object.isRequired,
history: PropTypes.object.isRequired,
editEvent: PropTypes.func.isRequired,
};
export default DashboardEvent;
Editor is loading...