diff --git a/app/Model/Settings/Settings.php b/app/Model/Settings/Settings.php index 506276ec4..d5ffb6f82 100644 --- a/app/Model/Settings/Settings.php +++ b/app/Model/Settings/Settings.php @@ -99,11 +99,6 @@ class Settings */ public const ACCOUNTANT = 'accountant'; - /** - * Místo vystavení dokladu. - */ - public const PRINT_LOCATION = 'print_location'; - /** * Číslo účtu. */ diff --git a/app/WebModule/Presenters/ProfilePresenter.php b/app/WebModule/Presenters/ProfilePresenter.php index 2fd9a53ef..477d83c16 100644 --- a/app/WebModule/Presenters/ProfilePresenter.php +++ b/app/WebModule/Presenters/ProfilePresenter.php @@ -6,6 +6,7 @@ use App\Model\Enums\PaymentType; use App\Model\Settings\Exceptions\SettingsItemNotFoundException; +use App\Model\Settings\Queries\SettingDateTimeValueQuery; use App\Model\Settings\Queries\SettingStringValueQuery; use App\Model\Settings\Settings; use App\Model\Structure\Repositories\SubeventRepository; @@ -84,6 +85,7 @@ public function renderDefault(): void $this->template->isAllowedEditCustomInputs = $this->applicationService->isAllowedEditCustomInputs(); $this->template->userPrograms = $this->queryBus->handle(new UserAttendsProgramsQuery($this->dbUser)); $this->template->accountNumber = $this->queryBus->handle(new SettingStringValueQuery(Settings::ACCOUNT_NUMBER)); + $this->template->ticketsActive = $this->queryBus->handle(new SettingDateTimeValueQuery(Settings::TICKETS_FROM)) !== null; } /** diff --git a/app/WebModule/Presenters/templates/Profile/default.latte b/app/WebModule/Presenters/templates/Profile/default.latte index 1e42d488f..63ccdd49a 100644 --- a/app/WebModule/Presenters/templates/Profile/default.latte +++ b/app/WebModule/Presenters/templates/Profile/default.latte @@ -53,8 +53,10 @@ - {_web.profile.seminar.ticket.heading} - {control ticket} + {if $ticketsActive} + {_web.profile.seminar.ticket.heading} + {control ticket} + {/if}