Set billable to false if hours are entere in brackets
This commit is contained in:
@@ -73,6 +73,8 @@ class App extends Component {
|
|||||||
project
|
project
|
||||||
) || head(project?.tasks)
|
) || head(project?.tasks)
|
||||||
|
|
||||||
|
const billable = /\(.+\)/.test(this.changeset.hours) === true ? false : !!task?.billable
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
remote_service: service?.name,
|
remote_service: service?.name,
|
||||||
remote_id: service?.id,
|
remote_id: service?.id,
|
||||||
@@ -80,7 +82,7 @@ class App extends Component {
|
|||||||
date: formatDate(new Date()),
|
date: formatDate(new Date()),
|
||||||
assignment_id: project?.value,
|
assignment_id: project?.value,
|
||||||
task_id: task?.value,
|
task_id: task?.value,
|
||||||
billable: task?.billable,
|
billable,
|
||||||
hours: "",
|
hours: "",
|
||||||
seconds:
|
seconds:
|
||||||
this.changeset.hours &&
|
this.changeset.hours &&
|
||||||
|
|||||||
Reference in New Issue
Block a user