From bd7a39740d29fa68799ca24a5431ab6b48af468a Mon Sep 17 00:00:00 2001 From: Heryson Date: Sun, 9 Jun 2024 23:28:27 -0300 Subject: [PATCH] Dashboad admin funcionalidades adicionadas ao dashboard de administrador. --- app/Http/Controllers/AdmController.php | 85 +++- app/Http/Controllers/HourController.php | 174 ++++++- app/Http/Controllers/IntegraController.php | 4 - app/Http/Middleware/CheckAdmin.php | 25 + public/css/admin.css | 3 +- public/css/horario_2.css | 8 +- public/img/lapis.png | Bin 0 -> 23809 bytes public/js/create-hour.js | 345 +++++++++++++ public/js/sn.js | 139 ++++- public/js/users.js | 51 +- .../views/pages/adms/dashboard.blade.php | 11 +- .../views/pages/adms/edit-hour.blade.php | 112 +++++ resources/views/pages/adms/hours.blade.php | 147 ++++++ .../views/pages/adms/user-deleted.blade.php | 38 ++ resources/views/pages/adms/users.blade.php | 13 +- resources/views/pages/grade/dsm.blade.php | 476 ++++++++++++++++++ .../views/pages/layouts/header.blade.php | 1 + resources/views/pages/making.blade.php | 201 ++++---- routes/web.php | 17 +- 19 files changed, 1721 insertions(+), 129 deletions(-) create mode 100644 app/Http/Middleware/CheckAdmin.php create mode 100644 public/img/lapis.png create mode 100644 public/js/create-hour.js create mode 100644 resources/views/pages/adms/edit-hour.blade.php create mode 100644 resources/views/pages/adms/hours.blade.php create mode 100644 resources/views/pages/adms/user-deleted.blade.php diff --git a/app/Http/Controllers/AdmController.php b/app/Http/Controllers/AdmController.php index 229541e..f5fdef3 100644 --- a/app/Http/Controllers/AdmController.php +++ b/app/Http/Controllers/AdmController.php @@ -6,14 +6,97 @@ use Illuminate\Http\RedirectResponse; use App\Models\Post; use App\Models\User; +use App\Models\Course; +use App\Models\Discipline; +use App\Models\Blocks; +use App\Models\Room; +use App\Models\Semester; +use App\Models\Hour; class AdmController extends Controller { public function index() { $posts = Post::all(); + // usuários $users = User::all(); - return view('pages.adms.dashboard', compact('posts','users')); + // cadastrar disciplinas + $courses = Course::all(); + $disciplines = Discipline::all(); + $blocks = Blocks::all(); + $users = User::all(); + $rooms = Room::all(); + $semesters = Semester::all(); + + // dsm 1 semestre + $dsm1 = Hour::whereIn('id', [8,9,10,11,12,13,14,15,16])->get(); + // dsm 2 semestre + $dsm2 = Hour::whereIn('id', [1,2,3,4,5,6,7])->get(); + + return view('pages.adms.dashboard', + compact( + 'posts','users', + // disciplinas + 'blocks','rooms','semesters','courses','disciplines', + //dsm1 - dsm2 + 'dsm1','dsm2', + )); + } + + public function delete($id) + { + $user = User::findOrFail($id); + $user->delete(); + + return response()->json(['success' => 'Usuário excluído com sucesso!']); + } + + public function editHour($id) + { + $hour = Hour::findOrFail($id); + + return view('pages.adms.edit-hour', compact('hour')); + } + + public function store(Request $request, $id) + { + $hour = Hour::findOrFail($id); + // Atualizar professor + $user = $hour->user; + $user->name = $request->user; + $user->save(); + + // Atualizar curso + $course = $hour->course; + $course->description = $request->course; + $course->save(); + + // Atualizar Semestre + $semester = $hour->semester; + $semester->name = $request->semester; + $semester->save(); + + // Atualizar Disciplina + $discipline = $hour->discipline; + $discipline->name = $request->discipline; + $discipline->save(); + + // Atualizar Sala + $room = $hour->room; + $room->name = $request->room; + $room->save(); + + // Atualizar Block + $block = $hour->block; + $block->block = $request->block; + $block->save(); + + // Atualizar Dia e Hora + $hour->dia = $request->dia; + $hour->save(); + + $hour->hora = $request->hora; + $hour->save(); } } diff --git a/app/Http/Controllers/HourController.php b/app/Http/Controllers/HourController.php index cdf9e18..a193d58 100644 --- a/app/Http/Controllers/HourController.php +++ b/app/Http/Controllers/HourController.php @@ -204,6 +204,136 @@ public function show_dsm() $cn6_sex_9 = Hour::find(159); $cn6_sex_11 = Hour::find(160); + // gpi 1 semestre + $gp1_seg_7 = Hour::find(161); + $gp1_seg_9 = Hour::find(162); + $gp1_ter_7 = Hour::find(163); + $gp1_ter_9 = Hour::find(164); + $gp1_qua_7 = Hour::find(165); + $gp1_qua_9 = Hour::find(166); + $gp1_qui_7 = Hour::find(167); + $gp1_qui_9 = Hour::find(168); + $gp1_sex_7 = Hour::find(169); + $gp1_sex_9 = Hour::find(170); + + // gpi 2 semestre + $gp2_seg_7 = Hour::find(171); + $gp2_seg_9 = Hour::find(172); + $gp2_ter_7 = Hour::find(173); + $gp2_ter_9 = Hour::find(174); + $gp2_qua_7 = Hour::find(175); + $gp2_qua_9 = Hour::find(176); + $gp2_qui_7 = Hour::find(177); + $gp2_qui_9 = Hour::find(178); + $gp2_sex_7 = Hour::find(179); + $gp2_sex_9 = Hour::find(180); + + // gpi 3 semestre + $gp3_seg_7 = Hour::find(181); + $gp3_seg_9 = Hour::find(182); + $gp3_ter_7 = Hour::find(183); + $gp3_ter_9 = Hour::find(184); + $gp3_qua_7 = Hour::find(185); + $gp3_qua_9 = Hour::find(186); + $gp3_qui_7 = Hour::find(187); + $gp3_qui_9 = Hour::find(188); + $gp3_sex_7 = Hour::find(189); + $gp3_sex_9 = Hour::find(190); + + // gpi 4 semestre + $gp4_seg_7 = Hour::find(191); + $gp4_seg_9 = Hour::find(192); + $gp4_ter_7 = Hour::find(193); + $gp4_ter_9 = Hour::find(194); + $gp4_qua_7 = Hour::find(195); + $gp4_qua_9 = Hour::find(196); + $gp4_qui_7 = Hour::find(197); + $gp4_qui_9 = Hour::find(198); + $gp4_sex_7 = Hour::find(199); + $gp4_sex_9 = Hour::find(200); + + // gpi 5 semestre + $gp5_seg_7 = Hour::find(201); + $gp5_seg_9 = Hour::find(202); + $gp5_ter_7 = Hour::find(203); + $gp5_ter_9 = Hour::find(204); + $gp5_qua_7 = Hour::find(205); + $gp5_qua_9 = Hour::find(206); + $gp5_qui_7 = Hour::find(207); + $gp5_qui_9 = Hour::find(208); + $gp5_sex_7 = Hour::find(209); + $gp5_sex_9 = Hour::find(210); + + // gpi 6 semestre + $gp6_seg_7 = Hour::find(211); + $gp6_seg_9 = Hour::find(212); + $gp6_ter_7 = Hour::find(213); + $gp6_ter_9 = Hour::find(214); + $gp6_qua_7 = Hour::find(215); + $gp6_qua_9 = Hour::find(216); + $gp6_qui_7 = Hour::find(217); + $gp6_qui_9 = Hour::find(218); + $gp6_sex_7 = Hour::find(219); + $gp6_sex_9 = Hour::find(220); + + // ma 1 semestre + $ma1_seg_7 = Hour::find(221); + $ma1_seg_9 = Hour::find(222); + $ma1_ter_7 = Hour::find(223); + $ma1_ter_9 = Hour::find(224); + $ma1_qua_7 = Hour::find(225); + $ma1_qua_9 = Hour::find(226); + $ma1_qui_7 = Hour::find(227); + $ma1_qui_9 = Hour::find(228); + $ma1_sex_7 = Hour::find(229); + $ma1_sex_9 = Hour::find(230); + $ma1_sab_7 = Hour::find(231); + $ma1_sab_9 = Hour::find(232); + + // ma 2 semestre + $ma2_seg_7 = Hour::find(233); + $ma2_seg_9 = Hour::find(234); + $ma2_ter_7 = Hour::find(235); + $ma2_ter_9 = Hour::find(236); + $ma2_qua_7 = Hour::find(237); + $ma2_qua_9 = Hour::find(238); + $ma2_qua_11 = Hour::find(239); + $ma2_qui_7 = Hour::find(240); + $ma2_qui_9 = Hour::find(241); + $ma2_qui_11 = Hour::find(242); + $ma2_sex_7 = Hour::find(243); + $ma2_sex_9 = Hour::find(244); + $ma2_sex_11 = Hour::find(245); + + // ma 3 semestre + $ma3_seg_7 = Hour::find(246); + $ma3_seg_9 = Hour::find(247); + $ma3_seg_11 = Hour::find(248); + $ma3_ter_9 = Hour::find(249); + $ma3_ter_11 = Hour::find(250); + $ma3_qua_7 = Hour::find(251); + $ma3_qua_9 = Hour::find(252); + $ma3_qua_11 = Hour::find(253); + $ma3_qui_7 = Hour::find(254); + $ma3_qui_9 = Hour::find(255); + $ma3_sex_9 = Hour::find(256); + $ma3_sex_11 = Hour::find(257); + + // ma 4 semestre + $ma4_seg_7 = Hour::find(258); + $ma4_seg_9 = Hour::find(259); + $ma4_seg_11 = Hour::find(260); + $ma4_ter_7 = Hour::find(261); + $ma4_ter_9 = Hour::find(262); + $ma4_qua_7 = Hour::find(263); + $ma4_qua_9 = Hour::find(264); + $ma4_qui_7 = Hour::find(265); + $ma4_qui_9 = Hour::find(266); + $ma4_qui_11 = Hour::find(267); + $ma4_sex_9 = Hour::find(268); + $ma4_sex_11 = Hour::find(269); + + return view('pages.grade', compact( // dsm 1 e 2 semestre @@ -259,6 +389,45 @@ public function show_dsm() 'cn6_seg_7','cn6_seg_9','cn6_ter_7','cn6_ter_9','cn6_ter_11','cn6_qua_7', 'cn6_qua_9','cn6_qui_7','cn6_qui_9','cn6_sex_7','cn6_sex_9','cn6_sex_11', + // gpi 1 semestre + 'gp1_seg_7','gp1_seg_9','gp1_ter_7','gp1_ter_9','gp1_qua_7','gp1_qua_9', + 'gp1_qui_7','gp1_qui_9','gp1_sex_7','gp1_sex_9', + + // gpi 2 semestre + 'gp2_seg_7','gp2_seg_9','gp2_ter_7','gp2_ter_9','gp2_qua_7','gp2_qua_9', + 'gp2_qui_7','gp2_qui_9','gp2_sex_7','gp2_sex_9', + + // gpi 3 semestre + 'gp3_seg_7','gp3_seg_9','gp3_ter_7','gp3_ter_9','gp3_qua_7','gp3_qua_9', + 'gp3_qui_7','gp3_qui_9','gp3_sex_7','gp3_sex_9', + + // gpi 4 semestre + 'gp4_seg_7','gp4_seg_9','gp4_ter_7','gp4_ter_9','gp4_qua_7','gp4_qua_9', + 'gp4_qui_7','gp4_qui_9','gp4_sex_7','gp4_sex_9', + + // gpi 5 semestre + 'gp5_seg_7','gp5_seg_9','gp5_ter_7','gp5_ter_9','gp5_qua_7','gp5_qua_9', + 'gp5_qui_7','gp5_qui_9','gp5_sex_7','gp5_sex_9', + + // gpi 6 semestre + 'gp6_seg_7','gp6_seg_9','gp6_ter_7','gp6_ter_9','gp6_qua_7','gp6_qua_9', + 'gp6_qui_7','gp6_qui_9','gp6_sex_7','gp6_sex_9', + + // ma 1 semestre + 'ma1_seg_7','ma1_seg_9','ma1_ter_7','ma1_ter_9','ma1_qua_7','ma1_qua_9', + 'ma1_qui_7','ma1_qui_9','ma1_sex_7','ma1_sex_9','ma1_sab_7','ma1_sab_9', + + // ma 2 semestre + 'ma2_seg_7','ma2_seg_9','ma2_ter_7','ma2_ter_9','ma2_qua_7','ma2_qua_9', + 'ma2_qui_7','ma2_qui_9','ma2_qui_11','ma2_sex_7','ma2_sex_9','ma2_sex_11', + + // ma 3 semestre + 'ma3_seg_7','ma3_seg_9','ma3_seg_11','ma3_ter_9','ma3_ter_11','ma3_qua_7', + 'ma3_qua_9','ma3_qua_11','ma3_qui_7','ma3_qui_9','ma3_sex_9','ma3_sex_11', + + // ma 4 semestre + 'ma4_seg_7','ma4_seg_9','ma4_seg_11','ma4_ter_7','ma4_ter_9','ma4_qua_7', + 'ma4_qua_9','ma4_qui_7','ma4_qui_9','ma4_qui_11','ma4_sex_9','ma4_sex_11', )); } public function grade() @@ -275,7 +444,7 @@ public function grade() } - public function store(Request $request): RedirectResponse + public function store(Request $request) { //dd($request->all()); @@ -293,6 +462,7 @@ public function store(Request $request): RedirectResponse 'dia'=>$request->days, 'hora'=>$request->hours]); - return redirect()->route('fazer')->with('status','hour-created'); + return response()->json(['success' => true]); + //return redirect()->route('dash')->with('status','hour-created'); } } diff --git a/app/Http/Controllers/IntegraController.php b/app/Http/Controllers/IntegraController.php index 2b335b6..6196fe2 100644 --- a/app/Http/Controllers/IntegraController.php +++ b/app/Http/Controllers/IntegraController.php @@ -53,10 +53,6 @@ public function create() // 'name'=>'Sala 302', // 'block_id'=>5 //]); - - $hour = Hour::find(7); - $hour->user_id = 5; - $hour->save(); } /** diff --git a/app/Http/Middleware/CheckAdmin.php b/app/Http/Middleware/CheckAdmin.php new file mode 100644 index 0000000..3bdd233 --- /dev/null +++ b/app/Http/Middleware/CheckAdmin.php @@ -0,0 +1,25 @@ +role === 'admin'){ + return $next($request); + } + + return redirect('/')->with('error','Você não tem permissão para acessar essa página!'); + } +} diff --git a/public/css/admin.css b/public/css/admin.css index 88c0740..982be2a 100644 --- a/public/css/admin.css +++ b/public/css/admin.css @@ -39,7 +39,7 @@ width: 50%; height: 2rem; } -.admin-right-all-container { +.admin-right-all-container, .text-wel { padding: 40px; display: flex; flex-direction: column; @@ -96,7 +96,6 @@ border: 1px solid var(--dsm-border-color-tertiary); color: var(--dsm-font-color-quaternary); } - /* TELA MINHAS PUBLICACOES */ @media(min-width: 576px) { diff --git a/public/css/horario_2.css b/public/css/horario_2.css index b9f72e3..dd3d3ae 100644 --- a/public/css/horario_2.css +++ b/public/css/horario_2.css @@ -20,7 +20,8 @@ margin-bottom: 1rem; } .dsm-s1, .dsm-s2,.sn-s1,.sn-s2, .sn-s3, .sn-s4, .sn-s5, .sn-s6 -,.cn-s1,.cn-s2,.cn-s3,.cn-s4,.cn-s5,.cn-s6{ +,.cn-s1,.cn-s2,.cn-s3,.cn-s4,.cn-s5,.cn-s6,.gp-s1,.gp-s2,.gp-s3, +.gp-s4,.gp-s5,.gp-s6,.ma-s1,.ma-s2,.ma-s3,.ma-s4,.ma-s5,.ma-s6{ display: inline-block; padding: 1rem; border: 1px solid red; @@ -29,11 +30,14 @@ background-color: crimson; color: lightcyan; border-radius: 15px; + margin-right: 0.5rem; } .dsm-s1:hover,.dsm-s2:hover,.sn-s1:hover, .sn-s2:hover,.sn-s3:hover,.sn-s4:hover,.sn-s5:hover,.sn-s6:hover, .cn-s1:hover,.cn-s2:hover,.cn-s3:hover,.cn-s4:hover,.cn-s5:hover, -.cn-s6:hover{ +.cn-s6:hover,.gp-s1:hover,.gp-s2:hover,.gp-s3:hover,.gp-s4:hover, +.gp-s5:hover,.gp-s6:hover,.ma-s1:hover,.ma-s2:hover,.ma-s3:hover, +.ma-s4:hover,.ma-s5:hover,.ma-s6:hover{ background-color: coral; } diff --git a/public/img/lapis.png b/public/img/lapis.png new file mode 100644 index 0000000000000000000000000000000000000000..42272f49f5f4530b5fba9de5ae2a967600994b80 GIT binary patch literal 23809 zcmYgYc|4Tg_a7-q2}z19SwkpmDNA-4jBGVRi)}{HVyG!wNlEt5Sh9~XwhGC}(oQAI z%<#$Do*ALVP$T-CXVkafAD>qr&%O8Dv%b%{=ef_sV;pUSg`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YPpc-AE)Yb2Fde7zIR2Nx^%XJ^7q_Z^_=?CwH-%v zK+)v{55h}p{@>rFI}7>p)ZqvY`FmbVf#t-JMh_^^{z(`ueL_9tuhO$!^D1PX#l2Zy zmVVdt0r7@;tTn3Mv-t<;ZOt1B@|CZ&j#Hgc<#S3$RSUZyc$nzhTDsVu#t7fISreG+|*0fPz0+-t>aj0gw*D99*wKySC$`;vwBkgKJ`FS7)(KCY@^OzI3HpM%1J4%akK6l+V11)QXEGkKsWEa?RG6sp>D zVVz2|3aKvTE!2c`(~`82xN1G18ypX0@K1)@PBYhFeH-8!0Ka~pt8Do$VHX(@$DTL~33lzVu|wO~+aKJu2aASX9sVIO*?!Uq5`g{QfnIEnBU%3i?Bx*U literal 0 HcmV?d00001 diff --git a/public/js/create-hour.js b/public/js/create-hour.js new file mode 100644 index 0000000..0db2cb2 --- /dev/null +++ b/public/js/create-hour.js @@ -0,0 +1,345 @@ +document.addEventListener('DOMContentLoaded', function() { + // Seleção dos elementos + const linkUserEl = document.getElementById('link-user'); + const linkHourEl = document.getElementById('link-hour'); + const linkCreateHourEl = document.getElementById('link-create-hour'); + const textEl = document.querySelector('.text-h3'); + const section = document.getElementById('show-template'); + const adminEl = document.getElementById('admin-container'); + + // Função para ajustar a altura do container + function ajustarAltura() { + adminEl.style.height = 'max-content'; + } + + // Função para adicionar ouvintes de evento ao formulário de criação de horários + function addFormListeners() { + const formEl = document.querySelector('#show-template #my-form'); + const responseDiv = document.querySelector('#show-template #response'); + const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content'); + + formEl.addEventListener('submit', function(event) { + event.preventDefault(); + + const formData = new FormData(formEl); + + fetch(formEl.action, { + method: 'POST', + headers: { + 'X-CSRF-TOKEN': csrfToken, + 'Accept': 'application/json' + }, + body: formData + }) + .then(response => { + if (!response.ok) { + throw new Error('Network response was not ok'); + } + return response.json(); + }) + .then(data => { + if (data.success) { + responseDiv.textContent = 'Horário criado com sucesso!'; + formEl.reset(); + } else { + responseDiv.textContent = 'Ocorreu um erro ao criar o horário.'; + } + }) + .catch(error => { + console.error('Erro:', error); + responseDiv.textContent = 'Ocorreu um erro ao criar o horário.'; + }); + }); + } + + // Função para adicionar ouvintes de evento ao formulário de exclusão de usuários + function addDeleteListeners() { + const deleteForms = document.querySelectorAll('.delete-user-form'); + + deleteForms.forEach(form => { + form.addEventListener('submit', function(event) { + event.preventDefault(); + + if (confirm('Tem certeza que deseja excluir este usuário?')) { + const action = this.action; + const csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content'); + + fetch(action, { + method: 'DELETE', + headers: { + 'X-CSRF-TOKEN': csrfToken, + 'Content-Type': 'application/json', + 'Accept': 'application/json' + } + }) + .then(response => response.json()) + .then(data => { + if (data.success) { + this.closest('.admin-right-container').remove(); + alert(data.success); + } else { + alert('Ocorreu um erro ao tentar excluir o usuário.'); + } + }) + .catch(error => console.error('Erro:', error)); + } + }); + }); + } + + // Função para carregar e exibir o template de usuários + function loadUserTemplate() { + const templateUser = document.getElementById('my-users').content.cloneNode(true); + section.innerHTML = ''; + section.appendChild(templateUser); + if (textEl) { + textEl.remove(); + } + addDeleteListeners(); + pesquisarUser(); + } + + // Função para carregar e exibir o template de criação de horários + function loadHourTemplate() { + const templateHour = document.getElementById('criar-hora').content.cloneNode(true); + section.innerHTML = ''; + section.appendChild(templateHour); + addFormListeners(); + } + + function loadReadHoursTemplate(){ + const templateReadHour = document.getElementById('my-hours').content.cloneNode(true); + section.innerHTML = ''; + section.appendChild(templateReadHour); + if (textEl) { + textEl.remove(); + } + ajustarAltura(); + } + + // Ouvinte de clique para o botão de usuários + linkUserEl.addEventListener('click', function(event) { + event.preventDefault(); + loadUserTemplate(); + ajustarAltura(); + }); + + // Ouvinte de clique para o botão de criação de horários + linkHourEl.addEventListener('click', function(event) { + event.preventDefault(); + loadReadHoursTemplate(); // Usar a função de usuário também para este botão (ajustar se necessário) + }); + + // Ouvinte de clique para o botão de criação de horários + linkCreateHourEl.addEventListener('click', function(event) { + textEl.innerHTML = ''; + event.preventDefault(); + loadHourTemplate(); + ajustarAltura(); + }); + + // Função para filtrar usuários dinamicamente + function pesquisarUser() { + const searchInput = document.querySelector('.search-user'); + const userContainers = document.querySelectorAll('.admin-right-container'); + + searchInput.addEventListener('input', function() { + const filter = searchInput.value.toLowerCase(); + userContainers.forEach(container => { + const userName = container.querySelector('.admin-card-username p:first-child').textContent.toLowerCase(); + const userEmail = container.querySelector('.admin-card-username p:last-child').textContent.toLowerCase(); + if (userName.includes(filter) || userEmail.includes(filter)) { + container.style.display = ''; + } else { + container.style.display = 'none'; + } + }); + }); + } + + function redirectPage(select) { + var selectedOption = select.options[select.selectedIndex]; + var courseId = selectedOption.value; + + if(courseId == 1){ + dsm1(courseId); + } + } + // EXPORTAR A FUNÇÃO REDIRECT PARA QUE ELA POSSA SER USADA + window.redirectPage = redirectPage; + + function dsm1(option){ + var optionsDsm = ` + `; + + if(option == 1){ + document.getElementById('botoes').innerHTML = optionsDsm; + addDsmListeners(); + } + } + + function addDsmListeners() { + const buttonS1 = document.querySelector('.dsm-s1'); + const buttonS2 = document.querySelector('.dsm-s2'); + // ADICIONANDO OUVINTES DE CLICK AOS BOTÕES DE DSM + buttonS1.addEventListener('click', () => displayContent('dsm', 1)); + buttonS2.addEventListener('click', () => displayContent('dsm', 2)); + } + + // FUNÇÃO PARA EXIBIR O CONTEÚDO DO SEMESTRE + function displayContent(course, semester) { + const section1 = document.getElementById('section_1'); + const section2 = document.getElementById('section_2'); + const section3 = document.getElementById('section_3'); + const section4 = document.getElementById('section_4'); + const section5 = document.getElementById('section_5'); + const section6 = document.getElementById('section_6'); + + // ESCONDE AS SEÇÕES INICIALMENTE + section1.style.display = 'none'; + section2.style.display = 'none'; + section3.style.display = 'none'; + section4.style.display = 'none'; + section5.style.display = 'none'; + section6.style.display = 'none'; + + // EXIBE E CARREGA O CONTEÚDO CORRESPONDENTE DO CURSO PARA CADA SEMESTRE + //DSM 1 SEMESTRE + if (course === 'dsm' && semester === 1) { + section1.style.display = 'block'; + const template = document.getElementById('dsm_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + // muda a altura da main para auto + ajustarAltura(); + // DSM 2 SEMESTRE + } else if (course === 'dsm' && semester === 2) { + section2.style.display = 'block'; + const template = document.getElementById('dsm_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + // SN 1 SEMESTRE + } else if (course === 'sn' && semester === 1) { + section1.style.display = 'block'; + const template = document.getElementById('sn_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + ajustarAltura(); + // SN 2 SEMESTRE + }else if (course === 'sn' && semester === 2) { + section2.style = 'block'; + const template = document.getElementById('sn_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + // SN 3 SEMESTRE + }else if (course === 'sn' && semester === 3){ + section3.style = 'block'; + const template = document.getElementById('sn_3').content.cloneNode(true); + section3.innerHTML = ''; + section3.appendChild(template); + ajustarAltura(); + // SN 4 SEMESTRE + }else if (course === 'sn' && semester === 4){ + section4.style = 'block'; + const template = document.getElementById('sn_4').content.cloneNode(true); + section4.innerHTML = ''; + section4.appendChild(template); + ajustarAltura(); + // SN 5 SEMESTRE + }else if (course === 'sn' && semester === 5){ + section5.style = 'block'; + const template = document.getElementById('sn_5').content.cloneNode(true); + section5.innerHTML = ''; + section5.appendChild(template); + ajustarAltura(); + // SN 6 SEMESTRE + }else if (course === 'sn' && semester === 6){ + section6.style = 'block'; + const template = document.getElementById('sn_6').content.cloneNode(true); + section6.innerHTML = ''; + section6.appendChild(template); + ajustarAltura(); + // CN 1 SEMESTRE + }else if (course === 'cn' && semester === 1){ + section1.style = 'block'; + const template = document.getElementById('cn_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + ajustarAltura(); + // CN 2 SEMESTRE + }else if (course === 'cn' && semester === 2){ + section2.style = 'block'; + const template = document.getElementById('cn_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + // CN 3 SEMESTRE + }else if (course === 'cn' && semester === 3){ + section3.style = 'block'; + const template = document.getElementById('cn_3').content.cloneNode(true); + section3.innerHTML = ''; + section3.appendChild(template); + ajustarAltura(); + // CN 4 SEMESTRE + }else if (course === 'cn' && semester === 4){ + section4.style = 'block'; + const template = document.getElementById('cn_4').content.cloneNode(true); + section4.innerHTML = ''; + section4.appendChild(template); + ajustarAltura(); + // CN 5 SEMESTRE + }else if (course === 'cn' && semester === 5){ + section5.style = 'block'; + const template = document.getElementById('cn_5').content.cloneNode(true); + section5.innerHTML = ''; + section5.appendChild(template); + ajustarAltura(); + // CN 6 SEMESTRE + }else if (course === 'cn' && semester === 6){ + section6.style = 'block'; + const template = document.getElementById('cn_6').content.cloneNode(true); + section6.innerHTML = ''; + section6.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 1){ + section1.style = 'block'; + const template = document.getElementById('gp_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 2){ + section2.style = 'block'; + const template = document.getElementById('gp_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 3){ + section3.style = 'block'; + const template = document.getElementById('gp_3').content.cloneNode(true); + section3.innerHTML = ''; + section3.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 4){ + section4.style = 'block'; + const template = document.getElementById('gp_4').content.cloneNode(true); + section4.innerHTML = ''; + section4.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 5){ + section5.style = 'block'; + const template = document.getElementById('gp_5').content.cloneNode(true); + section5.innerHTML = ''; + section5.appendChild(template); + ajustarAltura(); + }else if (course === 'gp' && semester === 6){ + section6.style = 'block'; + const template = document.getElementById('gp_6').content.cloneNode(true); + section6.innerHTML = ''; + section6.appendChild(template); + ajustarAltura(); + } + // Adicione lógica para outros semestres e cursos aqui conforme necessário + } +}); diff --git a/public/js/sn.js b/public/js/sn.js index 9d25a33..2d76c67 100644 --- a/public/js/sn.js +++ b/public/js/sn.js @@ -44,6 +44,37 @@ document.addEventListener('DOMContentLoaded', (event) => { addCnListeners(); } } + + // GESTÃO DA PRODUÇÃO INDUSTRIAL + function optGpi(option){ + // CRIANDO OS BOTÕES + var optionsGp = ` + + + + + `; + + if(option == 4){ + document.querySelector('.botoes').innerHTML = optionsGp; + addGpListeners(); + } + } + + function optMa(option){ + var optionsMa = ` + + + + + + `; + + if(option == 6){ + document.querySelector('.botoes').innerHTML = optionsMa; + addMaListener(); + } + } // FUNÇÃO PARA ADICIONAR OUVINTES DE EVENTO AOS BOTÕES DSM function addDsmListeners() { const buttonS1 = document.querySelector('.dsm-s1'); @@ -87,6 +118,39 @@ document.addEventListener('DOMContentLoaded', (event) => { buttonCn6.addEventListener('click', () => displayContent('cn', 6)); } + // FUNÇÃO PARA ADICIONAR OUVINTES AOS BOTÕES DE GPI + function addGpListeners() { + const buttonGp1 = document.querySelector('.gp-s1'); + const buttonGp2 = document.querySelector('.gp-s2'); + const buttonGp3 = document.querySelector('.gp-s3'); + const buttonGp4 = document.querySelector('.gp-s4'); + const buttonGp5 = document.querySelector('.gp-s5'); + const buttonGp6 = document.querySelector('.gp-s6'); + // ADICIONANDO OUVINTES DE CLICK AOS BOTÕES DE DSM + buttonGp1.addEventListener('click', () => displayContent('gp', 1)); + buttonGp2.addEventListener('click', () => displayContent('gp', 2)); + buttonGp3.addEventListener('click', () => displayContent('gp', 3)); + buttonGp4.addEventListener('click', () => displayContent('gp', 4)); + buttonGp5.addEventListener('click', () => displayContent('gp', 5)); + buttonGp6.addEventListener('click', () => displayContent('gp', 6)); + } + + function addMaListener() { + const buttonMa1 = document.querySelector('.ma-s1'); + const buttonMa2 = document.querySelector('.ma-s2'); + const buttonMa3 = document.querySelector('.ma-s3'); + const buttonMa4 = document.querySelector('.ma-s4'); + const buttonMa5 = document.querySelector('.ma-s5'); + const buttonMa6 = document.querySelector('.ma-s6'); + // ADICIONANDO OUVINTES DE CLICK AOS BOTÕES DE DSM + buttonMa1.addEventListener('click', () => displayContent('ma', 1)); + buttonMa2.addEventListener('click', () => displayContent('ma', 2)); + buttonMa3.addEventListener('click', () => displayContent('ma', 3)); + buttonMa4.addEventListener('click', () => displayContent('ma', 4)); + buttonMa5.addEventListener('click', () => displayContent('ma', 5)); + buttonMa6.addEventListener('click', () => displayContent('ma', 6)); + } + // FUNÇÃO PARA EXIBIR O CONTEÚDO DO SEMESTRE function displayContent(course, semester) { const section1 = document.getElementById('section_1'); @@ -204,7 +268,78 @@ document.addEventListener('DOMContentLoaded', (event) => { section6.innerHTML = ''; section6.appendChild(template); ajustarAltura(); + // GPI 1 SEMESTRE + }else if (course === 'gp' && semester === 1){ + section1.style = 'block'; + const template = document.getElementById('gp_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + ajustarAltura(); + // GPI 2 SEMESTRE + }else if (course === 'gp' && semester === 2){ + section2.style = 'block'; + const template = document.getElementById('gp_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + // GPI 3 SEMESTRE + }else if (course === 'gp' && semester === 3){ + section3.style = 'block'; + const template = document.getElementById('gp_3').content.cloneNode(true); + section3.innerHTML = ''; + section3.appendChild(template); + ajustarAltura(); + // GPI 4 SEMESTRE + }else if (course === 'gp' && semester === 4){ + section4.style = 'block'; + const template = document.getElementById('gp_4').content.cloneNode(true); + section4.innerHTML = ''; + section4.appendChild(template); + ajustarAltura(); + // GPI 5 SEMESTRE + }else if (course === 'gp' && semester === 5){ + section5.style = 'block'; + const template = document.getElementById('gp_5').content.cloneNode(true); + section5.innerHTML = ''; + section5.appendChild(template); + ajustarAltura(); + // GPI 6 SEMESTRE + }else if (course === 'gp' && semester === 6){ + section6.style = 'block'; + const template = document.getElementById('gp_6').content.cloneNode(true); + section6.innerHTML = ''; + section6.appendChild(template); + ajustarAltura(); + // MA 1 SEMESTRE + }else if (course === 'ma' && semester === 1){ + section1.style = 'block'; + const template = document.getElementById('ma_1').content.cloneNode(true); + section1.innerHTML = ''; + section1.appendChild(template); + ajustarAltura(); + // MA 2 SEMESTRE + }else if (course === 'ma' && semester === 2){ + section2.style = 'block'; + const template = document.getElementById('ma_2').content.cloneNode(true); + section2.innerHTML = ''; + section2.appendChild(template); + ajustarAltura(); + // MA 3 SEMESTRE + }else if (course === 'ma' && semester === 3){ + section3.style = 'block'; + const template = document.getElementById('ma_3').content.cloneNode(true); + section3.innerHTML = ''; + section3.appendChild(template); + ajustarAltura(); + // MA 4 SEMESTRE + }else if (course === 'ma' && semester === 4){ + section4.style = 'block'; + const template = document.getElementById('ma_4').content.cloneNode(true); + section4.innerHTML = ''; + section4.appendChild(template); + ajustarAltura(); } + // Adicione lógica para outros semestres e cursos aqui conforme necessário } // FUNÇÃO PARA MUDAR ALTURA @@ -225,11 +360,11 @@ document.addEventListener('DOMContentLoaded', (event) => { } else if (courseId == 3) { optCn(courseId); } else if (courseId == 4) { - optGpi(); + optGpi(courseId); } else if (courseId == 5) { alert('Curso modalidade EAD'); } else if (courseId == 6) { - optMr(); + optMa(courseId); } else if (courseId == 7) { optSi(); } else if (courseId == 8) { diff --git a/public/js/users.js b/public/js/users.js index c5b6666..6180e4f 100644 --- a/public/js/users.js +++ b/public/js/users.js @@ -1,37 +1,72 @@ const linkEl = document.getElementById('link-user'); const linkHourEl = document.getElementById('link-hour'); +const textEl = document.querySelector('.text-h3'); +// RECEBENDO A DIV QUE IRÁ EXIBIR O CONTEÚDO +const section = document.getElementById('show-template') -let userLoaded = false; // adicionando um ouvinte de click ao botão usuários + linkEl.addEventListener('click', (event)=> { + let userLoaded = false; event.preventDefault(); + ajustarAltura(); // testando se o botão já não foi carregado if(!userLoaded){ const templateUser = document.getElementById('my-users').content.cloneNode(true); - document.getElementById('show-users').appendChild(templateUser); + // LIMPANDO A DIV ANTES DE INSERIR O CONTEÚDO + section.innerHTML = ''; + document.getElementById('show-template').appendChild(templateUser); userLoaded = true; + // remove a div de boas vindas do html + textEl.remove(); + + pesquisarUser(); } - ajustarAltura(); + }); + linkHourEl.addEventListener('click', (event) => { + let userLoaded = false; event.preventDefault(); if(!userLoaded){ - const templateHour = document.getElementById('create-hour').content.cloneNode(true); - document.getElementById('show-create').appendChild(templateHour); + const templateHour = document.getElementById('criar-hora').content.cloneNode(true); + // LIMPANDO A DIV ANTES DE RECEBER O CONTEÚDO + section.innerHTML = ''; + document.getElementById('show-template').appendChild(templateHour); userLoaded = true; } ajustarAltura(); -}) - +}); const adminEl = document.getElementById('admin-container'); //função que uda a altura fixa da página para auto, //ajustando o conteúdo a ela function ajustarAltura(){ - adminEl.style.height = 'auto'; + adminEl.style.height = 'max-content'; +} + +// função para filtrar usuários +function pesquisarUser(){ + // recebendo o campo input + const searchInput = document.querySelector('.search-user'); + // recebendo a div + const userContainers = document.querySelectorAll('.admin-right-container'); + + searchInput.addEventListener('input', function() { + const filter = searchInput.value.toLowerCase(); + userContainers.forEach(container => { + const userName = container.querySelector('.admin-card-username p:first-child').textContent.toLowerCase(); + const userEmail = container.querySelector('.admin-card-username p:last-child').textContent.toLowerCase(); + if (userName.includes(filter) || userEmail.includes(filter)) { + container.style.display = ''; + } else { + container.style.display = 'none'; + } + }); + }); } diff --git a/resources/views/pages/adms/dashboard.blade.php b/resources/views/pages/adms/dashboard.blade.php index 501c216..eb5c722 100644 --- a/resources/views/pages/adms/dashboard.blade.php +++ b/resources/views/pages/adms/dashboard.blade.php @@ -16,18 +16,23 @@
- +
- +
@include('pages.adms.users') + @include('pages.making') + @include('pages.adms.hours') +
+
+

Bem vindo ao painel de controle, {{auth()->user()->name}}!

- + @endsection diff --git a/resources/views/pages/adms/edit-hour.blade.php b/resources/views/pages/adms/edit-hour.blade.php new file mode 100644 index 0000000..5d5102b --- /dev/null +++ b/resources/views/pages/adms/edit-hour.blade.php @@ -0,0 +1,112 @@ + + +
+ Voltar +
+ @csrf + @method('PUT') +

Editar Horário

+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+ + + diff --git a/resources/views/pages/adms/hours.blade.php b/resources/views/pages/adms/hours.blade.php new file mode 100644 index 0000000..8672418 --- /dev/null +++ b/resources/views/pages/adms/hours.blade.php @@ -0,0 +1,147 @@ + +
+ + + + + + diff --git a/resources/views/pages/adms/user-deleted.blade.php b/resources/views/pages/adms/user-deleted.blade.php new file mode 100644 index 0000000..b54e0ca --- /dev/null +++ b/resources/views/pages/adms/user-deleted.blade.php @@ -0,0 +1,38 @@ + +
+

Usuário deletado com sucesso

+ Voltar +
diff --git a/resources/views/pages/adms/users.blade.php b/resources/views/pages/adms/users.blade.php index 17de38f..c9a666e 100644 --- a/resources/views/pages/adms/users.blade.php +++ b/resources/views/pages/adms/users.blade.php @@ -1,5 +1,4 @@ -
-
+
+ diff --git a/resources/views/pages/grade/dsm.blade.php b/resources/views/pages/grade/dsm.blade.php index 6a9709b..53b33c6 100644 --- a/resources/views/pages/grade/dsm.blade.php +++ b/resources/views/pages/grade/dsm.blade.php @@ -687,5 +687,481 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @endsection diff --git a/resources/views/pages/layouts/header.blade.php b/resources/views/pages/layouts/header.blade.php index b7f5a1a..adadf90 100644 --- a/resources/views/pages/layouts/header.blade.php +++ b/resources/views/pages/layouts/header.blade.php @@ -4,6 +4,7 @@ @yield('titulo') IntegraFatec - HOME + diff --git a/resources/views/pages/making.blade.php b/resources/views/pages/making.blade.php index ca44eac..63dfb80 100644 --- a/resources/views/pages/making.blade.php +++ b/resources/views/pages/making.blade.php @@ -1,98 +1,105 @@ -
- @csrf -
-
- -
-
-
-
- -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- -
-
-
-
- -
-
-
-
- -
-
- - @if(session('status') === "hour-created") - Horário criado com sucesso! - @endif - -
+
+ diff --git a/routes/web.php b/routes/web.php index 37e0042..f253996 100644 --- a/routes/web.php +++ b/routes/web.php @@ -10,6 +10,7 @@ use App\Models\Hour; use App\Http\Controllers\PostController; use App\Http\Controllers\AdmController; +use App\Http\Middleware\CheckAdmin; Route::get('/', function () { return view('pages.index'); @@ -51,7 +52,20 @@ echo "

{$hour->room->name}

"; } }); -Route::get('/dash', [AdmController::class , 'index']); + +// ROTAS ADMINISTRADOR PROTEGIDAS POR UM MIDDLEWARE +Route::get('/dash', [AdmController::class , 'index']) + ->name('dash') + ->middleware(CheckAdmin::class); +Route::delete('/admin/{id}', [AdmController::class, 'delete']) + ->name('users.delete') + ->middleware(CheckAdmin::class); +Route::post('/edit/{id}', [AdmController::class, 'editHour']) + ->name('edit.hour') + ->middleware(CheckAdmin::class); +Route::put('/update-hour/{id}', [AdmController::class, 'store']) + ->name('update.hour') + ->middleware(CheckAdmin::class); Route::get('/relation', function (){ $semester = Semester::find(1); @@ -66,6 +80,7 @@ Route::get('/debug', function(){ return view('pages.hora'); }); + Route::middleware('auth')->group(function () { Route::get('/perfil', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('/perfil', [ProfileController::class, 'update'])->name('profile.update');