Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jsdoc-example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Generate a JSDOC Html file with this example:

jsdoc /workspace/employer-web-client/src/js/components/applicant-card/ApplicantCard.jsx
127 changes: 127 additions & 0 deletions out/ApplicantCard.jsx.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: ApplicantCard.jsx</title>

<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

<h1 class="page-title">Source: ApplicantCard.jsx</h1>






<section>
<article>
<pre class="prettyprint source linenums"><code>import React from "react";
import PropTypes from 'prop-types';
import './style.scss';
import Avatar from '../avatar';
import Stars from '../stars';
import Theme from '../theme';
import AcceptReject from '../accept-reject';

/**
*
* @summary Creates an object for each employee with their information.
* @description It's automatically triggered by navigating to the "Applicants" page, and it loops through each listed employee.
* @since 08.30.22 by Paola Sanchez
* @author Alejandro Sanchez
* @see Theme from "../theme"
* @param {Object} props - Information object about one of the listed employees.
* @param {Object} props.postitions - List of all existing/available job positions
* @param {Object} props.employee - Basic information on the employee
* @returns A card that shows key facts about each looped employee.
*/

const ApplicantCard = (props) => {
const applicant = props.applicant.employee || props.applicant;
return (&lt;Theme.Consumer>
{({bar}) =>
(&lt;li className="aplicantcard"
onClick={() => bar.show({ slug: "show_single_applicant", data: props.applicant, title: "Application Details", allowLevels: true })}>
&lt;Avatar url={applicant.user.profile.picture} />
&lt;AcceptReject
onAccept={() => props.onAccept(props.shift.id, applicant)}
onReject={() => props.onReject(props.shift.id, applicant)}
/>
&lt;a href="#" className="shift-position">{applicant.user.first_name + " " + applicant.user.last_name}&lt;/a>
&lt;Stars rating={Number(applicant.rating)} />
&lt;/li>)}
&lt;/Theme.Consumer>);
};
ApplicantCard.propTypes = {
applicant: PropTypes.object.isRequired,
onAccept: PropTypes.func.isRequired,
onReject: PropTypes.func.isRequired,
shift: PropTypes.object.isRequired
};

export default ApplicantCard;


/*

export const ApplicantCard = (props) => {
return (&lt;Theme.Consumer>
{({bar}) =>
(&lt;li className="aplicantcard"
onClick={() => bar.show({ slug: "show_single_applicant", data: props.applicant, title: "Application Details", allowLevels: true })}
>
&lt;Avatar url={props.applicant.user.profile.picture} />
&lt;AcceptReject
onAccept={() => acceptCandidate(props.shift.id, props.applicant).then(() => props.onAccept ? props.onAccept() : null)}
onReject={() => rejectCandidate(props.shift.id, props.applicant).then(() => props.onReject ? props.onReject() : null)}
/>
&lt;a href="#" className="shift-position">{props.applicant.user.first_name + " " + props.applicant.user.last_name}&lt;/a>
&lt;Stars rating={Number(props.applicant.rating)} />
&lt;/li>)}
&lt;/Theme.Consumer>);
};
ApplicantCard.propTypes = {
applicant: PropTypes.object.isRequired,
onAccept: PropTypes.func,
onReject: PropTypes.func,
shift: PropTypes.object.isRequired
};
ApplicantCard.defaultProps = {
onAccept: null,
onReject: null
};

*/</code></pre>
</article>
</section>




</div>

<nav>
<h2><a href="index.html">Home</a></h2><h3>Global</h3><ul><li><a href="global.html#ApplicantCard">ApplicantCard</a></li></ul>
</nav>

<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Sep 06 2022 18:44:36 GMT+0000 (Coordinated Universal Time)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
Loading