This commit is contained in:
Adrian Hopek 2022-03-07 15:13:37 +01:00
parent 069109c4b0
commit f0355f56d3
4 changed files with 33 additions and 29 deletions

View File

@ -18,8 +18,8 @@ class VacationRequestResource extends JsonResource
"user" => new UserResource($this->user), "user" => new UserResource($this->user),
"type" => $this->type->label(), "type" => $this->type->label(),
"state" => $this->state, "state" => $this->state,
"from" => $this->from->toDisplayString(), "from" => $this->from->toDisplayDate(),
"to" => $this->to->toDisplayString(), "to" => $this->to->toDisplayDate(),
"comment" => $this->comment, "comment" => $this->comment,
"days" => VacationResource::collection($this->vacations), "days" => VacationResource::collection($this->vacations),
]; ];

View File

@ -112,7 +112,7 @@
:key="request.id" :key="request.id"
class="py-5" class="py-5"
> >
<div class="relative focus-within:ring-2 focus-within:ring-cyan-500"> <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"> <h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
<InertiaLink <InertiaLink
:href="`/vacation-requests/${request.id}`" :href="`/vacation-requests/${request.id}`"
@ -155,7 +155,7 @@
<InertiaLink <InertiaLink
href="/vacation-requests" href="/vacation-requests"
:data="{status: 'waiting_for_action'}" :data="{status: 'waiting_for_action'}"
class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blumilk-500"
> >
Zobacz wszystkie Zobacz wszystkie
</InertiaLink> </InertiaLink>
@ -178,7 +178,7 @@
:key="request.id" :key="request.id"
class="py-5" class="py-5"
> >
<div class="relative focus-within:ring-2 focus-within:ring-cyan-500"> <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"> <h3 class="text-sm font-semibold text-blumilk-600 hover:text-blumilk-500">
<InertiaLink <InertiaLink
:href="`/vacation-requests/${request.id}`" :href="`/vacation-requests/${request.id}`"
@ -207,7 +207,7 @@
<div class="mt-6"> <div class="mt-6">
<InertiaLink <InertiaLink
href="/vacation-requests/me" href="/vacation-requests/me"
class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blumilk-500"
> >
Zobacz wszystkie Zobacz wszystkie
</InertiaLink> </InertiaLink>
@ -284,7 +284,7 @@
<div> <div>
<InertiaLink <InertiaLink
href="/holidays" href="/holidays"
class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50" class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blumilk-500"
> >
Zobacz wszystkie Zobacz wszystkie
</InertiaLink> </InertiaLink>

View File

@ -231,7 +231,7 @@
</InertiaLink> </InertiaLink>
</td> </td>
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-500"> <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-500">
<div class="flex justify-center items-center"> <div class="flex">
<img <img
class="h-10 w-10 rounded-full" class="h-10 w-10 rounded-full"
:src="request.user.avatar" :src="request.user.avatar"

View File

@ -19,11 +19,24 @@
</dd> </dd>
</div> </div>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500"> <dt class="text-sm font-medium text-gray-500 flex items-center">
Pracownik Pracownik
</dt> </dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
<div class="flex">
<img
class="h-10 w-10 rounded-full"
:src="request.user.avatar"
>
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">
{{ request.user.name }} {{ request.user.name }}
</p>
<p class="text-sm text-gray-500">
{{ request.user.email }}
</p>
</div>
</div>
</dd> </dd>
</div> </div>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
@ -44,26 +57,17 @@
</div> </div>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500"> <dt class="text-sm font-medium text-gray-500">
Urlop od Data
</dt> </dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
<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 }} {{ request.from }}
</dd> </template>
</div> </span>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
Urlop do
</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
{{ request.to }}
</dd>
</div>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500">
Dni urlopu
</dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">
{{ request.days.length }}
</dd> </dd>
</div> </div>
<div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="py-4 sm:py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
@ -84,7 +88,7 @@
</dd> </dd>
</div> </div>
<div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6"> <div class="bg-white px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
<dt class="text-sm font-medium text-gray-500"> <dt class="text-sm font-medium text-gray-500 flex items-center">
Załączniki Załączniki
</dt> </dt>
<dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2"> <dd class="mt-1 text-sm text-gray-900 sm:mt-0 sm:col-span-2">