Filter unpaid, unapproved and filled jobs

Fix missing key in react array
This commit is contained in:
Berkeley Martinez
2015-10-15 23:43:24 -07:00
parent c3776175a3
commit ede8da38ba
2 changed files with 10 additions and 1 deletions

View File

@ -32,6 +32,7 @@ export default React.createClass({
return (
<ListGroupItem
className={ className }
key={ id }
onClick={ () => handleClick(id) }>
<div>
<h4 style={{ display: 'inline-block' }}>

View File

@ -1,3 +1,11 @@
const whereFilt = {
where: {
isFilled: false,
isPaid: true,
isApproved: true
}
};
export default function getJobServices(app) {
const { Job } = app.models;
@ -16,7 +24,7 @@ export default function getJobServices(app) {
if (id) {
return Job.findById(id, cb);
}
Job.find({}, (err, jobs) => {
Job.find(whereFilt, (err, jobs) => {
cb(err, jobs);
});
}