Release 2.0.2 (#3856)

* allow to overwrite global spreadsheet styles
* bump version
* fix deprecations in vcard download
* bump composer packages
* added help page for all registered locales
* fix menu id's, cleanup times route, fix configurable homepage redirect
* format duration without leading zero in hours (unify javascript with php behavior)
* fix active records in all screen sizes
* improved responsiveness in XS
* fixed invoice number for customer null fields
* fix javascript respects multiple recent-activity dropdowns
* show recent activities on small screens
* fix user-profile layout column in XS
* fix search is always marked as active
This commit is contained in:
Kevin Papst
2023-02-21 19:21:49 +01:00
committed by GitHub
parent e474087257
commit 25469113fd
61 changed files with 821 additions and 580 deletions

View File

@@ -11,7 +11,6 @@ namespace App\EventSubscriber;
use App\Entity\User;
use App\Event\ConfigureMainMenuEvent;
use App\Utils\MenuItemModel;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -30,38 +29,25 @@ final class MenuFavoritesSubscriber implements EventSubscriberInterface
public function onMainMenuConfigure(ConfigureMainMenuEvent $menuEvent): void
{
/** @var User $user */
/** @var User|null $user */
$user = $this->security->getUser();
if (null === $user) {
return;
}
$favMenu = $menuEvent->getMenu()->findChild('favorites');
if ($favMenu === null) {
return;
}
$userFavorites = $user->getPreferenceValue('favorite_routes');
if (!\is_string($userFavorites) || trim($userFavorites) === '') {
return;
}
$root = new MenuItemModel('', '');
$root->addChild($menuEvent->getMenu());
if ($menuEvent->getAppsMenu()->hasChildren()) {
$root->addChild($menuEvent->getAppsMenu());
}
if ($menuEvent->getAdminMenu()->hasChildren()) {
$root->addChild($menuEvent->getAdminMenu());
}
if ($menuEvent->getSystemMenu()->hasChildren()) {
$root->addChild($menuEvent->getSystemMenu());
$favMenu = $menuEvent->findById('favorites');
if ($favMenu === null) {
return;
}
$userFavorites = explode(',', $userFavorites);
foreach ($userFavorites as $fav) {
$tmp = $root->findChild($fav);
$tmp = $menuEvent->findById($fav);
if ($tmp !== null && !$tmp->hasChildren()) {
$favMenu->addChild(clone $tmp);
}

View File

@@ -50,11 +50,11 @@ final class MenuSubscriber implements EventSubscriberInterface
$menu->addChild(new MenuItemModel('favorites', 'favorite_routes', null, [], 'bookmarked'));
// ------------------- timesheet menu -------------------
$times = new MenuItemModel('timesheet', 'time_tracking', null, [], 'timesheet');
$times = new MenuItemModel('times', 'time_tracking', null, [], 'timesheet');
if ($auth->isGranted('view_own_timesheet')) {
$timesheets = new MenuItemModel('times', 'my_times', 'timesheet', [], 'timesheet');
$timesheets->setChildRoutes(['times', 'timesheet_export', 'timesheet_edit', 'timesheet_create', 'timesheet_multi_update']);
$timesheets = new MenuItemModel('timesheet', 'my_times', 'timesheet', [], 'timesheet');
$timesheets->setChildRoutes(['timesheet_export', 'timesheet_edit', 'timesheet_create', 'timesheet_multi_update']);
$times->addChild($timesheets);
if ($auth->isGranted('quick-entry')) {
@@ -93,14 +93,15 @@ final class MenuSubscriber implements EventSubscriberInterface
$menu->addChild($reporting);
}
$invoice = new MenuItemModel('invoice', 'invoices', null, [], 'invoice');
// ------------------- invoice menu -------------------
$invoice = new MenuItemModel('invoices', 'invoices', null, [], 'invoice');
if ($auth->isGranted('create_invoice')) {
$invoice->addChild(new MenuItemModel('invoice', 'invoice_form.title', 'invoice', [], 'invoice'));
}
if ($auth->isGranted('view_invoice')) {
$tmpMenu = new MenuItemModel('invoice-listing', 'all_invoices', 'admin_invoice_list', [], 'list');
$tmpMenu = new MenuItemModel('invoice_listing', 'all_invoices', 'admin_invoice_list', [], 'list');
$tmpMenu->setChildRoutes(['admin_invoice_edit']);
$invoice->addChild($tmpMenu);
}

View File

@@ -19,9 +19,9 @@ use App\Form\Type\CalendarViewType;
use App\Form\Type\FavoriteMenuType;
use App\Form\Type\FirstWeekDayType;
use App\Form\Type\InitialViewType;
use App\Form\Type\LanguageType;
use App\Form\Type\SkinType;
use App\Form\Type\TimezoneType;
use App\Form\Type\UserLanguageType;
use App\Form\Type\YesNoType;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -87,7 +87,7 @@ final class UserPreferenceSubscriber implements EventSubscriberInterface
(new UserPreference(UserPreference::LOCALE, $this->systemConfiguration->getUserDefaultLanguage()))
->setOrder(250)
->setSection('locale')
->setType(LanguageType::class),
->setType(UserLanguageType::class),
(new UserPreference(UserPreference::FIRST_WEEKDAY, User::DEFAULT_FIRST_WEEKDAY))
->setOrder(300)
@@ -118,7 +118,7 @@ final class UserPreferenceSubscriber implements EventSubscriberInterface
->setOrder(710)
->setSection('behaviour')
->setOptions(['required' => false])
->addConstraint(new Length(['max' => 75]))
->addConstraint(new Length(['max' => 150]))
->setType(FavoriteMenuType::class),
(new UserPreference('daily_stats', false))