Set billable to false if hours are entere in brackets

This commit is contained in:
Manuel Bouza
2019-04-04 16:21:49 +02:00
parent e582f99a94
commit 0d1b244075

View File

@@ -73,6 +73,8 @@ class App extends Component {
project
) || head(project?.tasks)
const billable = /\(.+\)/.test(this.changeset.hours) === true ? false : !!task?.billable
const defaults = {
remote_service: service?.name,
remote_id: service?.id,
@@ -80,7 +82,7 @@ class App extends Component {
date: formatDate(new Date()),
assignment_id: project?.value,
task_id: task?.value,
billable: task?.billable,
billable,
hours: "",
seconds:
this.changeset.hours &&