- small changes (#98)
* - added some test * - cr fix * wip * wip * Update resources/js/Shared/MainMenu.vue Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com> * fix Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl> Co-authored-by: Ewelina Lasowy <56546832+EwelinaLasowy@users.noreply.github.com>
This commit is contained in:
@@ -287,7 +287,7 @@
|
||||
<div class="flex justify-end py-3">
|
||||
<div class="space-x-3">
|
||||
<InertiaLink
|
||||
href="/vacation-requests"
|
||||
href="/vacation/requests"
|
||||
class="bg-white py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
||||
>
|
||||
Anuluj
|
||||
@@ -388,7 +388,7 @@ function createForm() {
|
||||
type: data.type.value,
|
||||
user: data.user.id,
|
||||
}))
|
||||
.post('/vacation-requests')
|
||||
.post('/vacation/requests')
|
||||
}
|
||||
|
||||
function onFromChange(selectedDates, dateStr) {
|
||||
@@ -418,14 +418,14 @@ function resetForm() {
|
||||
|
||||
async function refreshEstimatedDays(from, to) {
|
||||
if (from && to) {
|
||||
const res = await axios.post('/api/calculate-vacation-days', { from, to })
|
||||
const res = await axios.post('/api/calculate-vacation/days', { from, to })
|
||||
|
||||
estimatedDays.value = res.data
|
||||
}
|
||||
}
|
||||
|
||||
async function refreshVacationStats(user) {
|
||||
const res = await axios.post('/api/calculate-vacation-stats', { user: user.id })
|
||||
const res = await axios.post('/api/calculate-vacation/stats', { user: user.id })
|
||||
|
||||
stats.value = res.data
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<InertiaLink
|
||||
href="/vacation-requests/create"
|
||||
href="/vacation/requests/create"
|
||||
class="inline-flex items-center px-4 py-3 border border-transparent text-sm leading-4 font-medium rounded-md shadow-sm text-white bg-blumilk-600 hover:bg-blumilk-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
||||
>
|
||||
Dodaj wniosek
|
||||
@@ -84,7 +84,7 @@
|
||||
>
|
||||
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="font-semibold text-blumilk-600 hover:text-blumilk-500 hover:underline"
|
||||
>
|
||||
{{ request.name }}
|
||||
@@ -107,13 +107,13 @@
|
||||
</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="flex justify-around"
|
||||
>
|
||||
<ChevronRightIcon class="block w-6 h-6 fill-blumilk-500" />
|
||||
</InertiaLink>
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="absolute inset-0"
|
||||
/>
|
||||
</td>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<InertiaLink
|
||||
href="/vacation-requests/create"
|
||||
href="/vacation/requests/create"
|
||||
class="inline-flex items-center px-4 py-3 border border-transparent text-sm leading-4 font-medium rounded-md shadow-sm text-white bg-blumilk-600 hover:bg-blumilk-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blumilk-500"
|
||||
>
|
||||
Dodaj wniosek
|
||||
@@ -224,7 +224,7 @@
|
||||
>
|
||||
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="font-semibold text-blumilk-600 hover:text-blumilk-500 hover:underline"
|
||||
>
|
||||
{{ request.name }}
|
||||
@@ -263,13 +263,13 @@
|
||||
</td>
|
||||
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="flex justify-around"
|
||||
>
|
||||
<ChevronRightIcon class="block w-6 h-6 fill-blumilk-500" />
|
||||
</InertiaLink>
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}`"
|
||||
:href="`/vacation/requests/${request.id}`"
|
||||
class="absolute inset-0"
|
||||
/>
|
||||
</td>
|
||||
@@ -334,7 +334,7 @@ const form = reactive({
|
||||
})
|
||||
|
||||
watch(form, debounce(() => {
|
||||
Inertia.get('/vacation-requests', { user: form.user?.id, status: form.status.value }, {
|
||||
Inertia.get('/vacation/requests', { user: form.user?.id, status: form.status.value }, {
|
||||
preserveState: true,
|
||||
replace: true,
|
||||
})
|
||||
|
@@ -60,13 +60,14 @@
|
||||
Data
|
||||
</dt>
|
||||
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
|
||||
<template v-if="request.days.length > 1">
|
||||
{{ request.from }} - {{ request.to }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ request.from }}
|
||||
</template>
|
||||
<span class="font-semibold">
|
||||
<template v-if="request.days.length > 1">
|
||||
{{ request.from }} - {{ request.to }} [Liczba dni: {{ request.days.length }}]
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ request.from }} [Liczba dni: {{ request.days.length }}]
|
||||
</template>
|
||||
[Liczba dni: {{ request.days.length }}]
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
@@ -100,7 +101,7 @@
|
||||
</div>
|
||||
<div class="ml-4 flex-shrink-0">
|
||||
<a
|
||||
:href="`/vacation-requests/${request.id}/download`"
|
||||
:href="`/vacation/requests/${request.id}/download`"
|
||||
target="_blank"
|
||||
class="font-medium text-blumilk-600 hover:text-blumilk-500"
|
||||
>
|
||||
@@ -130,7 +131,7 @@
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}/accept-as-technical`"
|
||||
:href="`/vacation/requests/${request.id}/accept-as-technical`"
|
||||
method="post"
|
||||
as="button"
|
||||
preserve-scroll
|
||||
@@ -156,7 +157,7 @@
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}/accept-as-administrative`"
|
||||
:href="`/vacation/requests/${request.id}/accept-as-administrative`"
|
||||
method="post"
|
||||
as="button"
|
||||
preserve-scroll
|
||||
@@ -182,7 +183,7 @@
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}/reject`"
|
||||
:href="`/vacation/requests/${request.id}/reject`"
|
||||
method="post"
|
||||
as="button"
|
||||
preserve-scroll
|
||||
@@ -208,7 +209,7 @@
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<InertiaLink
|
||||
:href="`/vacation-requests/${request.id}/cancel`"
|
||||
:href="`/vacation/requests/${request.id}/cancel`"
|
||||
method="post"
|
||||
as="button"
|
||||
preserve-scroll
|
||||
|
Reference in New Issue
Block a user