Compare commits

..

No commits in common. "419ec63dde8ac25d0cb7f04a6f930e58beab5fef" and "7fe4d052521acd57363e8c44440290b50daf4137" have entirely different histories.

6 changed files with 13 additions and 178 deletions

View File

@ -25,19 +25,13 @@ use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Maatwebsite\Excel\Facades\Excel; use Maatwebsite\Excel\Facades\Excel;
use Spatie\QueryBuilder\AllowedFilter;
use Spatie\QueryBuilder\QueryBuilder;
class DirectionController extends Controller class DirectionController extends Controller
{ {
public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
{ {
$directions = QueryBuilder::for(Direction::class) $directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
->allowedFilters('name') return view('admin.catalog.direction.index', compact('directions'));
->orderBy('id', 'desc')->get();
// $directions = Direction::all()->sortBy('created_at', SORT_REGULAR, true);
$filter = $request->filter ?? null;
return view('admin.catalog.direction.index', compact('directions', 'filter'));
} }
public function create(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application public function create(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application

View File

@ -5,7 +5,6 @@ namespace App\Http\Controllers\admin;
use App\Enums\ExaminationTypeEnum; use App\Enums\ExaminationTypeEnum;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Admission; use App\Models\Admission;
use App\Models\Direction;
use App\Models\EntranceExamination; use App\Models\EntranceExamination;
use App\Models\Faculty; use App\Models\Faculty;
use App\Models\Subject; use App\Models\Subject;
@ -15,11 +14,11 @@ use Illuminate\Foundation\Application;
class PageController extends Controller class PageController extends Controller
{ {
// public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application public function index(): View|Application|Factory|\Illuminate\Contracts\Foundation\Application
// { {
// $admissions = Admission::all()->sortBy('position'); $admissions = Admission::all()->sortBy('position');
// return view('menu.reception-screen', compact('admissions')); return view('menu.reception-screen', compact('admissions'));
// } }
public function directions() public function directions()
{ {
@ -33,21 +32,7 @@ class PageController extends Controller
$carry[$id] = $value; $carry[$id] = $value;
return $carry; return $carry;
}); });
$directionsWithInstitution = Direction::with(['department']) return view('new-design.bakalavr-special', compact('faculties', 'subjects'));
->join('departments', 'directions.department_id', '=', 'departments.id')
->join('faculties', 'departments.faculty_id', '=', 'faculties.id')
->join(
'educational_institutions',
'faculties.educational_institution_id',
'=',
'educational_institutions.id'
)
->get([
'directions.id',
'directions.name',
"educational_institutions.name as educational_institution_name"
]);
return view('new-design.bakalavr-special', compact('faculties', 'subjects', 'directionsWithInstitution'));
} }

View File

@ -9,7 +9,6 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8", "php": "^8",
"ext-zip": "*",
"fakerphp/faker": "^1.23.1", "fakerphp/faker": "^1.23.1",
"guzzlehttp/guzzle": "^7.8.1", "guzzlehttp/guzzle": "^7.8.1",
"imangazaliev/didom": "^2.0.1", "imangazaliev/didom": "^2.0.1",
@ -21,8 +20,8 @@
"league/flysystem": "^3.25.0", "league/flysystem": "^3.25.0",
"maatwebsite/excel": "^3.1.55", "maatwebsite/excel": "^3.1.55",
"rap2hpoutre/laravel-log-viewer": "^2.3", "rap2hpoutre/laravel-log-viewer": "^2.3",
"spatie/laravel-query-builder": "^5.8", "twbs/bootstrap": "5.2.3",
"twbs/bootstrap": "5.2.3" "ext-zip": "*"
}, },
"require-dev": { "require-dev": {
"laravel/breeze": "^1.29.1", "laravel/breeze": "^1.29.1",

135
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "7430aa832d42dad89f7314c9c96e0023", "content-hash": "d5970627f595d4d501a76767ce6e8dae",
"packages": [ "packages": [
{ {
"name": "brick/math", "name": "brick/math",
@ -4015,139 +4015,6 @@
}, },
"time": "2023-02-15T07:36:34+00:00" "time": "2023-02-15T07:36:34+00:00"
}, },
{
"name": "spatie/laravel-package-tools",
"version": "1.16.3",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-package-tools.git",
"reference": "59db18c2e20d49a0b6d447bb1c654f6c123beb9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-package-tools/zipball/59db18c2e20d49a0b6d447bb1c654f6c123beb9e",
"reference": "59db18c2e20d49a0b6d447bb1c654f6c123beb9e",
"shasum": ""
},
"require": {
"illuminate/contracts": "^9.28|^10.0|^11.0",
"php": "^8.0"
},
"require-dev": {
"mockery/mockery": "^1.5",
"orchestra/testbench": "^7.7|^8.0",
"pestphp/pest": "^1.22",
"phpunit/phpunit": "^9.5.24",
"spatie/pest-plugin-test-time": "^1.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Spatie\\LaravelPackageTools\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Freek Van der Herten",
"email": "freek@spatie.be",
"role": "Developer"
}
],
"description": "Tools for creating Laravel packages",
"homepage": "https://github.com/spatie/laravel-package-tools",
"keywords": [
"laravel-package-tools",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-package-tools/issues",
"source": "https://github.com/spatie/laravel-package-tools/tree/1.16.3"
},
"funding": [
{
"url": "https://github.com/spatie",
"type": "github"
}
],
"time": "2024-03-07T07:35:57+00:00"
},
{
"name": "spatie/laravel-query-builder",
"version": "5.8.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-query-builder.git",
"reference": "8d8b527a68d4651b7860d9993a33b8d4774a9d72"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/8d8b527a68d4651b7860d9993a33b8d4774a9d72",
"reference": "8d8b527a68d4651b7860d9993a33b8d4774a9d72",
"shasum": ""
},
"require": {
"illuminate/database": "^10.0|^11.0",
"illuminate/http": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"php": "^8.2",
"spatie/laravel-package-tools": "^1.11"
},
"require-dev": {
"ext-json": "*",
"mockery/mockery": "^1.4",
"orchestra/testbench": "^7.0|^8.0",
"pestphp/pest": "^2.0",
"spatie/invade": "^2.0",
"spatie/laravel-ray": "^1.28"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Spatie\\QueryBuilder\\QueryBuilderServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Spatie\\QueryBuilder\\": "src",
"Spatie\\QueryBuilder\\Database\\Factories\\": "database/factories"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alex Vanderbist",
"email": "alex@spatie.be",
"homepage": "https://spatie.be",
"role": "Developer"
}
],
"description": "Easily build Eloquent queries from API requests",
"homepage": "https://github.com/spatie/laravel-query-builder",
"keywords": [
"laravel-query-builder",
"spatie"
],
"support": {
"issues": "https://github.com/spatie/laravel-query-builder/issues",
"source": "https://github.com/spatie/laravel-query-builder"
},
"funding": [
{
"url": "https://spatie.be/open-source/support-us",
"type": "custom"
}
],
"time": "2024-02-06T20:07:16+00:00"
},
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v6.4.4", "version": "v6.4.4",

