Filter unpaid, unapproved and filled jobs
Fix missing key in react array
This commit is contained in:
@ -32,6 +32,7 @@ export default React.createClass({
|
|||||||
return (
|
return (
|
||||||
<ListGroupItem
|
<ListGroupItem
|
||||||
className={ className }
|
className={ className }
|
||||||
|
key={ id }
|
||||||
onClick={ () => handleClick(id) }>
|
onClick={ () => handleClick(id) }>
|
||||||
<div>
|
<div>
|
||||||
<h4 style={{ display: 'inline-block' }}>
|
<h4 style={{ display: 'inline-block' }}>
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
const whereFilt = {
|
||||||
|
where: {
|
||||||
|
isFilled: false,
|
||||||
|
isPaid: true,
|
||||||
|
isApproved: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export default function getJobServices(app) {
|
export default function getJobServices(app) {
|
||||||
const { Job } = app.models;
|
const { Job } = app.models;
|
||||||
|
|
||||||
@ -16,7 +24,7 @@ export default function getJobServices(app) {
|
|||||||
if (id) {
|
if (id) {
|
||||||
return Job.findById(id, cb);
|
return Job.findById(id, cb);
|
||||||
}
|
}
|
||||||
Job.find({}, (err, jobs) => {
|
Job.find(whereFilt, (err, jobs) => {
|
||||||
cb(err, jobs);
|
cb(err, jobs);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user