billable timesheets, inactive projects report, bookmark export search (#2503)
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\Timesheet;
|
||||
use App\Form\Type\BillableType;
|
||||
use App\Form\Type\DateTimePickerType;
|
||||
use App\Form\Type\DescriptionType;
|
||||
use App\Form\Type\DurationType;
|
||||
@@ -128,6 +129,7 @@ class TimesheetEditForm extends AbstractType
|
||||
$builder->add('metaFields', MetaFieldsCollectionType::class);
|
||||
|
||||
$this->addExported($builder, $options);
|
||||
$this->addBillable($builder, $options);
|
||||
}
|
||||
|
||||
protected function showCustomer(array $options, bool $isNew, int $customerCount): bool
|
||||
@@ -264,6 +266,15 @@ class TimesheetEditForm extends AbstractType
|
||||
]);
|
||||
}
|
||||
|
||||
protected function addBillable(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
if (!$options['include_billable']) {
|
||||
return;
|
||||
}
|
||||
|
||||
$builder->add('billable', BillableType::class, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -276,6 +287,7 @@ class TimesheetEditForm extends AbstractType
|
||||
'csrf_token_id' => 'timesheet_edit',
|
||||
'include_user' => false,
|
||||
'include_exported' => false,
|
||||
'include_billable' => true,
|
||||
'include_rate' => true,
|
||||
'docu_chapter' => 'timesheet.html',
|
||||
'method' => 'POST',
|
||||
|
||||
Reference in New Issue
Block a user