Release 2.6.0 (#4472)

- Added: calendar entry title combination for customer, project and activity
- Added: show not_invoiced and not_exported data in detail screens
- Added: force logout if user is disabled
- Added: reduced amount of database queries on several screens
- Fixed: open-close status on work-contract screen for users without configuration
- Fixed: failsafe order/orderBy in query if manually manipulated to be null
- Fixed: unify statistic calculation (not_invoiced and not_exported) across screens
- Tech: bump packages
- Tech: Symfony 6.4
This commit is contained in:
Kevin Papst
2023-12-17 16:19:50 +01:00
committed by GitHub
parent af82fd040d
commit 5f4b6d3cfa
77 changed files with 1362 additions and 1242 deletions

View File

@@ -33,6 +33,8 @@ use App\Repository\CustomerRepository;
use App\Repository\ProjectRepository;
use App\Repository\Query\CustomerQuery;
use App\Repository\Query\ProjectQuery;
use App\Repository\Query\TeamQuery;
use App\Repository\Query\TimesheetQuery;
use App\Repository\TeamRepository;
use App\Utils\DataTable;
use App\Utils\PageSetup;
@@ -307,6 +309,15 @@ final class CustomerController extends AbstractController
$rates = [];
$now = $this->getDateTimeFactory()->createDateTime();
$exportUrl = null;
$invoiceUrl = null;
if ($this->isGranted('create_export')) {
$exportUrl = $this->generateUrl('export', ['customers[]' => $customer->getId(), 'projects[]' => '', 'daterange' => '', 'exported' => TimesheetQuery::STATE_NOT_EXPORTED, 'preview' => true, 'billable' => true]);
}
if ($this->isGranted('view_invoice')) {
$invoiceUrl = $this->generateUrl('invoice', ['customers[]' => $customer->getId(), 'projects[]' => '', 'daterange' => '', 'exported' => TimesheetQuery::STATE_NOT_EXPORTED, 'billable' => true]);
}
if ($this->isGranted('edit', $customer)) {
if ($this->isGranted('create_team')) {
$defaultTeam = $teamRepository->findOneBy(['name' => $customer->getName()]);
@@ -328,7 +339,9 @@ final class CustomerController extends AbstractController
}
if ($this->isGranted('permissions', $customer) || $this->isGranted('details', $customer) || $this->isGranted('view_team')) {
$teams = $customer->getTeams();
$query = new TeamQuery();
$query->addCustomer($customer);
$teams = $teamRepository->getTeamsForQuery($query);
}
// additional boxes by plugins
@@ -353,7 +366,9 @@ final class CustomerController extends AbstractController
'customer_now' => new \DateTime('now', $timezone),
'rates' => $rates,
'now' => $now,
'boxes' => $boxes
'boxes' => $boxes,
'export_url' => $exportUrl,
'invoice_url' => $invoiceUrl,
]);
}