diff --git a/_docker/nginx/prod/conf.d/nginx.conf b/_docker/nginx/prod/conf.d/nginx.conf index 373acfc..6f2d106 100644 --- a/_docker/nginx/prod/conf.d/nginx.conf +++ b/_docker/nginx/prod/conf.d/nginx.conf @@ -71,6 +71,16 @@ server { return 301 /sveden/; } + location /abitur/ { + alias /var/www/public/abitur/; + index index.html; + try_files $uri $uri/ /sveden/index.html; + } + + location = /abitur { + return 301 /abitur/; + } + location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; diff --git a/app/Containers/Schedule/UI/WEB/Controllers/ClientScheduleController.php b/app/Containers/Schedule/UI/WEB/Controllers/ClientScheduleController.php index 1772512..b6c7057 100644 --- a/app/Containers/Schedule/UI/WEB/Controllers/ClientScheduleController.php +++ b/app/Containers/Schedule/UI/WEB/Controllers/ClientScheduleController.php @@ -7,7 +7,7 @@ use App\Containers\Schedule\UI\WEB\Transformers\EducationalGroupResource; use App\Ship\Contracts\SeoServiceInterface; use App\Ship\Controllers\Controller; use App\Ship\Enums\Education\FormEducation; -use App\Ship\Requests\Request; +use Illuminate\Http\Request; class ClientScheduleController extends Controller { @@ -21,9 +21,7 @@ class ClientScheduleController extends Controller $query->whereRaw('LOWER(title) like ?', ["%".strtolower($search)."%"]); }) ->when(request()->input('favorite'), function ($query, $favorite) { - $query->whereHas('schedules', function ($query) use ($favorite) { - $query->whereIn('id', $favorite); - }); + $query->whereIn('id', $favorite); }) ->when(request()->input('form'), function ($query, $form) { $query->where('education_form_id', FormEducation::fromName($form)->value); diff --git a/app/Filament/Components/Forms/PostForm.php b/app/Filament/Components/Forms/PostForm.php index 9990ae8..96c1a89 100644 --- a/app/Filament/Components/Forms/PostForm.php +++ b/app/Filament/Components/Forms/PostForm.php @@ -151,7 +151,7 @@ class PostForm ->resize(50) ->imageEditor() ->helperText('Загрузите главное изображение для новости') - ->maxSize(2048) + ->maxSize(20480) ->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp']) ->imagePreviewHeight('150') ->panelLayout('integrated'), @@ -167,7 +167,7 @@ class PostForm ->panelLayout('grid') ->helperText('Загрузите дополнительные изображения для галереи') ->maxFiles(10) - ->maxSize(2048) + ->maxSize(20480) ->acceptedFileTypes(['image/jpeg', 'image/png']) ->imagePreviewHeight('150'), ]), @@ -253,7 +253,7 @@ class PostForm ->resize(50) ->imageEditor() ->required() - ->maxSize(2048) + ->maxSize(50000) ->helperText('Загрузите фоновое изображение для слайда') ->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp']), ToggleButtons::make('slide.image.shading') diff --git a/app/Filament/Resources/ScheduleResource.php b/app/Filament/Resources/ScheduleResource.php index 94e6d7a..09a1362 100644 --- a/app/Filament/Resources/ScheduleResource.php +++ b/app/Filament/Resources/ScheduleResource.php @@ -69,7 +69,7 @@ class ScheduleResource extends Resource ->label('Файл PDF') ->required() ->acceptedFileTypes(['application/pdf']) - ->maxSize(5120) // 5MB + ->maxSize(10000) ->disk('public') ->directory('schedules') ->downloadable() diff --git a/resources/js/Pages/Client/Schedules/Index.vue b/resources/js/Pages/Client/Schedules/Index.vue index 2fdfe85..a1582e8 100644 --- a/resources/js/Pages/Client/Schedules/Index.vue +++ b/resources/js/Pages/Client/Schedules/Index.vue @@ -60,16 +60,31 @@ export default { } }, methods: { - search: debounce(function () { - this.$inertia.reload({ - method: 'get', - data: { - search: this.searchInput, - }, - preserveState: true, - replace: true, - }); - }, 300), + search: debounce(function () { + if(this.searchInput === "") { + let url = new URL(window.location.href); + url.searchParams.delete('search'); + let newUrl = url.toString(); + this.$inertia.visit(newUrl,{ + method: 'get', + preserveState: true, + replace: true, + }); + } else { + let url = new URL(window.location.href); + url.searchParams.delete('page'); + let newUrl = url.toString(); + this.$inertia.visit(newUrl,{ + method: 'get', + data: { + search: this.searchInput, + }, + preserveState: true, + replace: true, + }) + } + }, 500), + toggleFavorite(group) { if (!this.favoriteGroups) { this.favoriteGroups = []; diff --git a/resources/js/Pages/Client/Tv/Index.vue b/resources/js/Pages/Client/Tv/Index.vue index b42012d..2e82448 100644 --- a/resources/js/Pages/Client/Tv/Index.vue +++ b/resources/js/Pages/Client/Tv/Index.vue @@ -13,5 +13,5 @@ export default { diff --git a/resources/js/Pages/Schedule.vue b/resources/js/Pages/Schedule.vue deleted file mode 100644 index 9617ef7..0000000 --- a/resources/js/Pages/Schedule.vue +++ /dev/null @@ -1,171 +0,0 @@ - - - - - \ No newline at end of file