Require comma at last array element and no single line space
This commit is contained in:
parent
216185b65c
commit
ad360a70fb
|
@ -40,6 +40,8 @@
|
||||||
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment" />
|
||||||
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
|
<rule ref="SlevomatCodingStandard.Commenting.UselessFunctionDocComment" />
|
||||||
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
<rule ref="Generic.Formatting.SpaceAfterCast" />
|
||||||
|
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
|
||||||
|
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
|
||||||
<rule ref="Squiz.Strings.DoubleQuoteUsage" />
|
<rule ref="Squiz.Strings.DoubleQuoteUsage" />
|
||||||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
||||||
<exclude-pattern>/includes</exclude-pattern>
|
<exclude-pattern>/includes</exclude-pattern>
|
||||||
|
|
|
@ -357,7 +357,7 @@ return [
|
||||||
'name' => env('SESSION_NAME', 'session'),
|
'name' => env('SESSION_NAME', 'session'),
|
||||||
|
|
||||||
// Lifetime in days
|
// Lifetime in days
|
||||||
'lifetime' => env('SESSION_LIFETIME', 30)
|
'lifetime' => env('SESSION_LIFETIME', 30),
|
||||||
],
|
],
|
||||||
|
|
||||||
// IP addresses of reverse proxies that are trusted, can be an array or a comma separated list
|
// IP addresses of reverse proxies that are trusted, can be an array or a comma separated list
|
||||||
|
@ -380,7 +380,7 @@ return [
|
||||||
'credits' => [
|
'credits' => [
|
||||||
'Contribution' => 'Please visit [engelsystem/engelsystem](https://github.com/engelsystem/engelsystem) if '
|
'Contribution' => 'Please visit [engelsystem/engelsystem](https://github.com/engelsystem/engelsystem) if '
|
||||||
. 'you want to contribute, have found any [bugs](https://github.com/engelsystem/engelsystem/issues) '
|
. 'you want to contribute, have found any [bugs](https://github.com/engelsystem/engelsystem/issues) '
|
||||||
. 'or need help.'
|
. 'or need help.',
|
||||||
],
|
],
|
||||||
|
|
||||||
// var dump server
|
// var dump server
|
||||||
|
|
|
@ -17,7 +17,7 @@ class FixUserLanguages extends Migration
|
||||||
$connection
|
$connection
|
||||||
->table('users_settings')
|
->table('users_settings')
|
||||||
->update([
|
->update([
|
||||||
'language' => $connection->raw('REPLACE(language, ".UTF-8", "")')
|
'language' => $connection->raw('REPLACE(language, ".UTF-8", "")'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ class FixUserLanguages extends Migration
|
||||||
$connection
|
$connection
|
||||||
->table('users_settings')
|
->table('users_settings')
|
||||||
->update([
|
->update([
|
||||||
'language' => $connection->raw('CONCAT(language, ".UTF-8")')
|
'language' => $connection->raw('CONCAT(language, ".UTF-8")'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ class AddNameMinutesAndTimestampsToSchedules extends Migration
|
||||||
|
|
||||||
$connection->table('schedules')
|
$connection->table('schedules')
|
||||||
->update([
|
->update([
|
||||||
'shift_type' => $connection->raw('(' . $query->toSql() . ')')
|
'shift_type' => $connection->raw('(' . $query->toSql() . ')'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->schema->table('schedules', function (Blueprint $table): void {
|
$this->schema->table('schedules', function (Blueprint $table): void {
|
||||||
|
|
|
@ -68,7 +68,7 @@ function angeltypes_about_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Teams/Job description'),
|
__('Teams/Job description'),
|
||||||
AngelTypes_about_view($angeltypes, (bool) $user)
|
AngelTypes_about_view($angeltypes, (bool) $user),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ function angeltype_delete_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Delete angeltype %s'), $angeltype->name),
|
sprintf(__('Delete angeltype %s'), $angeltype->name),
|
||||||
AngelType_delete_view($angeltype)
|
AngelType_delete_view($angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ function angeltype_edit_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Edit %s'), $angeltype->name),
|
sprintf(__('Edit %s'), $angeltype->name),
|
||||||
AngelType_edit_view($angeltype, $supporter_mode)
|
AngelType_edit_view($angeltype, $supporter_mode),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ function angeltype_controller()
|
||||||
$shiftsFilterRenderer,
|
$shiftsFilterRenderer,
|
||||||
$shiftCalendarRenderer,
|
$shiftCalendarRenderer,
|
||||||
$tab
|
$tab
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ function angeltypes_list_controller()
|
||||||
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('eye') . __('view'),
|
icon('eye') . __('view'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (auth()->can('admin_angel_types')) {
|
if (auth()->can('admin_angel_types')) {
|
||||||
|
@ -346,7 +346,7 @@ function angeltypes_list_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
angeltypes_title(),
|
angeltypes_title(),
|
||||||
AngelTypes_list_view($angeltypes, auth()->can('admin_angel_types'))
|
AngelTypes_list_view($angeltypes, auth()->can('admin_angel_types')),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,6 @@ function event_config_edit_controller()
|
||||||
$event_start_date,
|
$event_start_date,
|
||||||
$event_end_date,
|
$event_end_date,
|
||||||
$teardown_end_date
|
$teardown_end_date
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ function public_dashboard_controller()
|
||||||
'needed-3-hours' => stats_angels_needed_three_hours($filter),
|
'needed-3-hours' => stats_angels_needed_three_hours($filter),
|
||||||
'needed-night' => stats_angels_needed_for_nightshifts($filter),
|
'needed-night' => stats_angels_needed_for_nightshifts($filter),
|
||||||
'angels-working' => stats_currently_working($filter),
|
'angels-working' => stats_currently_working($filter),
|
||||||
'hours-to-work' => stats_hours_to_work($filter)
|
'hours-to-work' => stats_hours_to_work($filter),
|
||||||
];
|
];
|
||||||
|
|
||||||
$free_shifts_source = Shifts_free(time(), time() + 12 * 60 * 60, $filter);
|
$free_shifts_source = Shifts_free(time(), time() + 12 * 60 * 60, $filter);
|
||||||
|
@ -57,7 +57,7 @@ function public_dashboard_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Public Dashboard'),
|
__('Public Dashboard'),
|
||||||
public_dashboard_view($stats, $free_shifts)
|
public_dashboard_view($stats, $free_shifts),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ function public_dashboard_needed_angels($needed_angels, ShiftsFilter $filter = n
|
||||||
if ($angeltype->show_on_dashboard) {
|
if ($angeltype->show_on_dashboard) {
|
||||||
$result[] = [
|
$result[] = [
|
||||||
'need' => $need,
|
'need' => $need,
|
||||||
'angeltype_name' => $angeltype->name
|
'angeltype_name' => $angeltype->name,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ function room_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$room->name,
|
$room->name,
|
||||||
Room_view($room, $shiftsFilterRenderer, $shiftCalendarRenderer)
|
Room_view($room, $shiftsFilterRenderer, $shiftCalendarRenderer),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@ function shift_entry_create_controller_admin(Shift $shift, ?AngelType $angeltype
|
||||||
$room = $shift->room;
|
$room = $shift->room;
|
||||||
return [
|
return [
|
||||||
ShiftEntry_create_title(),
|
ShiftEntry_create_title(),
|
||||||
ShiftEntry_create_view_admin($shift, $room, $angeltype, $angeltypes_select, $signup_user, $users_select)
|
ShiftEntry_create_view_admin($shift, $room, $angeltype, $angeltypes_select, $signup_user, $users_select),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ function shift_entry_create_controller_supporter(Shift $shift, AngelType $angelt
|
||||||
$room = $shift->room;
|
$room = $shift->room;
|
||||||
return [
|
return [
|
||||||
ShiftEntry_create_title(),
|
ShiftEntry_create_title(),
|
||||||
ShiftEntry_create_view_supporter($shift, $room, $angeltype, $signup_user, $users_select)
|
ShiftEntry_create_view_supporter($shift, $room, $angeltype, $signup_user, $users_select),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ function shift_entry_create_controller_user(Shift $shift, AngelType $angeltype):
|
||||||
$room = $shift->room;
|
$room = $shift->room;
|
||||||
return [
|
return [
|
||||||
ShiftEntry_create_title(),
|
ShiftEntry_create_title(),
|
||||||
ShiftEntry_create_view_user($shift, $room, $angeltype, $comment)
|
ShiftEntry_create_view_user($shift, $room, $angeltype, $comment),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +270,7 @@ function shift_entry_create_link(Shift $shift, AngelType $angeltype, $params = [
|
||||||
$params = array_merge([
|
$params = array_merge([
|
||||||
'action' => 'create',
|
'action' => 'create',
|
||||||
'shift_id' => $shift->id,
|
'shift_id' => $shift->id,
|
||||||
'angeltype_id' => $angeltype->id
|
'angeltype_id' => $angeltype->id,
|
||||||
], $params);
|
], $params);
|
||||||
return page_link_to('shift_entries', $params);
|
return page_link_to('shift_entries', $params);
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ function shift_entry_create_link_admin(Shift $shift, $params = [])
|
||||||
{
|
{
|
||||||
$params = array_merge([
|
$params = array_merge([
|
||||||
'action' => 'create',
|
'action' => 'create',
|
||||||
'shift_id' => $shift->id
|
'shift_id' => $shift->id,
|
||||||
], $params);
|
], $params);
|
||||||
return page_link_to('shift_entries', $params);
|
return page_link_to('shift_entries', $params);
|
||||||
}
|
}
|
||||||
|
@ -339,13 +339,13 @@ function shift_entry_delete_controller()
|
||||||
if ($user->id == $signout_user->id) {
|
if ($user->id == $signout_user->id) {
|
||||||
return [
|
return [
|
||||||
ShiftEntry_delete_title(),
|
ShiftEntry_delete_title(),
|
||||||
ShiftEntry_delete_view($shift, $angeltype, $signout_user)
|
ShiftEntry_delete_view($shift, $angeltype, $signout_user),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
ShiftEntry_delete_title(),
|
ShiftEntry_delete_title(),
|
||||||
ShiftEntry_delete_view_admin($shift, $angeltype, $signout_user)
|
ShiftEntry_delete_view_admin($shift, $angeltype, $signout_user),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -360,7 +360,7 @@ function shift_entry_delete_link($shiftEntry, $params = [])
|
||||||
{
|
{
|
||||||
$params = array_merge([
|
$params = array_merge([
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'shift_entry_id' => $shiftEntry['shift_entry_id'] ?? $shiftEntry['id']
|
'shift_entry_id' => $shiftEntry['shift_entry_id'] ?? $shiftEntry['id'],
|
||||||
], $params);
|
], $params);
|
||||||
return page_link_to('shift_entries', $params);
|
return page_link_to('shift_entries', $params);
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,8 +215,8 @@ function shift_edit_controller()
|
||||||
form_info('', __('This description is for single shifts, otherwise please use the description in shift type.')),
|
form_info('', __('This description is for single shifts, otherwise please use the description in shift type.')),
|
||||||
'<h2>' . __('Needed angels') . '</h2>',
|
'<h2>' . __('Needed angels') . '</h2>',
|
||||||
$angel_types_spinner,
|
$angel_types_spinner,
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ function shift_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$shift->shiftType->name,
|
$shift->shiftType->name,
|
||||||
Shift_view($shift, $shifttype, $room, $angeltypes, $shift_signup_state)
|
Shift_view($shift, $shifttype, $room, $angeltypes, $shift_signup_state),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ function shifttype_delete_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Delete shifttype %s'), $shifttype->name),
|
sprintf(__('Delete shifttype %s'), $shifttype->name),
|
||||||
ShiftType_delete_view($shifttype)
|
ShiftType_delete_view($shifttype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ function shifttype_edit_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
shifttypes_title(),
|
shifttypes_title(),
|
||||||
ShiftType_edit_view($name, $description, $shifttype_id)
|
ShiftType_edit_view($name, $description, $shifttype_id),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ function shifttype_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$shifttype->name,
|
$shifttype->name,
|
||||||
ShiftType_view($shifttype)
|
ShiftType_view($shifttype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ function shifttypes_list_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
shifttypes_title(),
|
shifttypes_title(),
|
||||||
ShiftTypes_list_view($shifttypes)
|
ShiftTypes_list_view($shifttypes),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ function user_angeltypes_delete_all_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Deny all users'),
|
__('Deny all users'),
|
||||||
UserAngelTypes_delete_all_view($angeltype)
|
UserAngelTypes_delete_all_view($angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ function user_angeltypes_confirm_all_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Confirm all users'),
|
__('Confirm all users'),
|
||||||
UserAngelTypes_confirm_all_view($angeltype)
|
UserAngelTypes_confirm_all_view($angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ function user_angeltype_confirm_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Confirm angeltype for user'),
|
__('Confirm angeltype for user'),
|
||||||
UserAngelType_confirm_view($user_angeltype, $user_source, $angeltype)
|
UserAngelType_confirm_view($user_angeltype, $user_source, $angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ function user_angeltype_delete_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Remove angeltype'),
|
__('Remove angeltype'),
|
||||||
UserAngelType_delete_view($user_angeltype, $user_source, $angeltype)
|
UserAngelType_delete_view($user_angeltype, $user_source, $angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ function user_angeltype_update_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$supporter ? __('Add supporter rights') : __('Remove supporter rights'),
|
$supporter ? __('Add supporter rights') : __('Remove supporter rights'),
|
||||||
UserAngelType_update_view($user_angeltype, $user_source, $angeltype, $supporter)
|
UserAngelType_update_view($user_angeltype, $user_source, $angeltype, $supporter),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ function user_angeltype_add_controller(): array
|
||||||
|
|
||||||
return [
|
return [
|
||||||
__('Add user to angeltype'),
|
__('Add user to angeltype'),
|
||||||
UserAngelType_add_view($angeltype, $users_source, $user_source->id)
|
UserAngelType_add_view($angeltype, $users_source, $user_source->id),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -451,7 +451,7 @@ function user_angeltype_join_controller(AngelType $angeltype)
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Become a %s'), $angeltype->name),
|
sprintf(__('Become a %s'), $angeltype->name),
|
||||||
UserAngelType_join_view($user, $angeltype)
|
UserAngelType_join_view($user, $angeltype),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,6 @@ function user_driver_license_edit_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Edit %s driving license information'), $user_source->name),
|
sprintf(__('Edit %s driving license information'), $user_source->name),
|
||||||
UserDriverLicense_edit_view($user_source, $driverLicense)
|
UserDriverLicense_edit_view($user_source, $driverLicense),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ function user_delete_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('Delete %s'), $user_source->name),
|
sprintf(__('Delete %s'), $user_source->name),
|
||||||
User_delete_view($user_source)
|
User_delete_view($user_source),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ function user_edit_vouchers_controller()
|
||||||
|
|
||||||
return [
|
return [
|
||||||
sprintf(__('%s\'s vouchers'), $user_source->name),
|
sprintf(__('%s\'s vouchers'), $user_source->name),
|
||||||
User_edit_vouchers_view($user_source)
|
User_edit_vouchers_view($user_source),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ function user_controller()
|
||||||
auth()->can('admin_active'),
|
auth()->can('admin_active'),
|
||||||
auth()->can('admin_user_worklog'),
|
auth()->can('admin_user_worklog'),
|
||||||
UserWorkLogsForUser($user_source->id)
|
UserWorkLogsForUser($user_source->id)
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ function users_list_controller()
|
||||||
ShiftEntry::whereFreeloaded(true)->count(),
|
ShiftEntry::whereFreeloaded(true)->count(),
|
||||||
State::whereGotShirt(true)->count(),
|
State::whereGotShirt(true)->count(),
|
||||||
State::query()->sum('got_voucher')
|
State::query()->sum('got_voucher')
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class ShiftsFilter
|
||||||
$this->types = $angelTypes;
|
$this->types = $angelTypes;
|
||||||
|
|
||||||
$this->filled = [
|
$this->filled = [
|
||||||
ShiftsFilter::FILLED_FREE
|
ShiftsFilter::FILLED_FREE,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($user_shifts_admin) {
|
if ($user_shifts_admin) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ function Shifts_free($start, $end, ShiftsFilter $filter = null)
|
||||||
$start,
|
$start,
|
||||||
$end,
|
$end,
|
||||||
$start,
|
$start,
|
||||||
$end
|
$end,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$shifts = collect($shifts);
|
$shifts = collect($shifts);
|
||||||
|
@ -238,7 +238,7 @@ function NeededAngeltype_by_Shift_and_Angeltype(Shift $shift, AngelType $angelty
|
||||||
$shift->id,
|
$shift->id,
|
||||||
$angeltype->id,
|
$angeltype->id,
|
||||||
$shift->id,
|
$shift->id,
|
||||||
$angeltype->id
|
$angeltype->id,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -564,7 +564,7 @@ function Shift($shift)
|
||||||
'angel_type_id' => $type['angel_type_id'],
|
'angel_type_id' => $type['angel_type_id'],
|
||||||
'count' => $type['count'],
|
'count' => $type['count'],
|
||||||
'restricted' => $type['restricted'],
|
'restricted' => $type['restricted'],
|
||||||
'taken' => $type['taken']
|
'taken' => $type['taken'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$shift->neededAngels = $neededAngels;
|
$shift->neededAngels = $neededAngels;
|
||||||
|
|
|
@ -133,7 +133,7 @@ function stats_angels_needed_three_hours(ShiftsFilter $filter = null)
|
||||||
' . ($filter ? 'AND shifts.room_id IN (' . implode(',', $filter->getRooms()) . ')' : '') . '
|
' . ($filter ? 'AND shifts.room_id IN (' . implode(',', $filter->getRooms()) . ')' : '') . '
|
||||||
) AS `tmp`', [
|
) AS `tmp`', [
|
||||||
$in3hours,
|
$in3hours,
|
||||||
$in3hours
|
$in3hours,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $result['count'] ?: '-';
|
return $result['count'] ?: '-';
|
||||||
|
@ -214,7 +214,7 @@ function stats_angels_needed_for_nightshifts(ShiftsFilter $filter = null)
|
||||||
$night_start,
|
$night_start,
|
||||||
$night_end,
|
$night_end,
|
||||||
$night_start,
|
$night_start,
|
||||||
$night_end
|
$night_end,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
return $result['count'] ?: '-';
|
return $result['count'] ?: '-';
|
||||||
|
|
|
@ -31,7 +31,7 @@ function User_tshirt_score($userId)
|
||||||
AND `shifts`.`end` < NOW()
|
AND `shifts`.`end` < NOW()
|
||||||
GROUP BY `users`.`id`
|
GROUP BY `users`.`id`
|
||||||
', $shift_sum_formula), [
|
', $shift_sum_formula), [
|
||||||
$userId
|
$userId,
|
||||||
]);
|
]);
|
||||||
if (!isset($result_shifts['tshirt_score'])) {
|
if (!isset($result_shifts['tshirt_score'])) {
|
||||||
$result_shifts = ['tshirt_score' => 0];
|
$result_shifts = ['tshirt_score' => 0];
|
||||||
|
|
|
@ -305,7 +305,7 @@ function admin_active()
|
||||||
->count();
|
->count();
|
||||||
$shirt_statistics[] = [
|
$shirt_statistics[] = [
|
||||||
'size' => $size,
|
'size' => $size,
|
||||||
'given' => $gc
|
'given' => $gc,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -319,11 +319,11 @@ function admin_active()
|
||||||
form([
|
form([
|
||||||
form_text('search', __('Search angel:'), $search),
|
form_text('search', __('Search angel:'), $search),
|
||||||
form_checkbox('show_all_shifts', __('Show all shifts'), $show_all_shifts),
|
form_checkbox('show_all_shifts', __('Show all shifts'), $show_all_shifts),
|
||||||
form_submit('submit', __('Search'))
|
form_submit('submit', __('Search')),
|
||||||
], page_link_to('admin_active')),
|
], page_link_to('admin_active')),
|
||||||
$set_active == '' ? form([
|
$set_active == '' ? form([
|
||||||
form_text('count', __('How much angels should be active?'), $count ?: $forced_count),
|
form_text('count', __('How much angels should be active?'), $count ?: $forced_count),
|
||||||
form_submit('set_active', __('Preview'))
|
form_submit('set_active', __('Preview')),
|
||||||
]) : $set_active,
|
]) : $set_active,
|
||||||
$msg . msg(),
|
$msg . msg(),
|
||||||
table(
|
table(
|
||||||
|
@ -339,7 +339,7 @@ function admin_active()
|
||||||
'active' => __('Active?'),
|
'active' => __('Active?'),
|
||||||
'force_active' => __('Forced'),
|
'force_active' => __('Forced'),
|
||||||
'tshirt' => ($other_goodie ? __('Goodie?') : __('T-shirt?')),
|
'tshirt' => ($other_goodie ? __('Goodie?') : __('T-shirt?')),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
$matched_users
|
$matched_users
|
||||||
|
@ -348,6 +348,6 @@ function admin_active()
|
||||||
table(array_merge(
|
table(array_merge(
|
||||||
(!$other_goodie ? ['size' => __('Size')] : []),
|
(!$other_goodie ? ['size' => __('Size')] : []),
|
||||||
['given' => $other_goodie ? __('Given goodies') : __('Given shirts') ]
|
['given' => $other_goodie ? __('Given goodies') : __('Given shirts') ]
|
||||||
), $shirt_statistics)
|
), $shirt_statistics),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ function admin_arrive()
|
||||||
$arrival_at_day[$day] = [
|
$arrival_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $day,
|
||||||
'count' => $count,
|
'count' => $count,
|
||||||
'sum' => $arrival_sum
|
'sum' => $arrival_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ function admin_arrive()
|
||||||
$planned_arrival_at_day[$day] = [
|
$planned_arrival_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $day,
|
||||||
'count' => $count,
|
'count' => $count,
|
||||||
'sum' => $planned_arrival_sum
|
'sum' => $planned_arrival_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ function admin_arrive()
|
||||||
$planned_departure_at_day[$day] = [
|
$planned_departure_at_day[$day] = [
|
||||||
'day' => $day,
|
'day' => $day,
|
||||||
'count' => $count,
|
'count' => $count,
|
||||||
'sum' => $planned_departure_sum
|
'sum' => $planned_departure_sum,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ function admin_arrive()
|
||||||
$msg . msg(),
|
$msg . msg(),
|
||||||
form([
|
form([
|
||||||
form_text('search', __('Search'), $search),
|
form_text('search', __('Search'), $search),
|
||||||
form_submit('submit', __('Search'))
|
form_submit('submit', __('Search')),
|
||||||
], page_link_to('admin_arrive')),
|
], page_link_to('admin_arrive')),
|
||||||
table([
|
table([
|
||||||
'name' => __('Nickname'),
|
'name' => __('Nickname'),
|
||||||
|
@ -190,54 +190,54 @@ function admin_arrive()
|
||||||
'arrived' => __('Arrived?'),
|
'arrived' => __('Arrived?'),
|
||||||
'rendered_arrival_date' => __('Arrival date'),
|
'rendered_arrival_date' => __('Arrival date'),
|
||||||
'rendered_planned_departure_date' => __('Planned departure'),
|
'rendered_planned_departure_date' => __('Planned departure'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $users_matched),
|
], $users_matched),
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-4', [
|
div('col-md-4', [
|
||||||
heading(__('Planned arrival statistics'), 3),
|
heading(__('Planned arrival statistics'), 3),
|
||||||
BarChart::render([
|
BarChart::render([
|
||||||
'count' => __('arrived'),
|
'count' => __('arrived'),
|
||||||
'sum' => __('arrived sum')
|
'sum' => __('arrived sum'),
|
||||||
], [
|
], [
|
||||||
'count' => '#090',
|
'count' => '#090',
|
||||||
'sum' => '#888'
|
'sum' => '#888',
|
||||||
], $planned_arrival_at_day),
|
], $planned_arrival_at_day),
|
||||||
table([
|
table([
|
||||||
'day' => __('Date'),
|
'day' => __('Date'),
|
||||||
'count' => __('Count'),
|
'count' => __('Count'),
|
||||||
'sum' => __('Sum')
|
'sum' => __('Sum'),
|
||||||
], $planned_arrival_at_day)
|
], $planned_arrival_at_day),
|
||||||
]),
|
]),
|
||||||
div('col-md-4', [
|
div('col-md-4', [
|
||||||
heading(__('Arrival statistics'), 3),
|
heading(__('Arrival statistics'), 3),
|
||||||
BarChart::render([
|
BarChart::render([
|
||||||
'count' => __('arrived'),
|
'count' => __('arrived'),
|
||||||
'sum' => __('arrived sum')
|
'sum' => __('arrived sum'),
|
||||||
], [
|
], [
|
||||||
'count' => '#090',
|
'count' => '#090',
|
||||||
'sum' => '#888'
|
'sum' => '#888',
|
||||||
], $arrival_at_day),
|
], $arrival_at_day),
|
||||||
table([
|
table([
|
||||||
'day' => __('Date'),
|
'day' => __('Date'),
|
||||||
'count' => __('Count'),
|
'count' => __('Count'),
|
||||||
'sum' => __('Sum')
|
'sum' => __('Sum'),
|
||||||
], $arrival_at_day)
|
], $arrival_at_day),
|
||||||
]),
|
]),
|
||||||
div('col-md-4', [
|
div('col-md-4', [
|
||||||
heading(__('Planned departure statistics'), 3),
|
heading(__('Planned departure statistics'), 3),
|
||||||
BarChart::render([
|
BarChart::render([
|
||||||
'count' => __('arrived'),
|
'count' => __('arrived'),
|
||||||
'sum' => __('arrived sum')
|
'sum' => __('arrived sum'),
|
||||||
], [
|
], [
|
||||||
'count' => '#090',
|
'count' => '#090',
|
||||||
'sum' => '#888'
|
'sum' => '#888',
|
||||||
], $planned_departure_at_day),
|
], $planned_departure_at_day),
|
||||||
table([
|
table([
|
||||||
'day' => __('Date'),
|
'day' => __('Date'),
|
||||||
'count' => __('Count'),
|
'count' => __('Count'),
|
||||||
'sum' => __('Sum')
|
'sum' => __('Sum'),
|
||||||
], $planned_departure_at_day)
|
], $planned_departure_at_day),
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ function admin_free()
|
||||||
|
|
||||||
$angel_types_source = AngelType::all(['id', 'name']);
|
$angel_types_source = AngelType::all(['id', 'name']);
|
||||||
$angel_types = [
|
$angel_types = [
|
||||||
'' => __('All')
|
'' => __('All'),
|
||||||
];
|
];
|
||||||
foreach ($angel_types_source as $angel_type) {
|
foreach ($angel_types_source as $angel_type) {
|
||||||
$angel_types[$angel_type->id] = $angel_type->name;
|
$angel_types[$angel_type->id] = $angel_type->name;
|
||||||
|
@ -105,7 +105,7 @@ function admin_free()
|
||||||
'actions' =>
|
'actions' =>
|
||||||
auth()->can('admin_user')
|
auth()->can('admin_user')
|
||||||
? button(page_link_to('admin_user', ['id' => $usr->id]), icon('pencil') . __('edit'), 'btn-sm')
|
? button(page_link_to('admin_user', ['id' => $usr->id]), icon('pencil') . __('edit'), 'btn-sm')
|
||||||
: ''
|
: '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return page_with_title(admin_free_title(), [
|
return page_with_title(admin_free_title(), [
|
||||||
|
@ -115,7 +115,7 @@ function admin_free()
|
||||||
div('row', [
|
div('row', [
|
||||||
form_text('search', __('Search'), $search, null, null, null, 'col'),
|
form_text('search', __('Search'), $search, null, null, null, 'col'),
|
||||||
form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'),
|
form_select('angeltype', __('Angeltype'), $angel_types, $angelType, '', 'col'),
|
||||||
form_submit('submit', __('Search'))
|
form_submit('submit', __('Search')),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
@ -126,7 +126,7 @@ function admin_free()
|
||||||
'last_shift' => __('Last shift'),
|
'last_shift' => __('Last shift'),
|
||||||
'dect' => __('DECT'),
|
'dect' => __('DECT'),
|
||||||
'email' => __('E-Mail'),
|
'email' => __('E-Mail'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $free_users_table),
|
], $free_users_table),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ function admin_groups()
|
||||||
),
|
),
|
||||||
icon('pencil') . __('edit'),
|
icon('pencil') . __('edit'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@ function admin_groups()
|
||||||
table([
|
table([
|
||||||
'name' => __('Name'),
|
'name' => __('Name'),
|
||||||
'privileges' => __('Privileges'),
|
'privileges' => __('Privileges'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $groups_table)
|
], $groups_table),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
switch ($request->input('action')) {
|
switch ($request->input('action')) {
|
||||||
|
@ -84,7 +84,7 @@ function admin_groups()
|
||||||
form(
|
form(
|
||||||
$privileges_form,
|
$privileges_form,
|
||||||
page_link_to('admin_groups', ['action' => 'save', 'id' => $group->id])
|
page_link_to('admin_groups', ['action' => 'save', 'id' => $group->id])
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
return error('No Group found.', true);
|
return error('No Group found.', true);
|
||||||
|
@ -145,6 +145,6 @@ function groupPrivilegesWithSelected(Group $group): Collection
|
||||||
->orderBy('name')
|
->orderBy('name')
|
||||||
->get([
|
->get([
|
||||||
'privileges.*',
|
'privileges.*',
|
||||||
'group_privileges.group_id as selected'
|
'group_privileges.group_id as selected',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ function admin_rooms()
|
||||||
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
||||||
icon('trash') . __('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
])
|
]),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,13 +154,13 @@ function admin_rooms()
|
||||||
$angeltypes_count_form = [];
|
$angeltypes_count_form = [];
|
||||||
foreach ($angeltypes as $angeltype_id => $angeltypeName) {
|
foreach ($angeltypes as $angeltype_id => $angeltypeName) {
|
||||||
$angeltypes_count_form[] = div('col-lg-4 col-md-6 col-xs-6', [
|
$angeltypes_count_form[] = div('col-lg-4 col-md-6 col-xs-6', [
|
||||||
form_spinner('angeltype_count_' . $angeltype_id, $angeltypeName, $angeltypes_count[$angeltype_id])
|
form_spinner('angeltype_count_' . $angeltype_id, $angeltypeName, $angeltypes_count[$angeltype_id]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return page_with_title(admin_rooms_title(), [
|
return page_with_title(admin_rooms_title(), [
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('admin_rooms'), __('back'), 'back')
|
button(page_link_to('admin_rooms'), __('back'), 'back'),
|
||||||
]),
|
]),
|
||||||
$msg,
|
$msg,
|
||||||
form([
|
form([
|
||||||
|
@ -176,14 +176,14 @@ function admin_rooms()
|
||||||
div('col-md-6', [
|
div('col-md-6', [
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-12', [
|
div('col-md-12', [
|
||||||
form_info(__('Needed angels:'))
|
form_info(__('Needed angels:')),
|
||||||
]),
|
]),
|
||||||
join($angeltypes_count_form)
|
join($angeltypes_count_form),
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
], true);
|
], true);
|
||||||
} elseif ($request->input('show') == 'delete') {
|
} elseif ($request->input('show') == 'delete') {
|
||||||
if ($request->hasPostData('ack')) {
|
if ($request->hasPostData('ack')) {
|
||||||
|
@ -213,7 +213,7 @@ function admin_rooms()
|
||||||
|
|
||||||
return page_with_title(admin_rooms_title(), [
|
return page_with_title(admin_rooms_title(), [
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('admin_rooms'), __('back'), 'back')
|
button(page_link_to('admin_rooms'), __('back'), 'back'),
|
||||||
]),
|
]),
|
||||||
sprintf(__('Do you want to delete room %s?'), $name),
|
sprintf(__('Do you want to delete room %s?'), $name),
|
||||||
form([
|
form([
|
||||||
|
@ -225,14 +225,14 @@ function admin_rooms()
|
||||||
|
|
||||||
return page_with_title(admin_rooms_title(), [
|
return page_with_title(admin_rooms_title(), [
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('admin_rooms', ['show' => 'edit']), __('add'))
|
button(page_link_to('admin_rooms', ['show' => 'edit']), __('add')),
|
||||||
]),
|
]),
|
||||||
msg(),
|
msg(),
|
||||||
table([
|
table([
|
||||||
'name' => __('Name'),
|
'name' => __('Name'),
|
||||||
'dect' => __('DECT'),
|
'dect' => __('DECT'),
|
||||||
'map_url' => __('Map'),
|
'map_url' => __('Map'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $rooms)
|
], $rooms),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -286,7 +286,7 @@ function admin_shifts()
|
||||||
'room_id' => $rid,
|
'room_id' => $rid,
|
||||||
'title' => $title,
|
'title' => $title,
|
||||||
'shift_type_id' => $shifttype_id,
|
'shift_type_id' => $shifttype_id,
|
||||||
'description' => $description
|
'description' => $description,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ function admin_shifts()
|
||||||
'title' =>
|
'title' =>
|
||||||
ShiftType_name_render(ShiftType::find($shifttype_id))
|
ShiftType_name_render(ShiftType::find($shifttype_id))
|
||||||
. ($shift['title'] ? '<br />' . $shift['title'] : ''),
|
. ($shift['title'] ? '<br />' . $shift['title'] : ''),
|
||||||
'needed_angels' => ''
|
'needed_angels' => '',
|
||||||
];
|
];
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
if (isset($needed_angel_types[$type->id]) && $needed_angel_types[$type->id] > 0) {
|
if (isset($needed_angel_types[$type->id]) && $needed_angel_types[$type->id] > 0) {
|
||||||
|
@ -357,10 +357,10 @@ function admin_shifts()
|
||||||
table([
|
table([
|
||||||
'timeslot' => __('Time and location'),
|
'timeslot' => __('Time and location'),
|
||||||
'title' => __('Type and title'),
|
'title' => __('Type and title'),
|
||||||
'needed_angels' => __('Needed angels')
|
'needed_angels' => __('Needed angels'),
|
||||||
], $shifts_table),
|
], $shifts_table),
|
||||||
form_submit('submit', icon('save') . __('Save'))
|
form_submit('submit', icon('save') . __('Save')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
} elseif ($request->hasPostData('submit')) {
|
} elseif ($request->hasPostData('submit')) {
|
||||||
|
@ -424,7 +424,7 @@ function admin_shifts()
|
||||||
$needed_angel_types[$type->id],
|
$needed_angel_types[$type->id],
|
||||||
[
|
[
|
||||||
'radio-name' => 'angelmode',
|
'radio-name' => 'angelmode',
|
||||||
'radio-value' => 'manually'
|
'radio-value' => 'manually',
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
. '</div>';
|
. '</div>';
|
||||||
|
@ -454,10 +454,10 @@ function admin_shifts()
|
||||||
div('col-md-6 col-xl-5', [
|
div('col-md-6 col-xl-5', [
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-lg-6', [
|
div('col-lg-6', [
|
||||||
form_datetime('start', __('Start'), $start)
|
form_datetime('start', __('Start'), $start),
|
||||||
]),
|
]),
|
||||||
div('col-lg-6', [
|
div('col-lg-6', [
|
||||||
form_datetime('end', __('End'), $end)
|
form_datetime('end', __('End'), $end),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
form_info(__('Mode')),
|
form_info(__('Mode')),
|
||||||
|
@ -475,7 +475,7 @@ function admin_shifts()
|
||||||
'',
|
'',
|
||||||
[
|
[
|
||||||
'radio-name' => 'mode',
|
'radio-name' => 'mode',
|
||||||
'radio-value' => 'multi'
|
'radio-value' => 'multi',
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
form_radio(
|
form_radio(
|
||||||
|
@ -496,14 +496,14 @@ function admin_shifts()
|
||||||
'',
|
'',
|
||||||
[
|
[
|
||||||
'radio-name' => 'mode',
|
'radio-name' => 'mode',
|
||||||
'radio-value' => 'variable'
|
'radio-value' => 'variable',
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
form_checkbox(
|
form_checkbox(
|
||||||
'shift_over_midnight',
|
'shift_over_midnight',
|
||||||
__('Create a shift over midnight.'),
|
__('Create a shift over midnight.'),
|
||||||
$shift_over_midnight
|
$shift_over_midnight
|
||||||
)
|
),
|
||||||
]),
|
]),
|
||||||
div('col-md-6 col-xl-7', [
|
div('col-md-6 col-xl-7', [
|
||||||
form_info(__('Needed angels')),
|
form_info(__('Needed angels')),
|
||||||
|
@ -520,12 +520,12 @@ function admin_shifts()
|
||||||
'manually'
|
'manually'
|
||||||
),
|
),
|
||||||
div('row', [
|
div('row', [
|
||||||
$angel_types
|
$angel_types,
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
form_submit('preview', icon('search') . __('Preview'))
|
form_submit('preview', icon('search') . __('Preview')),
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -621,7 +621,7 @@ function admin_shifts_history(): string
|
||||||
'end' => __('End'),
|
'end' => __('End'),
|
||||||
'user' => __('User'),
|
'user' => __('User'),
|
||||||
'created_at' => __('Created'),
|
'created_at' => __('Created'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $shiftsData)
|
], $shiftsData),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ function admin_user()
|
||||||
|
|
||||||
$options = [
|
$options = [
|
||||||
'1' => __('Yes'),
|
'1' => __('Yes'),
|
||||||
'0' => __('No')
|
'0' => __('No'),
|
||||||
];
|
];
|
||||||
|
|
||||||
// Gekommen?
|
// Gekommen?
|
||||||
|
@ -175,7 +175,7 @@ function admin_user()
|
||||||
}
|
}
|
||||||
|
|
||||||
$html .= buttons([
|
$html .= buttons([
|
||||||
button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger')
|
button(user_delete_link($user_source->id), icon('trash') . __('delete'), 'btn-danger'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$html .= '<hr>';
|
$html .= '<hr>';
|
||||||
|
@ -296,7 +296,7 @@ function admin_user()
|
||||||
}
|
}
|
||||||
|
|
||||||
return page_with_title(__('Edit user'), [
|
return page_with_title(__('Edit user'), [
|
||||||
$html
|
$html,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,6 +317,6 @@ function changeableGroups($myHighestGroup, $angelId): Collection
|
||||||
->orderBy('name')
|
->orderBy('name')
|
||||||
->get([
|
->get([
|
||||||
'groups.*',
|
'groups.*',
|
||||||
'users_groups.group_id as selected'
|
'users_groups.group_id as selected',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,21 +394,21 @@ function guest_register()
|
||||||
form_info(
|
form_info(
|
||||||
'',
|
'',
|
||||||
__('Use up to 24 letters, numbers, connecting punctuations or spaces for your nickname.')
|
__('Use up to 24 letters, numbers, connecting punctuations or spaces for your nickname.')
|
||||||
)
|
),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
$enable_pronoun ? div('col', [
|
$enable_pronoun ? div('col', [
|
||||||
form_text('pronoun', __('Pronoun'), $pronoun, false, 15)
|
form_text('pronoun', __('Pronoun'), $pronoun, false, 15),
|
||||||
]) : '',
|
]) : '',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
$enable_user_name ? div('row', [
|
$enable_user_name ? div('row', [
|
||||||
div('col', [
|
div('col', [
|
||||||
form_text('prename', __('First name'), $preName, false, 64, 'given-name')
|
form_text('prename', __('First name'), $preName, false, 64, 'given-name'),
|
||||||
]),
|
]),
|
||||||
div('col', [
|
div('col', [
|
||||||
form_text('lastname', __('Last name'), $lastName, false, 64, 'family-name')
|
form_text('lastname', __('Last name'), $lastName, false, 64, 'family-name'),
|
||||||
])
|
]),
|
||||||
]) : '',
|
]) : '',
|
||||||
|
|
||||||
div('row', [
|
div('row', [
|
||||||
|
@ -449,7 +449,7 @@ function guest_register()
|
||||||
]),
|
]),
|
||||||
|
|
||||||
$enable_dect ? div('col', [
|
$enable_dect ? div('col', [
|
||||||
form_text('dect', __('DECT'), $dect, false, 40, 'tel-local')
|
form_text('dect', __('DECT'), $dect, false, 40, 'tel-local'),
|
||||||
]) : '',
|
]) : '',
|
||||||
|
|
||||||
div('col', [
|
div('col', [
|
||||||
|
@ -458,13 +458,13 @@ function guest_register()
|
||||||
'mobile_show',
|
'mobile_show',
|
||||||
__('Show mobile number to other users to contact me'),
|
__('Show mobile number to other users to contact me'),
|
||||||
$mobile_show
|
$mobile_show
|
||||||
) : ''
|
) : '',
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
div('row', [
|
div('row', [
|
||||||
$enable_password ? div('col', [
|
$enable_password ? div('col', [
|
||||||
form_password('password', __('Password') . ' ' . entry_required(), 'new-password')
|
form_password('password', __('Password') . ' ' . entry_required(), 'new-password'),
|
||||||
]) : '',
|
]) : '',
|
||||||
|
|
||||||
$enable_planned_arrival ? div('col', [
|
$enable_planned_arrival ? div('col', [
|
||||||
|
@ -474,13 +474,13 @@ function guest_register()
|
||||||
$planned_arrival_date,
|
$planned_arrival_date,
|
||||||
$buildup_start_date,
|
$buildup_start_date,
|
||||||
$teardown_end_date
|
$teardown_end_date
|
||||||
)
|
),
|
||||||
]) : '',
|
]) : '',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
div('row', [
|
div('row', [
|
||||||
$enable_password ? div('col', [
|
$enable_password ? div('col', [
|
||||||
form_password('password2', __('Confirm password') . ' ' . entry_required(), 'new-password')
|
form_password('password2', __('Confirm password') . ' ' . entry_required(), 'new-password'),
|
||||||
]) : '',
|
]) : '',
|
||||||
|
|
||||||
div('col', [
|
div('col', [
|
||||||
|
@ -490,7 +490,7 @@ function guest_register()
|
||||||
$tshirt_sizes,
|
$tshirt_sizes,
|
||||||
$tshirt_size,
|
$tshirt_size,
|
||||||
__('Please select...')
|
__('Please select...')
|
||||||
) : ''
|
) : '',
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
@ -509,12 +509,12 @@ function guest_register()
|
||||||
form_info(
|
form_info(
|
||||||
'',
|
'',
|
||||||
__('Some angel types have to be confirmed later by a supporter at an introduction meeting. You can change your selection in the options section.')
|
__('Some angel types have to be confirmed later by a supporter at an introduction meeting. You can change your selection in the options section.')
|
||||||
)
|
),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
form_submit('submit', __('Register'))
|
form_submit('submit', __('Register')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,7 +269,7 @@ class ImportSchedule extends BaseController
|
||||||
->table('shift_entries')
|
->table('shift_entries')
|
||||||
->select([
|
->select([
|
||||||
'shift_types.name', 'shifts.title', 'angel_types.name AS type', 'rooms.id AS room_id',
|
'shift_types.name', 'shifts.title', 'angel_types.name AS type', 'rooms.id AS room_id',
|
||||||
'shifts.start', 'shifts.end', 'shift_entries.user_id', 'shift_entries.freeloaded'
|
'shifts.start', 'shifts.end', 'shift_entries.user_id', 'shift_entries.freeloaded',
|
||||||
])
|
])
|
||||||
->join('shifts', 'shifts.id', 'shift_entries.shift_id')
|
->join('shifts', 'shifts.id', 'shift_entries.shift_id')
|
||||||
->join('schedule_shift', 'shifts.id', 'schedule_shift.shift_id')
|
->join('schedule_shift', 'shifts.id', 'schedule_shift.shift_id')
|
||||||
|
|
|
@ -44,7 +44,7 @@ function user_myshifts()
|
||||||
__('If you reset the key, the url to your iCal- and JSON-export and your atom/rss feed changes! You have to update it in every application using one of these exports.'),
|
__('If you reset the key, the url to your iCal- and JSON-export and your atom/rss feed changes! You have to update it in every application using one of these exports.'),
|
||||||
true
|
true
|
||||||
),
|
),
|
||||||
button(page_link_to('user_myshifts', ['reset' => 'ack']), __('Continue'), 'btn-danger')
|
button(page_link_to('user_myshifts', ['reset' => 'ack']), __('Continue'), 'btn-danger'),
|
||||||
]);
|
]);
|
||||||
} elseif ($request->has('edit') && preg_match('/^\d+$/', $request->input('edit'))) {
|
} elseif ($request->has('edit') && preg_match('/^\d+$/', $request->input('edit'))) {
|
||||||
$shift_entry_id = $request->input('edit');
|
$shift_entry_id = $request->input('edit');
|
||||||
|
|
|
@ -246,12 +246,12 @@ function view_user_shifts()
|
||||||
$filled = [
|
$filled = [
|
||||||
[
|
[
|
||||||
'id' => '1',
|
'id' => '1',
|
||||||
'name' => __('occupied')
|
'name' => __('occupied'),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => '0',
|
'id' => '0',
|
||||||
'name' => __('free')
|
'name' => __('free'),
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
$start_day = $shiftsFilter->getStart()->format('Y-m-d');
|
$start_day = $shiftsFilter->getStart()->format('Y-m-d');
|
||||||
$start_time = $shiftsFilter->getStart()->format('H:i');
|
$start_time = $shiftsFilter->getStart()->format('H:i');
|
||||||
|
@ -326,9 +326,9 @@ function view_user_shifts()
|
||||||
'buttons' => button(
|
'buttons' => button(
|
||||||
public_dashboard_link(),
|
public_dashboard_link(),
|
||||||
icon('speedometer2') . __('Public Dashboard')
|
icon('speedometer2') . __('Public Dashboard')
|
||||||
)
|
),
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ function stats($label, $number, $style = null)
|
||||||
return div('col stats text-' . $style, [
|
return div('col stats text-' . $style, [
|
||||||
$label,
|
$label,
|
||||||
div('number', [
|
div('number', [
|
||||||
$number
|
$number,
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ function tabs($tabs, $selected = 0)
|
||||||
}
|
}
|
||||||
return div('', [
|
return div('', [
|
||||||
'<ul class="nav nav-tabs mb-3" role="tablist">' . join($tab_header) . '</ul>',
|
'<ul class="nav nav-tabs mb-3" role="tablist">' . join($tab_header) . '</ul>',
|
||||||
'<div class="tab-content">' . join($tab_content) . '</div>'
|
'<div class="tab-content">' . join($tab_content) . '</div>',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ function toolbar_dropdown_item(string $href, string $label, bool $active, string
|
||||||
'{icon}' => $icon === null ? '' : '<i class="bi bi-' . $icon . '"></i>',
|
'{icon}' => $icon === null ? '' : '<i class="bi bi-' . $icon . '"></i>',
|
||||||
'{label}' => $label,
|
'{label}' => $label,
|
||||||
'{active}' => $active ? ' active' : '',
|
'{active}' => $active ? ' active' : '',
|
||||||
'{aria}' => $active ? ' aria-current="page"' : ''
|
'{aria}' => $active ? ' aria-current="page"' : '',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ EOT;
|
||||||
[
|
[
|
||||||
'{class}' => $active ? ' active' : '',
|
'{class}' => $active ? ' active' : '',
|
||||||
'{label}' => $label,
|
'{label}' => $label,
|
||||||
'{submenu}' => join("\n", $submenu)
|
'{submenu}' => join("\n", $submenu),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -304,11 +304,11 @@ function table($columns, $rows_raw, $data = true)
|
||||||
$rows = [];
|
$rows = [];
|
||||||
foreach ($rows_raw as $row) {
|
foreach ($rows_raw as $row) {
|
||||||
$rows[] = [
|
$rows[] = [
|
||||||
'col' => $row
|
'col' => $row,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
return render_table([
|
return render_table([
|
||||||
'col' => $columns
|
'col' => $columns,
|
||||||
], $rows, $data);
|
], $rows, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ function AngelType_delete_view(AngelType $angeltype)
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('angeltypes'), icon('x-lg') . __('cancel')),
|
button(page_link_to('angeltypes'), icon('x-lg') . __('cancel')),
|
||||||
form_submit('delete', icon('trash') . __('delete'), 'btn-danger', false),
|
form_submit('delete', icon('trash') . __('delete'), 'btn-danger', false),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode)
|
||||||
{
|
{
|
||||||
return page_with_title(sprintf(__('Edit %s'), $angeltype->name), [
|
return page_with_title(sprintf(__('Edit %s'), $angeltype->name), [
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back')
|
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back'),
|
||||||
]),
|
]),
|
||||||
msg(),
|
msg(),
|
||||||
form([
|
form([
|
||||||
|
@ -128,8 +128,8 @@ function AngelType_edit_view(AngelType $angeltype, bool $supporter_mode)
|
||||||
form_text('contact_name', __('Name'), $angeltype->contact_name),
|
form_text('contact_name', __('Name'), $angeltype->contact_name),
|
||||||
config('enable_dect') ? form_text('contact_dect', __('DECT'), $angeltype->contact_dect) : '',
|
config('enable_dect') ? form_text('contact_dect', __('DECT'), $angeltype->contact_dect) : '',
|
||||||
form_text('contact_email', __('E-Mail'), $angeltype->contact_email),
|
form_text('contact_email', __('E-Mail'), $angeltype->contact_email),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ function AngelType_view_buttons(
|
||||||
$user
|
$user
|
||||||
) {
|
) {
|
||||||
$buttons = [
|
$buttons = [
|
||||||
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back')
|
button(page_link_to('angeltypes'), icon('person-lines-fill') . __('Angeltypes'), 'back'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($angeltype->requires_driver_license) {
|
if ($angeltype->requires_driver_license) {
|
||||||
|
@ -250,7 +250,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
),
|
),
|
||||||
__('deny'),
|
__('deny'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
$members_unconfirmed[] = $member;
|
$members_unconfirmed[] = $member;
|
||||||
} elseif ($member->pivot->supporter) {
|
} elseif ($member->pivot->supporter) {
|
||||||
|
@ -260,11 +260,11 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
page_link_to('user_angeltypes', [
|
page_link_to('user_angeltypes', [
|
||||||
'action' => 'update',
|
'action' => 'update',
|
||||||
'user_angeltype_id' => $member->pivot->id,
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
'supporter' => 0
|
'supporter' => 0,
|
||||||
]),
|
]),
|
||||||
icon('person-fill-down') . __('Remove supporter rights'),
|
icon('person-fill-down') . __('Remove supporter rights'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
$member['actions'] = '';
|
$member['actions'] = '';
|
||||||
|
@ -278,7 +278,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
page_link_to('user_angeltypes', [
|
page_link_to('user_angeltypes', [
|
||||||
'action' => 'update',
|
'action' => 'update',
|
||||||
'user_angeltype_id' => $member->pivot->id,
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
'supporter' => 1
|
'supporter' => 1,
|
||||||
]),
|
]),
|
||||||
icon('person-fill-up') . __('Add supporter rights'),
|
icon('person-fill-up') . __('Add supporter rights'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
|
@ -287,11 +287,11 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
button(
|
button(
|
||||||
page_link_to('user_angeltypes', [
|
page_link_to('user_angeltypes', [
|
||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'user_angeltype_id' => $member->pivot->id
|
'user_angeltype_id' => $member->pivot->id,
|
||||||
]),
|
]),
|
||||||
icon('trash') . __('remove'),
|
icon('trash') . __('remove'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$members_confirmed[] = $member;
|
$members_confirmed[] = $member;
|
||||||
|
@ -301,7 +301,7 @@ function AngelType_view_members(AngelType $angeltype, $members, $admin_user_ange
|
||||||
return [
|
return [
|
||||||
$supporters,
|
$supporters,
|
||||||
$members_confirmed,
|
$members_confirmed,
|
||||||
$members_unconfirmed
|
$members_unconfirmed,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -318,7 +318,7 @@ function AngelType_view_table_headers(AngelType $angeltype, $supporter, $admin_a
|
||||||
$headers = [
|
$headers = [
|
||||||
'name' => __('Nick'),
|
'name' => __('Nick'),
|
||||||
'dect' => __('DECT'),
|
'dect' => __('DECT'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
if ($angeltype->requires_driver_license && ($supporter || $admin_angeltypes)) {
|
if ($angeltype->requires_driver_license && ($supporter || $admin_angeltypes)) {
|
||||||
$headers = [
|
$headers = [
|
||||||
|
@ -331,7 +331,7 @@ function AngelType_view_table_headers(AngelType $angeltype, $supporter, $admin_a
|
||||||
'has_license_7_5t_truck' => __('7,5t Truck'),
|
'has_license_7_5t_truck' => __('7,5t Truck'),
|
||||||
'has_license_12t_truck' => __('12t Truck'),
|
'has_license_12t_truck' => __('12t Truck'),
|
||||||
'has_license_forklift' => __('Forklift'),
|
'has_license_forklift' => __('Forklift'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (!config('enable_dect')) {
|
if (!config('enable_dect')) {
|
||||||
|
@ -385,7 +385,7 @@ function AngelType_view(
|
||||||
$shiftsFilterRenderer,
|
$shiftsFilterRenderer,
|
||||||
$shiftCalendarRenderer
|
$shiftCalendarRenderer
|
||||||
),
|
),
|
||||||
], $tab)
|
], $tab),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ function AngelType_view_shifts(AngelType $angeltype, $shiftsFilterRenderer, $shi
|
||||||
{
|
{
|
||||||
$shifts = $shiftsFilterRenderer->render(page_link_to('angeltypes', [
|
$shifts = $shiftsFilterRenderer->render(page_link_to('angeltypes', [
|
||||||
'action' => 'view',
|
'action' => 'view',
|
||||||
'angeltype_id' => $angeltype->id
|
'angeltype_id' => $angeltype->id,
|
||||||
]), ['type' => $angeltype->id]);
|
]), ['type' => $angeltype->id]);
|
||||||
$shifts .= $shiftCalendarRenderer->render();
|
$shifts .= $shiftCalendarRenderer->render();
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ function AngelType_view_info(
|
||||||
$members_confirmed[] = [
|
$members_confirmed[] = [
|
||||||
'name' => __('Sum'),
|
'name' => __('Sum'),
|
||||||
'dect' => count($members_confirmed),
|
'dect' => count($members_confirmed),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -457,7 +457,7 @@ function AngelType_view_info(
|
||||||
$members_unconfirmed[] = [
|
$members_unconfirmed[] = [
|
||||||
'name' => __('Sum'),
|
'name' => __('Sum'),
|
||||||
'dect' => count($members_unconfirmed),
|
'dect' => count($members_unconfirmed),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ function AngelType_view_info(
|
||||||
),
|
),
|
||||||
__('Add'),
|
__('Add'),
|
||||||
'add'
|
'add'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$info[] = table($table_headers, $members_confirmed);
|
$info[] = table($table_headers, $members_confirmed);
|
||||||
|
@ -486,7 +486,7 @@ function AngelType_view_info(
|
||||||
button(
|
button(
|
||||||
page_link_to('user_angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id]),
|
page_link_to('user_angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id]),
|
||||||
icon('trash') . __('deny all')
|
icon('trash') . __('deny all')
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
$info[] = table($table_headers, $members_unconfirmed);
|
$info[] = table($table_headers, $members_unconfirmed);
|
||||||
}
|
}
|
||||||
|
@ -532,15 +532,15 @@ function AngelTypes_list_view($angeltypes, bool $admin_angeltypes)
|
||||||
$admin_angeltypes
|
$admin_angeltypes
|
||||||
? button(page_link_to('angeltypes', ['action' => 'edit']), __('New angeltype'), 'add')
|
? button(page_link_to('angeltypes', ['action' => 'edit']), __('New angeltype'), 'add')
|
||||||
: '',
|
: '',
|
||||||
button(page_link_to('angeltypes', ['action' => 'about']), __('Teams/Job description'))
|
button(page_link_to('angeltypes', ['action' => 'about']), __('Teams/Job description')),
|
||||||
]),
|
]),
|
||||||
table([
|
table([
|
||||||
'name' => __('Name'),
|
'name' => __('Name'),
|
||||||
'is_restricted' => icon('mortarboard-fill') . __('Requires introduction'),
|
'is_restricted' => icon('mortarboard-fill') . __('Requires introduction'),
|
||||||
'no_self_signup_allowed' => icon('pencil-square') . __('Self Sign Up Allowed'),
|
'no_self_signup_allowed' => icon('pencil-square') . __('Self Sign Up Allowed'),
|
||||||
'membership' => __('Membership'),
|
'membership' => __('Membership'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $angeltypes)
|
], $angeltypes),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -627,7 +627,7 @@ function AngelTypes_about_view($angeltypes, $user_logged_in)
|
||||||
$content = [
|
$content = [
|
||||||
buttons($buttons),
|
buttons($buttons),
|
||||||
'<p>' . __('Here is the list of teams and their tasks. If you have questions, read the FAQ.') . '</p>',
|
'<p>' . __('Here is the list of teams and their tasks. If you have questions, read the FAQ.') . '</p>',
|
||||||
'<hr />'
|
'<hr />',
|
||||||
];
|
];
|
||||||
foreach ($angeltypes as $angeltype) {
|
foreach ($angeltypes as $angeltype) {
|
||||||
$content[] = AngelTypes_about_view_angeltype($angeltype);
|
$content[] = AngelTypes_about_view_angeltype($angeltype);
|
||||||
|
|
|
@ -31,20 +31,20 @@ function EventConfig_edit_view(
|
||||||
form_info(
|
form_info(
|
||||||
'',
|
'',
|
||||||
__('Welcome message is shown after successful registration. You can use markdown.')
|
__('Welcome message is shown after successful registration. You can use markdown.')
|
||||||
)
|
),
|
||||||
]),
|
]),
|
||||||
div('col-md-3 col-xs-6', [
|
div('col-md-3 col-xs-6', [
|
||||||
form_datetime('buildup_start_date', __('Buildup date'), $buildup_start_date),
|
form_datetime('buildup_start_date', __('Buildup date'), $buildup_start_date),
|
||||||
form_datetime('event_start_date', __('Event start date'), $event_start_date),
|
form_datetime('event_start_date', __('Event start date'), $event_start_date),
|
||||||
form_datetime('event_end_date', __('Event end date'), $event_end_date),
|
form_datetime('event_end_date', __('Event end date'), $event_end_date),
|
||||||
form_datetime('teardown_end_date', __('Teardown end date'), $teardown_end_date),
|
form_datetime('teardown_end_date', __('Teardown end date'), $teardown_end_date),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
div('row', [
|
div('row', [
|
||||||
div('col-md-6', [
|
div('col-md-6', [
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@ function public_dashboard_view($stats, $free_shifts)
|
||||||
$needed_angels = '';
|
$needed_angels = '';
|
||||||
if (count($free_shifts) > 0) {
|
if (count($free_shifts) > 0) {
|
||||||
$shift_panels = [
|
$shift_panels = [
|
||||||
'<div class="row">'
|
'<div class="row">',
|
||||||
];
|
];
|
||||||
foreach ($free_shifts as $i => $shift) {
|
foreach ($free_shifts as $i => $shift) {
|
||||||
$shift_panels[] = public_dashboard_shift_render($shift);
|
$shift_panels[] = public_dashboard_shift_render($shift);
|
||||||
|
@ -23,11 +23,11 @@ function public_dashboard_view($stats, $free_shifts)
|
||||||
$shift_panels[] = '</div>';
|
$shift_panels[] = '</div>';
|
||||||
$needed_angels = div('first', [
|
$needed_angels = div('first', [
|
||||||
div('col-md-12', [
|
div('col-md-12', [
|
||||||
heading(__('Needed angels:'))
|
heading(__('Needed angels:')),
|
||||||
]),
|
]),
|
||||||
div('container-fluid', [
|
div('container-fluid', [
|
||||||
join($shift_panels)
|
join($shift_panels),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ function public_dashboard_view($stats, $free_shifts)
|
||||||
stats(__('Angels currently working'), $stats['angels-working'], 'default'),
|
stats(__('Angels currently working'), $stats['angels-working'], 'default'),
|
||||||
stats(__('Hours to be worked'), $stats['hours-to-work'], 'default'),
|
stats(__('Hours to be worked'), $stats['hours-to-work'], 'default'),
|
||||||
], 'statistics'),
|
], 'statistics'),
|
||||||
$needed_angels
|
$needed_angels,
|
||||||
], 'public-dashboard'),
|
], 'public-dashboard'),
|
||||||
]),
|
]),
|
||||||
div('first col-md-12 text-center', [buttons([
|
div('first col-md-12 text-center', [buttons([
|
||||||
|
@ -55,7 +55,7 @@ function public_dashboard_view($stats, $free_shifts)
|
||||||
auth()->user() ? button(
|
auth()->user() ? button(
|
||||||
public_dashboard_link($isFiltered ? [] : ['filtered' => 1] + $filter),
|
public_dashboard_link($isFiltered ? [] : ['filtered' => 1] + $filter),
|
||||||
icon('filter') . ($isFiltered ? __('All') : __('Filtered'))
|
icon('filter') . ($isFiltered ? __('All') : __('Filtered'))
|
||||||
) : ''
|
) : '',
|
||||||
])], 'fullscreen-button'),
|
])], 'fullscreen-button'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -94,8 +94,8 @@ function public_dashboard_shift_render($shift)
|
||||||
div('dashboard-card card border-' . $shift['style'] . ' ' . $type, [
|
div('dashboard-card card border-' . $shift['style'] . ' ' . $type, [
|
||||||
div('card-body', [
|
div('card-body', [
|
||||||
'<a class="card-link" href="' . shift_link($shift) . '"></a>',
|
'<a class="card-link" href="' . shift_link($shift) . '"></a>',
|
||||||
$panel_body
|
$panel_body,
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,9 @@ function Room_view(Room $room, ShiftsFilterRenderer $shiftsFilterRenderer, Shift
|
||||||
$tabs[__('Shifts')] = div('first', [
|
$tabs[__('Shifts')] = div('first', [
|
||||||
$shiftsFilterRenderer->render(page_link_to('rooms', [
|
$shiftsFilterRenderer->render(page_link_to('rooms', [
|
||||||
'action' => 'view',
|
'action' => 'view',
|
||||||
'room_id' => $room->id
|
'room_id' => $room->id,
|
||||||
]), ['rooms' => [$room->id]]),
|
]), ['rooms' => [$room->id]]),
|
||||||
$shiftCalendarRenderer->render()
|
$shiftCalendarRenderer->render(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$selected_tab = 0;
|
$selected_tab = 0;
|
||||||
|
@ -69,7 +69,7 @@ function Room_view(Room $room, ShiftsFilterRenderer $shiftsFilterRenderer, Shift
|
||||||
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
page_link_to('admin_rooms', ['show' => 'delete', 'id' => $room->id]),
|
||||||
icon('trash') . __('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn'
|
'btn'
|
||||||
)
|
),
|
||||||
]) : '',
|
]) : '',
|
||||||
$dect,
|
$dect,
|
||||||
$description,
|
$description,
|
||||||
|
|
|
@ -77,7 +77,7 @@ class ShiftCalendarRenderer
|
||||||
if (!isset($lanes[$room->id])) {
|
if (!isset($lanes[$room->id])) {
|
||||||
// initialize room with one lane
|
// initialize room with one lane
|
||||||
$lanes[$room->id] = [
|
$lanes[$room->id] = [
|
||||||
new ShiftCalendarLane($header)
|
new ShiftCalendarLane($header),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
// Try to add the shift to the existing lanes for this room
|
// Try to add the shift to the existing lanes for this room
|
||||||
|
@ -141,7 +141,7 @@ class ShiftCalendarRenderer
|
||||||
|
|
||||||
return div('shift-calendar table-responsive', [
|
return div('shift-calendar table-responsive', [
|
||||||
$this->renderTimeLane(),
|
$this->renderTimeLane(),
|
||||||
$this->renderShiftLanes()
|
$this->renderShiftLanes(),
|
||||||
]) . $this->renderLegend();
|
]) . $this->renderLegend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ class ShiftCalendarRenderer
|
||||||
|
|
||||||
return div('lane', [
|
return div('lane', [
|
||||||
div('header ' . $bg, $lane->getHeader()),
|
div('header ' . $bg, $lane->getHeader()),
|
||||||
$html
|
$html,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,14 +218,14 @@ class ShiftCalendarRenderer
|
||||||
return div($class . ' day');
|
return div($class . ' day');
|
||||||
}
|
}
|
||||||
return div($class . ' day', [
|
return div($class . ' day', [
|
||||||
date(__('m-d'), $time) . '<br>' . date(__('H:i'), $time)
|
date(__('m-d'), $time) . '<br>' . date(__('H:i'), $time),
|
||||||
]);
|
]);
|
||||||
} elseif ($time % (60 * 60) == 0) {
|
} elseif ($time % (60 * 60) == 0) {
|
||||||
if (!$label) {
|
if (!$label) {
|
||||||
return div($class . ' hour');
|
return div($class . ' hour');
|
||||||
}
|
}
|
||||||
return div($class . ' hour', [
|
return div($class . ' hour', [
|
||||||
date(__('m-d'), $time) . '<br>' . date(__('H:i'), $time)
|
date(__('m-d'), $time) . '<br>' . date(__('H:i'), $time),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
return div($class);
|
return div($class);
|
||||||
|
@ -242,8 +242,8 @@ class ShiftCalendarRenderer
|
||||||
|
|
||||||
$time_slot = [
|
$time_slot = [
|
||||||
div('header ' . $bg, [
|
div('header ' . $bg, [
|
||||||
__('Time')
|
__('Time'),
|
||||||
])
|
]),
|
||||||
];
|
];
|
||||||
for ($block = 0; $block < $this->getBlocksPerSlot(); $block++) {
|
for ($block = 0; $block < $this->getBlocksPerSlot(); $block++) {
|
||||||
$thistime = $this->getFirstBlockStartTime() + ($block * ShiftCalendarRenderer::SECONDS_PER_ROW);
|
$thistime = $this->getFirstBlockStartTime() + ($block * ShiftCalendarRenderer::SECONDS_PER_ROW);
|
||||||
|
@ -312,7 +312,7 @@ class ShiftCalendarRenderer
|
||||||
badge(__('Help needed'), 'danger'),
|
badge(__('Help needed'), 'danger'),
|
||||||
badge(__('Other angeltype needed / collides with my shifts'), 'warning'),
|
badge(__('Other angeltype needed / collides with my shifts'), 'warning'),
|
||||||
badge(__('Shift is full'), 'success'),
|
badge(__('Shift is full'), 'success'),
|
||||||
badge(__('Shift running/ended or user not arrived/allowed'), 'secondary')
|
badge(__('Shift running/ended or user not arrived/allowed'), 'secondary'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,12 @@ class ShiftCalendarShiftRenderer
|
||||||
$this->renderShiftHead($shift, $class, $shift_signup_state->getFreeEntries()),
|
$this->renderShiftHead($shift, $class, $shift_signup_state->getFreeEntries()),
|
||||||
div('card-body ' . $this->classBg(), [
|
div('card-body ' . $this->classBg(), [
|
||||||
$info_text,
|
$info_text,
|
||||||
Room_name_render($room)
|
Room_name_render($room),
|
||||||
]),
|
]),
|
||||||
$shifts_row
|
$shifts_row,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,13 +134,13 @@ class ShiftCalendarShiftRenderer
|
||||||
if ($html != '') {
|
if ($html != '') {
|
||||||
return [
|
return [
|
||||||
$shift_signup_state,
|
$shift_signup_state,
|
||||||
'<ul class="list-group list-group-flush">' . $html . '</ul>'
|
'<ul class="list-group list-group-flush">' . $html . '</ul>',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
$shift_signup_state,
|
$shift_signup_state,
|
||||||
''
|
'',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ class ShiftCalendarShiftRenderer
|
||||||
$shifts_row .= '</li>';
|
$shifts_row .= '</li>';
|
||||||
return [
|
return [
|
||||||
$shift_signup_state,
|
$shift_signup_state,
|
||||||
$shifts_row
|
$shifts_row,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -257,7 +257,7 @@ class ShiftCalendarShiftRenderer
|
||||||
page_link_to('user_shifts', ['delete_shift' => $shift->id]),
|
page_link_to('user_shifts', ['delete_shift' => $shift->id]),
|
||||||
icon('trash'),
|
icon('trash'),
|
||||||
'btn-' . $class . ' btn-sm border-light text-white'
|
'btn-' . $class . ' btn-sm border-light text-white'
|
||||||
)
|
),
|
||||||
]) . '</div>';
|
]) . '</div>';
|
||||||
}
|
}
|
||||||
$shift_heading = $shift->start->format('H:i') . ' ‐ '
|
$shift_heading = $shift->start->format('H:i') . ' ‐ '
|
||||||
|
@ -270,7 +270,7 @@ class ShiftCalendarShiftRenderer
|
||||||
|
|
||||||
return div('card-header d-flex align-items-center', [
|
return div('card-header d-flex align-items-center', [
|
||||||
'<a class="d-flex align-items-center text-white" href="' . shift_link($shift) . '">' . $shift_heading . '</a>',
|
'<a class="d-flex align-items-center text-white" href="' . shift_link($shift) . '">' . $shift_heading . '</a>',
|
||||||
$header_buttons
|
$header_buttons,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ function ShiftEntry_delete_view_admin(Shift $shift, AngelType $angeltype, User $
|
||||||
form([
|
form([
|
||||||
buttons([
|
buttons([
|
||||||
button(user_link($signoff_user->id), icon('x-lg') . __('cancel')),
|
button(user_link($signoff_user->id), icon('x-lg') . __('cancel')),
|
||||||
form_submit('delete', icon('trash') . __('sign off'), 'btn-danger', false)
|
form_submit('delete', icon('trash') . __('sign off'), 'btn-danger', false),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
]);
|
]);
|
||||||
|
@ -100,8 +100,8 @@ function ShiftEntry_create_view_admin(
|
||||||
form([
|
form([
|
||||||
form_select('angeltype_id', __('Angeltype'), $angeltypes_select, $angeltype->id),
|
form_select('angeltype_id', __('Angeltype'), $angeltypes_select, $angeltype->id),
|
||||||
form_select('user_id', __('User'), $users_select, $signup_user->id),
|
form_select('user_id', __('User'), $users_select, $signup_user->id),
|
||||||
form_submit('submit', icon('check-lg') . __('Save'))
|
form_submit('submit', icon('check-lg') . __('Save')),
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,8 @@ function ShiftEntry_create_view_supporter(Shift $shift, Room $room, AngelType $a
|
||||||
), true),
|
), true),
|
||||||
form([
|
form([
|
||||||
form_select('user_id', __('User'), $users_select, $signup_user->id),
|
form_select('user_id', __('User'), $users_select, $signup_user->id),
|
||||||
form_submit('submit', icon('check-lg') . __('Save'))
|
form_submit('submit', icon('check-lg') . __('Save')),
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -156,8 +156,8 @@ function ShiftEntry_create_view_user(Shift $shift, Room $room, AngelType $angelt
|
||||||
info(sprintf(__('Do you want to sign up for this shift as %s?'), AngelType_name_render($angeltype)), true),
|
info(sprintf(__('Do you want to sign up for this shift as %s?'), AngelType_name_render($angeltype)), true),
|
||||||
form([
|
form([
|
||||||
form_textarea('comment', __('Comment (for your eyes only):'), $comment),
|
form_textarea('comment', __('Comment (for your eyes only):'), $comment),
|
||||||
form_submit('submit', icon('check-lg') . __('Save'))
|
form_submit('submit', icon('check-lg') . __('Save')),
|
||||||
])
|
]),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ function ShiftEntry_edit_view(
|
||||||
'freeloaded_comment',
|
'freeloaded_comment',
|
||||||
__('Freeload comment (Only for shift coordination):'),
|
__('Freeload comment (Only for shift coordination):'),
|
||||||
$freeloaded_comment
|
$freeloaded_comment
|
||||||
)
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ function ShiftEntry_edit_view(
|
||||||
form_info(__('Type:'), $type),
|
form_info(__('Type:'), $type),
|
||||||
$comment,
|
$comment,
|
||||||
join('', $freeload_form),
|
join('', $freeload_form),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,14 @@ function ShiftType_edit_view($name, $description, $shifttype_id)
|
||||||
return page_with_title($shifttype_id ? __('Edit shifttype') : __('Create shifttype'), [
|
return page_with_title($shifttype_id ? __('Edit shifttype') : __('Create shifttype'), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('shifttypes'), shifttypes_title(), 'back')
|
button(page_link_to('shifttypes'), shifttypes_title(), 'back'),
|
||||||
]),
|
]),
|
||||||
form([
|
form([
|
||||||
form_text('name', __('Name'), $name),
|
form_text('name', __('Name'), $name),
|
||||||
form_textarea('description', __('Description'), $description),
|
form_textarea('description', __('Description'), $description),
|
||||||
form_info('', __('Please use markdown for the description.')),
|
form_info('', __('Please use markdown for the description.')),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
])
|
]),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,10 +80,10 @@ function ShiftType_view(ShiftType $shifttype)
|
||||||
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
||||||
icon('trash') . __('delete'),
|
icon('trash') . __('delete'),
|
||||||
'delete'
|
'delete'
|
||||||
)
|
),
|
||||||
]),
|
]),
|
||||||
heading(__('Description'), 2),
|
heading(__('Description'), 2),
|
||||||
$parsedown->parse($shifttype->description)
|
$parsedown->parse($shifttype->description),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,18 +112,18 @@ function ShiftTypes_list_view($shifttypes)
|
||||||
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
page_link_to('shifttypes', ['action' => 'delete', 'shifttype_id' => $shifttype->id]),
|
||||||
icon('trash') . __('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return page_with_title(shifttypes_title(), [
|
return page_with_title(shifttypes_title(), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('shifttypes', ['action' => 'edit']), __('New shifttype'), 'add')
|
button(page_link_to('shifttypes', ['action' => 'edit']), __('New shifttype'), 'add'),
|
||||||
]),
|
]),
|
||||||
table([
|
table([
|
||||||
'name' => __('Name'),
|
'name' => __('Name'),
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
], $shifttypes)
|
], $shifttypes),
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ class ShiftsFilterRenderer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return div('mb-3', [
|
return div('mb-3', [
|
||||||
toolbar_pills($toolbar)
|
toolbar_pills($toolbar),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ function Shift_view_header(Shift $shift, Room $room)
|
||||||
. ($shift->url != ''
|
. ($shift->url != ''
|
||||||
? '<a href="' . $shift->url . '">' . $shift->title . '</a>'
|
? '<a href="' . $shift->url . '">' . $shift->title . '</a>'
|
||||||
: $shift->title)
|
: $shift->title)
|
||||||
. '</p>'
|
. '</p>',
|
||||||
]),
|
]),
|
||||||
div('col-sm-3 col-xs-6', [
|
div('col-sm-3 col-xs-6', [
|
||||||
'<h4>' . __('Start') . '</h4>',
|
'<h4>' . __('Start') . '</h4>',
|
||||||
|
@ -34,7 +34,7 @@ function Shift_view_header(Shift $shift, Room $room)
|
||||||
icon('calendar-event') . $shift->start->format(__('Y-m-d')),
|
icon('calendar-event') . $shift->start->format(__('Y-m-d')),
|
||||||
'<br />',
|
'<br />',
|
||||||
icon('clock') . $shift->start->format('H:i'),
|
icon('clock') . $shift->start->format('H:i'),
|
||||||
'</p>'
|
'</p>',
|
||||||
]),
|
]),
|
||||||
div('col-sm-3 col-xs-6', [
|
div('col-sm-3 col-xs-6', [
|
||||||
'<h4>' . __('End') . '</h4>',
|
'<h4>' . __('End') . '</h4>',
|
||||||
|
@ -42,12 +42,12 @@ function Shift_view_header(Shift $shift, Room $room)
|
||||||
icon('calendar-event') . $shift->end->format(__('Y-m-d')),
|
icon('calendar-event') . $shift->end->format(__('Y-m-d')),
|
||||||
'<br />',
|
'<br />',
|
||||||
icon('clock') . $shift->end->format('H:i'),
|
icon('clock') . $shift->end->format('H:i'),
|
||||||
'</p>'
|
'</p>',
|
||||||
]),
|
]),
|
||||||
div('col-sm-3 col-xs-6', [
|
div('col-sm-3 col-xs-6', [
|
||||||
'<h4>' . __('Location') . '</h4>',
|
'<h4>' . __('Location') . '</h4>',
|
||||||
'<p class="lead">' . Room_name_render($room) . '</p>'
|
'<p class="lead">' . Room_name_render($room) . '</p>',
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,13 +184,13 @@ function Shift_view(Shift $shift, ShiftType $shifttype, Room $room, $angeltypes_
|
||||||
$content[] = div('row', [
|
$content[] = div('row', [
|
||||||
div('col-sm-6', [
|
div('col-sm-6', [
|
||||||
'<h2>' . __('Needed angels') . '</h2>',
|
'<h2>' . __('Needed angels') . '</h2>',
|
||||||
'<div class="list-group">' . $needed_angels . '</div>'
|
'<div class="list-group">' . $needed_angels . '</div>',
|
||||||
]),
|
]),
|
||||||
div('col-sm-6', [
|
div('col-sm-6', [
|
||||||
'<h2>' . __('Description') . '</h2>',
|
'<h2>' . __('Description') . '</h2>',
|
||||||
$parsedown->parse($shifttype->description),
|
$parsedown->parse($shifttype->description),
|
||||||
$parsedown->parse($shift->description),
|
$parsedown->parse($shift->description),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($shift_admin) {
|
if ($shift_admin) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ function UserAngelTypes_delete_all_view(AngelType $angeltype)
|
||||||
),
|
),
|
||||||
icon('x-lg') . __('cancel')
|
icon('x-lg') . __('cancel')
|
||||||
),
|
),
|
||||||
form_submit('deny_all', icon('check-lg') . __('yes'), 'btn-primary', false)
|
form_submit('deny_all', icon('check-lg') . __('yes'), 'btn-primary', false),
|
||||||
]),
|
]),
|
||||||
], page_link_to('user_angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id])),
|
], page_link_to('user_angeltypes', ['action' => 'delete_all', 'angeltype_id' => $angeltype->id])),
|
||||||
]);
|
]);
|
||||||
|
@ -148,14 +148,14 @@ function UserAngelType_add_view(AngelType $angeltype, $users_source, $user_id)
|
||||||
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
page_link_to('angeltypes', ['action' => 'view', 'angeltype_id' => $angeltype->id]),
|
||||||
__('back'),
|
__('back'),
|
||||||
'back'
|
'back'
|
||||||
)
|
),
|
||||||
]),
|
]),
|
||||||
form([
|
form([
|
||||||
form_info(__('Angeltype'), $angeltype->name),
|
form_info(__('Angeltype'), $angeltype->name),
|
||||||
form_checkbox('auto_confirm_user', __('Confirm user'), true),
|
form_checkbox('auto_confirm_user', __('Confirm user'), true),
|
||||||
form_select('user_id', __('User'), $users, $user_id),
|
form_select('user_id', __('User'), $users, $user_id),
|
||||||
form_submit('submit', __('Add'))
|
form_submit('submit', __('Add')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ function UserAngelType_join_view($user, AngelType $angeltype)
|
||||||
auth()->can('admin_user_angeltypes') ? form_checkbox('auto_confirm_user', __('Confirm user'), true) : '',
|
auth()->can('admin_user_angeltypes') ? form_checkbox('auto_confirm_user', __('Confirm user'), true) : '',
|
||||||
buttons([
|
buttons([
|
||||||
button(angeltype_link($angeltype->id), icon('x-lg') . __('cancel')),
|
button(angeltype_link($angeltype->id), icon('x-lg') . __('cancel')),
|
||||||
form_submit('submit', icon('check-lg') . __('save'), 'btn-primary', false)
|
form_submit('submit', icon('check-lg') . __('save'), 'btn-primary', false),
|
||||||
]),
|
]),
|
||||||
], page_link_to(
|
], page_link_to(
|
||||||
'user_angeltypes',
|
'user_angeltypes',
|
||||||
|
|
|
@ -14,7 +14,7 @@ function UserDriverLicense_edit_view($user_source, $user_driver_license)
|
||||||
{
|
{
|
||||||
return page_with_title(sprintf(__('Edit %s driving license information'), User_Nick_render($user_source)), [
|
return page_with_title(sprintf(__('Edit %s driving license information'), User_Nick_render($user_source)), [
|
||||||
buttons([
|
buttons([
|
||||||
button(user_link($user_source->id), __('Back to profile'), 'back')
|
button(user_link($user_source->id), __('Back to profile'), 'back'),
|
||||||
]),
|
]),
|
||||||
msg(),
|
msg(),
|
||||||
form([
|
form([
|
||||||
|
@ -47,9 +47,9 @@ function UserDriverLicense_edit_view($user_source, $user_driver_license)
|
||||||
'has_license_forklift',
|
'has_license_forklift',
|
||||||
__('Forklift'),
|
__('Forklift'),
|
||||||
$user_driver_license->drive_forklift
|
$user_driver_license->drive_forklift
|
||||||
)
|
),
|
||||||
], 'driving_license'),
|
], 'driving_license'),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
]),
|
]),
|
||||||
'
|
'
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -68,6 +68,6 @@ function UserDriverLicense_edit_view($user_source, $user_driver_license)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
'
|
',
|
||||||
], true);
|
], true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ function User_delete_view($user)
|
||||||
return page_with_title(sprintf(__('Delete %s'), User_Nick_render($user)), [
|
return page_with_title(sprintf(__('Delete %s'), User_Nick_render($user)), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
button(user_edit_link($user->id), icon('chevron-left') . __('back'))
|
button(user_edit_link($user->id), icon('chevron-left') . __('back')),
|
||||||
]),
|
]),
|
||||||
error(
|
error(
|
||||||
__('Do you really want to delete the user including all his shifts and every other piece of his data?'),
|
__('Do you really want to delete the user including all his shifts and every other piece of his data?'),
|
||||||
|
@ -29,8 +29,8 @@ function User_delete_view($user)
|
||||||
),
|
),
|
||||||
form([
|
form([
|
||||||
form_password('password', __('Your password'), 'current-password'),
|
form_password('password', __('Your password'), 'current-password'),
|
||||||
form_submit('submit', __('Delete'))
|
form_submit('submit', __('Delete')),
|
||||||
])
|
]),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ function User_edit_vouchers_view($user)
|
||||||
return page_with_title(sprintf(__('%s\'s vouchers'), User_Nick_render($user)), [
|
return page_with_title(sprintf(__('%s\'s vouchers'), User_Nick_render($user)), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
button(user_link($user->id), icon('chevron-left') . __('back'))
|
button(user_link($user->id), icon('chevron-left') . __('back')),
|
||||||
]),
|
]),
|
||||||
info(sprintf(
|
info(sprintf(
|
||||||
$user->state->force_active
|
$user->state->force_active
|
||||||
|
@ -56,10 +56,10 @@ function User_edit_vouchers_view($user)
|
||||||
form(
|
form(
|
||||||
[
|
[
|
||||||
form_spinner('vouchers', __('Number of vouchers given out'), $user->state->got_voucher),
|
form_spinner('vouchers', __('Number of vouchers given out'), $user->state->got_voucher),
|
||||||
form_submit('submit', __('Save'))
|
form_submit('submit', __('Save')),
|
||||||
],
|
],
|
||||||
page_link_to('users', ['action' => 'edit_vouchers', 'user_id' => $user->id])
|
page_link_to('users', ['action' => 'edit_vouchers', 'user_id' => $user->id])
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ function Users_view(
|
||||||
? $user->personalData->planned_departure_date->format(__('Y-m-d')) : '';
|
? $user->personalData->planned_departure_date->format(__('Y-m-d')) : '';
|
||||||
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : '';
|
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : '';
|
||||||
$u['actions'] = table_buttons([
|
$u['actions'] = table_buttons([
|
||||||
button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil', 'btn-sm')
|
button_icon(page_link_to('admin_user', ['id' => $user->id]), 'pencil', 'btn-sm'),
|
||||||
]);
|
]);
|
||||||
$usersList[] = $u;
|
$usersList[] = $u;
|
||||||
}
|
}
|
||||||
|
@ -122,11 +122,11 @@ function Users_view(
|
||||||
'force_active' => $force_active_count,
|
'force_active' => $force_active_count,
|
||||||
'freeloads' => $freeloads_count,
|
'freeloads' => $freeloads_count,
|
||||||
'got_shirt' => $tshirts_count,
|
'got_shirt' => $tshirts_count,
|
||||||
'actions' => '<strong>' . count($usersList) . '</strong>'
|
'actions' => '<strong>' . count($usersList) . '</strong>',
|
||||||
];
|
];
|
||||||
|
|
||||||
$user_table_headers = [
|
$user_table_headers = [
|
||||||
'name' => Users_table_header_link('name', __('Nick'), $order_by)
|
'name' => Users_table_header_link('name', __('Nick'), $order_by),
|
||||||
];
|
];
|
||||||
if (config('enable_user_name')) {
|
if (config('enable_user_name')) {
|
||||||
$user_table_headers['first_name'] = Users_table_header_link('first_name', __('Prename'), $order_by);
|
$user_table_headers['first_name'] = Users_table_header_link('first_name', __('Prename'), $order_by);
|
||||||
|
@ -172,9 +172,9 @@ function Users_view(
|
||||||
return page_with_title(__('All users'), [
|
return page_with_title(__('All users'), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
button(page_link_to('register'), icon('plus-lg') . __('New user'))
|
button(page_link_to('register'), icon('plus-lg') . __('New user')),
|
||||||
]),
|
]),
|
||||||
table($user_table_headers, $usersList)
|
table($user_table_headers, $usersList),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ function User_view_myshift(Shift $shift, $user_source, $its_me)
|
||||||
'duration' => sprintf('%.2f', ($shift->end->timestamp - $shift->start->timestamp) / 3600) . ' h',
|
'duration' => sprintf('%.2f', ($shift->end->timestamp - $shift->start->timestamp) / 3600) . ' h',
|
||||||
'room' => Room_name_render($shift->room),
|
'room' => Room_name_render($shift->room),
|
||||||
'shift_info' => $shift_info,
|
'shift_info' => $shift_info,
|
||||||
'comment' => ''
|
'comment' => '',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($its_me) {
|
if ($its_me) {
|
||||||
|
@ -332,7 +332,7 @@ function User_view_myshift(Shift $shift, $user_source, $its_me)
|
||||||
}
|
}
|
||||||
|
|
||||||
$myshift['actions'] = [
|
$myshift['actions'] = [
|
||||||
button(shift_link($shift), icon('eye') . __('view'), 'btn-sm')
|
button(shift_link($shift), icon('eye') . __('view'), 'btn-sm'),
|
||||||
];
|
];
|
||||||
if ($its_me || auth()->can('user_shifts_admin')) {
|
if ($its_me || auth()->can('user_shifts_admin')) {
|
||||||
$myshift['actions'][] = button(
|
$myshift['actions'][] = button(
|
||||||
|
@ -403,7 +403,7 @@ function User_view_myshifts(
|
||||||
'room' => '',
|
'room' => '',
|
||||||
'shift_info' => '',
|
'shift_info' => '',
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
if (config('enable_tshirt_size', false) && ($its_me || $tshirt_admin)) {
|
if (config('enable_tshirt_size', false) && ($its_me || $tshirt_admin)) {
|
||||||
$myshifts_table[] = [
|
$myshifts_table[] = [
|
||||||
|
@ -412,7 +412,7 @@ function User_view_myshifts(
|
||||||
'room' => '',
|
'room' => '',
|
||||||
'shift_info' => '',
|
'shift_info' => '',
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
'actions' => ''
|
'actions' => '',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -440,7 +440,7 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege)
|
||||||
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id . '/delete'),
|
url('/admin/user/' . $worklog->user->id . '/worklog/' . $worklog->id . '/delete'),
|
||||||
icon('trash') . __('delete'),
|
icon('trash') . __('delete'),
|
||||||
'btn-sm'
|
'btn-sm'
|
||||||
)
|
),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ function User_view_worklog(Worklog $worklog, $admin_user_worklog_privilege)
|
||||||
User_Nick_render($worklog->creator),
|
User_Nick_render($worklog->creator),
|
||||||
$worklog->created_at->format('Y-m-d H:i')
|
$worklog->created_at->format('Y-m-d H:i')
|
||||||
),
|
),
|
||||||
'actions' => $actions
|
'actions' => $actions,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -512,7 +512,7 @@ function User_view(
|
||||||
'room' => __('Location'),
|
'room' => __('Location'),
|
||||||
'shift_info' => __('Name & workmates'),
|
'shift_info' => __('Name & workmates'),
|
||||||
'comment' => __('Comment'),
|
'comment' => __('Comment'),
|
||||||
'actions' => __('Action')
|
'actions' => __('Action'),
|
||||||
], $my_shifts);
|
], $my_shifts);
|
||||||
} elseif ($user_source->state->force_active) {
|
} elseif ($user_source->state->force_active) {
|
||||||
$myshifts_table = success(__('You have done enough.'), true);
|
$myshifts_table = success(__('You have done enough.'), true);
|
||||||
|
@ -554,7 +554,7 @@ function User_view(
|
||||||
form([
|
form([
|
||||||
form_hidden('action', 'arrived'),
|
form_hidden('action', 'arrived'),
|
||||||
form_hidden('user', $user_source->id),
|
form_hidden('user', $user_source->id),
|
||||||
form_submit('submit', __('arrived'), '', false)
|
form_submit('submit', __('arrived'), '', false),
|
||||||
], page_link_to('admin_arrive'), true) : '',
|
], page_link_to('admin_arrive'), true) : '',
|
||||||
($admin_user_privilege || $auth->can('voucher.edit')) && config('enable_voucher') ?
|
($admin_user_privilege || $auth->can('voucher.edit')) && config('enable_voucher') ?
|
||||||
button(
|
button(
|
||||||
|
@ -588,9 +588,9 @@ function User_view(
|
||||||
)) ? button(
|
)) ? button(
|
||||||
page_link_to('user_myshifts', ['reset' => 1]),
|
page_link_to('user_myshifts', ['reset' => 1]),
|
||||||
icon('arrow-repeat') . __('Reset API key')
|
icon('arrow-repeat') . __('Reset API key')
|
||||||
) : ''
|
) : '',
|
||||||
])
|
]),
|
||||||
])
|
]),
|
||||||
]),
|
]),
|
||||||
div('row user-info', [
|
div('row user-info', [
|
||||||
div('col-md-2', [
|
div('col-md-2', [
|
||||||
|
@ -641,7 +641,7 @@ function User_view(
|
||||||
page_link_to('user_shifts')
|
page_link_to('user_shifts')
|
||||||
), true)
|
), true)
|
||||||
: '',
|
: '',
|
||||||
$its_me ? ical_hint() : ''
|
$its_me ? ical_hint() : '',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -664,7 +664,7 @@ function User_view_state($admin_user_privilege, $freeloader, $user_source)
|
||||||
|
|
||||||
return div('col-md-2', [
|
return div('col-md-2', [
|
||||||
heading(__('User state'), 4),
|
heading(__('User state'), 4),
|
||||||
join('<br>', $state)
|
join('<br>', $state),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ function User_view_state($admin_user_privilege, $freeloader, $user_source)
|
||||||
function User_view_state_user($user_source)
|
function User_view_state_user($user_source)
|
||||||
{
|
{
|
||||||
$state = [
|
$state = [
|
||||||
User_shift_state_render($user_source)
|
User_shift_state_render($user_source),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($user_source->state->arrived) {
|
if ($user_source->state->arrived) {
|
||||||
|
@ -771,7 +771,7 @@ function User_angeltypes_render($user_angeltypes)
|
||||||
}
|
}
|
||||||
return div('col-md-2', [
|
return div('col-md-2', [
|
||||||
heading(__('Angeltypes'), 4),
|
heading(__('Angeltypes'), 4),
|
||||||
join('<br>', $output)
|
join('<br>', $output),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ function User_groups_render($user_groups)
|
||||||
|
|
||||||
return div('col-md-2', [
|
return div('col-md-2', [
|
||||||
'<h4>' . __('Rights') . '</h4>',
|
'<h4>' . __('Rights') . '</h4>',
|
||||||
join('<br>', $output)
|
join('<br>', $output),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ class NewsController extends BaseController
|
||||||
'Deleted {type} "{news}"',
|
'Deleted {type} "{news}"',
|
||||||
[
|
[
|
||||||
'type' => $news->is_meeting ? 'meeting' : 'news',
|
'type' => $news->is_meeting ? 'meeting' : 'news',
|
||||||
'news' => $news->title
|
'news' => $news->title,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class UserShirtController extends BaseController
|
||||||
'size' => $user->personalData->shirt_size,
|
'size' => $user->personalData->shirt_size,
|
||||||
'arrived' => $user->state->arrived ? 'yes' : 'no',
|
'arrived' => $user->state->arrived ? 'yes' : 'no',
|
||||||
'active' => $user->state->active ? 'yes' : 'no',
|
'active' => $user->state->active ? 'yes' : 'no',
|
||||||
'got_shirt' => $user->state->got_shirt ? 'yes' : 'no'
|
'got_shirt' => $user->state->got_shirt ? 'yes' : 'no',
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ class UserWorkLogController extends BaseController
|
||||||
|
|
||||||
return $this->response->withView(
|
return $this->response->withView(
|
||||||
'admin/user/delete-worklog.twig',
|
'admin/user/delete-worklog.twig',
|
||||||
[ 'user' => $user ]
|
['user' => $user]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ class FeedController extends BaseController
|
||||||
...$entry->toArray(),
|
...$entry->toArray(),
|
||||||
|
|
||||||
// Fahrplan app required data
|
// Fahrplan app required data
|
||||||
...$data
|
...$data,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ class MessagesController extends BaseController
|
||||||
$users = $this->user->orderBy('name')->get()
|
$users = $this->user->orderBy('name')->get()
|
||||||
->except($currentUser->id)
|
->except($currentUser->id)
|
||||||
->mapWithKeys(function ($u) {
|
->mapWithKeys(function ($u) {
|
||||||
return [ $u->id => $u->name ];
|
return [$u->id => $u->name];
|
||||||
});
|
});
|
||||||
$users->prepend($currentUser->name, $currentUser->id);
|
$users->prepend($currentUser->name, $currentUser->id);
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ class MessagesController extends BaseController
|
||||||
'pages/messages/overview.twig',
|
'pages/messages/overview.twig',
|
||||||
[
|
[
|
||||||
'conversations' => $conversations,
|
'conversations' => $conversations,
|
||||||
'users' => $users
|
'users' => $users,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -185,7 +185,7 @@ class MessagesController extends BaseController
|
||||||
->groupBy('user_id')
|
->groupBy('user_id')
|
||||||
->get(['user_id', 'amount'])
|
->get(['user_id', 'amount'])
|
||||||
->mapWithKeys(function ($unread) {
|
->mapWithKeys(function ($unread) {
|
||||||
return [ $unread->user_id => $unread->amount ];
|
return [$unread->user_id => $unread->amount];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,7 +126,7 @@ class Controller extends BaseController
|
||||||
'tshirts_issued' => ['type' => 'counter', 'help' => 'Issued T-Shirts', $this->stats->tshirts()],
|
'tshirts_issued' => ['type' => 'counter', 'help' => 'Issued T-Shirts', $this->stats->tshirts()],
|
||||||
'tshirt_sizes' => [
|
'tshirt_sizes' => [
|
||||||
'type' => 'gauge',
|
'type' => 'gauge',
|
||||||
'help' => 'The sizes users have configured'
|
'help' => 'The sizes users have configured',
|
||||||
] + $userTshirtSizes,
|
] + $userTshirtSizes,
|
||||||
'locales' => ['type' => 'gauge', 'help' => 'The locales users have configured'] + $userLocales,
|
'locales' => ['type' => 'gauge', 'help' => 'The locales users have configured'] + $userLocales,
|
||||||
'themes' => ['type' => 'gauge', 'help' => 'The themes users have configured'] + $userThemes,
|
'themes' => ['type' => 'gauge', 'help' => 'The themes users have configured'] + $userThemes,
|
||||||
|
|
|
@ -56,7 +56,7 @@ class OAuthController extends BaseController
|
||||||
[
|
[
|
||||||
// Leauge separates scopes by comma, which is wrong, so we do it
|
// Leauge separates scopes by comma, which is wrong, so we do it
|
||||||
// here properly by spaces. See https://www.rfc-editor.org/rfc/rfc6749#section-3.3
|
// here properly by spaces. See https://www.rfc-editor.org/rfc/rfc6749#section-3.3
|
||||||
'scope' => join(' ', $config['scope'] ?? [])
|
'scope' => join(' ', $config['scope'] ?? []),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
$this->session->set('oauth2_state', $provider->getState());
|
$this->session->set('oauth2_state', $provider->getState());
|
||||||
|
@ -80,7 +80,7 @@ class OAuthController extends BaseController
|
||||||
$accessToken = $provider->getAccessToken(
|
$accessToken = $provider->getAccessToken(
|
||||||
'authorization_code',
|
'authorization_code',
|
||||||
[
|
[
|
||||||
'code' => $request->get('code')
|
'code' => $request->get('code'),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
} catch (IdentityProviderException $e) {
|
} catch (IdentityProviderException $e) {
|
||||||
|
@ -258,7 +258,7 @@ class OAuthController extends BaseController
|
||||||
'provider' => $providerName,
|
'provider' => $providerName,
|
||||||
'user' => $this->getId($providerName, $resourceOwner),
|
'user' => $this->getId($providerName, $resourceOwner),
|
||||||
'name' => $user->name,
|
'name' => $user->name,
|
||||||
'id' => $user->id
|
'id' => $user->id,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,7 +114,7 @@ class SettingsController extends BaseController
|
||||||
'pages/settings/password',
|
'pages/settings/password',
|
||||||
[
|
[
|
||||||
'settings_menu' => $this->settingsMenu(),
|
'settings_menu' => $this->settingsMenu(),
|
||||||
'min_length' => config('min_password_length')
|
'min_length' => config('min_password_length'),
|
||||||
] + $this->getNotifications()
|
] + $this->getNotifications()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ class SettingsController extends BaseController
|
||||||
[
|
[
|
||||||
'settings_menu' => $this->settingsMenu(),
|
'settings_menu' => $this->settingsMenu(),
|
||||||
'themes' => $themes,
|
'themes' => $themes,
|
||||||
'current_theme' => $currentTheme
|
'current_theme' => $currentTheme,
|
||||||
] + $this->getNotifications()
|
] + $this->getNotifications()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ class SettingsController extends BaseController
|
||||||
[
|
[
|
||||||
'settings_menu' => $this->settingsMenu(),
|
'settings_menu' => $this->settingsMenu(),
|
||||||
'languages' => $languages,
|
'languages' => $languages,
|
||||||
'current_language' => $currentLanguage
|
'current_language' => $currentLanguage,
|
||||||
] + $this->getNotifications()
|
] + $this->getNotifications()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -238,7 +238,7 @@ class SettingsController extends BaseController
|
||||||
url('/settings/profile') => 'settings.profile',
|
url('/settings/profile') => 'settings.profile',
|
||||||
url('/settings/password') => 'settings.password',
|
url('/settings/password') => 'settings.password',
|
||||||
url('/settings/language') => 'settings.language',
|
url('/settings/language') => 'settings.language',
|
||||||
url('/settings/theme') => 'settings.theme'
|
url('/settings/theme') => 'settings.theme',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!empty(config('oauth'))) {
|
if (!empty(config('oauth'))) {
|
||||||
|
|
|
@ -160,7 +160,7 @@ class BarChart
|
||||||
[
|
[
|
||||||
|
|
||||||
'count' => '#090',
|
'count' => '#090',
|
||||||
'sum' => '#888'
|
'sum' => '#888',
|
||||||
],
|
],
|
||||||
$demoData,
|
$demoData,
|
||||||
];
|
];
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Question extends BaseModel
|
||||||
|
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
protected $dates = [ // phpcs:ignore
|
protected $dates = [ // phpcs:ignore
|
||||||
'answered_at'
|
'answered_at',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var array<string> */
|
/** @var array<string> */
|
||||||
|
|
|
@ -26,7 +26,7 @@ class NewsControllerTest extends ControllerTest
|
||||||
'title' => 'Foo',
|
'title' => 'Foo',
|
||||||
'text' => '**foo**',
|
'text' => '**foo**',
|
||||||
'user_id' => 1,
|
'user_id' => 1,
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -110,7 +110,7 @@ class UserWorkLogControllerTest extends ControllerTest
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'worked_at' => new Carbon('2022-01-01'),
|
'worked_at' => new Carbon('2022-01-01'),
|
||||||
'hours' => 3.14,
|
'hours' => 3.14,
|
||||||
'comment' => 'a comment'
|
'comment' => 'a comment',
|
||||||
])->create();
|
])->create();
|
||||||
|
|
||||||
$request = $this->request
|
$request = $this->request
|
||||||
|
|
|
@ -71,7 +71,7 @@ class ControllerTest extends TestCase
|
||||||
$this->assertArraySubset(['tshirt_sizes' => [
|
$this->assertArraySubset(['tshirt_sizes' => [
|
||||||
'type' => 'gauge',
|
'type' => 'gauge',
|
||||||
['labels' => ['size' => 'L'], 2],
|
['labels' => ['size' => 'L'], 2],
|
||||||
['labels' => ['size' => 'XL'], 0]
|
['labels' => ['size' => 'XL'], 0],
|
||||||
]], $data);
|
]], $data);
|
||||||
|
|
||||||
return 'metrics return';
|
return 'metrics return';
|
||||||
|
|
|
@ -77,7 +77,7 @@ engelsystem_test_minimum_histogram_count 4
|
||||||
EOD,
|
EOD,
|
||||||
$engine->get('/metrics', [
|
$engine->get('/metrics', [
|
||||||
'test_minimum_histogram' => [
|
'test_minimum_histogram' => [
|
||||||
'type' => 'histogram', [3 => 4, 'sum' => 1.337]
|
'type' => 'histogram', [3 => 4, 'sum' => 1.337],
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
@ -96,7 +96,7 @@ EOD,
|
||||||
$engine->get('/metrics', [
|
$engine->get('/metrics', [
|
||||||
'test_short_histogram' => [
|
'test_short_histogram' => [
|
||||||
'type' => 'histogram',
|
'type' => 'histogram',
|
||||||
'value' => [120 => 19, '+Inf' => 300, 60 => 10, 0 => 0, 'sum' => 123.456]
|
'value' => [120 => 19, '+Inf' => 300, 60 => 10, 0 => 0, 'sum' => 123.456],
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
@ -134,7 +134,7 @@ engelsystem_test_minimum_histogram_count NaN
|
||||||
EOD,
|
EOD,
|
||||||
$engine->get('/metrics', [
|
$engine->get('/metrics', [
|
||||||
'test_minimum_histogram' => [
|
'test_minimum_histogram' => [
|
||||||
'type' => 'histogram', []
|
'type' => 'histogram', [],
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
);
|
);
|
||||||
|
|
|
@ -155,7 +155,7 @@ class StatsTest extends TestCase
|
||||||
'creator_id' => 1,
|
'creator_id' => 1,
|
||||||
'hours' => 2.4,
|
'hours' => 2.4,
|
||||||
'comment' => '',
|
'comment' => '',
|
||||||
'worked_at' => new Carbon()
|
'worked_at' => new Carbon(),
|
||||||
];
|
];
|
||||||
(new Worklog($worklogData))->save();
|
(new Worklog($worklogData))->save();
|
||||||
(new Worklog(['hours' => 1.2, 'user_id' => 3] + $worklogData))->save();
|
(new Worklog(['hours' => 1.2, 'user_id' => 3] + $worklogData))->save();
|
||||||
|
@ -183,7 +183,7 @@ class StatsTest extends TestCase
|
||||||
2 * 60 * 60,
|
2 * 60 * 60,
|
||||||
3 * 60 * 60,
|
3 * 60 * 60,
|
||||||
4 * 60 * 60,
|
4 * 60 * 60,
|
||||||
'+Inf'
|
'+Inf',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->assertEquals([
|
$this->assertEquals([
|
||||||
|
|
|
@ -387,7 +387,7 @@ class OAuthControllerTest extends TestCase
|
||||||
['unsupported_response_type'],
|
['unsupported_response_type'],
|
||||||
['invalid_scope'],
|
['invalid_scope'],
|
||||||
['server_error'],
|
['server_error'],
|
||||||
['temporarily_unavailable']
|
['temporarily_unavailable'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ class OAuthControllerTest extends TestCase
|
||||||
$this->oauth,
|
$this->oauth,
|
||||||
$this->redirect,
|
$this->redirect,
|
||||||
$this->session,
|
$this->session,
|
||||||
$this->url
|
$this->url,
|
||||||
])
|
])
|
||||||
->onlyMethods($mockMethods)
|
->onlyMethods($mockMethods)
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
|
@ -208,7 +208,7 @@ class PasswordResetControllerTest extends TestCase
|
||||||
'session' => $session,
|
'session' => $session,
|
||||||
'mailer' => $mailer,
|
'mailer' => $mailer,
|
||||||
'log' => $log,
|
'log' => $log,
|
||||||
'renderer' => $renderer
|
'renderer' => $renderer,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -251,7 +251,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
$body = [
|
$body = [
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
'new_password' => 'newpassword',
|
'new_password' => 'newpassword',
|
||||||
'new_password2' => 'newpassword'
|
'new_password2' => 'newpassword',
|
||||||
];
|
];
|
||||||
$this->request = $this->request->withParsedBody($body);
|
$this->request = $this->request->withParsedBody($body);
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
|
|
||||||
$body = [
|
$body = [
|
||||||
'new_password' => 'anotherpassword',
|
'new_password' => 'anotherpassword',
|
||||||
'new_password2' => 'anotherpassword'
|
'new_password2' => 'anotherpassword',
|
||||||
];
|
];
|
||||||
$this->request = $this->request->withParsedBody($body);
|
$this->request = $this->request->withParsedBody($body);
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
$body = [
|
$body = [
|
||||||
'password' => 'wrongpassword',
|
'password' => 'wrongpassword',
|
||||||
'new_password' => 'newpassword',
|
'new_password' => 'newpassword',
|
||||||
'new_password2' => 'newpassword'
|
'new_password2' => 'newpassword',
|
||||||
];
|
];
|
||||||
$this->request = $this->request->withParsedBody($body);
|
$this->request = $this->request->withParsedBody($body);
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
$body = [
|
$body = [
|
||||||
'password' => 'password',
|
'password' => 'password',
|
||||||
'new_password' => 'newpassword',
|
'new_password' => 'newpassword',
|
||||||
'new_password2' => 'wrongpassword'
|
'new_password2' => 'wrongpassword',
|
||||||
];
|
];
|
||||||
$this->request = $this->request->withParsedBody($body);
|
$this->request = $this->request->withParsedBody($body);
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
[null, 'newpassword', 'newpassword'],
|
[null, 'newpassword', 'newpassword'],
|
||||||
['password', null, 'newpassword'],
|
['password', null, 'newpassword'],
|
||||||
['password', 'newpassword', null],
|
['password', 'newpassword', null],
|
||||||
['password', 'short', 'short']
|
['password', 'short', 'short'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,7 +389,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
$body = [
|
$body = [
|
||||||
'password' => $password,
|
'password' => $password,
|
||||||
'new_password' => $newPassword,
|
'new_password' => $newPassword,
|
||||||
'new_password2' => $newPassword2
|
'new_password2' => $newPassword2,
|
||||||
];
|
];
|
||||||
$this->request = $this->request->withParsedBody($body);
|
$this->request = $this->request->withParsedBody($body);
|
||||||
|
|
||||||
|
@ -594,7 +594,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
'http://localhost/settings/password' => 'settings.password',
|
'http://localhost/settings/password' => 'settings.password',
|
||||||
'http://localhost/settings/language' => 'settings.language',
|
'http://localhost/settings/language' => 'settings.language',
|
||||||
'http://localhost/settings/theme' => 'settings.theme',
|
'http://localhost/settings/theme' => 'settings.theme',
|
||||||
'http://localhost/settings/oauth' => ['title' => 'settings.oauth', 'hidden' => false]
|
'http://localhost/settings/oauth' => ['title' => 'settings.oauth', 'hidden' => false],
|
||||||
], $this->controller->settingsMenu());
|
], $this->controller->settingsMenu());
|
||||||
|
|
||||||
config(['oauth' => $providersHidden]);
|
config(['oauth' => $providersHidden]);
|
||||||
|
@ -603,7 +603,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
'http://localhost/settings/password' => 'settings.password',
|
'http://localhost/settings/password' => 'settings.password',
|
||||||
'http://localhost/settings/language' => 'settings.language',
|
'http://localhost/settings/language' => 'settings.language',
|
||||||
'http://localhost/settings/theme' => 'settings.theme',
|
'http://localhost/settings/theme' => 'settings.theme',
|
||||||
'http://localhost/settings/oauth' => ['title' => 'settings.oauth', 'hidden' => true]
|
'http://localhost/settings/oauth' => ['title' => 'settings.oauth', 'hidden' => true],
|
||||||
], $this->controller->settingsMenu());
|
], $this->controller->settingsMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -618,7 +618,7 @@ class SettingsControllerTest extends ControllerTest
|
||||||
'http://localhost/settings/profile' => 'settings.profile',
|
'http://localhost/settings/profile' => 'settings.profile',
|
||||||
'http://localhost/settings/password' => 'settings.password',
|
'http://localhost/settings/password' => 'settings.password',
|
||||||
'http://localhost/settings/language' => 'settings.language',
|
'http://localhost/settings/language' => 'settings.language',
|
||||||
'http://localhost/settings/theme' => 'settings.theme'
|
'http://localhost/settings/theme' => 'settings.theme',
|
||||||
], $this->controller->settingsMenu());
|
], $this->controller->settingsMenu());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -631,18 +631,18 @@ class SettingsControllerTest extends ControllerTest
|
||||||
|
|
||||||
$themes = [
|
$themes = [
|
||||||
0 => ['name' => 'Engelsystem light'],
|
0 => ['name' => 'Engelsystem light'],
|
||||||
1 => ['name' => 'Engelsystem dark']
|
1 => ['name' => 'Engelsystem dark'],
|
||||||
];
|
];
|
||||||
$languages = [
|
$languages = [
|
||||||
'en_US' => 'English',
|
'en_US' => 'English',
|
||||||
'de_DE' => 'Deutsch'
|
'de_DE' => 'Deutsch',
|
||||||
];
|
];
|
||||||
$tshirt_sizes = ['S' => 'Small'];
|
$tshirt_sizes = ['S' => 'Small'];
|
||||||
$this->config = new Config([
|
$this->config = new Config([
|
||||||
'min_password_length' => 6,
|
'min_password_length' => 6,
|
||||||
'themes' => $themes,
|
'themes' => $themes,
|
||||||
'locales' => $languages,
|
'locales' => $languages,
|
||||||
'tshirt_sizes' => $tshirt_sizes
|
'tshirt_sizes' => $tshirt_sizes,
|
||||||
]);
|
]);
|
||||||
$this->app->instance('config', $this->config);
|
$this->app->instance('config', $this->config);
|
||||||
$this->app->instance(Config::class, $this->config);
|
$this->app->instance(Config::class, $this->config);
|
||||||
|
|
|
@ -152,7 +152,7 @@ class MigrateTest extends TestCase
|
||||||
$this->setExpects($migration, 'lockTable');
|
$this->setExpects($migration, 'lockTable');
|
||||||
$this->setExpects($migration, 'unlockTable');
|
$this->setExpects($migration, 'unlockTable');
|
||||||
$this->setExpects($migration, 'getMigrations', null, collect([
|
$this->setExpects($migration, 'getMigrations', null, collect([
|
||||||
['migration' => '1234_01_23_123456_init_foo', 'path' => '/foo']
|
['migration' => '1234_01_23_123456_init_foo', 'path' => '/foo'],
|
||||||
]));
|
]));
|
||||||
$this->setExpects($migration, 'getMigrated', null, collect([]));
|
$this->setExpects($migration, 'getMigrated', null, collect([]));
|
||||||
$migration->expects($this->once())
|
$migration->expects($this->once())
|
||||||
|
|
|
@ -30,8 +30,8 @@ class EventsServiceProviderTest extends ServiceProviderTest
|
||||||
$config = new Config([
|
$config = new Config([
|
||||||
'event-handlers' => [
|
'event-handlers' => [
|
||||||
'test.event' => 'someFunction',
|
'test.event' => 'someFunction',
|
||||||
'another.event' => ['Foo\Bar@baz', [$this, 'testRegister']]
|
'another.event' => ['Foo\Bar@baz', [$this, 'testRegister']],
|
||||||
]
|
],
|
||||||
]);
|
]);
|
||||||
$this->app->instance('config', $config);
|
$this->app->instance('config', $config);
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,7 @@ class OAuth2Test extends TestCase
|
||||||
'groups' => 'groups_key',
|
'groups' => 'groups_key',
|
||||||
'teams' => [
|
'teams' => [
|
||||||
'/test' => 21,
|
'/test' => 21,
|
||||||
'/lorem' => ['id' => 42, 'supporter' => true]
|
'/lorem' => ['id' => 42, 'supporter' => true],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
]]);
|
]]);
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FakerProvider extends Base
|
||||||
've',
|
've',
|
||||||
'xe',
|
'xe',
|
||||||
'ze',
|
'ze',
|
||||||
'zie'
|
'zie',
|
||||||
];
|
];
|
||||||
|
|
||||||
/** @var string[] */
|
/** @var string[] */
|
||||||
|
|
|
@ -77,7 +77,7 @@ class BarChartTest extends TestCase
|
||||||
'rowLabels' => self::ROW_LABELS,
|
'rowLabels' => self::ROW_LABELS,
|
||||||
'barChartClass' => '',
|
'barChartClass' => '',
|
||||||
'yLabels' => $yLabels,
|
'yLabels' => $yLabels,
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
yield 'non-empty data' => [
|
yield 'non-empty data' => [
|
||||||
self::DATA,
|
self::DATA,
|
||||||
|
|
|
@ -25,7 +25,7 @@ class DumpServerServiceProviderTest extends ServiceProviderTest
|
||||||
$varDumpServerConfig = [
|
$varDumpServerConfig = [
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'port' => 80,
|
'port' => 80,
|
||||||
'enable' => true
|
'enable' => true,
|
||||||
];
|
];
|
||||||
|
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
|
@ -69,7 +69,7 @@ class DumpServerServiceProviderTest extends ServiceProviderTest
|
||||||
$varDumpServerConfig = [
|
$varDumpServerConfig = [
|
||||||
'host' => 'localhost',
|
'host' => 'localhost',
|
||||||
'port' => 80,
|
'port' => 80,
|
||||||
'enable' => $enable
|
'enable' => $enable,
|
||||||
];
|
];
|
||||||
|
|
||||||
$config = new Config();
|
$config = new Config();
|
||||||
|
|
|
@ -29,7 +29,7 @@ class UuidTest extends TestCase
|
||||||
['42', 'a1d0c6e8-3f02-4327-9846-1063f4ac58a6'],
|
['42', 'a1d0c6e8-3f02-4327-9846-1063f4ac58a6'],
|
||||||
[1.23, '579c4c7f-58e4-45e8-8cfc-73e08903a08c'],
|
[1.23, '579c4c7f-58e4-45e8-8cfc-73e08903a08c'],
|
||||||
['1.23', '579c4c7f-58e4-45e8-8cfc-73e08903a08c'],
|
['1.23', '579c4c7f-58e4-45e8-8cfc-73e08903a08c'],
|
||||||
['test', '098f6bcd-4621-4373-8ade-4e832627b4f6']
|
['test', '098f6bcd-4621-4373-8ade-4e832627b4f6'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class SessionServiceProviderTest extends ServiceProviderTest
|
||||||
[
|
[
|
||||||
// 2 days
|
// 2 days
|
||||||
'options' => ['cookie_httponly' => true, 'name' => 'session', 'cookie_lifetime' => 172800],
|
'options' => ['cookie_httponly' => true, 'name' => 'session', 'cookie_lifetime' => 172800],
|
||||||
'handler' => null
|
'handler' => null,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[Session::class],
|
[Session::class],
|
||||||
|
@ -70,7 +70,7 @@ class SessionServiceProviderTest extends ServiceProviderTest
|
||||||
[
|
[
|
||||||
// 5 days
|
// 5 days
|
||||||
'options' => ['cookie_httponly' => true, 'name' => 'foobar', 'cookie_lifetime' => 432000],
|
'options' => ['cookie_httponly' => true, 'name' => 'foobar', 'cookie_lifetime' => 432000],
|
||||||
'handler' => $databaseHandler
|
'handler' => $databaseHandler,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[Session::class]
|
[Session::class]
|
||||||
|
|
|
@ -75,7 +75,7 @@ class LoggerTest extends ServiceProviderTest
|
||||||
{
|
{
|
||||||
return 'Bar';
|
return 'Bar';
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class NewsTest extends ModelTest
|
||||||
$this->newsData = [
|
$this->newsData = [
|
||||||
'title' => 'test title',
|
'title' => 'test title',
|
||||||
'text' => 'test text',
|
'text' => 'test text',
|
||||||
'user_id' => $this->user->id
|
'user_id' => $this->user->id,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,9 +128,9 @@ class UserTest extends ModelTest
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'name' => 'Ipsum',
|
'name' => 'Ipsum',
|
||||||
]
|
],
|
||||||
]
|
],
|
||||||
]
|
],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue