#39 - generate timesheet (#56)

* #39 - wip

* #39 - fix

* #39 - wip

* #39 - wip

* #39 - wip

* Update app/Domain/Enums/Month.php

Co-authored-by: Marcin Tracz <marcin.tracz@blumilk.pl>

* #39 - cr fixes

Co-authored-by: EwelinaLasowy <ewelina.lasowy@blumilk.pl>
Co-authored-by: Marcin Tracz <marcin.tracz@blumilk.pl>
This commit is contained in:
Adrian Hopek
2022-02-21 16:09:45 +01:00
committed by GitHub
parent 77a4d5711c
commit 39b464388c
12 changed files with 1085 additions and 143 deletions

View File

@@ -1,10 +1,20 @@
<template>
<InertiaHead title="Kalendarz urlopów" />
<div class="bg-white shadow-md">
<div class="p-4 sm:px-6">
<h2 class="text-lg leading-6 font-medium text-gray-900">
Kalendarz urlopów
</h2>
<div class="flex justify-between items-center p-4 sm:px-6">
<div>
<h2 class="text-lg leading-6 font-medium text-gray-900">
Kalendarz urlopów
</h2>
</div>
<div>
<a
: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
</a>
</div>
</div>
<div class="overflow-x-auto">
<table class="w-full text-center table-fixed text-sm border border-gray-300">
@@ -19,7 +29,7 @@
<MenuButton
class="inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white 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"
>
{{ selectedMonth.name }}
{{ selectedMonth.name }} {{ years.current }}
<ChevronDownIcon class="-mr-1 ml-2 h-5 w-5" />
</MenuButton>
</div>
@@ -42,8 +52,7 @@
v-slot="{ active }"
>
<InertiaLink
href="/vacation-calendar"
:data="{ month: month.value }"
:href="`/vacation-calendar/${month.value}`"
:class="[active ? 'bg-gray-100 text-gray-900' : 'text-gray-700', 'flex w-full font-normal px-4 py-2 text-sm']"
>
{{ month.name }}
@@ -151,6 +160,10 @@ export default {
type: String,
default: () => 'january',
},
years: {
type: Object,
default: () => null,
},
},
setup(props) {
const {getMonths, findMonth} = useMonthInfo()