View File

@ -9,16 +9,6 @@
</div> </div>
<br> <br>
<br> <br>
<div class="row">
<div class="col-3">
{{Form::open(['route' => 'directions.index', 'method' => 'GET'])}}
{{Form::text('filter[name]', $filter['name'] ?? null, ['placeholder' => 'Введите название направления', 'class' => 'form-control'])}}
</div>
<div class="col">
{{Form::submit('Найти', ['class' => 'btn btn-primary'])}}
{{Form::close()}}
</div>
</div>
<table class="table"> <table class="table">
<thead class="border-b-2 border-solid border-black text-left" style="text-align: left"> <thead class="border-b-2 border-solid border-black text-left" style="text-align: left">
<tr> <tr>

View File

@ -572,14 +572,14 @@
</div> </div>
</div> </div>
<div class="col-md-7 mt-md-0 mt-5 col-12"> <div class="col-md-6 mt-md-0 mt-5 col-12">
<div class="d-flex border border-white py-5 justify-content-center align-items-center" <div class="d-flex border border-white py-5 justify-content-center align-items-center"
style="border-radius: 50px; min-height: 200px;"> style="border-radius: 50px; min-height: 200px;">
<div class="col-12 text-remove text-white w-100 text-center fs-4" <div class="col-12 text-remove text-white w-100 text-center fs-4"
style="font-family: Geologica-ExtraLight">Выберите предметы style="font-family: Geologica-ExtraLight">Выберите предметы
</div> </div>
<div class="table-responsive p-5 w-100 " style=" max-height: 700px; "> <div class="table-responsive ps-5 " style="width: 90%">
<table class=" text-white px-5 calcul_rez" <table class=" text-white px-5 calcul_rez"
style="width: 90%; font-family: Geologica-ExtraLight;"> style="width: 90%; font-family: Geologica-ExtraLight;">