#43 - fix
This commit is contained in:
parent
37c08f3823
commit
730b0f9adb
@ -61,7 +61,11 @@ class UserVacationStatsRetriever
|
||||
|
||||
public function getRemainingVacationDays(User $user, YearPeriod $yearPeriod): int
|
||||
{
|
||||
return $this->getVacationDaysLimit($user, $yearPeriod) - $this->getUsedVacationDays($user, $yearPeriod);
|
||||
$limit = $this->getVacationDaysLimit($user, $yearPeriod);
|
||||
$used = $this->getUsedVacationDays($user, $yearPeriod);
|
||||
$pending = $this->getPendingVacationDays($user, $yearPeriod);
|
||||
|
||||
return $limit - $used - $pending;
|
||||
}
|
||||
|
||||
public function getVacationDaysLimit(User $user, YearPeriod $yearPeriod): int
|
||||
|
@ -40,7 +40,7 @@
|
||||
<div class="mt-1 relative sm:mt-0 sm:col-span-2">
|
||||
<ListboxButton
|
||||
class="bg-white relative w-full max-w-lg border rounded-md shadow-sm pl-3 pr-10 py-2 text-left cursor-default sm:text-sm focus:ring-1"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.type, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.type }"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.user, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.user }"
|
||||
>
|
||||
<span class="flex items-center">
|
||||
<img
|
||||
|
Loading…
x
Reference in New Issue
Block a user