Compare commits
6 Commits
61add6b1e8
...
#152-dashb
Author | SHA1 | Date | |
---|---|---|---|
3bea1f41b2
|
|||
d2d753640c
|
|||
40e74be394
|
|||
0e06c6ec54
|
|||
5db97ebd0c
|
|||
d863422103
|
@@ -105,11 +105,10 @@ class UserVacationStatsRetriever
|
|||||||
|
|
||||||
public function hasVacationDaysLimit(User $user, YearPeriod $yearPeriod): bool
|
public function hasVacationDaysLimit(User $user, YearPeriod $yearPeriod): bool
|
||||||
{
|
{
|
||||||
$limit = $user->vacationLimits()
|
return $user->vacationLimits()
|
||||||
->whereBelongsTo($yearPeriod)
|
->whereBelongsTo($yearPeriod)
|
||||||
->first()?->days;
|
->first()
|
||||||
|
?->hasVacation() ?? false;
|
||||||
return $limit !== null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getLimitableVacationTypes(): Collection
|
protected function getLimitableVacationTypes(): Collection
|
||||||
|
@@ -20,11 +20,9 @@
|
|||||||
<div class="grid grid-cols-1 gap-4">
|
<div class="grid grid-cols-1 gap-4">
|
||||||
<VacationStats :stats="stats" />
|
<VacationStats :stats="stats" />
|
||||||
<AbsenceList
|
<AbsenceList
|
||||||
v-if="years.current.year === years.selected.year && absences.data.length"
|
|
||||||
:absences="absences.data"
|
:absences="absences.data"
|
||||||
/>
|
/>
|
||||||
<HomeOfficeList
|
<HomeOfficeList
|
||||||
v-if="years.current.year === years.selected.year && remoteDays.data.length"
|
|
||||||
:remote-days="remoteDays.data"
|
:remote-days="remoteDays.data"
|
||||||
/>
|
/>
|
||||||
<UpcomingHolidays
|
<UpcomingHolidays
|
||||||
|
@@ -8,7 +8,10 @@
|
|||||||
No search result
|
No search result
|
||||||
</slot>
|
</slot>
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-sm">
|
<p
|
||||||
|
v-if="showDescription"
|
||||||
|
class="text-sm"
|
||||||
|
>
|
||||||
<slot name="text">
|
<slot name="text">
|
||||||
Try a different search query
|
Try a different search query
|
||||||
</slot>
|
</slot>
|
||||||
@@ -18,4 +21,11 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { SearchIcon } from '@heroicons/vue/solid'
|
import { SearchIcon } from '@heroicons/vue/solid'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
showDescription: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@@ -6,7 +6,10 @@
|
|||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 border-t border-gray-200 sm:px-6">
|
<div class="px-4 border-t border-gray-200 sm:px-6">
|
||||||
<ul class="divide-y divide-gray-200">
|
<ul
|
||||||
|
v-if="absences.length"
|
||||||
|
class="divide-y divide-gray-200"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
v-for="absence in absences"
|
v-for="absence in absences"
|
||||||
:key="absence.user.id"
|
:key="absence.user.id"
|
||||||
@@ -26,11 +29,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<EmptyState
|
||||||
|
v-else
|
||||||
|
:show-description="false"
|
||||||
|
>
|
||||||
|
<template #head>
|
||||||
|
<SunIcon class="mx-auto w-12 h-12" />
|
||||||
|
</template>
|
||||||
|
<template #title>
|
||||||
|
Brak nieobecności
|
||||||
|
</template>
|
||||||
|
</EmptyState>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import EmptyState from '@/Shared/Feedbacks/EmptyState'
|
||||||
|
import { SunIcon } from '@heroicons/vue/solid'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
absences: Object,
|
absences: Object,
|
||||||
})
|
})
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
day.isHoliday && 'font-bold cursor-default',
|
day.isHoliday && 'font-bold cursor-default',
|
||||||
(day.isPendingVacation) && `border-b-4 border-dashed ${day.getVacationType.border}`,
|
(day.isPendingVacation) && `pb-0 border-b-[3px] border-dashed ${day.getVacationType.border}`,
|
||||||
(day.isVacation) && `border-b-4 ${day.getVacationType.border}`
|
(day.isVacation) && `pb-0 border-b-[3px] ${day.getVacationType.border}`
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<Popper
|
<Popper
|
||||||
|
@@ -6,7 +6,10 @@
|
|||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="px-4 border-t border-gray-200 sm:px-6">
|
<div class="px-4 border-t border-gray-200 sm:px-6">
|
||||||
<ul class="divide-y divide-gray-200">
|
<ul
|
||||||
|
v-if="remoteDays.length"
|
||||||
|
class="divide-y divide-gray-200"
|
||||||
|
>
|
||||||
<li
|
<li
|
||||||
v-for="day in remoteDays"
|
v-for="day in remoteDays"
|
||||||
:key="day.user.id"
|
:key="day.user.id"
|
||||||
@@ -26,11 +29,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<EmptyState
|
||||||
|
v-else
|
||||||
|
:show-description="false"
|
||||||
|
>
|
||||||
|
<template #head>
|
||||||
|
<HomeCityIcon
|
||||||
|
class="flex justify-center"
|
||||||
|
size="48"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #title>
|
||||||
|
Nikt nie pracuje z domu
|
||||||
|
</template>
|
||||||
|
</EmptyState>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import EmptyState from '@/Shared/Feedbacks/EmptyState'
|
||||||
|
import HomeCityIcon from 'vue-material-design-icons/HomeCity'
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
remoteDays: Object,
|
remoteDays: Object,
|
||||||
})
|
})
|
||||||
|
@@ -91,13 +91,13 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
<div class="ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col">
|
<div class="border border-gray-300 lg:flex lg:flex-auto lg:flex-col">
|
||||||
<div
|
<div
|
||||||
v-if="calendarState.viewMode.isMonth"
|
v-if="calendarState.viewMode.isMonth"
|
||||||
class="grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none"
|
class="grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-300 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none"
|
||||||
>
|
>
|
||||||
<div class="py-2 bg-white">
|
<div class="py-2 bg-white">
|
||||||
Pn
|
Pon
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 bg-white">
|
<div class="py-2 bg-white">
|
||||||
Wt
|
Wt
|
||||||
@@ -106,19 +106,19 @@
|
|||||||
Śr
|
Śr
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 bg-white">
|
<div class="py-2 bg-white">
|
||||||
Cz
|
Czw
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 bg-white">
|
<div class="py-2 bg-white">
|
||||||
Pt
|
Pt
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 bg-red-100 text-red-800">
|
<div class="py-2 bg-red-100 text-red-800">
|
||||||
Sb
|
Sob
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 bg-red-100 text-red-800">
|
<div class="py-2 bg-red-100 text-red-800">
|
||||||
Nd
|
Ndz
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto">
|
<div class="flex bg-gray-300 text-xs leading-6 text-gray-700 lg:flex-auto">
|
||||||
<div
|
<div
|
||||||
class="w-full grid grid-cols-7 gap-px"
|
class="w-full grid grid-cols-7 gap-px"
|
||||||
:class="{ 'grid-rows-1': calendarState.viewMode.isWeek }"
|
:class="{ 'grid-rows-1': calendarState.viewMode.isWeek }"
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
v-for="(day, index) in days"
|
v-for="(day, index) in days"
|
||||||
:key="index"
|
:key="index"
|
||||||
:day="day"
|
:day="day"
|
||||||
class="flex flex-col relative py-2 px-3"
|
class="flex flex-col relative py-3 px-3"
|
||||||
:class="{ 'day': calendarState.viewMode.isWeek }"
|
:class="{ 'day': calendarState.viewMode.isWeek }"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -378,7 +378,7 @@ function getVacationInfo(day) {
|
|||||||
|
|
||||||
<style lang="css">
|
<style lang="css">
|
||||||
.day:nth-of-type(7n - 6):before {
|
.day:nth-of-type(7n - 6):before {
|
||||||
content: "Pn";
|
content: "Pon";
|
||||||
}
|
}
|
||||||
|
|
||||||
.day:nth-of-type(7n - 5):before {
|
.day:nth-of-type(7n - 5):before {
|
||||||
@@ -390,7 +390,7 @@ function getVacationInfo(day) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.day:nth-of-type(7n - 3):before {
|
.day:nth-of-type(7n - 3):before {
|
||||||
content: "Cz";
|
content: "Czw";
|
||||||
}
|
}
|
||||||
|
|
||||||
.day:nth-of-type(7n - 2):before {
|
.day:nth-of-type(7n - 2):before {
|
||||||
@@ -398,10 +398,10 @@ function getVacationInfo(day) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.day:nth-of-type(7n - 1):before {
|
.day:nth-of-type(7n - 1):before {
|
||||||
content: "Sb";
|
content: "Sob";
|
||||||
}
|
}
|
||||||
|
|
||||||
.day:nth-of-type(7n):before {
|
.day:nth-of-type(7n):before {
|
||||||
content: "Nd";
|
content: "Ndz";
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -11,6 +11,9 @@
|
|||||||
<dt class="font-medium text-gray-700 truncate text-md">
|
<dt class="font-medium text-gray-700 truncate text-md">
|
||||||
Pozostało
|
Pozostało
|
||||||
</dt>
|
</dt>
|
||||||
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
|
Dni do wykorzystania teraz.
|
||||||
|
</dt>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
||||||
<dd class="mt-1 text-4xl font-semibold text-blumilk-700">
|
<dd class="mt-1 text-4xl font-semibold text-blumilk-700">
|
||||||
@@ -19,6 +22,9 @@
|
|||||||
<dt class="font-medium text-gray-700 truncate text-md">
|
<dt class="font-medium text-gray-700 truncate text-md">
|
||||||
Wykorzystane
|
Wykorzystane
|
||||||
</dt>
|
</dt>
|
||||||
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
|
Dni, które zostały już wykorzystane na urlop wypoczynkowy.
|
||||||
|
</dt>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
||||||
<dt class="mt-1 text-4xl font-semibold text-blumilk-200">
|
<dt class="mt-1 text-4xl font-semibold text-blumilk-200">
|
||||||
@@ -27,6 +33,9 @@
|
|||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
<dd class="font-medium text-gray-700 truncate text-md">
|
||||||
Rozpatrywane
|
Rozpatrywane
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
|
Dni czekające na akceptację przełożonych.
|
||||||
|
</dt>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
||||||
<dt class="mt-1 text-4xl font-semibold text-blumilk-800">
|
<dt class="mt-1 text-4xl font-semibold text-blumilk-800">
|
||||||
@@ -35,22 +44,9 @@
|
|||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
<dd class="font-medium text-gray-700 truncate text-md">
|
||||||
Limit urlopu
|
Limit urlopu
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
Twój roczny limit urlopu wypoczynkowego.
|
||||||
<dt class="mt-1 text-4xl font-semibold text-gray-500">
|
|
||||||
{{ stats.other }}
|
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
|
||||||
Inne urlopy
|
|
||||||
</dd>
|
|
||||||
</div>
|
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
|
||||||
<dt class="mt-1 text-4xl font-semibold text-lime-500">
|
|
||||||
{{ stats.homeOffice }}
|
|
||||||
</dt>
|
|
||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
|
||||||
Praca zdalna
|
|
||||||
</dd>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
@@ -64,6 +60,9 @@
|
|||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
<dd class="font-medium text-gray-700 truncate text-md">
|
||||||
Inne urlopy
|
Inne urlopy
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
|
Urlopy bezpłatne, okolicznościowe, zwolnienia lekarskie, itd., które zostały już zatwierdzone.
|
||||||
|
</dt>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
||||||
<dt class="mt-1 text-4xl font-semibold text-lime-500">
|
<dt class="mt-1 text-4xl font-semibold text-lime-500">
|
||||||
@@ -72,6 +71,9 @@
|
|||||||
<dd class="font-medium text-gray-700 truncate text-md">
|
<dd class="font-medium text-gray-700 truncate text-md">
|
||||||
Praca zdalna
|
Praca zdalna
|
||||||
</dd>
|
</dd>
|
||||||
|
<dt class="mt-2 text-sm font-medium text-gray-500">
|
||||||
|
Dni przepracowane poza biurem.
|
||||||
|
</dt>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
Reference in New Issue
Block a user