|
|
|
@ -4,6 +4,7 @@ use Carbon\Carbon;
|
|
|
|
|
use Engelsystem\Models\Room;
|
|
|
|
|
use Engelsystem\Models\User\User;
|
|
|
|
|
use Engelsystem\Models\Worklog;
|
|
|
|
|
use Engelsystem\Renderer\Renderer;
|
|
|
|
|
use Illuminate\Support\Collection;
|
|
|
|
|
use Illuminate\Support\Str;
|
|
|
|
|
|
|
|
|
@ -37,18 +38,16 @@ function User_settings_view(
|
|
|
|
|
$enable_dect = config('enable_dect');
|
|
|
|
|
$enable_planned_arrival = config('enable_planned_arrival');
|
|
|
|
|
|
|
|
|
|
return page_with_title(settings_title(), [
|
|
|
|
|
msg(),
|
|
|
|
|
div('row', [
|
|
|
|
|
div('col-md-3 settings-menu', [
|
|
|
|
|
'<ul class="nav nav-pills nav-stacked">',
|
|
|
|
|
'<li class="active"><a href="' . url('/user-settings') . '">' . __('settings.profile') . '</a></li>',
|
|
|
|
|
'<li><a href="' . url('/settings/password') . '">' . __('settings.password') . '</a></li>',
|
|
|
|
|
'<li><a href="' . url('/settings/oauth') . '">' . __('settings.oauth') . '</a></li>',
|
|
|
|
|
'</ul>'
|
|
|
|
|
]),
|
|
|
|
|
/** @var Renderer $renderer */
|
|
|
|
|
$renderer = app(Renderer::class);
|
|
|
|
|
return $renderer->render(
|
|
|
|
|
'pages/settings/settings.twig',
|
|
|
|
|
[
|
|
|
|
|
'title' => 'settings.profile',
|
|
|
|
|
'content' =>
|
|
|
|
|
msg()
|
|
|
|
|
. div('row', [
|
|
|
|
|
div('col-md-9', [
|
|
|
|
|
heading(__('settings.profile'), 2),
|
|
|
|
|
form([
|
|
|
|
|
form_info('', __('Here you can change your user details.')),
|
|
|
|
|
form_info(entry_required() . ' = ' . __('Entry required!')),
|
|
|
|
@ -62,14 +61,18 @@ function User_settings_view(
|
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
|
'planned_arrival_date',
|
|
|
|
|
__('Planned date of arrival') . ' ' . entry_required(),
|
|
|
|
|
$personalData->planned_arrival_date ? $personalData->planned_arrival_date->getTimestamp() : '',
|
|
|
|
|
$personalData->planned_arrival_date
|
|
|
|
|
? $personalData->planned_arrival_date->getTimestamp()
|
|
|
|
|
: '',
|
|
|
|
|
$buildup_start_date,
|
|
|
|
|
$teardown_end_date
|
|
|
|
|
) : '',
|
|
|
|
|
$enable_planned_arrival ? form_date(
|
|
|
|
|
'planned_departure_date',
|
|
|
|
|
__('Planned date of departure'),
|
|
|
|
|
$personalData->planned_departure_date ? $personalData->planned_departure_date->getTimestamp() : '',
|
|
|
|
|
$personalData->planned_departure_date
|
|
|
|
|
? $personalData->planned_departure_date->getTimestamp()
|
|
|
|
|
: '',
|
|
|
|
|
$buildup_start_date,
|
|
|
|
|
$teardown_end_date
|
|
|
|
|
) : '',
|
|
|
|
@ -111,7 +114,8 @@ function User_settings_view(
|
|
|
|
|
]),
|
|
|
|
|
])
|
|
|
|
|
])
|
|
|
|
|
], true);
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|