diff --git a/app/Containers/Widget/UI/WEB/Controllers/TvController.php b/app/Containers/Widget/UI/WEB/Controllers/TvController.php new file mode 100644 index 0000000..1c8c983 --- /dev/null +++ b/app/Containers/Widget/UI/WEB/Controllers/TvController.php @@ -0,0 +1,14 @@ +render('Client/Tv/Index'); + } +} diff --git a/app/Containers/Widget/UI/WEB/Routes/web.php b/app/Containers/Widget/UI/WEB/Routes/web.php new file mode 100644 index 0000000..243db3c --- /dev/null +++ b/app/Containers/Widget/UI/WEB/Routes/web.php @@ -0,0 +1,14 @@ +name('client.tv.post.index'); diff --git a/app/Http/Middleware/HandleInertiaRequests.php b/app/Http/Middleware/HandleInertiaRequests.php index 1c93027..c241e47 100644 --- a/app/Http/Middleware/HandleInertiaRequests.php +++ b/app/Http/Middleware/HandleInertiaRequests.php @@ -21,29 +21,22 @@ class HandleInertiaRequests extends Middleware public function share(Request $request): array { - // Навигация (кешированная) - $navigation = Cache::remember('navigation', now()->addHours(1), function () { - return NavigationResource::collection( - MainSection::with('subSections.pages.section') - ->orderBy('sort', 'asc') - ->get() - ); - }); - - // Хлебные крошки (автоматически по текущему URL) - $breadcrumbs = app(BreadcrumbService::class)->generateBreadcrumbs(); - return [ ...parent::share($request), 'auth' => [ 'user' => $request->user() ? $request->user()->only('id', 'name', 'email', 'created_at') : null, ], - 'ziggy' => fn () => [ - ...(new Ziggy)->toArray(), - 'location' => $request->url(), - ], - 'navigation' => $navigation, - 'breadcrumbs' => $breadcrumbs, // Добавляем хлебные крошки +// 'ziggy' => fn () => [ +// ...(new Ziggy)->toArray(), +// 'location' => $request->url(), +// ], + 'ziggy' => function() { + return array_merge((new Ziggy())->toArray(), [ + 'location' => url()->current(), + ]); + }, + 'navigation' => $this->getNavigation(), + 'breadcrumbs' => $this->getBreadcrumbs(), 'urlPrev' => function () { if (url()->previous() !== url()->current()) { return url()->previous(); @@ -52,4 +45,20 @@ class HandleInertiaRequests extends Middleware }, ]; } + + private function getNavigation() + { + return Cache::remember('navigation', now()->addHours(1), function () { + return NavigationResource::collection( + MainSection::with('subSections.pages.section') + ->orderBy('sort', 'asc') + ->get() + ); + }); + } + + private function getBreadcrumbs() + { + return app(BreadcrumbService::class)->generateBreadcrumbs(); + } } \ No newline at end of file diff --git a/app/Services/App/Cache/UserCacheService.php b/app/Services/App/Cache/UserCacheService.php index c5c36f0..973105e 100644 --- a/app/Services/App/Cache/UserCacheService.php +++ b/app/Services/App/Cache/UserCacheService.php @@ -20,6 +20,9 @@ class UserCacheService extends AbstractCacheService implements CacheInterface public function clearAllCacheByModel(): void { $this->clearCacheByPrefix(CacheKeys::USER_PREFIX->value.'*'); + $this->clearCacheByPrefix(CacheKeys::FACULTY_PREFIX->value.'*'); + $this->clearCacheByPrefix(CacheKeys::DEPARTMENT_PREFIX->value.'*'); + $this->clearCacheByPrefix(CacheKeys::DIVISION_PREFIX->value.'*'); } public function getCachedData(string $key) diff --git a/resources/js/Pages/Client/Posts/Index.vue b/resources/js/Pages/Client/Posts/Index.vue index ca92525..15ce7ee 100644 --- a/resources/js/Pages/Client/Posts/Index.vue +++ b/resources/js/Pages/Client/Posts/Index.vue @@ -69,6 +69,11 @@ export default { type: Object, } }, + data() { + return { + currentPageLoaded: this.posts_pagination.current_page, + } + }, computed: { hasActiveFilters() { return this.filters.category_filter.value || this.filters.tag_filter.value || this.filters.search_filter.value; @@ -109,10 +114,14 @@ export default { - - - - + + + + + + + +
diff --git a/resources/js/Pages/Client/Schedules/Index.vue b/resources/js/Pages/Client/Schedules/Index.vue index 723413a..2fdfe85 100644 --- a/resources/js/Pages/Client/Schedules/Index.vue +++ b/resources/js/Pages/Client/Schedules/Index.vue @@ -22,7 +22,9 @@ export default { favoriteGroups: JSON.parse(localStorage.getItem('favoriteGroups')), showFavorites: false, loading: false, - }; + currentPageLoaded: this.schedules_paginator.current_page, + + }; }, components: { BaseBreadcrumbs, BreadcrumbsItem, @@ -218,6 +220,16 @@ export default {
+ + + + + + + + + +
diff --git a/resources/js/Pages/Client/Tv/Index.vue b/resources/js/Pages/Client/Tv/Index.vue new file mode 100644 index 0000000..b42012d --- /dev/null +++ b/resources/js/Pages/Client/Tv/Index.vue @@ -0,0 +1,17 @@ + + + diff --git a/resources/js/Pages/Error.vue b/resources/js/Pages/Error.vue index e158ec0..c236fcc 100644 --- a/resources/js/Pages/Error.vue +++ b/resources/js/Pages/Error.vue @@ -34,19 +34,10 @@
- - - - - - - - diff --git a/resources/js/componentss/features/sliders/TvSlider.vue b/resources/js/componentss/features/sliders/TvSlider.vue new file mode 100644 index 0000000..b7e748c --- /dev/null +++ b/resources/js/componentss/features/sliders/TvSlider.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/resources/js/componentss/features/sliders/components/SliderBody.vue b/resources/js/componentss/features/sliders/components/SliderBody.vue index 58c5e3c..795d71e 100644 --- a/resources/js/componentss/features/sliders/components/SliderBody.vue +++ b/resources/js/componentss/features/sliders/components/SliderBody.vue @@ -155,11 +155,14 @@ export default { this.sortedSlides = this.slides.slice().sort((a, b) => a.sort - b.sort); // Передаем данные в Vuex после монтирования компонента - this.updateLastSlider({ - url: this.$page.props.ziggy.location, - top: this.$refs.sliderRef.getBoundingClientRect().top, - bottom: this.$refs.sliderRef.getBoundingClientRect().bottom, // Получаем актуальное значение bottom - }); + if (typeof window !== 'undefined') { + this.updateLastSlider({ + url: this.$page.props.ziggy.location, + top: this.$refs.sliderRef.getBoundingClientRect().top, + bottom: this.$refs.sliderRef.getBoundingClientRect().bottom, // Получаем актуальное значение bottom + }); + } + this.startTimer(); }, beforeUnmount() { diff --git a/resources/js/componentss/features/sliders/components/TvSliderBody.vue b/resources/js/componentss/features/sliders/components/TvSliderBody.vue new file mode 100644 index 0000000..7c4606f --- /dev/null +++ b/resources/js/componentss/features/sliders/components/TvSliderBody.vue @@ -0,0 +1,159 @@ + + + + + \ No newline at end of file diff --git a/resources/views/vendor/filament-panels/components/logo.blade.php b/resources/views/vendor/filament-panels/components/logo.blade.php index 484ed47..0f9af6d 100644 --- a/resources/views/vendor/filament-panels/components/logo.blade.php +++ b/resources/views/vendor/filament-panels/components/logo.blade.php @@ -1,2 +1,2 @@ -Logo +Logo