Merge pull request #1306 from xuwhite/fixes

small bug fixes
This commit is contained in:
Leandra Eberle 2023-12-27 13:26:10 +01:00 committed by GitHub
commit 64fef42087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 14 deletions

View File

@ -414,15 +414,6 @@ function admin_shifts()
$shift->createdBy()->associate(auth()->user());
$shift->save();
engelsystem_log(
'Shift created: ' . $shifttypes[$shift->shift_type_id]
. ' with title ' . $shift->title
. ' with description ' . $shift->description
. ' from ' . $shift->start->format('Y-m-d H:i')
. ' to ' . $shift->end->format('Y-m-d H:i')
. ', transaction: ' . $transactionId
);
$needed_angel_types_info = [];
foreach ($session->get('admin_shifts_types', []) as $type_id => $count) {
$angel_type_source = AngelType::find($type_id);
@ -436,7 +427,13 @@ function admin_shifts()
$needed_angel_types_info[] = $angel_type_source->name . ': ' . $count;
}
}
engelsystem_log('Shift needs following angel types: ' . join(', ', $needed_angel_types_info));
engelsystem_log('Shift created: ' . $shifttypes[$shift->shift_type_id]
. ' with title ' . $shift->title
. ' with description ' . $shift->description
. ' from ' . $shift->start->format('Y-m-d H:i')
. ' to ' . $shift->end->format('Y-m-d H:i')
. ', transaction: ' . $transactionId
. '; needed angel types: ' . join(', ', $needed_angel_types_info));
}
success('Shifts created.');

View File

@ -122,8 +122,9 @@ function Users_view(
'/admin-user',
['id' => $user->id]
),
'pencil',
icon('pencil'),
'btn-sm',
'',
__('form.edit')
),
]);
@ -563,7 +564,10 @@ function User_view(
'actions' => __('general.actions'),
], $my_shifts));
} elseif ($user_source->state->force_active) {
$myshifts_table = success(__('You have done enough.'), true);
$myshifts_table = success(__(
'myshifts.sucess',
[($its_me ? __('You have') : ($user_source->name . ' ' . __('has')))]
), true);
}
}

View File

@ -1187,8 +1187,14 @@ msgstr "Dauer"
msgid "Name & Workmates"
msgstr "Name & Kollegen"
msgid "You have done enough."
msgstr "Du hast genug gemacht."
msgid "myshifts.sucess"
msgstr "%s genug gemacht."
msgid "You have"
msgstr "Du hast"
msgid "has"
msgstr "hat"
msgid "Vouchers"
msgstr "Gutscheine"

View File

@ -937,3 +937,6 @@ msgstr "Actions"
msgid "general.back"
msgstr "Back"
msgid "myshifts.sucess"
msgstr "%s done enough."