billable timesheets, inactive projects report, bookmark export search (#2503)

This commit is contained in:
Kevin Papst
2021-04-18 21:51:27 +02:00
committed by GitHub
parent 8664d94ea6
commit 0330f45c6a
97 changed files with 1516 additions and 664 deletions

View File

@@ -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',