Skip to content

Commit

Permalink
#8 - cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Sep 24, 2023
1 parent 13c76ca commit c2e7322
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
9 changes: 2 additions & 7 deletions app/Http/Middleware/HandleInertiaRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,14 @@ class HandleInertiaRequests extends Middleware
{
protected $rootView = "app";

public function version(Request $request): ?string
{
return parent::version($request);
}

public function share(Request $request): array
{
return array_merge(parent::share($request), [
"flash" => $this->getFlashedData($request),
"flash" => $this->getFlashData($request),
]);
}

protected function getFlashedData(Request $request): Closure
protected function getFlashData(Request $request): Closure
{
return fn(): array => [
"success" => $request->session()->get("success"),
Expand Down
10 changes: 2 additions & 8 deletions resources/js/Layouts/DashboardLayout.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script setup>
import { ref } from 'vue'
import { Dialog, DialogPanel, TransitionChild, TransitionRoot } from '@headlessui/vue'
import {
Bars3Icon,
Expand All @@ -18,17 +17,12 @@ import {
CodeBracketSquareIcon,
Cog6ToothIcon,
} from '@heroicons/vue/24/outline'
import { watch } from 'vue'
import { ref, watch } from 'vue'
import { useToast } from 'vue-toastification'
const toast = useToast()
const props = defineProps({
flash: {
type: Object,
default () {
return Object
},
},
flash: Object,
})
const navigation = [
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard/Semester/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function createSemester() {
<form @submit.prevent="createSemester">
<Section class="mt-3">
<div class="flex justify-between">
<FormGroup>
<FormGroup :full-width="false">
<FormLabel for="name">
Nazwa
</FormLabel>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/Pages/Dashboard/Semester/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function updateSemester() {
<form @submit.prevent="updateSemester">
<Section class="mt-3">
<div class="flex justify-between">
<FormGroup>
<FormGroup :full-width="false">
<FormLabel for="name">
Nazwa
</FormLabel>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ createInertiaApp({
return createApp({ render: () => h(App, props) })
.use(plugin)
.use(Toast, {
position: 'bottom-right',
position: 'top-right',
maxToast: 5,
timeout: 3000,
pauseOnFocusLoss: false,
Expand Down

0 comments on commit c2e7322

Please sign in to comment.