This commit is contained in:
EwelinaLasowy 2022-02-28 07:46:18 +01:00
parent e442da9303
commit 22fc753c73
5 changed files with 221 additions and 242 deletions

View File

@ -66,16 +66,6 @@ class DashboardController extends Controller
)
->count();
$onRequest = $request->user()
->vacations()
->whereRelation(
"vacationRequest",
fn(Builder $query) => $query
->where("type", VacationType::OnRequest)
->states(VacationRequestState::successStates()),
)
->count();
$pending = $request->user()
->vacations()
->whereRelation(
@ -106,7 +96,6 @@ class DashboardController extends Controller
"used" => $used,
"pending" => $pending,
"other" => $other,
"onRequest" => 4 - $onRequest,
],
]);
}

View File

@ -12,7 +12,7 @@
:href="`/timesheet/${selectedMonth.value}`"
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"
>
Pobierz plik excel
Pobierz plik Excel
</a>
</div>
</div>

View File

@ -67,7 +67,7 @@
Rozpatrywane
</dd>
<dt class="text-sm font-medium text-gray-500 mt-2">
Dni czekające na akceptację przełożonych
Dni czekające na akceptację przełożonych.
</dt>
</div>
<div class="px-4 py-5 bg-white shadow-md sm:p-6">
@ -81,18 +81,7 @@
Twój roczny limit urlopu wypoczynkowego.
</dt>
</div>
<div class="px-4 py-5 bg-white shadow-md sm:p-6">
<dt class="mt-1 text-4xl font-semibold text-gray-900">
{{ stats.onRequest }}
</dt>
<dd class="text-md font-medium text-gray-500 truncate">
Urlop na żądanie
</dd>
<dt class="text-sm font-medium text-gray-500 mt-2">
Ilość dni urlopu na żądanie, który wlicza się w limit urlopu wypoczynkowego.
</dt>
</div>
<div class="px-4 py-5 bg-white shadow-md sm:p-6">
<div class="px-4 py-5 bg-white shadow-md sm:p-6 col-span-2">
<dt class="mt-1 text-4xl font-semibold text-gray-900">
{{ stats.other }}
</dt>
@ -183,6 +172,11 @@
</p>
</div>
</li>
<li v-if="! absences.data.length">
<p class="py-2">
Brak danych
</p>
</li>
</ul>
</div>
</div>

View File

@ -19,10 +19,9 @@
</InertiaLink>
</div>
</div>
<div class="border-t border-gray-200">
<div class="overflow-x-auto xl:overflow-x-visible overflow-y-auto xl:overflow-y-visible">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-100">
<thead class="bg-gray-50">
<tr>
<th
scope="col"
@ -136,7 +135,6 @@
</table>
</div>
</div>
</div>
</template>
<script>

View File

@ -11,7 +11,6 @@
</p>
</div>
</div>
<div class="border-t border-gray-200">
<div class="overflow-x-auto xl:overflow-x-visible overflow-y-auto xl:overflow-y-visible">
<form @submit.prevent="submitVacationDays">
<table class="min-w-full divide-y divide-gray-200">
@ -125,7 +124,6 @@
</form>
</div>
</div>
</div>
</template>
<script>