From 31339e6b29a1e66fb5c8ed7fe8dfd2302cc895fa Mon Sep 17 00:00:00 2001 From: ROMANGOLIENKO Date: Tue, 9 Apr 2024 15:53:43 +0300 Subject: [PATCH] minor design fixes, adding magistr and inostran pages --- app/Http/Controllers/admin/PageController.php | 316 +++++- .../views/layouts/new-design-layout.blade.php | 184 ++++ .../new-design/bakalavr-special.blade.php | 204 +--- .../views/new-design/inostran-old.blade.php | 827 +++++++++++++++ resources/views/new-design/inostran.blade.php | 979 +++++++---------- .../views/new-design/magistr-old.blade.php | 828 +++++++++++++++ resources/views/new-design/magistr.blade.php | 985 +++++++----------- routes/pages.php | 7 +- 8 files changed, 2927 insertions(+), 1403 deletions(-) create mode 100644 resources/views/new-design/inostran-old.blade.php create mode 100644 resources/views/new-design/magistr-old.blade.php diff --git a/app/Http/Controllers/admin/PageController.php b/app/Http/Controllers/admin/PageController.php index 4e7cf65..7e73285 100644 --- a/app/Http/Controllers/admin/PageController.php +++ b/app/Http/Controllers/admin/PageController.php @@ -21,7 +21,7 @@ class PageController extends Controller // return view('menu.reception-screen', compact('admissions')); // } - public function directions() + public function bakalavr() { $admissions = Admission::all(); $faculties = Faculty::all(); @@ -177,6 +177,320 @@ class PageController extends Controller 'admissions', )); } + public function inostran() + { + $admissions = Admission::all(); + $faculties = Faculty::all(); + $subjects = EntranceExamination::all() + ->select('subject_id', 'subject_type_id', 'examination_type_id') + ->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value) + ->reduce(function (?array $carry, $subject) { + $id = $subject['subject_id']; + $value = Subject::find($id)->name; + $carry[$id] = $value; + return $carry; + }); + $directionsWithInstitution = Direction::with(['department']) + ->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" + ]); + //phpcs:disable + $directionsGroups = Direction::with(['department']) + ->leftJoin('direction_direction_profile', 'directions.id', '=', 'direction_direction_profile.direction_id') + ->leftJoin('direction_profiles','direction_direction_profile.direction_profile_id','=','direction_profiles.id') + ->leftJoin('departments', 'directions.department_id', '=', 'departments.id') + ->leftJoin('faculties', 'departments.faculty_id', '=', 'faculties.id') + ->leftJoin('education_levels', 'directions.education_level_id', '=', 'education_levels.id') + ->leftJoin('education_forms', 'directions.education_form_id', '=', 'education_forms.id') + ->leftJoin('entrance_examinations', 'entrance_examinations.direction_id', '=', 'directions.id') + ->leftJoin('educational_institutions','faculties.educational_institution_id','=','educational_institutions.id') + ->leftJoin('examination_types', 'entrance_examinations.examination_type_id', '=', 'examination_types.id') + ->leftJoin('subject_types', 'entrance_examinations.subject_type_id', '=', 'subject_types.id') + ->leftJoin('subjects', 'entrance_examinations.subject_id', '=', 'subjects.id') + ->select( + 'directions.id as direction_id', + 'directions.code as direction_code', + 'directions.name as direction_name', + 'directions.description as direction_description', + 'directions.budget_places as direction_budget_places', + 'directions.paid_places as direction_paid_places', + 'directions.cost_paid_place as direction_cost_paid_place', + 'directions.period as direction_period', + 'education_levels.name as education_level_name', + 'education_forms.name as education_form_name', + 'faculties.id as faculty_id', + 'faculties.name as faculty_name', + 'faculties.description as faculty_description', + 'educational_institutions.id as educational_institution_id', + 'educational_institutions.name as educational_institution_name', + 'direction_profiles.id as direction_profile_id', + 'entrance_examinations.scores as entrance_examination_score', + 'examination_types.name as examination_type_name', + 'subject_types.name as subject_type_name', + 'subjects.name as subject_name', + 'direction_profiles.name as direction_profile_name', + ) + ->get()->toArray(); + //phpcs:enable + $branches = []; + $directionsGroupWithOutBranch = array_reduce($directionsGroups, function ($acc, $direction) use (&$branches) { + + if ($direction['educational_institution_id'] == 3) { + $branches[] = $direction; + } + $acc[] = $direction; + return $acc; + }, []); + + $groupedDirections = collect($directionsGroupWithOutBranch) + ->reduce(function ($carry, $item, $key) use ($branches) { + [ + 'direction_id' => $directionId, + 'direction_name' => $directionName, + 'direction_code' => $directionCode, + 'educational_institution_id' => $educational_institution_id, + 'educational_institution_name' => $educationalInstitutionName, + 'faculty_id' => $facultyId, + 'faculty_name' => $facultyName, + 'faculty_description' => $facultyDescription, + 'education_level_name' => $educationLevelName, + 'education_form_name' => $educationFormName, + 'entrance_examination_score' => $entranceExaminationScore, + 'examination_type_name' => $examinationTypeName, + 'subject_type_name' => $subjectTypeName, + 'subject_name' => $subjectName, + 'direction_profile_name' => $directionProfileName, + 'direction_budget_places' => $directionBudgetPlaces, + 'direction_paid_places' => $directionPaidPlaces, + 'direction_cost_paid_place' => $directionCostPaidPlace, + 'direction_period' => $directionPeriod, + 'direction_description' => $directionDescription, + ] = $item; + + $carry[$facultyName]['id'] = $facultyId; + $carry[$facultyName]['name'] = $facultyName; + $carry[$facultyName]['description'] = $facultyDescription; + $carry[$facultyName]['directions'][$directionName]['name'] = $directionName; + $carry[$facultyName]['directions'][$directionName]['id'] = $directionId; + $carry[$facultyName]['directions'][$directionName]['code'] = $directionCode; + $carry[$facultyName]['directions'][$directionName]['education_level'] = $educationLevelName; + $carry[$facultyName]['directions'][$directionName]['education_form'][] = $educationFormName; + $carry[$facultyName]['directions'][$directionName]['education_form'] = array_unique( + $carry[$facultyName]['directions'][$directionName]['education_form'] + ); + $carry[$facultyName]['directions'][$directionName]['entrance_examinations'] + [$examinationTypeName][$subjectTypeName][$subjectName] = $entranceExaminationScore; + $carry[$facultyName]['directions'][$directionName]['budget_places'] + [$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionBudgetPlaces; + + + $carry[$facultyName]['directions'][$directionName]['paid_places'] + [$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionPaidPlaces; + + /*$carry[$facultyName]['directions'][$directionName] + ['paid_places'][$educationFormName] = $directionPaidPlaces;*/ + + + $carry[$facultyName]['directions'][$directionName] + ['cost_paid_place'][$educationFormName] = $directionCostPaidPlace; + $carry[$facultyName]['directions'][$directionName]['period'][$educationFormName] = $directionPeriod; + $carry[$facultyName]['directions'][$directionName]['description'] = $directionDescription; + + foreach ($branches as $branch) { + [ + 'direction_name' => $directionNameBranch, + 'educational_institution_name' => $educationalInstitutionNameBranch, + 'direction_profile_name' => $directionProfileNameBranch, + 'education_form_name' => $educationFormNameBranch, + 'direction_budget_places' => $directionBudgetPlacesBranch + ] = $branch; + if ($directionNameBranch === $directionName) { + $carry[$facultyName]['directions'][$directionName]['budget_places'] + [$educationalInstitutionNameBranch][$directionProfileNameBranch] + [$educationFormNameBranch] = $directionBudgetPlacesBranch; + } + } + + + return $carry; + }, []); + + return view('new-design.inostran', compact( + 'faculties', + 'subjects', + 'directionsWithInstitution', + 'groupedDirections', + 'admissions', + )); + } + + public function magistr() + { + $admissions = Admission::all(); + $faculties = Faculty::all(); + $subjects = EntranceExamination::all() + ->select('subject_id', 'subject_type_id', 'examination_type_id') + ->where('examination_type_id', '=', ExaminationTypeEnum::Ege->value) + ->reduce(function (?array $carry, $subject) { + $id = $subject['subject_id']; + $value = Subject::find($id)->name; + $carry[$id] = $value; + return $carry; + }); + $directionsWithInstitution = Direction::with(['department']) + ->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" + ]); + //phpcs:disable + $directionsGroups = Direction::with(['department']) + ->leftJoin('direction_direction_profile', 'directions.id', '=', 'direction_direction_profile.direction_id') + ->leftJoin('direction_profiles','direction_direction_profile.direction_profile_id','=','direction_profiles.id') + ->leftJoin('departments', 'directions.department_id', '=', 'departments.id') + ->leftJoin('faculties', 'departments.faculty_id', '=', 'faculties.id') + ->leftJoin('education_levels', 'directions.education_level_id', '=', 'education_levels.id') + ->leftJoin('education_forms', 'directions.education_form_id', '=', 'education_forms.id') + ->leftJoin('entrance_examinations', 'entrance_examinations.direction_id', '=', 'directions.id') + ->leftJoin('educational_institutions','faculties.educational_institution_id','=','educational_institutions.id') + ->leftJoin('examination_types', 'entrance_examinations.examination_type_id', '=', 'examination_types.id') + ->leftJoin('subject_types', 'entrance_examinations.subject_type_id', '=', 'subject_types.id') + ->leftJoin('subjects', 'entrance_examinations.subject_id', '=', 'subjects.id') + ->select( + 'directions.id as direction_id', + 'directions.code as direction_code', + 'directions.name as direction_name', + 'directions.description as direction_description', + 'directions.budget_places as direction_budget_places', + 'directions.paid_places as direction_paid_places', + 'directions.cost_paid_place as direction_cost_paid_place', + 'directions.period as direction_period', + 'education_levels.name as education_level_name', + 'education_forms.name as education_form_name', + 'faculties.id as faculty_id', + 'faculties.name as faculty_name', + 'faculties.description as faculty_description', + 'educational_institutions.id as educational_institution_id', + 'educational_institutions.name as educational_institution_name', + 'direction_profiles.id as direction_profile_id', + 'entrance_examinations.scores as entrance_examination_score', + 'examination_types.name as examination_type_name', + 'subject_types.name as subject_type_name', + 'subjects.name as subject_name', + 'direction_profiles.name as direction_profile_name', + ) + ->get()->toArray(); + //phpcs:enable + $branches = []; + $directionsGroupWithOutBranch = array_reduce($directionsGroups, function ($acc, $direction) use (&$branches) { + + if ($direction['educational_institution_id'] == 3) { + $branches[] = $direction; + } + $acc[] = $direction; + return $acc; + }, []); + + $groupedDirections = collect($directionsGroupWithOutBranch) + ->reduce(function ($carry, $item, $key) use ($branches) { + [ + 'direction_id' => $directionId, + 'direction_name' => $directionName, + 'direction_code' => $directionCode, + 'educational_institution_id' => $educational_institution_id, + 'educational_institution_name' => $educationalInstitutionName, + 'faculty_id' => $facultyId, + 'faculty_name' => $facultyName, + 'faculty_description' => $facultyDescription, + 'education_level_name' => $educationLevelName, + 'education_form_name' => $educationFormName, + 'entrance_examination_score' => $entranceExaminationScore, + 'examination_type_name' => $examinationTypeName, + 'subject_type_name' => $subjectTypeName, + 'subject_name' => $subjectName, + 'direction_profile_name' => $directionProfileName, + 'direction_budget_places' => $directionBudgetPlaces, + 'direction_paid_places' => $directionPaidPlaces, + 'direction_cost_paid_place' => $directionCostPaidPlace, + 'direction_period' => $directionPeriod, + 'direction_description' => $directionDescription, + ] = $item; + + $carry[$facultyName]['id'] = $facultyId; + $carry[$facultyName]['name'] = $facultyName; + $carry[$facultyName]['description'] = $facultyDescription; + $carry[$facultyName]['directions'][$directionName]['name'] = $directionName; + $carry[$facultyName]['directions'][$directionName]['id'] = $directionId; + $carry[$facultyName]['directions'][$directionName]['code'] = $directionCode; + $carry[$facultyName]['directions'][$directionName]['education_level'] = $educationLevelName; + $carry[$facultyName]['directions'][$directionName]['education_form'][] = $educationFormName; + $carry[$facultyName]['directions'][$directionName]['education_form'] = array_unique( + $carry[$facultyName]['directions'][$directionName]['education_form'] + ); + $carry[$facultyName]['directions'][$directionName]['entrance_examinations'] + [$examinationTypeName][$subjectTypeName][$subjectName] = $entranceExaminationScore; + $carry[$facultyName]['directions'][$directionName]['budget_places'] + [$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionBudgetPlaces; + + + $carry[$facultyName]['directions'][$directionName]['paid_places'] + [$educationalInstitutionName][$directionProfileName][$educationFormName] = $directionPaidPlaces; + + /*$carry[$facultyName]['directions'][$directionName] + ['paid_places'][$educationFormName] = $directionPaidPlaces;*/ + + + $carry[$facultyName]['directions'][$directionName] + ['cost_paid_place'][$educationFormName] = $directionCostPaidPlace; + $carry[$facultyName]['directions'][$directionName]['period'][$educationFormName] = $directionPeriod; + $carry[$facultyName]['directions'][$directionName]['description'] = $directionDescription; + + foreach ($branches as $branch) { + [ + 'direction_name' => $directionNameBranch, + 'educational_institution_name' => $educationalInstitutionNameBranch, + 'direction_profile_name' => $directionProfileNameBranch, + 'education_form_name' => $educationFormNameBranch, + 'direction_budget_places' => $directionBudgetPlacesBranch + ] = $branch; + if ($directionNameBranch === $directionName) { + $carry[$facultyName]['directions'][$directionName]['budget_places'] + [$educationalInstitutionNameBranch][$directionProfileNameBranch] + [$educationFormNameBranch] = $directionBudgetPlacesBranch; + } + } + + + return $carry; + }, []); + + return view('new-design.magistr', compact( + 'faculties', + 'subjects', + 'directionsWithInstitution', + 'groupedDirections', + 'admissions', + )); + } + public function calculator($request) diff --git a/resources/views/layouts/new-design-layout.blade.php b/resources/views/layouts/new-design-layout.blade.php index a132491..3b8ec55 100644 --- a/resources/views/layouts/new-design-layout.blade.php +++ b/resources/views/layouts/new-design-layout.blade.php @@ -29,4 +29,188 @@ {{-- --}} {{-- --}} + @yield('content') diff --git a/resources/views/new-design/bakalavr-special.blade.php b/resources/views/new-design/bakalavr-special.blade.php index e97efad..8c687a1 100644 --- a/resources/views/new-design/bakalavr-special.blade.php +++ b/resources/views/new-design/bakalavr-special.blade.php @@ -1,68 +1,6 @@ @extends('layouts.new-design-layout') @section('content') + + + + +
+
+
+
+ +
+
+ +
+ + + + +
+
+ ПОСТУПАЙ В МГТУ +
+
+
+
+ 75 студенческих объединений +
+
+
+
+ 3367 БЮДЖЕТНЫХ МЕСТ +
+
+
+
+ 300 образовательных программ +
+
+
+






