Release 1.19.4 (#3255)

* login redirects to homepage if already being logged-in
* fix budget check for entries that were moved to another moth
* invoice: fix amount should be decimal if decimal template is used
* added new month grouped by project/activity/user report
This commit is contained in:
Kevin Papst
2022-04-18 12:41:45 +02:00
committed by GitHub
parent a179719c3e
commit bc908b4534
20 changed files with 729 additions and 56 deletions

View File

@@ -0,0 +1,16 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Reporting\CustomerMonthlyProjects;
use App\Reporting\AbstractUserList;
final class CustomerMonthlyProjects extends AbstractUserList
{
}

View File

@@ -0,0 +1,46 @@
<?php
/*
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Reporting\CustomerMonthlyProjects;
use App\Form\Type\MonthPickerType;
use App\Form\Type\ReportSumType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CustomerMonthlyProjectsForm extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('date', MonthPickerType::class, [
'model_timezone' => $options['timezone'],
'view_timezone' => $options['timezone'],
'start_date' => $options['start_date'],
]);
$builder->add('sumType', ReportSumType::class);
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => CustomerMonthlyProjects::class,
'timezone' => date_default_timezone_get(),
'start_date' => new \DateTime(),
'csrf_protection' => false,
'method' => 'GET',
]);
}
}

View File

@@ -60,6 +60,9 @@ final class ReportingService
$event->addReport(new Report('daterange_projects', 'report_project_daterange', 'report_project_daterange', 'project'));
$event->addReport(new Report('inactive_projects', 'report_project_inactive', 'report_inactive_project', 'project'));
}
if ($this->security->isGranted('view_other_reporting') && $this->security->isGranted('view_other_timesheet')) {
$event->addReport(new Report('report_customer_monthly_projects', 'report_customer_monthly_projects', 'report_customer_monthly_projects', 'customer'));
}
$this->dispatcher->dispatch($event);
}