Pass timed activity to App

This commit is contained in:
manubo
2019-09-19 17:37:56 +02:00
parent 1403875207
commit 6b89191d3f
5 changed files with 66 additions and 37 deletions

View File

@@ -6,8 +6,14 @@ import cn from "classnames"
class Form extends Component {
static propTypes = {
changeset: PropTypes.shape({
project: PropTypes.object,
task: PropTypes.object,
assignment_id: PropTypes.number.isRequired,
billable: PropTypes.bool.isRequired,
date: PropTypes.string.isRequired,
task_id: PropTypes.number.isRequired,
remote_id: PropTypes.string,
remote_service: PropTypes.string,
remote_url: PropTypes.string,
seconds: PropTypes.number,
hours: PropTypes.string,
}).isRequired,
errors: PropTypes.object,
@@ -35,7 +41,7 @@ class Form extends Component {
}
render() {
const { projects, changeset, errors, onChange, onSubmit } = this.props
const { projects, changeset, timedActivity, errors, onChange, onSubmit } = this.props
const project = Select.findOptionByValue(projects, changeset.assignment_id)
return (