Merge branch 'main' into #63-permissions
This commit is contained in:
commit
c9a7ec4869
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
/node_modules
|
/node_modules
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
|
/public/avatars
|
||||||
/public/js/
|
/public/js/
|
||||||
/public/css/
|
/public/css/
|
||||||
/public/mix-manifest.json
|
/public/mix-manifest.json
|
||||||
|
@ -17,7 +17,6 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
"links" => [
|
"links" => [
|
||||||
public_path("storage") => storage_path("app/public"),
|
|
||||||
public_path("avatars") => storage_path("app/avatars"),
|
public_path("avatars") => storage_path("app/avatars"),
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -37,6 +37,10 @@ Directory structure little differs from a standard Laravel tree. We decided to r
|
|||||||
|
|
||||||
dcr php php artisan key:generate
|
dcr php php artisan key:generate
|
||||||
|
|
||||||
|
- generate storage link
|
||||||
|
|
||||||
|
dcr php php artisan storage:link
|
||||||
|
|
||||||
- migrate and seed database
|
- migrate and seed database
|
||||||
|
|
||||||
dcr php php artisan migrate --seed
|
dcr php php artisan migrate --seed
|
||||||
|
@ -45,10 +45,7 @@
|
|||||||
@click="sidebarOpen = false"
|
@click="sidebarOpen = false"
|
||||||
>
|
>
|
||||||
<span class="sr-only">Close sidebar</span>
|
<span class="sr-only">Close sidebar</span>
|
||||||
<XIcon
|
<XIcon class="h-6 w-6 text-white" />
|
||||||
class="h-6 w-6 text-white"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</TransitionChild>
|
</TransitionChild>
|
||||||
@ -61,38 +58,27 @@
|
|||||||
>
|
>
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
</div>
|
</div>
|
||||||
<nav
|
<nav class="mt-5 flex-shrink-0 h-full divide-y divide-blumilk-800 overflow-y-auto">
|
||||||
class="mt-5 flex-shrink-0 h-full divide-y divide-blumilk-800 overflow-y-auto"
|
|
||||||
aria-label="Sidebar"
|
|
||||||
>
|
|
||||||
<div class="px-2 space-y-1">
|
<div class="px-2 space-y-1">
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
v-for="item in navigation"
|
href="/"
|
||||||
:key="item.name"
|
:class="[$page.url === '/' ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-sm leading-6 font-medium rounded-md']"
|
||||||
:href="item.href"
|
|
||||||
:class="[item.current ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-base font-medium rounded-md']"
|
|
||||||
:aria-current="item.current ? 'page' : undefined"
|
|
||||||
>
|
>
|
||||||
<component
|
<HomeIcon class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200" />
|
||||||
:is="item.icon"
|
Strona główna
|
||||||
class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
{{ item.name }}
|
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 pt-6">
|
<div class="mt-3 pt-3">
|
||||||
<div class="px-2 space-y-1">
|
<div class="px-2 space-y-1">
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
v-for="item in secondaryNavigation"
|
v-for="item in navigation"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
:href="item.href"
|
:href="item.href"
|
||||||
class="group flex items-center px-2 py-2 text-base font-medium rounded-md text-blumilk-100 hover:text-white hover:bg-blumilk-600"
|
:class="[$page.url.startsWith(item.href) ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-base font-medium rounded-md']"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="item.icon"
|
:is="item.icon"
|
||||||
class="mr-4 h-6 w-6 text-blumilk-200"
|
class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200"
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
/>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
@ -101,10 +87,7 @@
|
|||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</TransitionChild>
|
</TransitionChild>
|
||||||
<div
|
<div class="flex-shrink-0 w-14" />
|
||||||
class="flex-shrink-0 w-14"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</TransitionRoot>
|
</TransitionRoot>
|
||||||
|
|
||||||
@ -120,38 +103,27 @@
|
|||||||
>
|
>
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
</div>
|
</div>
|
||||||
<nav
|
<nav class="mt-5 flex-1 flex flex-col divide-y divide-blumilk-800 overflow-y-auto">
|
||||||
class="mt-5 flex-1 flex flex-col divide-y divide-blumilk-800 overflow-y-auto"
|
|
||||||
aria-label="Sidebar"
|
|
||||||
>
|
|
||||||
<div class="px-2 space-y-1">
|
<div class="px-2 space-y-1">
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
v-for="item in navigation"
|
href="/"
|
||||||
:key="item.name"
|
:class="[$page.url === '/' ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-sm leading-6 font-medium rounded-md']"
|
||||||
:href="item.href"
|
|
||||||
:class="[item.current ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-sm leading-6 font-medium rounded-md']"
|
|
||||||
:aria-current="item.current ? 'page' : undefined"
|
|
||||||
>
|
>
|
||||||
<component
|
<HomeIcon class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200" />
|
||||||
:is="item.icon"
|
Dashboard
|
||||||
class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
{{ item.name }}
|
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6 pt-6">
|
<div class="mt-4 pt-4">
|
||||||
<div class="px-2 space-y-1">
|
<div class="px-2 space-y-1">
|
||||||
<InertiaLink
|
<InertiaLink
|
||||||
v-for="item in secondaryNavigation"
|
v-for="item in navigation"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
:href="item.href"
|
:href="item.href"
|
||||||
class="group flex items-center px-2 py-2 text-sm leading-6 font-medium rounded-md text-blumilk-100 hover:text-white hover:bg-blumilk-600"
|
:class="[$page.url.startsWith(item.href) ? 'bg-blumilk-800 text-white' : 'text-blumilk-100 hover:text-white hover:bg-blumilk-600', 'group flex items-center px-2 py-2 text-sm leading-6 font-medium rounded-md']"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="item.icon"
|
:is="item.icon"
|
||||||
class="mr-4 h-6 w-6 text-blumilk-200"
|
class="mr-4 flex-shrink-0 h-6 w-6 text-blumilk-200"
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
/>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</InertiaLink>
|
</InertiaLink>
|
||||||
@ -169,10 +141,7 @@
|
|||||||
@click="sidebarOpen = true"
|
@click="sidebarOpen = true"
|
||||||
>
|
>
|
||||||
<span class="sr-only">Open sidebar</span>
|
<span class="sr-only">Open sidebar</span>
|
||||||
<MenuAlt1Icon
|
<MenuAlt1Icon class="h-6 w-6" />
|
||||||
class="h-6 w-6"
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
</button>
|
</button>
|
||||||
<div class="flex-1 px-4 flex justify-between sm:px-6 lg:px-8">
|
<div class="flex-1 px-4 flex justify-between sm:px-6 lg:px-8">
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
@ -305,12 +274,9 @@ import {
|
|||||||
} from '@headlessui/vue'
|
} from '@headlessui/vue'
|
||||||
import {
|
import {
|
||||||
BellIcon,
|
BellIcon,
|
||||||
CogIcon,
|
|
||||||
HomeIcon,
|
HomeIcon,
|
||||||
CollectionIcon,
|
CollectionIcon,
|
||||||
MenuAlt1Icon,
|
MenuAlt1Icon,
|
||||||
QuestionMarkCircleIcon,
|
|
||||||
ShieldCheckIcon,
|
|
||||||
UserGroupIcon,
|
UserGroupIcon,
|
||||||
XIcon,
|
XIcon,
|
||||||
SunIcon,
|
SunIcon,
|
||||||
@ -362,29 +328,23 @@ export default {
|
|||||||
const years = computed(() => usePage().props.value.years)
|
const years = computed(() => usePage().props.value.years)
|
||||||
|
|
||||||
const navigation = [
|
const navigation = [
|
||||||
{name: 'Strona główna', href: '/', icon: HomeIcon, current: true},
|
{name: 'Wnioski urlopowe', href: '/vacation-requests', icon: CollectionIcon},
|
||||||
{name: 'Wnioski urlopowe', href: '/vacation-requests', icon: CollectionIcon, current: false},
|
{name: 'Kalendarz urlopów', href: '/vacation-calendar', icon: CalendarIcon},
|
||||||
{name: 'Kalendarz urlopów', href: '/vacation-calendar', icon: CalendarIcon, current: false},
|
{name: 'Dni wolne', href: '/holidays', icon: StarIcon},
|
||||||
{name: 'Dni wolne', href: '/holidays', icon: StarIcon, current: false},
|
{name: 'Limity urlopów', href: '/vacation-limits', icon: SunIcon},
|
||||||
{name: 'Limity urlopów', href: '/vacation-limits', icon: SunIcon, current: false},
|
{name: 'Użytkownicy', href: '/users', icon: UserGroupIcon},
|
||||||
{name: 'Użytkownicy', href: '/users', icon: UserGroupIcon, current: false},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const userNavigation = [
|
const userNavigation = [
|
||||||
{name: 'Your Profile', href: '#'},
|
{name: 'Your Profile', href: '#'},
|
||||||
{name: 'Settings', href: '#'},
|
{name: 'Settings', href: '#'},
|
||||||
{name: 'Wyloguj się', href: '/logout', method: 'post', as: 'button'},
|
{name: 'Wyloguj się', href: '/logout', method: 'post', as: 'button'},
|
||||||
]
|
]
|
||||||
|
|
||||||
const secondaryNavigation = [
|
|
||||||
{name: 'Settings', href: '#', icon: CogIcon},
|
|
||||||
{name: 'Help', href: '#', icon: QuestionMarkCircleIcon},
|
|
||||||
{name: 'Privacy', href: '#', icon: ShieldCheckIcon},
|
|
||||||
]
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
years,
|
years,
|
||||||
navigation,
|
navigation,
|
||||||
secondaryNavigation,
|
|
||||||
userNavigation,
|
userNavigation,
|
||||||
sidebarOpen,
|
sidebarOpen,
|
||||||
}
|
}
|
||||||
|
1
setup
1
setup
@ -8,6 +8,7 @@ docker-compose build --no-cache --pull
|
|||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
docker-compose run --rm -u "$(id -u):$(id -g)" php composer install
|
docker-compose run --rm -u "$(id -u):$(id -g)" php composer install
|
||||||
docker-compose run --rm -u "$(id -u):$(id -g)" php php artisan key:generate
|
docker-compose run --rm -u "$(id -u):$(id -g)" php php artisan key:generate
|
||||||
|
docker-compose run --rm -u "$(id -u):$(id -g)" php php artisan storage:link
|
||||||
docker-compose run --rm -u "$(id -u):$(id -g)" php php artisan migrate --seed
|
docker-compose run --rm -u "$(id -u):$(id -g)" php php artisan migrate --seed
|
||||||
docker-compose run --rm -u "$(id -u):$(id -g)" node npm install
|
docker-compose run --rm -u "$(id -u):$(id -g)" node npm install
|
||||||
docker-compose run --rm -u "$(id -u):$(id -g)" node npm run dev
|
docker-compose run --rm -u "$(id -u):$(id -g)" node npm run dev
|
||||||
|
1
storage/app/.gitignore
vendored
1
storage/app/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
*
|
*
|
||||||
!public/
|
!public/
|
||||||
|
!avatars/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
2
storage/app/avatars/.gitignore
vendored
Normal file
2
storage/app/avatars/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
Loading…
x
Reference in New Issue
Block a user