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 (
|
||||
<ListGroupItem
|
||||
className={ className }
|
||||
key={ id }
|
||||
onClick={ () => handleClick(id) }>
|
||||
<div>
|
||||
<h4 style={{ display: 'inline-block' }}>
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user