+
+ + + + +
+







+
+
+ +
+ + +
+ +
+ +
+
+
+ КАЛЬКУЛЯТОР ЕГЭ +
+
+
+
+
+ +
Выберите предметы ЕГЭ
+
+ + + + + + + + + + + + + + +
+
+
Сбросить фильтр
+
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
Технологический факультет Строительство 4 года
Технологический факультет Строительство 4 года
Технологический факультет Строительство 4 года
Технологический факультет Строительство 4 года
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + +
Технологический факультет Строительство 4 года
Технологический факультет Технологические машины и оборудование 4 года
Технологический факультет Продукты питания из растительного сырья 4 года
Технологический факультет Строительство 4 года
+ +
+ + +
+ +
+ + +
+












+
+
+ +
+
+
+
+ СРОКИ ПРИЕМА +
+
+ +
+
+
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+
+
+
+ Начало приема документов +
+

+ А ещё базовые сценарии поведения пользователей представляют собой не что иное, как квинтэссенцию победы + маркетинга над разумом и должны быть описаны максимально подробно +

+
+
+
+
+
20.06.24
Бюджет
+
20.06.24
Бюджет
+
+
+
+ +
+ + + +
+
+
+ +
































+
+
+
+
+
+
+
+ +
+
Приемная коммисия:
+

(8772) 52-30-08

+
+
+
+
+
Приёмная комиссия филиала МГТУ в пос. Яблоновском:
+

8-938-530-53-14

+
+
+
+
+
Почта:
+

info@mkgtu.ru

+
+
+
+
+

385000, Республика Адыгея, г. Майкоп, ул. Первомайская, д. 191

+
+
+ vid + vid + vid + vid + vid + vid +
+
+
+ +


+
+ +
+ + +@endsection diff --git a/resources/views/new-design/inostran.blade.php b/resources/views/new-design/inostran.blade.php index 26c0b3c..e7d8ef5 100644 --- a/resources/views/new-design/inostran.blade.php +++ b/resources/views/new-design/inostran.blade.php @@ -1,259 +1,122 @@ @extends('layouts.new-design-layout') @section('content') -
-
-
+
+
- +
-
-
+
- +
-
-
+ -
-
+
ПОСТУПАЙ В МГТУ
-
+
75 студенческих объединений
-
+
3367 БЮДЖЕТНЫХ МЕСТ
-
+
300 образовательных программ
@@ -289,16 +155,41 @@ overflow-x: hidden;






-
-
+
-
+
-
+
ПЕРЕЧЕНЬ ФАКУЛЬТЕТОВ
-
-
- - - -