Merge branch 'main' into #134-fill-users-data-for-resume
# Conflicts: # .eslintrc.js # composer.lock # package-lock.json # package.json
This commit is contained in:
@@ -8,7 +8,7 @@ import HandHeartOutlineIcon from 'vue-material-design-icons/HandHeartOutline.vue
|
||||
import CalendarCheckIcon from 'vue-material-design-icons/CalendarCheck.vue'
|
||||
import MedicalBagIcon from 'vue-material-design-icons/MedicalBag.vue'
|
||||
import CalendarRemoveIcon from 'vue-material-design-icons/CalendarRemove.vue'
|
||||
import LaptopIcon from 'vue-material-design-icons/Laptop.vue'
|
||||
import HomeCityIcon from 'vue-material-design-icons/HomeCity.vue'
|
||||
|
||||
const types = [
|
||||
{
|
||||
@@ -43,8 +43,8 @@ const types = [
|
||||
text: 'Urlop szkoleniowy',
|
||||
value: 'training_vacation',
|
||||
icon: HumanMaleBoardIcon,
|
||||
color: 'text-blumilk-500',
|
||||
border: 'border-blumilk-500',
|
||||
color: 'text-indigo-500',
|
||||
border: 'border-indigo-500',
|
||||
},
|
||||
{
|
||||
text: 'Urlop bezpłatny',
|
||||
@@ -84,9 +84,9 @@ const types = [
|
||||
{
|
||||
text: 'Praca zdalna',
|
||||
value: 'home_office',
|
||||
icon: LaptopIcon,
|
||||
color: 'text-fuchsia-500',
|
||||
border: 'border-fuchsia-500',
|
||||
icon: HomeCityIcon,
|
||||
color: 'text-lime-500',
|
||||
border: 'border-lime-500',
|
||||
},
|
||||
]
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
:remote-days="remoteDays.data"
|
||||
/>
|
||||
<UpcomingHolidays
|
||||
v-if="years.current.year === years.selected.year"
|
||||
v-if="years.current.year === years.selected.year && holidays.data.length"
|
||||
:holidays="holidays.data"
|
||||
/>
|
||||
</div>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<InertiaHead title="Dodaj dzień wolny" />
|
||||
<div class="bg-white shadow-md">
|
||||
<div class="mx-auto w-full max-w-7xl bg-white shadow-md">
|
||||
<div class="p-4 sm:px-6">
|
||||
<h2 class="text-lg font-medium leading-6 text-gray-900">
|
||||
Dodaj dzień wolny
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<InertiaHead title="Dodawanie użytkownika" />
|
||||
<div class="bg-white shadow-md">
|
||||
<div class="mx-auto w-full max-w-7xl bg-white shadow-md">
|
||||
<div class="p-4 sm:px-6">
|
||||
<h2 class="text-lg font-medium leading-6 text-gray-900">
|
||||
Dodaj użytkownika
|
||||
@@ -234,6 +234,52 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items-center py-4 sm:grid sm:grid-cols-3">
|
||||
<label
|
||||
for="slackId"
|
||||
class="block text-sm font-medium text-gray-700 sm:mt-px"
|
||||
>
|
||||
Slack ID
|
||||
</label>
|
||||
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
||||
<input
|
||||
id="position"
|
||||
v-model="form.slackId"
|
||||
type="text"
|
||||
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.slackId, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.slackId }"
|
||||
>
|
||||
<p
|
||||
v-if="form.errors.slackId"
|
||||
class="mt-2 text-sm text-red-600"
|
||||
>
|
||||
{{ form.errors.slackId }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items-center py-4 sm:grid sm:grid-cols-3">
|
||||
<label
|
||||
for="birthday"
|
||||
class="block text-sm font-medium text-gray-700 sm:mt-px"
|
||||
>
|
||||
Data urodzenia
|
||||
</label>
|
||||
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
||||
<FlatPickr
|
||||
id="birthday"
|
||||
v-model="form.birthday"
|
||||
placeholder="Wybierz datę"
|
||||
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.birthday, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.birthday }"
|
||||
/>
|
||||
<p
|
||||
v-if="form.errors.birthday"
|
||||
class="mt-2 text-sm text-red-600"
|
||||
>
|
||||
{{ form.errors.birthday }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end py-3">
|
||||
<div class="space-x-3">
|
||||
<InertiaLink
|
||||
@@ -274,6 +320,8 @@ const form = useForm({
|
||||
role: props.roles[0],
|
||||
position: null,
|
||||
employmentDate: null,
|
||||
birthday: null,
|
||||
slackId: null,
|
||||
})
|
||||
|
||||
function createUser() {
|
||||
|
@@ -241,6 +241,52 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items-center py-4 sm:grid sm:grid-cols-3">
|
||||
<label
|
||||
for="birthday"
|
||||
class="block text-sm font-medium text-gray-700 sm:mt-px"
|
||||
>
|
||||
Data urodzenia
|
||||
</label>
|
||||
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
||||
<FlatPickr
|
||||
id="birthday"
|
||||
v-model="form.birthday"
|
||||
placeholder="Wybierz datę"
|
||||
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.birthday, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.birthday }"
|
||||
/>
|
||||
<p
|
||||
v-if="form.errors.birthday"
|
||||
class="mt-2 text-sm text-red-600"
|
||||
>
|
||||
{{ form.errors.birthday }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items-center py-4 sm:grid sm:grid-cols-3">
|
||||
<label
|
||||
for="slackId"
|
||||
class="block text-sm font-medium text-gray-700 sm:mt-px"
|
||||
>
|
||||
Slack ID
|
||||
</label>
|
||||
<div class="mt-1 sm:col-span-2 sm:mt-0">
|
||||
<input
|
||||
id="position"
|
||||
v-model="form.slackId"
|
||||
type="text"
|
||||
class="block w-full max-w-lg rounded-md shadow-sm sm:text-sm"
|
||||
:class="{ 'border-red-300 text-red-900 focus:outline-none focus:ring-red-500 focus:border-red-500': form.errors.slackId, 'focus:ring-blumilk-500 focus:border-blumilk-500 sm:text-sm border-gray-300': !form.errors.slackId }"
|
||||
>
|
||||
<p
|
||||
v-if="form.errors.slackId"
|
||||
class="mt-2 text-sm text-red-600"
|
||||
>
|
||||
{{ form.errors.slackId }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end py-3">
|
||||
<div class="space-x-3">
|
||||
<InertiaLink
|
||||
@@ -282,6 +328,8 @@ const form = useForm({
|
||||
position: props.user.position,
|
||||
employmentForm: props.employmentForms.find(form => form.value === props.user.employmentForm),
|
||||
employmentDate: props.user.employmentDate,
|
||||
birthday: props.user.birthday,
|
||||
slackId: props.user.slackId,
|
||||
})
|
||||
|
||||
function editUser() {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<InertiaHead title="Złóż wniosek" />
|
||||
<div class="grid grid-cols-1 gap-4 items-start xl:grid-cols-3 xl:gap-8">
|
||||
<div :class="[stats.limit > 0 ? ' grid grid-cols-1 gap-4 items-start xl:grid-cols-3 xl:gap-8' : 'mx-auto w-full max-w-7xl']">
|
||||
<div class="flex flex-col h-full bg-white shadow-md xl:col-span-2">
|
||||
<div class="p-4 sm:px-6">
|
||||
<h2 class="text-lg font-medium leading-6 text-gray-900">
|
||||
@@ -306,7 +306,10 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="h-full bg-white shadow-md">
|
||||
<div
|
||||
v-if="stats.limit > 0 "
|
||||
class="h-full bg-white shadow-md"
|
||||
>
|
||||
<div class="p-4 sm:px-6">
|
||||
<h2 class="text-lg font-medium leading-6 text-gray-900">
|
||||
<span v-if="auth.user.id !== form.user.id">
|
||||
|
@@ -132,9 +132,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white divide-y divide-gray-100">
|
||||
<tr
|
||||
<InertiaLink
|
||||
v-for="request in requests.data"
|
||||
:key="request.id"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
as="tr"
|
||||
class="relative hover:bg-blumilk-25"
|
||||
>
|
||||
<td class="p-4 text-sm text-gray-500 whitespace-nowrap">
|
||||
@@ -167,12 +169,8 @@
|
||||
>
|
||||
<ChevronRightIcon class="block w-6 h-6 fill-blumilk-500" />
|
||||
</InertiaLink>
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="absolute inset-0 focus:outline-blumilk-500"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</InertiaLink>
|
||||
<tr v-if="! requests.data.length">
|
||||
<td
|
||||
colspan="100%"
|
||||
|
@@ -211,10 +211,12 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="bg-white divide-y divide-gray-100">
|
||||
<tr
|
||||
<InertiaLink
|
||||
v-for="request in requests.data"
|
||||
:key="request.id"
|
||||
class="relative hover:bg-blumilk-25"
|
||||
as="tr"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="relative hover:bg-blumilk-25 hover:cursor-pointer"
|
||||
>
|
||||
<td class="p-4 text-sm text-gray-500 whitespace-nowrap">
|
||||
<InertiaLink
|
||||
@@ -261,12 +263,8 @@
|
||||
>
|
||||
<ChevronRightIcon class="block w-6 h-6 fill-blumilk-500" />
|
||||
</InertiaLink>
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="absolute inset-0 focus:outline-blumilk-500"
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
</InertiaLink>
|
||||
<tr v-if="! requests.data.length">
|
||||
<td
|
||||
colspan="100%"
|
||||
|
@@ -77,7 +77,7 @@
|
||||
</dt>
|
||||
<dd
|
||||
v-if="request.comment != null"
|
||||
class="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0"
|
||||
class="mt-1 text-sm text-gray-900 break-all sm:col-span-2 sm:mt-0"
|
||||
>
|
||||
{{ request.comment }}
|
||||
</dd>
|
||||
@@ -89,7 +89,7 @@
|
||||
</dd>
|
||||
</div>
|
||||
<div
|
||||
v-if="VacationType.isVacation"
|
||||
v-if="request.isVacation"
|
||||
class="py-5 px-4 bg-white sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"
|
||||
>
|
||||
<dt class="flex items-center text-sm font-medium text-gray-500">
|
||||
@@ -100,7 +100,7 @@
|
||||
<li class="flex justify-between items-center py-3 pr-4 pl-3 text-sm">
|
||||
<div class="flex flex-1 items-center w-0">
|
||||
<PaperClipIcon class="shrink-0 w-5 h-5 text-gray-400" />
|
||||
<span class="flex-1 ml-2 w-0 truncate"> wniosek_urlopowy.pdf </span>
|
||||
<span class="flex-1 ml-2 w-0 truncate">wniosek.pdf</span>
|
||||
</div>
|
||||
<div class="shrink-0 ml-4">
|
||||
<a
|
||||
|
@@ -14,18 +14,24 @@
|
||||
class="py-5"
|
||||
>
|
||||
<div class="relative focus-within:ring-2 focus-within:ring-blumilk-500">
|
||||
<h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<span class="absolute inset-0" />
|
||||
Wniosek o {{ findType(request.type).text.toLowerCase() }}
|
||||
[{{ request.name }}]
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ request.from }} - {{ request.to }}
|
||||
<div class="flex flex-row">
|
||||
<h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<span class="absolute inset-0" />
|
||||
Wniosek [{{ request.name }}]
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<div>
|
||||
<div class="ml-2 text-sm text-gray-600">
|
||||
{{ request.from }} - {{ request.to }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2 text-sm text-gray-600">
|
||||
<VacationType :type="request.type" />
|
||||
</p>
|
||||
<div class="mt-3 text-sm text-gray-600">
|
||||
<div class="flex">
|
||||
@@ -66,11 +72,10 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useVacationTypeInfo from '@/Composables/vacationTypeInfo'
|
||||
import VacationType from '@/Shared/VacationType'
|
||||
|
||||
defineProps({
|
||||
requests: Object,
|
||||
})
|
||||
|
||||
const { findType } = useVacationTypeInfo()
|
||||
</script>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
{{ holiday.name }}
|
||||
</p>
|
||||
<p class="text-sm text-gray-500">
|
||||
{{ holiday.displayDate }}
|
||||
{{ holiday.displayDate }} ({{ holiday.dayOfWeek }})
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
|
@@ -14,18 +14,22 @@
|
||||
class="py-5"
|
||||
>
|
||||
<div class="relative focus-within:ring-2 focus-within:ring-blumilk-500">
|
||||
<h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<span class="absolute inset-0" />
|
||||
Wniosek o {{ findType(request.type).text.toLowerCase() }}
|
||||
[{{ request.name }}]
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600">
|
||||
{{ request.from }} - {{ request.to }}
|
||||
<div class="flex flex-row">
|
||||
<h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<span class="absolute inset-0" />
|
||||
Wniosek [{{ request.name }}]
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<div class="ml-2 text-sm text-gray-600">
|
||||
{{ request.from }} - {{ request.to }}
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2 text-sm text-gray-600">
|
||||
<VacationType :type="request.type" />
|
||||
</p>
|
||||
<p class="mt-2 text-sm text-gray-600">
|
||||
<Status :status="request.state" />
|
||||
@@ -52,12 +56,11 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import useVacationTypeInfo from '@/Composables/vacationTypeInfo'
|
||||
import Status from '@/Shared/Status'
|
||||
import VacationType from '@/Shared/VacationType'
|
||||
|
||||
defineProps({
|
||||
requests: Object,
|
||||
})
|
||||
|
||||
const { findType } = useVacationTypeInfo()
|
||||
</script>
|
||||
|
@@ -61,7 +61,7 @@
|
||||
</dt>
|
||||
</div>
|
||||
<div class="py-5 px-4 bg-white shadow-md sm:p-6">
|
||||
<dt class="mt-1 text-4xl font-semibold text-fuchsia-700">
|
||||
<dt class="mt-1 text-4xl font-semibold text-lime-500">
|
||||
{{ stats.homeOffice }}
|
||||
</dt>
|
||||
<dd class="font-medium text-gray-700 truncate text-md">
|
||||
|
Reference in New Issue
Block a user