#22 - wip
This commit is contained in:
130
resources/js/Pages/Calendar.vue
Normal file
130
resources/js/Pages/Calendar.vue
Normal file
@@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<InertiaHead title="Kalendarz urlopów" />
|
||||
<div class="bg-white sm:rounded-lg 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>
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-center border border-gray-300">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-64 py-2 border border-gray-300">
|
||||
<Menu
|
||||
as="div"
|
||||
class="relative inline-block text-left"
|
||||
>
|
||||
<div>
|
||||
<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-offset-gray-100 focus:ring-blumilk-500"
|
||||
>
|
||||
Styczeń
|
||||
<ChevronDownIcon
|
||||
class="-mr-1 ml-2 h-5 w-5"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</MenuButton>
|
||||
</div>
|
||||
|
||||
<transition
|
||||
enter-active-class="transition ease-out duration-100"
|
||||
enter-from-class="transform opacity-0 scale-95"
|
||||
enter-to-class="transform opacity-100 scale-100"
|
||||
leave-active-class="transition ease-in duration-75"
|
||||
leave-from-class="transform opacity-100 scale-100"
|
||||
leave-to-class="transform opacity-0 scale-95"
|
||||
>
|
||||
<MenuItems
|
||||
class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"
|
||||
>
|
||||
<div class="py-1">
|
||||
<MenuItem>
|
||||
<a
|
||||
href="#"
|
||||
class="text-gray-900 block px-4 py-2 text-sm"
|
||||
>Styczeń</a>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<a
|
||||
href="#"
|
||||
class="text-gray-900 block px-4 py-2 text-sm"
|
||||
>Luty</a>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<a
|
||||
href="#"
|
||||
class="text-gray-900 block px-4 py-2 text-sm"
|
||||
>Marzec</a>
|
||||
</MenuItem>
|
||||
</div>
|
||||
</MenuItems>
|
||||
</transition>
|
||||
</Menu>
|
||||
</th>
|
||||
<th
|
||||
v-for="i in 31"
|
||||
:key="i"
|
||||
class="border border-gray-300 font-semibold text-gray-900 py-4 px-2 bg-gray-50"
|
||||
>
|
||||
{{ i }}
|
||||
<p class="text-gray-800 font-normal mt-1">
|
||||
Pt
|
||||
</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="user in users.data"
|
||||
:key="user.id"
|
||||
>
|
||||
<th class="border border-gray-300 py-2 px-4">
|
||||
<div class="flex justify-start items-center">
|
||||
<span class="inline-flex items-center justify-center h-10 w-10 rounded-full">
|
||||
<img
|
||||
class="h-10 w-10 rounded-full"
|
||||
:src="user.avatar"
|
||||
alt=""
|
||||
>
|
||||
</span>
|
||||
<div class="ml-3">
|
||||
<div class="text-sm font-medium text-gray-900">
|
||||
{{ user.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
<td
|
||||
v-for="i in 31"
|
||||
:key="i"
|
||||
class="border border-gray-300 bg-blumilk-25"
|
||||
/>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Menu, MenuButton, MenuItem, MenuItems} from '@headlessui/vue'
|
||||
import {ChevronDownIcon} from '@heroicons/vue/solid'
|
||||
|
||||
export default {
|
||||
name: 'VacationCalendar',
|
||||
components: {
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
ChevronDownIcon,
|
||||
},
|
||||
props: {
|
||||
users: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
@@ -1,467 +1,374 @@
|
||||
<template>
|
||||
<InertiaHead title="Strona główna" />
|
||||
<div class="grid grid-cols-1 gap-4 items-start lg:grid-cols-3 lg:gap-8">
|
||||
<!-- Left column -->
|
||||
<div class="grid grid-cols-1 gap-4 lg:col-span-2">
|
||||
<!-- Welcome panel -->
|
||||
<section aria-labelledby="profile-overview-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<h2
|
||||
id="profile-overview-title"
|
||||
class="sr-only"
|
||||
>
|
||||
Profile Overview
|
||||
</h2>
|
||||
<div class="bg-white p-6">
|
||||
<div class="sm:flex sm:items-center sm:justify-between">
|
||||
<div class="sm:flex sm:space-x-5">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="mx-auto h-20 w-20 rounded-full"
|
||||
:src="user.avatar"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="mt-4 text-center sm:mt-0 sm:pt-1 sm:text-left">
|
||||
<p class="text-sm font-medium text-gray-600">
|
||||
Welcome back,
|
||||
</p>
|
||||
<p class="text-xl font-bold text-gray-900 sm:text-2xl">
|
||||
{{ user.name }}
|
||||
</p>
|
||||
<p class="text-sm font-medium text-gray-600">
|
||||
{{ user.role }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 flex justify-center sm:mt-0">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
View profile
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="border-t border-gray-200 bg-gray-50 grid grid-cols-1 divide-y divide-gray-200 sm:grid-cols-3 sm:divide-y-0 sm:divide-x"
|
||||
>
|
||||
<div
|
||||
v-for="stat in stats"
|
||||
:key="stat.label"
|
||||
class="px-6 py-5 text-sm font-medium text-center"
|
||||
>
|
||||
<span class="text-gray-900">{{ stat.value }}</span>
|
||||
{{ ' ' }}
|
||||
<span class="text-gray-600">{{ stat.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<InertiaHead title="Strona główna" />
|
||||
<div class="grid grid-cols-1 gap-4 items-start lg:grid-cols-3 lg:gap-8">
|
||||
<!-- Left column -->
|
||||
<div class="grid grid-cols-1 gap-4 lg:col-span-2">
|
||||
<!-- Welcome panel -->
|
||||
<section aria-labelledby="profile-overview-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<h2
|
||||
id="profile-overview-title"
|
||||
class="sr-only"
|
||||
>
|
||||
Profile Overview
|
||||
</h2>
|
||||
<div class="bg-white p-6">
|
||||
<div class="sm:flex sm:items-center sm:justify-between">
|
||||
<div class="sm:flex sm:space-x-5">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="mx-auto h-20 w-20 rounded-full"
|
||||
:src="user.avatar"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Actions panel -->
|
||||
<section aria-labelledby="quick-links-title">
|
||||
<div
|
||||
class="rounded-lg bg-gray-200 overflow-hidden shadow divide-y divide-gray-200 sm:divide-y-0 sm:grid sm:grid-cols-2 sm:gap-px"
|
||||
<div class="mt-4 text-center sm:mt-0 sm:pt-1 sm:text-left">
|
||||
<p class="text-sm font-medium text-gray-600">
|
||||
Welcome back,
|
||||
</p>
|
||||
<p class="text-xl font-bold text-gray-900 sm:text-2xl">
|
||||
{{ user.name }}
|
||||
</p>
|
||||
<p class="text-sm font-medium text-gray-600">
|
||||
{{ user.role }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-5 flex justify-center sm:mt-0">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
<h2
|
||||
id="quick-links-title"
|
||||
class="sr-only"
|
||||
>
|
||||
Quick links
|
||||
</h2>
|
||||
<div
|
||||
v-for="(action, actionIdx) in actions"
|
||||
:key="action.name"
|
||||
:class="[actionIdx === 0 ? 'rounded-tl-lg rounded-tr-lg sm:rounded-tr-none' : '', actionIdx === 1 ? 'sm:rounded-tr-lg' : '', actionIdx === actions.length - 2 ? 'sm:rounded-bl-lg' : '', actionIdx === actions.length - 1 ? 'rounded-bl-lg rounded-br-lg sm:rounded-bl-none' : '', 'relative group bg-white p-6 focus-within:ring-2 focus-within:ring-inset focus-within:ring-cyan-500']"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
:class="[action.iconBackground, action.iconForeground, 'rounded-lg inline-flex p-3 ring-4 ring-white']"
|
||||
>
|
||||
<component
|
||||
:is="action.icon"
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
<h3 class="text-lg font-medium">
|
||||
<InertiaLink
|
||||
:href="action.href"
|
||||
class="focus:outline-none"
|
||||
>
|
||||
<!-- Extend touch target to entire panel -->
|
||||
<span
|
||||
class="absolute inset-0"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ action.name }}
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-2 text-sm text-gray-500">
|
||||
Doloribus dolores nostrum quia qui natus officia quod et dolorem. Sit
|
||||
repellendus qui ut at blanditiis et quo et molestiae.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
class="pointer-events-none absolute top-6 right-6 text-gray-300 group-hover:text-gray-400"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<svg
|
||||
class="h-6 w-6"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M20 4h1a1 1 0 00-1-1v1zm-1 12a1 1 0 102 0h-2zM8 3a1 1 0 000 2V3zM3.293 19.293a1 1 0 101.414 1.414l-1.414-1.414zM19 4v12h2V4h-2zm1-1H8v2h12V3zm-.707.293l-16 16 1.414 1.414 16-16-1.414-1.414z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
View profile
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="border-t border-gray-200 bg-gray-50 grid grid-cols-1 divide-y divide-gray-200 sm:grid-cols-3 sm:divide-y-0 sm:divide-x"
|
||||
>
|
||||
<div
|
||||
v-for="stat in stats"
|
||||
:key="stat.label"
|
||||
class="px-6 py-5 text-sm font-medium text-center"
|
||||
>
|
||||
<span class="text-gray-900">{{ stat.value }}</span>
|
||||
{{ ' ' }}
|
||||
<span class="text-gray-600">{{ stat.label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
<!-- Announcements -->
|
||||
<section aria-labelledby="announcements-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<div class="p-6">
|
||||
<h2
|
||||
id="announcements-title"
|
||||
class="text-base font-medium text-gray-900"
|
||||
>
|
||||
Announcements
|
||||
</h2>
|
||||
<div class="flow-root mt-6">
|
||||
<ul
|
||||
role="list"
|
||||
class="-my-5 divide-y divide-gray-200"
|
||||
>
|
||||
<li
|
||||
v-for="announcement in announcements"
|
||||
:key="announcement.id"
|
||||
class="py-5"
|
||||
>
|
||||
<div class="relative focus-within:ring-2 focus-within:ring-cyan-500">
|
||||
<h3 class="text-sm font-semibold text-gray-800">
|
||||
<InertiaLink
|
||||
:href="announcement.href"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<!-- Extend touch target to entire panel -->
|
||||
<span
|
||||
class="absolute inset-0"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ announcement.title }}
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600 line-clamp-2">
|
||||
{{ announcement.preview }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
View all
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Recent Hires -->
|
||||
<section aria-labelledby="recent-hires-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<div class="p-6">
|
||||
<h2
|
||||
id="recent-hires-title"
|
||||
class="text-base font-medium text-gray-900"
|
||||
>
|
||||
Recent Hires
|
||||
</h2>
|
||||
<div class="flow-root mt-6">
|
||||
<ul
|
||||
role="list"
|
||||
class="-my-5 divide-y divide-gray-200"
|
||||
>
|
||||
<li
|
||||
v-for="person in recentHires"
|
||||
:key="person.handle"
|
||||
class="py-4"
|
||||
>
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="h-8 w-8 rounded-full"
|
||||
:src="person.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-sm font-medium text-gray-900 truncate">
|
||||
{{ person.name }}
|
||||
</p>
|
||||
<p class="text-sm text-gray-500 truncate">
|
||||
{{ '@' + person.handle }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<InertiaLink
|
||||
:href="person.href"
|
||||
class="inline-flex items-center shadow-sm px-2.5 py-0.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
View all
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- Actions panel -->
|
||||
<section aria-labelledby="quick-links-title">
|
||||
<div
|
||||
class="rounded-lg bg-gray-200 overflow-hidden shadow divide-y divide-gray-200 sm:divide-y-0 sm:grid sm:grid-cols-2 sm:gap-px"
|
||||
>
|
||||
<h2
|
||||
id="quick-links-title"
|
||||
class="sr-only"
|
||||
>
|
||||
Quick links
|
||||
</h2>
|
||||
<div
|
||||
v-for="(action, actionIdx) in actions"
|
||||
:key="action.name"
|
||||
:class="[actionIdx === 0 ? 'rounded-tl-lg rounded-tr-lg sm:rounded-tr-none' : '', actionIdx === 1 ? 'sm:rounded-tr-lg' : '', actionIdx === actions.length - 2 ? 'sm:rounded-bl-lg' : '', actionIdx === actions.length - 1 ? 'rounded-bl-lg rounded-br-lg sm:rounded-bl-none' : '', 'relative group bg-white p-6 focus-within:ring-2 focus-within:ring-inset focus-within:ring-cyan-500']"
|
||||
>
|
||||
<div>
|
||||
<span
|
||||
:class="[action.iconBackground, action.iconForeground, 'rounded-lg inline-flex p-3 ring-4 ring-white']"
|
||||
>
|
||||
<component
|
||||
:is="action.icon"
|
||||
class="h-6 w-6"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
<h3 class="text-lg font-medium">
|
||||
<InertiaLink
|
||||
:href="action.href"
|
||||
class="focus:outline-none"
|
||||
>
|
||||
<!-- Extend touch target to entire panel -->
|
||||
<span
|
||||
class="absolute inset-0"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ action.name }}
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-2 text-sm text-gray-500">
|
||||
Doloribus dolores nostrum quia qui natus officia quod et dolorem. Sit
|
||||
repellendus qui ut at blanditiis et quo et molestiae.
|
||||
</p>
|
||||
</div>
|
||||
<span
|
||||
class="pointer-events-none absolute top-6 right-6 text-gray-300 group-hover:text-gray-400"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<svg
|
||||
class="h-6 w-6"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="currentColor"
|
||||
viewBox="0 0 24 24"
|
||||
>
|
||||
<path
|
||||
d="M20 4h1a1 1 0 00-1-1v1zm-1 12a1 1 0 102 0h-2zM8 3a1 1 0 000 2V3zM3.293 19.293a1 1 0 101.414 1.414l-1.414-1.414zM19 4v12h2V4h-2zm1-1H8v2h12V3zm-.707.293l-16 16 1.414 1.414 16-16-1.414-1.414z"
|
||||
/>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Right column -->
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
<!-- Announcements -->
|
||||
<section aria-labelledby="announcements-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<div class="p-6">
|
||||
<h2
|
||||
id="announcements-title"
|
||||
class="text-base font-medium text-gray-900"
|
||||
>
|
||||
Announcements
|
||||
</h2>
|
||||
<div class="flow-root mt-6">
|
||||
<ul
|
||||
role="list"
|
||||
class="-my-5 divide-y divide-gray-200"
|
||||
>
|
||||
<li
|
||||
v-for="announcement in announcements"
|
||||
:key="announcement.id"
|
||||
class="py-5"
|
||||
>
|
||||
<div class="relative focus-within:ring-2 focus-within:ring-cyan-500">
|
||||
<h3 class="text-sm font-semibold text-gray-800">
|
||||
<InertiaLink
|
||||
:href="announcement.href"
|
||||
class="hover:underline focus:outline-none"
|
||||
>
|
||||
<!-- Extend touch target to entire panel -->
|
||||
<span
|
||||
class="absolute inset-0"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
{{ announcement.title }}
|
||||
</InertiaLink>
|
||||
</h3>
|
||||
<p class="mt-1 text-sm text-gray-600 line-clamp-2">
|
||||
{{ announcement.preview }}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
View all
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Recent Hires -->
|
||||
<section aria-labelledby="recent-hires-title">
|
||||
<div class="rounded-lg bg-white overflow-hidden shadow">
|
||||
<div class="p-6">
|
||||
<h2
|
||||
id="recent-hires-title"
|
||||
class="text-base font-medium text-gray-900"
|
||||
>
|
||||
Recent Hires
|
||||
</h2>
|
||||
<div class="flow-root mt-6">
|
||||
<ul
|
||||
role="list"
|
||||
class="-my-5 divide-y divide-gray-200"
|
||||
>
|
||||
<li
|
||||
v-for="person in recentHires"
|
||||
:key="person.handle"
|
||||
class="py-4"
|
||||
>
|
||||
<div class="flex items-center space-x-4">
|
||||
<div class="flex-shrink-0">
|
||||
<img
|
||||
class="h-8 w-8 rounded-full"
|
||||
:src="person.imageUrl"
|
||||
alt=""
|
||||
>
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-sm font-medium text-gray-900 truncate">
|
||||
{{ person.name }}
|
||||
</p>
|
||||
<p class="text-sm text-gray-500 truncate">
|
||||
{{ '@' + person.handle }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<InertiaLink
|
||||
:href="person.href"
|
||||
class="inline-flex items-center shadow-sm px-2.5 py-0.5 border border-gray-300 text-sm leading-5 font-medium rounded-full text-gray-700 bg-white hover:bg-gray-50"
|
||||
>
|
||||
View
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<InertiaLink
|
||||
href="#"
|
||||
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"
|
||||
>
|
||||
View all
|
||||
</InertiaLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
AcademicCapIcon,
|
||||
BadgeCheckIcon,
|
||||
CashIcon,
|
||||
ClockIcon,
|
||||
ReceiptRefundIcon,
|
||||
UsersIcon,
|
||||
} from '@heroicons/vue/outline';
|
||||
import {computed} from 'vue';
|
||||
import {usePage} from '@inertiajs/inertia-vue3';
|
||||
AcademicCapIcon,
|
||||
BadgeCheckIcon,
|
||||
CashIcon,
|
||||
ClockIcon,
|
||||
ReceiptRefundIcon,
|
||||
UsersIcon,
|
||||
} from '@heroicons/vue/outline'
|
||||
import {computed} from 'vue'
|
||||
import {usePage} from '@inertiajs/inertia-vue3'
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
setup() {
|
||||
const user = computed(() => usePage().props.value.auth.user);
|
||||
const stats = [
|
||||
{label: 'Vacation days left', value: 12},
|
||||
{label: 'Sick days left', value: 4},
|
||||
{label: 'Personal days left', value: 2},
|
||||
];
|
||||
const actions = [
|
||||
{
|
||||
icon: ClockIcon,
|
||||
name: 'Request time off',
|
||||
href: '#',
|
||||
iconForeground: 'text-teal-700',
|
||||
iconBackground: 'bg-teal-50',
|
||||
},
|
||||
{
|
||||
icon: BadgeCheckIcon,
|
||||
name: 'Benefits',
|
||||
href: '#',
|
||||
iconForeground: 'text-purple-700',
|
||||
iconBackground: 'bg-purple-50',
|
||||
},
|
||||
{
|
||||
icon: UsersIcon,
|
||||
name: 'Schedule a one-on-one',
|
||||
href: '#',
|
||||
iconForeground: 'text-sky-700',
|
||||
iconBackground: 'bg-sky-50',
|
||||
},
|
||||
{
|
||||
icon: CashIcon,
|
||||
name: 'Payroll',
|
||||
href: '#',
|
||||
iconForeground: 'text-yellow-700',
|
||||
iconBackground: 'bg-yellow-50',
|
||||
},
|
||||
{
|
||||
icon: ReceiptRefundIcon,
|
||||
name: 'Submit an expense',
|
||||
href: '#',
|
||||
iconForeground: 'text-rose-700',
|
||||
iconBackground: 'bg-rose-50',
|
||||
},
|
||||
{
|
||||
icon: AcademicCapIcon,
|
||||
name: 'Training',
|
||||
href: '#',
|
||||
iconForeground: 'text-indigo-700',
|
||||
iconBackground: 'bg-indigo-50',
|
||||
},
|
||||
];
|
||||
const recentHires = [
|
||||
{
|
||||
name: 'Leonard Krasner',
|
||||
handle: 'leonardkrasner',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1519345182560-3f2917c472ef?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Floyd Miles',
|
||||
handle: 'floydmiles',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1463453091185-61582044d556?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Emily Selman',
|
||||
handle: 'emilyselman',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1502685104226-ee32379fefbe?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Kristin Watson',
|
||||
handle: 'kristinwatson',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1500917293891-ef795e70e1f6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
];
|
||||
const announcements = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Office closed on July 2nd',
|
||||
href: '#',
|
||||
preview:
|
||||
'Cum qui rem deleniti. Suscipit in dolor veritatis sequi aut. Vero ut earum quis deleniti. Ut a sunt eum cum ut repudiandae possimus. Nihil ex tempora neque cum consectetur dolores.',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'New password policy',
|
||||
href: '#',
|
||||
preview:
|
||||
'Alias inventore ut autem optio voluptas et repellendus. Facere totam quaerat quam quo laudantium cumque eaque excepturi vel. Accusamus maxime ipsam reprehenderit rerum id repellendus rerum. Culpa cum vel natus. Est sit autem mollitia.',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Office closed on July 2nd',
|
||||
href: '#',
|
||||
preview:
|
||||
'Tenetur libero voluptatem rerum occaecati qui est molestiae exercitationem. Voluptate quisquam iure assumenda consequatur ex et recusandae. Alias consectetur voluptatibus. Accusamus a ab dicta et. Consequatur quis dignissimos voluptatem nisi.',
|
||||
},
|
||||
];
|
||||
return {
|
||||
user,
|
||||
stats,
|
||||
actions,
|
||||
recentHires,
|
||||
announcements,
|
||||
};
|
||||
},
|
||||
};
|
||||
name: 'Dashboard',
|
||||
setup() {
|
||||
const user = computed(() => usePage().props.value.auth.user)
|
||||
const stats = [
|
||||
{label: 'Vacation days left', value: 12},
|
||||
{label: 'Sick days left', value: 4},
|
||||
{label: 'Personal days left', value: 2},
|
||||
]
|
||||
const actions = [
|
||||
{
|
||||
icon: ClockIcon,
|
||||
name: 'Request time off',
|
||||
href: '#',
|
||||
iconForeground: 'text-teal-700',
|
||||
iconBackground: 'bg-teal-50',
|
||||
},
|
||||
{
|
||||
icon: BadgeCheckIcon,
|
||||
name: 'Benefits',
|
||||
href: '#',
|
||||
iconForeground: 'text-purple-700',
|
||||
iconBackground: 'bg-purple-50',
|
||||
},
|
||||
{
|
||||
icon: UsersIcon,
|
||||
name: 'Schedule a one-on-one',
|
||||
href: '#',
|
||||
iconForeground: 'text-sky-700',
|
||||
iconBackground: 'bg-sky-50',
|
||||
},
|
||||
{
|
||||
icon: CashIcon,
|
||||
name: 'Payroll',
|
||||
href: '#',
|
||||
iconForeground: 'text-yellow-700',
|
||||
iconBackground: 'bg-yellow-50',
|
||||
},
|
||||
{
|
||||
icon: ReceiptRefundIcon,
|
||||
name: 'Submit an expense',
|
||||
href: '#',
|
||||
iconForeground: 'text-rose-700',
|
||||
iconBackground: 'bg-rose-50',
|
||||
},
|
||||
{
|
||||
icon: AcademicCapIcon,
|
||||
name: 'Training',
|
||||
href: '#',
|
||||
iconForeground: 'text-indigo-700',
|
||||
iconBackground: 'bg-indigo-50',
|
||||
},
|
||||
]
|
||||
const recentHires = [
|
||||
{
|
||||
name: 'Leonard Krasner',
|
||||
handle: 'leonardkrasner',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1519345182560-3f2917c472ef?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Floyd Miles',
|
||||
handle: 'floydmiles',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1463453091185-61582044d556?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Emily Selman',
|
||||
handle: 'emilyselman',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1502685104226-ee32379fefbe?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
{
|
||||
name: 'Kristin Watson',
|
||||
handle: 'kristinwatson',
|
||||
imageUrl:
|
||||
'https://images.unsplash.com/photo-1500917293891-ef795e70e1f6?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80',
|
||||
href: '#',
|
||||
},
|
||||
]
|
||||
const announcements = [
|
||||
{
|
||||
id: 1,
|
||||
title: 'Office closed on July 2nd',
|
||||
href: '#',
|
||||
preview:
|
||||
'Cum qui rem deleniti. Suscipit in dolor veritatis sequi aut. Vero ut earum quis deleniti. Ut a sunt eum cum ut repudiandae possimus. Nihil ex tempora neque cum consectetur dolores.',
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: 'New password policy',
|
||||
href: '#',
|
||||
preview:
|
||||
'Alias inventore ut autem optio voluptas et repellendus. Facere totam quaerat quam quo laudantium cumque eaque excepturi vel. Accusamus maxime ipsam reprehenderit rerum id repellendus rerum. Culpa cum vel natus. Est sit autem mollitia.',
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: 'Office closed on July 2nd',
|
||||
href: '#',
|
||||
preview:
|
||||
'Tenetur libero voluptatem rerum occaecati qui est molestiae exercitationem. Voluptate quisquam iure assumenda consequatur ex et recusandae. Alias consectetur voluptatibus. Accusamus a ab dicta et. Consequatur quis dignissimos voluptatem nisi.',
|
||||
},
|
||||
]
|
||||
return {
|
||||
user,
|
||||
stats,
|
||||
actions,
|
||||
recentHires,
|
||||
announcements,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<!--<script>-->
|
||||
<!--import { ref } from 'vue';-->
|
||||
<!--import {-->
|
||||
<!-- Dialog,-->
|
||||
<!-- DialogOverlay,-->
|
||||
<!-- Menu,-->
|
||||
<!-- MenuButton,-->
|
||||
<!-- MenuItem,-->
|
||||
<!-- MenuItems,-->
|
||||
<!-- TransitionChild,-->
|
||||
<!-- TransitionRoot,-->
|
||||
<!--} from '@headlessui/vue';-->
|
||||
<!--import {-->
|
||||
<!-- BellIcon,-->
|
||||
<!-- ClockIcon,-->
|
||||
<!-- CogIcon,-->
|
||||
<!-- CreditCardIcon,-->
|
||||
<!-- DocumentReportIcon,-->
|
||||
<!-- HomeIcon,-->
|
||||
<!-- MenuAlt1Icon,-->
|
||||
<!-- QuestionMarkCircleIcon,-->
|
||||
<!-- ScaleIcon,-->
|
||||
<!-- ShieldCheckIcon,-->
|
||||
<!-- UserGroupIcon,-->
|
||||
<!-- XIcon,-->
|
||||
<!--} from '@heroicons/vue/outline';-->
|
||||
<!--import {-->
|
||||
<!-- CalendarIcon,-->
|
||||
<!-- CashIcon,-->
|
||||
<!-- CheckCircleIcon,-->
|
||||
<!-- ChevronDownIcon,-->
|
||||
<!-- ChevronRightIcon,-->
|
||||
<!-- OfficeBuildingIcon,-->
|
||||
<!-- SearchIcon, SunIcon,-->
|
||||
<!--} from '@heroicons/vue/solid';-->
|
||||
|
||||
<!--const cards = [-->
|
||||
<!-- { name: 'Account balance', href: '#', icon: ScaleIcon, amount: '$30,659.45' },-->
|
||||
<!--];-->
|
||||
<!--const transactions = [-->
|
||||
<!-- {-->
|
||||
<!-- id: 1,-->
|
||||
<!-- name: 'Payment to Molly Sanders',-->
|
||||
<!-- href: '#',-->
|
||||
<!-- amount: '$20,000',-->
|
||||
<!-- currency: 'USD',-->
|
||||
<!-- status: 'success',-->
|
||||
<!-- date: 'July 11, 2020',-->
|
||||
<!-- datetime: '2020-07-11',-->
|
||||
<!-- },-->
|
||||
<!--];-->
|
||||
<!--const statusStyles = {-->
|
||||
<!-- success: 'bg-green-100 text-green-800',-->
|
||||
<!-- processing: 'bg-yellow-100 text-yellow-800',-->
|
||||
<!-- failed: 'bg-gray-100 text-gray-800',-->
|
||||
<!--};-->
|
||||
|
||||
<!--export default {-->
|
||||
<!-- components: {-->
|
||||
<!-- Dialog,-->
|
||||
<!-- DialogOverlay,-->
|
||||
<!-- Menu,-->
|
||||
<!-- MenuButton,-->
|
||||
<!-- MenuItem,-->
|
||||
<!-- MenuItems,-->
|
||||
<!-- TransitionChild,-->
|
||||
<!-- TransitionRoot,-->
|
||||
<!-- BellIcon,-->
|
||||
<!-- CashIcon,-->
|
||||
<!-- CheckCircleIcon,-->
|
||||
<!-- ChevronDownIcon,-->
|
||||
<!-- ChevronRightIcon,-->
|
||||
<!-- MenuAlt1Icon,-->
|
||||
<!-- OfficeBuildingIcon,-->
|
||||
<!-- SearchIcon,-->
|
||||
<!-- XIcon,-->
|
||||
<!-- HomeIcon,-->
|
||||
<!-- UserGroupIcon,-->
|
||||
<!-- SunIcon,-->
|
||||
<!-- CalendarIcon,-->
|
||||
<!-- },-->
|
||||
<!-- setup() {-->
|
||||
<!-- const sidebarOpen = ref(false);-->
|
||||
<!-- return {-->
|
||||
<!-- cards,-->
|
||||
<!-- transactions,-->
|
||||
<!-- statusStyles,-->
|
||||
<!-- sidebarOpen,-->
|
||||
<!-- };-->
|
||||
<!-- },-->
|
||||
<!--};-->
|
||||
<!--</script>-->
|
@@ -1,97 +0,0 @@
|
||||
<template>
|
||||
<InertiaHead title="Kalendarz" />
|
||||
<div class="bg-white sm:rounded-lg shadow-md">
|
||||
<div class="p-4 sm:px-6">
|
||||
<h2 class="text-lg leading-6 font-medium text-gray-900">
|
||||
Kalendarz
|
||||
</h2>
|
||||
</div>
|
||||
<div class="grid grid-cols-38 justify-items-center divide-x divide-gray-300">
|
||||
<div class="w-full text-center col-span-7">
|
||||
<Menu as="div" class="relative inline-block text-left">
|
||||
<div>
|
||||
<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-offset-gray-100 focus:ring-blumilk-500">
|
||||
Styczeń
|
||||
<ChevronDownIcon class="-mr-1 ml-2 h-5 w-5" aria-hidden="true" />
|
||||
</MenuButton>
|
||||
</div>
|
||||
|
||||
<transition enter-active-class="transition ease-out duration-100" enter-from-class="transform opacity-0 scale-95" enter-to-class="transform opacity-100 scale-100" leave-active-class="transition ease-in duration-75" leave-from-class="transform opacity-100 scale-100" leave-to-class="transform opacity-0 scale-95">
|
||||
<MenuItems class="origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none">
|
||||
<div class="py-1">
|
||||
<MenuItem>
|
||||
<a href="#" class="text-gray-900 block px-4 py-2 text-sm">Styczeń</a>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<a href="#" class="text-gray-900 block px-4 py-2 text-sm">Luty</a>
|
||||
</MenuItem>
|
||||
<MenuItem>
|
||||
<a href="#" class="text-gray-900 block px-4 py-2 text-sm">Marzec</a>
|
||||
</MenuItem>
|
||||
</div>
|
||||
</MenuItems>
|
||||
</transition>
|
||||
</Menu>
|
||||
</div>
|
||||
<div class="w-full text-center font-semibold text-gray-900 py-4 bg-gray-50" v-for="n in 31">{{ n }}
|
||||
<p class="text-gray-800 font-normal mt-1">Pt</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-38 justify-items-start divide-x divide-gray-300 border-t border-gray-300" v-for="user in users.data"
|
||||
:key="user.id">
|
||||
<div class="col-span-7 px-4 py-2 whitespace-nowrap">
|
||||
<div class="flex justify-start items-center">
|
||||
<span
|
||||
class="inline-flex items-center justify-center h-10 w-10 rounded-full"
|
||||
>
|
||||
<img
|
||||
class="h-10 w-10 rounded-full"
|
||||
:src="user.avatar"
|
||||
alt=""
|
||||
>
|
||||
</span>
|
||||
<div class="ml-3">
|
||||
<div class="text-sm font-medium break-all text-gray-900">
|
||||
{{ user.name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full bg-blumilk-25 divide-x divide-gray-300 flex justify-center" v-for="n in 31">
|
||||
<!-- <div class="bg-blumilk-500 items-center w-96 m-1 rounded-lg"></div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FlatPickr from 'vue-flatpickr-component';
|
||||
import {Listbox, ListboxButton, ListboxLabel, ListboxOption, ListboxOptions} from '@headlessui/vue';
|
||||
import { Menu, MenuButton, MenuItem, MenuItems } from '@headlessui/vue'
|
||||
import {CheckIcon, SelectorIcon} from '@heroicons/vue/solid';
|
||||
import { ChevronDownIcon } from '@heroicons/vue/solid'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FlatPickr,
|
||||
Listbox,
|
||||
ListboxButton,
|
||||
ListboxLabel,
|
||||
ListboxOption,
|
||||
ListboxOptions,
|
||||
Menu,
|
||||
MenuButton,
|
||||
MenuItem,
|
||||
MenuItems,
|
||||
CheckIcon,
|
||||
SelectorIcon,
|
||||
ChevronDownIcon,
|
||||
},
|
||||
props: {
|
||||
users: {
|
||||
type: Object,
|
||||
default: () => null,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user