This commit is contained in:
Olga 2019-12-14 17:26:31 +01:00
commit 063e0641c9
26 changed files with 742 additions and 443 deletions

View File

@ -17,7 +17,7 @@ class UserAttendancesController extends Controller
$user_id = Auth::id(); $user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get(); $subjects = Subject::where('user_id', $user_id)->get();
$subjects_ids = $subjects->pluck('id')->toArray(); $subjects_ids = $subjects->pluck('id')->toArray();
$classes = Classes::whereIn('subject_id', $subjects_ids)->get(); $classes = Classes::whereIn('subject_id', $subjects_ids)->orderBy('created_at','DESC')->get();
$classes_ids = $classes->pluck('id')->toArray(); $classes_ids = $classes->pluck('id')->toArray();
$attendances = Attendance::whereIn('classes_id', $classes_ids)->get(); $attendances = Attendance::whereIn('classes_id', $classes_ids)->get();
$attendances_grouped = $attendances->groupBy($groupBy); $attendances_grouped = $attendances->groupBy($groupBy);

View File

@ -19,12 +19,12 @@ class UserClassesController extends Controller
$user_id = Auth::id(); $user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get(); $subjects = Subject::where('user_id', $user_id)->get();
$subjects_ids = $subjects->pluck('id')->toArray(); $subjects_ids = $subjects->pluck('id')->toArray();
$classes = Classes::whereIn('subject_id', $subjects_ids)->get(); $classes = Classes::whereIn('subject_id', $subjects_ids)->orderBy('created_at','DESC')->get();
foreach($classes as $classes_item) { foreach($classes as $classes_item) {
$current_date = date('Y-m-d H:i:s'); $current_date = date('Y-m-d H:i:s');
$classes_date = $classes_item->date; $classes_date = $classes_item->created_at;
$hours_difference = checkHoursDifference($classes_date, $current_date); $hours_difference = checkHoursDifference($classes_date, $current_date);
if ($hours_difference > 24) { if ($hours_difference > 1.5) {
$classes_item->classes_code = null; $classes_item->classes_code = null;
$classes_item->save(); $classes_item->save();
$classes_item->refresh(); $classes_item->refresh();
@ -103,4 +103,18 @@ class UserClassesController extends Controller
]); ]);
return view('map.summary_map', ['student_name' => $student_name, 'student_surname' => $student_surname, 'seat_number' => $seat_number, 'student_id_number' => $student_id_number, 'classes_id' => $classes_id]); return view('map.summary_map', ['student_name' => $student_name, 'student_surname' => $student_surname, 'seat_number' => $seat_number, 'student_id_number' => $student_id_number, 'classes_id' => $classes_id]);
} }
public function preview_classes($classes_id)
{
if(!$classes_id == 0) {
$classes = Classes::find($classes_id);
$attendances = Attendance::where('classes_id', $classes->id)->get();
$subject = Subject::find($classes->subject_id);
$room_arrangement = Room::find($subject->room_id)->arrangement;
if(!$room_arrangement) {
$room_arrangement = Room::where('name', 'Inna sala')->first()->arrangement;
}
}
return view('user.user_preview_classes', ['classes_id' => $classes_id, 'room_arrangement' => $room_arrangement, 'attendances' => $attendances]);
}
} }

View File

@ -11100,3 +11100,96 @@ a.text-dark:focus {
} }
} }
.full-height {
height: 100%;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 13px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
.content {
text-align: center;
color: #636b6f;
}
#app {
display: flex;
flex-direction: column;
}
.container, .py-4 {
height: 100%;
}
/*.btn-custom {*/
/*border: none;*/
/*border-bottom: 1px solid lightgrey;*/
/*background-color: white;*/
/*color: #1e3572;*/
/*}*/
.custom-header {
display: flex;
justify-content: space-between;
}
.add-subject, .add-attendance {
display: none;
}
.add-subject.open, .add-attendance.open {
display: block;
}
.card-body {
margin-top: 30px;
}
.classes-form {
margin-bottom: 50px;
}
.map-buttons {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.subjects-table {
margin-bottom: 50px;
}
.seat-wrapper {
display: flex;
flex-direction: column;
}
.main-seat-text {
font-size: 50px;
}
.navbar-nav.ml-auto {
justify-content: flex-end;
width: 100%;
}
.no-margin-top {
margin-top: 0;
}
.nav-link {
margin-left: 30px;
transition: transform 0.3s;
}
.nav-link:hover {
transform: scale(1.1);
}

View File

@ -1,5 +1,5 @@
div.seatCharts-container { div.seatCharts-container {
/*min-width: 700px;*/ min-width: 700px;
} }
div.seatCharts-cell { div.seatCharts-cell {
@ -25,11 +25,11 @@ div.seatCharts-seat {
div.seatCharts-seat:focus { div.seatCharts-seat:focus {
border: none; border: none;
} }
/*
.seatCharts-seat:focus { .seatCharts-seat:focus {
outline: none; outline: none;
} }
*/
div.seatCharts-space { div.seatCharts-space {
background-color: white; background-color: white;
@ -61,6 +61,7 @@ div.seatCharts-seat.unavailable {
ul.seatCharts-legendList { ul.seatCharts-legendList {
list-style: none; list-style: none;
cursor: default;
} }
li.seatCharts-legendItem { li.seatCharts-legendItem {
margin-top: 10px; margin-top: 10px;
@ -69,3 +70,6 @@ li.seatCharts-legendItem {
li.seatCharts-legendItem div { li.seatCharts-legendItem div {
cursor: default; cursor: default;
} }
li.seatCharts-legendItem > .seatCharts-cell {
cursor: default;
}

View File

@ -1,56 +1,93 @@
body { body {
font-family: monospace, sans-serif; font-family: 'Nunito', sans-serif;
background-color: #f8fafc;
} }
.wrapper { .wrapper {
text-align: center; text-align: center;
margin: 100px; margin: 100px;
background-color: rgba(159, 183, 218, 0.856);
border-radius: 10px; border-radius: 10px;
padding: 50px 0; padding: 50px 0;
text-shadow: 0 0 2px rgba(56, 55, 55, 0.6);
color: #545c5f;
} }
.wrapper h2 { .wrapper h2 {
font-size: 38px; font-size: 64px;
padding: 15px 0; padding: 0;
} }
.wrapper h3 { .wrapper h3 {
font-size: 22px; font-size: 36px;
font-weight: 400;
text-shadow: 1px 0px 0px rgb(160, 160, 160);
} }
#sel-seat { #sel-seat {
font-size: 30px; font-size: 24px;
text-shadow: 1px 1px 1px rgb(160, 160, 160); text-shadow: 0px 0px 1px rgb(160, 160, 160);
margin-top: -15px; margin-top: -15px;
margin-bottom: 100px; margin-bottom: 100px;
padding: 0; padding: 0;
font-weight: 600;
letter-spacing: 0.2em;
} }
button { button {
margin: auto 0; margin: auto 0;
font-size: 18px; font-size: 18px;
background-color: #5d7cd3;
border-radius: 2px; border-radius: 2px;
border: 0; border: 0;
min-width: 250px; min-width: 250px;
padding: 25px 60px; padding: 25px 60px;
text-align: center; text-align: center;
box-shadow:0px 4px 0px #1e3572; color: #fff;
font-family: monospace; background-color: #3490dc;
float: right; border-color: #3490dc;
display: inline-block;
position: absolute;
left: 50%;
bottom: 30%;
transform: translate(-50%, -10%);
} }
button:hover { button:hover {
color: #fff;
background-color: #227dc7;
border-color: #2176bd;
}
button:active {
box-shadow: 0 0 #b85a5b;
background-color: #3654ff;
}
.checkout-button {
margin: 10px 0;
font-size: 14px;
background-color: #5d7cd3;
border-radius: 3px;
border: 0;
padding: 15px 40px;
display: inline-block;
text-align: center;
box-shadow:0px 4px 0px #1e3572;
}
.checkout-button:hover {
box-shadow: 0 0 rgb(103, 88, 184); box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9; background-color: #3654c9;
cursor: pointer; cursor: pointer;
} }
button:active { .checkout-button:active {
top: 4px;
box-shadow: 0 0 #b85a5b; box-shadow: 0 0 #b85a5b;
background-color: #3654ff; background-color: #3654ff;
} }
a.checkout-button {
color: black;
text-decoration: none;
}
.add-mn-btn {
display: none;
}

View File

@ -1,42 +1,46 @@
body { body {
background: rgb(210, 218, 231); background-color: #f8fafc;
} }
.wrapper { .wrapper {
margin: 0 auto; margin: 0 auto;
display: inline-block; display: inline-block;
background-color: rgba(159, 183, 218, 0.856); padding: 20px;
border-radius: 10px;
width: 70%; width: 70%;
height:60vh; height:60vh;
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 50%; top: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.czytnik { .czytnik {
display: inline-block;
text-align: center; text-align: center;
position: absolute; position: absolute;
left: 50%; left: 50%;
bottom: -20%; bottom: -30%;
transform: translate(-50%, -10%); transform: translate(-50%, -10%);
background-color: rgba(139, 152, 172, 0.856);
padding: 30px 40px;
font-family: monospace;
font-size: 30px;
}
.czytnik:hover {
box-shadow: 0 0 rgb(103, 88, 184); box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9; color: #fff;
cursor: progress; background-color: #3490dc;
border-color: #3490dc;
padding: 50px 100px;
font-size: 30px;
display: none;
width: 70%;
}
.czytnik:hover {
color: #fff;
background-color: #227dc7;
border-color: #2176bd;
} }
.czytnik.open {
display: block;
}
.code-p { .code-p {
text-align: center; text-align: center;
font-size: 20px;
margin-bottom: 100px;
} }
.test-form { .test-form {
display: flex; display: flex;
@ -49,34 +53,30 @@ body {
justify-content: space-between; justify-content: space-between;
} }
.main-text { .main-text {
font-family: "Oswald", Tahoma, sans-serif;
font-weight: bold;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: .15em; font-family: 'Nunito', sans-serif;
display: inline-block; font-weight: 500;
text-shadow: 0 0 80px rgba(255,255,255,.5); text-shadow: 0 0 2px rgba(56, 55, 55, 0.6);
color: #1C1C1C; color: #636b6f;
text-align: center; text-align: center;
line-height: 15vh; font-size: 12vh;
font-size: 11vh;
height: 10%;
} }
@media (max-width: 1300px) { @media (max-width: 1300px) {
.main-text {
font-size: 7.5vh;
width: 100%;
}
}
@media (max-width: 900px) {
.wrapper { .wrapper {
height: 40%; height: 50%;
} }
.main-text { .main-text {
font-size: 3.3em; font-size: 9vh;
}
}
@media (max-width: 870px) {
.wrapper {
height: 35%;
}
.main-text {
font-size: 3.5em;
line-height: 10vh; line-height: 10vh;
width: 100%; width: 100%;
} }
@ -97,9 +97,51 @@ body {
} }
.main-text { .main-text {
font-size: 2.1em; font-size: 2.7em;
line-height: 6vh; line-height: 6vh;
width: 100%; width: 100%;
padding: 20px 0; padding: 20px 0;
} }
} }
.checkout-button {
margin: 10px 0;
font-size: 14px;
background-color: #5d7cd3;
border-radius: 3px;
border: 0;
padding: 15px 40px;
display: inline-block;
text-align: center;
box-shadow:0px 4px 0px #1e3572;
}
.checkout-button:hover {
box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9;
cursor: pointer;
}
.checkout-button:active {
top: 4px;
box-shadow: 0 0 #b85a5b;
background-color: #3654ff;
}
a.checkout-button {
color: black;
text-decoration: none;
}
.map-buttons {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.seat-wrapper {
display: flex;
flex-direction: column;
}
.main-seat-text {
font-size: 70px;
text-align: center;
}

View File

@ -0,0 +1,40 @@
.add-mn-btn, .end-button {
display: none;
}
.preview-page-content {
display: flex;
justify-content: center;
align-items: flex-start;
height: 100%;
padding: auto;
padding-top: 50px;
}
.preview-attendance-table {
width: 40%;
padding-left: 50px;
}
.seat-chart-wrapper {
width: 60%;
}
.preview-attendance-table, .seat-chart-wrapper {
margin: 0 30px;
}
.seatCharts-space {
background-color: unset!important;
}
.seatCharts-container {
width: 100%!important;
}
.seatCharts-row {
width: 100%!important;
height: 130px!important;
}
.seatCharts-cell {
width: 120px!important;
height: 120px!important;
line-height: 55px!important;
}
.preview-name {
color: rgba(0,0,0,0.7);
}

View File

@ -1,6 +1,7 @@
body { body {
font-family: 'Lato', sans-serif; background-color: #f8fafc;
font-style: #b71a4c; font-family: 'Nunito', sans-serif;
font-weight: 600;
} }
a { a {
color: #b71a4c; color: #b71a4c;
@ -8,8 +9,8 @@ a {
.front-indicator { .front-indicator {
width: 90%; width: 90%;
margin: 5px 32px 5px 32px; margin: 5px 32px 5px 32px;
background-color: #f6f6f6; background-color: #ececec;
color: #adadad; color: #a1a1a1;
text-align: center; text-align: center;
padding: 15px; padding: 15px;
border-radius: 5px; border-radius: 5px;
@ -26,7 +27,6 @@ a {
width: 49%; width: 49%;
margin: 0 auto; margin: 0 auto;
float: left; float: left;
font-family: monospace;
font-size: 16px; font-size: 16px;
} }
.booking-details { .booking-details {
@ -50,15 +50,13 @@ a {
margin: 25px 0 20px 0; margin: 25px 0 20px 0;
font-size: 35px; font-size: 35px;
color: #333333; color: #333333;
font-family: monospace;
letter-spacing: 0.15em; letter-spacing: 0.15em;
font-weight: bold; font-weight: bold;
} }
.booking-details h3 { .booking-details h3 {
margin: 5px 5px 0 0; margin: 5px 5px 0 0;
font-size: 18px; font-size: 40px;
color: #333333; color: #333333;
font-family: monospace;
font-weight: bold; font-weight: bold;
} }
div.seatCharts-cell { div.seatCharts-cell {
@ -71,7 +69,6 @@ div.seatCharts-cell {
div.seatCharts-seat { div.seatCharts-seat {
color: #FFFFFF; color: #FFFFFF;
cursor: pointer; cursor: pointer;
} }
div.seatCharts-row { div.seatCharts-row {
height: 100px; height: 100px;
@ -81,20 +78,19 @@ div.seatCharts-row {
justify-content: center; justify-content: center;
} }
div.seatCharts-seat.available { div.seatCharts-seat.available {
background-color: #a8b9bd; background-color: #649a24;
} }
div.seatCharts-seat.available.student-class { div.seatCharts-seat.available.student-class {
background-color: #a8b9bd; background-color: #a8b9bd;
} }
div.seatCharts-seat.focused { div.seatCharts-seat.focused {
background-color: #758184; background-color: #1F5684;
} }
div.seatCharts-seat.selected { div.seatCharts-seat.selected {
background-color: rgb(216, 196, 230); background-color: #1b4d76;
} }
div.seatCharts-seat.unavailable { div.seatCharts-seat.unavailable {
background-color: #caaa41; background-color: #6F7881;
} }
div.seatCharts-container { div.seatCharts-container {
@ -123,26 +119,20 @@ span.seatCharts-legendDescription {
.checkout-button { .checkout-button {
margin: 10px 0; margin: 10px 0;
font-size: 14px; font-size: 14px;
background-color: #5d7cd3; color: #fff;
border-radius: 2px; background-color: #3490dc;
border-color: #3490dc;
border-radius: 3px;
border: 0; border: 0;
padding: 15px 40px; padding: 15px 40px;
display: inline-block; display: inline-block;
text-align: center; text-align: center;
box-shadow:0px 4px 0px #1e3572;
font-family: monospace;
} }
.checkout-button:hover { .checkout-button:hover {
box-shadow: 0 0 rgb(103, 88, 184); box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9; background-color: #227dc7;
cursor: pointer; border-color: #2176bd;
}
.checkout-button:active {
top: 4px;
box-shadow: 0 0 #b85a5b;
background-color: #3654ff;
} }
a.checkout-button { a.checkout-button {
color: black; color: black;
@ -151,7 +141,14 @@ a.checkout-button {
#selected-seats { #selected-seats {
list-style-type: none; list-style-type: none;
font-size: 14px;
margin-left: 0; margin-left: 0;
padding-left: 0; padding-left: 0;
} }
.add-mn-btn {
display: none;
}
.seat-p {
font-weight: bold;
margin-bottom: 0;
font-size: 20px;
}

25
public/js/custom.js Normal file
View File

@ -0,0 +1,25 @@
$(document).ready(function(){
$('.add-mn-btn').on('click', function () {
console.log($('.add-mn-btn'));
$('.czytnik').toggleClass('open');
});
$('.add-subject-btn').on('click', function () {
$('.add-subject').toggleClass('open');
if ($('.add-subject').first().hasClass('open')) {
$(this).text('Anuluj')
} else {
$(this).text('Dodaj nowy')
}
});
$('.add-attendance-btn').on('click', function () {
$('.add-attendance').toggleClass('open');
if ($('.add-attendance').first().hasClass('open')) {
$(this).text('Anuluj')
} else {
$(this).text('Dodaj nowy wpis')
}
});
});

View File

@ -24,8 +24,8 @@
settings = { settings = {
animate : false, //requires jQuery UI animate : false, //requires jQuery UI
naming : { naming : {
top : true, top : false,
left : true, left : false,
getId : function(character, row, column) { getId : function(character, row, column) {
return row + '_' + column; return row + '_' + column;
}, },

View File

@ -0,0 +1,28 @@
function assignPlaces() {
const attendances = $('.attendance-id');
attendances.each(function() {
const seat_number = $(this).attr('id').split('++')[0];
const name = $(this).attr('id').split('++')[1];
const surname = $(this).attr('id').split('++')[2];
const map_seat = $('#seat-map').find(`#${seat_number}`);
map_seat.html(`<b>${seat_number}</b><br><span class="preview-name">${name} ${surname}</span>`)
map_seat.on('mouseover', () => {
map_seat.css('backgroundColor', 'lightgrey');
$(this).css('backgroundColor', 'lightgrey');
}).on('mouseleave', () => {
map_seat.css('backgroundColor', '#649a24');
$(this).css('backgroundColor', 'unset');
});
$(this).on('mouseover', () => {
map_seat.css('backgroundColor', 'lightgrey');
$(this).css('backgroundColor', 'lightgrey');
}).on('mouseleave', () => {
map_seat.css('backgroundColor', '#649a24');
$(this).css('backgroundColor', 'unset');
})
})
}
$(document).ready(function(){
assignPlaces();
});

View File

@ -5,9 +5,7 @@ $(document).ready(function() {
var $cart = $('#selected-seats'), var $cart = $('#selected-seats'),
seatNumber = '', seatNumber = '',
placeNumber = ('#sel-seat'),
$counter = $('#counter'), $counter = $('#counter'),
$name = $('#studentName'),
$total = $('#total'), $total = $('#total'),
sc = $('#seat-map').seatCharts({ sc = $('#seat-map').seatCharts({
map: seat_map, map: seat_map,
@ -21,6 +19,7 @@ $(document).ready(function() {
naming : { naming : {
rows: ['','','',''], rows: ['','','',''],
top : false, top : false,
left: false,
getLabel : function (character, row, column) { getLabel : function (character, row, column) {
if (row === '1') { if (row === '1') {
return column; return column;

View File

@ -57,6 +57,7 @@
<th> ID przedmoitu </th> <th> ID przedmoitu </th>
<th> Nazwa przedmiotu </th> <th> Nazwa przedmiotu </th>
<th> Data </th> <th> Data </th>
<th> Kod </th>
<th></th> <th></th>
<th></th> <th></th>
</tr> </tr>
@ -67,6 +68,7 @@
<td> {{ App\Subject::find($classes_item->subject_id)->name }}, {{ App\Subject::find($classes_item->subject_id)->type }}, <td> {{ App\Subject::find($classes_item->subject_id)->name }}, {{ App\Subject::find($classes_item->subject_id)->type }},
{{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td> {{ App\Subject::find($classes_item->subject_id)->weekday }} {{ App\Subject::find($classes_item->subject_id)->time }}</td>
<td> {{ $classes_item->date }} </td> <td> {{ $classes_item->date }} </td>
<td> {{ $classes_item->classes_code }}</td>
<td> <td>
<a href="{{ route('admin_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a> <a href="{{ route('admin_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a>
</td> </td>

View File

@ -3,29 +3,53 @@
@section('title') Strona Główna @endsection @section('title') Strona Główna @endsection
@section('content') @section('content')
@auth
<div class="container"> <div class="container">
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card"> <div class="card">
<div class="card-header">Mój Panel</div> <div class="card-body no-margin-top">
<div class="card-body">
@if (session('status')) @if (session('status'))
<div class="alert alert-success" role="alert"> <div class="alert alert-success" role="alert">
{{ session('status') }} {{ session('status') }}
</div> </div>
@endif @endif
</div> @section('user_content')
<div class="card-body"> <h4> Garść przydatnych informacji </h4>
<a href="{{ route('user_subjects') }}" class="btn btn-primary"> Moje przedmioty </a> <p> W zakładce <b>Moje przedmioty</b> znajdują się przedmioty, których jesteś prowadzącym.
{{--<a href="{{ route('user_classes') }}" class="btn btn-primary"> My classes </a>--}} <br>Możesz tam także dodać nowy przedmiot.
<a href="{{ route('user_classes') }}" class="btn btn-primary"> Sprawdź obecność </a> </p>
<a href="{{ route('user_attendances') }}" class="btn btn-primary"> Obecności </a> <p></p>
</div> <p> Sprawdzanie obecności możesz rozpocząć w zakładce <b>Sprawdź obecność</b>.
<div class="card-body"> <br> Po rozpoczęciu zapisów zostanie wygenerowany i wyświetlony na ekranie kod weryfikacyjny.
Należy go wprowadzić do programu obsługującego odczyt danych z legitymacji studenckich.
Kod jest ważny 1,5 godziny od momentu utworzenia zajęć.
Dopóki kod jest aktywny, zapisy można przerywać i ponownie kontynuować, gdy zajdzie taka potrzeba.
<br> W tej zakładce znajdziesz także listę wszystkich minionych zajęć.
<br> W każdym momencie możesz zobaczyć podgląd sali i listę obecności dla konkretnych zajęć.
</p>
<p>
Dane dotyczące obecności znajdziesz także w zakładce <b>Obecności</b>.
</p>
@endsection
@yield('user_content') @yield('user_content')
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@else
<div class="container flex-center">
<div class="row justify-content-center">
<div class="flex-center position-ref full-height">
<div class="content">
<div class="title m-b-md">
@CHECK
</div>
<h2>Witaj!</h2>
</div>
</div>
</div>
</div>
@endauth
@endsection @endsection

View File

@ -10,15 +10,19 @@
<title>@CHECK | @yield('title')</title> <title>@CHECK | @yield('title')</title>
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script> <script src="{{ secure_asset('js/app.js') }}" defer></script>
<script src="{{ secure_asset('js/custom.js') }}" defer></script>
<!-- Fonts --> <!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com"> <link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<!-- Styles --> <!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ secure_asset('css/app.css') }}" rel="stylesheet">
<link rel="shortcut icon" href="{{ asset('img/favicon.png') }}"> <link rel="shortcut icon" href="{{ secure_asset('img/favicon.png') }}">
@yield('main_meta')
</head> </head>
<body> <body>
<div id="app"> <div id="app">
@ -34,7 +38,6 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar --> <!-- Left Side Of Navbar -->
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
</ul> </ul>
<!-- Right Side Of Navbar --> <!-- Right Side Of Navbar -->
@ -50,6 +53,9 @@
</li> </li>
@endif @endif
@else @else
<a href="{{ route('user_subjects') }}" class="nav-link"> Moje przedmioty </a>
<a href="{{ route('user_classes') }}" class="nav-link"> Sprawdź obecność </a>
<a href="{{ route('user_attendances') }}" class="nav-link"> Obecności </a>
@if (Auth::user()->is_Admin) @if (Auth::user()->is_Admin)
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{{ route('admin') }}">{{ __('Panel admina') }}</a> <a class="nav-link" href="{{ route('admin') }}">{{ __('Panel admina') }}</a>

View File

@ -3,20 +3,82 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8"> <meta charset="UTF-8">
<link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css"> <link rel="stylesheet" href="http://code.jquery.com/qunit/qunit-1.14.0.css">
<link rel="stylesheet" href="{{ asset('js/app.js') }}"> <link rel="stylesheet" href="{{ asset('css/app.css') }}">
<script type="text/javascript" src="{{ asset('js/app.js') }}"></script>
<script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script> <script src="http://code.jquery.com/qunit/qunit-1.14.0.js"></script>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="{{ asset('js/map/jquery.seat-charts.min.js') }}"></script> <script type="text/javascript" src="{{ asset('js/custom.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}">
<link rel="shortcut icon" href="{{ asset('img/favicon.png') }}"> <link rel="shortcut icon" href="{{ asset('img/favicon.png') }}">
<title> @CHECK | @yield('map_title') </title> <title> @CHECK | @yield('map_title') </title>
@yield('map_meta') @yield('map_meta')
</head> </head>
<body> <body>
<div id="app">
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
<div class="container">
<a class="navbar-brand" href="{{ url('/') }}">
@CHECK
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar -->
<ul class="navbar-nav mr-auto">
</ul>
<!-- Right Side Of Navbar -->
<ul class="navbar-nav ml-auto">
<!-- Authentication Links -->
@guest
<li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">{{ __('Zaloguj się') }}</a>
</li>
@if (Route::has('register'))
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Zarejestruj się') }}</a>
</li>
@endif
@else
<a href="{{ route('user_subjects') }}" class="nav-link"> Moje przedmioty </a>
<a href="{{ route('user_classes') }}" class="nav-link"> Sprawdź obecność </a>
<a href="{{ route('user_attendances') }}" class="nav-link"> Obecności </a>
@if (Auth::user()->is_Admin)
<li class="nav-item">
<a class="nav-link" href="{{ route('admin') }}">{{ __('Panel admina') }}</a>
</li>
@endif
<li class="nav-item dropdown">
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }} {{ Auth::user()->surname }} <span class="caret"></span>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ __('Wyloguj się') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
@csrf
</form>
</div>
</li>
@endguest
</ul>
</div>
</div>
</nav>
</div>
<div class="wrapper"> <div class="wrapper">
<div class="map-buttons">
<a href="{{ route('user_classes') }}" class="checkout-button end-button"> Zakończ zapisy </a> <a href="{{ route('user_classes') }}" class="checkout-button end-button"> Zakończ zapisy </a>
<button type="button" class="checkout-button end-button add-mn-btn"> Dodaj studenta ręcznie </button>
</div>
@yield('map_content') @yield('map_content')
</div> </div>

View File

@ -2,20 +2,25 @@
@section('title') Wybór miejsca @endsection @section('title') Wybór miejsca @endsection
@section('map_meta') @section('map_meta')
<meta name="csrf-token" content="{{ csrf_token() }}"> <script type="text/javascript" src="{{ asset('js/map/jquery.seat-charts.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/jquery.seat-charts.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('css/map/jquery.seat-charts.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}">
<script type="text/javascript" src="{{ asset('js/map/seatchart.js') }}"></script> <script type="text/javascript" src="{{ asset('js/map/seatchart.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/map/seatchart-custom.js') }}"></script> <script type="text/javascript" src="{{ asset('js/map/seatchart-custom.js') }}"></script>
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
@endsection @endsection
@section('map_content') @section('map_content')
<div class="seat-chart-wrapper"> <div class="seat-chart-wrapper">
<div id="seat-map"> <div id="seat-map">
<div class="front-indicator">{{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->name }}, <div class="front-indicator">
<p class="seat-p">
{{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->weekday }} {{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->weekday }}
{{ App\Classes::find($classes_id)->date }} {{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->time }}, {{ App\Classes::find($classes_id)->date }} {{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->time }},
<b>sala {{ App\Room::find(App\Subject::find(App\Classes::find($classes_id)->subject_id)->room_id)->name }}</b></div> <b>sala {{ App\Room::find(App\Subject::find(App\Classes::find($classes_id)->subject_id)->room_id)->name }}</b>
</p>
</div>
</div> </div>
</div> </div>
<br/> <br/>

View File

@ -2,33 +2,32 @@
@section('title') Wybór miejsca @endsection @section('title') Wybór miejsca @endsection
@section('map_meta') @section('map_meta')
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/przylozlegitke.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('css/map/przylozlegitke.css') }}">
<script type="text/javascript" src="{{ asset('js/map/przylozlegitke.js') }}"></script>
@endsection @endsection
@section('map_content') @section('map_content')
<p class="code-p"> <b>Kod:</b> {{ $classes_code }}</p> <p class="code-p"> <b>Kod:</b> {{ $classes_code }}</p>
<h1 class="main-text">Przyłóż legitymację do czytnika</h1> <h1 class="main-text main-seat-text">Przyłóż legitymację do czytnika</h1>
<div class="czytnik"> <div class="czytnik">
<h3> CZYTNIK </h3>
<form method="POST" action="{{ route('user_start_classes_verified') }}" class="test-form"> <form method="POST" action="{{ route('user_start_classes_verified') }}" class="test-form">
<div> <div>
<label for="classes_code"> Kod: </label> <label for="classes_code"> Kod: </label>
<input type="text" name="classes_code" id="classes_code"> <input type="text" name="classes_code" id="classes_code" value="{{ $classes_code }}" required>
</div> </div>
<div> <div>
<label for="student_id_number"> ID studenta: </label> <label for="student_id_number"> Nr indeksu: </label>
<input type="number" name="student_id_number" id="student_id_number"> <input type="number" name="student_id_number" id="student_id_number" required>
</div> </div>
<div> <div>
<label for="student_name"> Imię studenta: </label> <label for="student_name"> Imię: </label>
<input type="text" name="student_name" id="student_name"> <input type="text" name="student_name" id="student_name" required>
</div> </div>
<div> <div>
<label for="student_surname"> Nazwisko studenta: </label> <label for="student_surname"> Nazwisko: </label>
<input type="text" name="student_surname" id="student_surname"> <input type="text" name="student_surname" id="student_surname" required>
</div> </div>
<button type="submit" class="checkout-button"> Wyślij requesta </button> <button type="submit" class="checkout-button"> Dodaj studenta </button>
</form> </form>
</div> </div>
@endsection @endsection

View File

@ -2,8 +2,8 @@
@section('title') Wybór miejsca @endsection @section('title') Wybór miejsca @endsection
@section('map_meta') @section('map_meta')
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/koncowastrona.css') }}"> <link rel="stylesheet" type="text/css" href="{{ asset('css/map/koncowastrona.css') }}">
<script type="text/javascript" src="{{ asset('js/map/seatchart.js') }}"></script>
@endsection @endsection
@section('map_content') @section('map_content')
@ -13,5 +13,5 @@
<h3>wybrane miejsce:</h3> <h3>wybrane miejsce:</h3>
<ul id="sel-seat"> {{ $seat_number }}</ul> <ul id="sel-seat"> {{ $seat_number }}</ul>
<a href="{{ route('user_start_classes', [$classes_id]) }}"><button type="button" class="checkout-button">Przejdź do strony głównej &raquo;</button></a> <a href="{{ route('user_start_classes', [$classes_id]) }}"><button type="button" class="checkout-button">Następny student &raquo;</button></a>
@endsection @endsection

View File

@ -5,7 +5,12 @@
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-header custom-header">
<h4> Wszystkie obecności: ({{ $attendances->count() }}) </h4>
<button type="button" class="btn btn-primary btn-custom add-attendance-btn"> Dodaj nowy wpis </button>
</div>
<div class="card-body add-attendance">
<h4 class="card-header"> Dodaj obecność </h4> <h4 class="card-header"> Dodaj obecność </h4>
<form method="POST" action="{{ route('user_add_attendance') }}" class="col-md-12"> <form method="POST" action="{{ route('user_add_attendance') }}" class="col-md-12">
@csrf @csrf
@ -32,7 +37,7 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('ID studenta') }}</label> <label for="student_id" class="col-md-4 col-form-label text-md-right">{{ __('Nr indeksu') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus> <input id="student_id" type="number" class="form-control @error('student_id') is-invalid @enderror" name="student_id" value="{{ old('student_id') }}" required autocomplete="student_id" autofocus>
@ -46,10 +51,10 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Imię studenta') }}</label> <label for="student_name" class="col-md-4 col-form-label text-md-right">{{ __('Imię') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" autocomplete="student_name"> <input id="student_name" type="text" class="form-control @error('student_name') is-invalid @enderror" name="student_name" value="{{ old('student_name') }}" required autocomplete="student_name">
@error('student_name') @error('student_name')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -60,10 +65,10 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Nazwisko studenta') }}</label> <label for="student_surname" class="col-md-4 col-form-label text-md-right">{{ __('Nazwisko') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" autocomplete="student_surname"> <input id="student_surname" type="text" class="form-control @error('student_surname') is-invalid @enderror" name="student_surname" value="{{ old('student_surname') }}" required autocomplete="student_surname">
@error('student_surname') @error('student_surname')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -96,17 +101,15 @@
</div> </div>
</form> </form>
</div> </div>
<div class="card-body">
@if ($attendances->count() > 0)
<h4 class="card-header"> Wszystkie obecności: ({{ $attendances->count() }}) </h4>
@if ($attendances->count() > 0)
<div class="card-body"> <div class="card-body">
<span> Grupuj: </span> <span> Grupuj: </span>
<a href="{{ route('user_attendances', ['classes_id']) }}" class="btn btn-primary"> po nazwie zajęć </a> <a href="{{ route('user_attendances', ['classes_id']) }}" class="btn btn-primary"> po nazwie zajęć </a>
<a href="{{ route('user_attendances', ['student_id_number']) }}" class="btn btn-primary"> po ID studenta </a> <a href="{{ route('user_attendances', ['student_id_number']) }}" class="btn btn-primary"> po numerze indeksu </a>
<a href="{{ route('user_attendances', ['seat_number']) }}" class="btn btn-primary"> po numerze miejsca </a> <a href="{{ route('user_attendances', ['seat_number']) }}" class="btn btn-primary"> po numerze miejsca </a>
</div> </div>
<div class="card-body">
@foreach ($attendances_grouped as $attendances_group_name => $attendances_list) @foreach ($attendances_grouped as $attendances_group_name => $attendances_list)
@if($attendances_group_name) @if($attendances_group_name)
@if($grouped_by == 'classes_id') @if($grouped_by == 'classes_id')
@ -120,12 +123,12 @@
<h5 class="card-title"> Inne ({{ $attendances_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $attendances_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped subjects-table">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Nazwa zajęc </th> <th> Nazwa zajęć </th>
<th> ID studenta </th> <th> Nr indeksu </th>
<th> Imię studenta </th> <th> Imię </th>
<th> Nazwisko studenta </th> <th> Nazwisko </th>
<th> Nr miejsca </th> <th> Nr miejsca </th>
<th></th> <th></th>
<th></th> <th></th>
@ -141,17 +144,17 @@
<td> <td>
<a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a> <a href="{{ route('user_delete_attendance', [$attendance->id]) }}" name="delete-attendance-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
{{--<td>--}}
{{--<a href="{{ route('user_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edytuj </a>--}}
{{--</td>--}}
</tr> </tr>
@endforeach @endforeach
</table> </table>
@endforeach @endforeach
@else
<p> Brak zarejestrowantch obecności. </p>
@endif
</div> </div>
@else
<div class="card-body">
<p> Brak zarejestrowantch obecności. </p>
</div>
@endif
</div> </div>
</div> </div>
@endsection @endsection

View File

@ -5,9 +5,11 @@
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-header custom-header">
<h4> Sprawdź obecność </h4>
</div>
<div class="card-body"> <div class="card-body">
<h4 class="card-header"> Sprawdź obecność </h4> <form method="POST" action="{{ route('user_add_classes') }}" class="classes-form">
<form method="POST" action="{{ route('user_add_classes') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
@ -32,7 +34,7 @@
<label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Data') }}</label> <label for="date" class="col-md-4 col-form-label text-md-right">{{ __('Data') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ $defaultDate }}" autocomplete="date"> <input id="date" type="date" class="form-control @error('date') is-invalid @enderror" name="date" value="{{ $defaultDate }}" required autocomplete="date">
@error('date') @error('date')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -51,9 +53,10 @@
</div> </div>
</form> </form>
</div> </div>
<div>
@if ($classes->count() > 0) @if ($classes->count() > 0)
<h4 class="card-header"> Moje zajęcia: ({{ $classes->count() }}) </h4> <div class="card-header custom-header">
<h4> Moje zajęcia: ({{ $classes->count() }}) </h4>
</div>
<div class="card-body"> <div class="card-body">
<span> Grupuj: </span> <span> Grupuj: </span>
@ -61,6 +64,7 @@
<a href="{{ route('user_classes', ['date']) }}" class="btn btn-primary"> po dacie </a> <a href="{{ route('user_classes', ['date']) }}" class="btn btn-primary"> po dacie </a>
</div> </div>
<div class="card-body">
@foreach ($classes_grouped as $classes_group_name => $classes_list) @foreach ($classes_grouped as $classes_group_name => $classes_list)
@if($classes_group_name) @if($classes_group_name)
@if($grouped_by == 'subject_id') @if($grouped_by == 'subject_id')
@ -72,7 +76,7 @@
@else @else
<h5 class="card-title"> Inne ({{ $classes_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $classes_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped subjects-table">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Nazwa przedmiotu </th> <th> Nazwa przedmiotu </th>
<th> Data </th> <th> Data </th>
@ -90,6 +94,9 @@
<a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-warning"> Kontynuuj zapisy </a> <a href="{{ route('user_start_classes', [$classes_item->id]) }}" name="start-classes-btn" class="btn btn-warning"> Kontynuuj zapisy </a>
@endif @endif
</td> </td>
<td>
<a href="{{ route('user_preview_classes', [$classes_item->id]) }}" name="preview-classes-btn" class="btn btn-info"> Zobacz podgląd sali </a>
</td>
<td> <td>
<a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a> <a href="{{ route('user_delete_classes', [$classes_item->id]) }}" name="delete-classes-btn" class="btn btn-danger"> Usuń </a>
</td> </td>
@ -97,10 +104,12 @@
@endforeach @endforeach
</table> </table>
@endforeach @endforeach
</div>
@else @else
<div class="card-body">
<p> Brak zajęć. </p> <p> Brak zajęć. </p>
</div>
@endif @endif
</div> </div>
</div> </div>
</div>
@endsection @endsection

View File

@ -1,37 +0,0 @@
@extends('home')
@section('title') Mój Panel - Zajęcia @endsection
@section('user_content')
<div class="row justify-content-center">
<div class="col-md-12">
<div class="card-body">
<p> {{ App\Subject::find($classes->subject_id)->name }}, {{ $classes->date }} {{ App\Subject::find($classes->subject_id)->time }}</p>
@if(!$verified)
<p>
Wprowadź poniższy kod do programu:
</p>
<p> {{ $classes_code }}</p>
@else
<p> Połączono prawidłowo.</p>
<p> Zajęcia odbywają się w sali {{ $room }}.</p>
@if($attendances)
<p> Aktualna liczba studentów w sali: {{ $attendances->count() }}</p>
<br><br>
@foreach($attendances as $attendance)
<p> Student ID number: {{ $attendance->student_id_number }}</p>
<p> Student name: {{ $attendance->student_name }}</p>
<p> Student surname: {{ $attendance->student_surname }}</p>
<p> Seat number: {{ $attendance->seat_number }}</p>
<br><br>
@endforeach
@else
<p> Aktualna liczba studentów w sali: 0</p>
<br><br>
@endif
@endif
</div>
</div>
</div>
@endsection

View File

@ -0,0 +1,52 @@
@extends('layouts.map')
@section('title') Podgląd sali @endsection
@section('map_meta')
<script type="text/javascript" src="{{ asset('js/map/jquery.seat-charts.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/jquery.seat-charts.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}">
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart-preview.css') }}">
<script type="text/javascript" src="{{ asset('js/map/seatchart.js') }}"></script>
<script type="text/javascript" src="{{ asset('js/map/seatchart-preview.js') }}"></script>
@endsection
@section('map_content')
<div class="front-indicator">
<p class="seat-p">
{{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->name }},
{{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->weekday }}
{{ App\Classes::find($classes_id)->date }} {{ App\Subject::find(App\Classes::find($classes_id)->subject_id)->time }},
<b>sala {{ App\Room::find(App\Subject::find(App\Classes::find($classes_id)->subject_id)->room_id)->name }}</b>
</p>
</div>
<div class="preview-page-content">
<div class="preview-attendance-table">
<div class="card-header custom-header">
<h4> Lista obecności </h4>
</div>
<table class="table subjects-table">
<tr class="thead-light">
<th> Nr indeksu </th>
<th> Imię </th>
<th> Nazwisko </th>
<th> Nr miejsca </th>
</tr>
@foreach ($attendances as $attendance)
<tr class="attendance-id" id="{{ $attendance->seat_number }}++{{ $attendance->student_name}}++{{ $attendance->student_surname}}">
<td> {{ $attendance->student_id_number }} </td>
<td> {{ $attendance->student_name}}</td>
<td> {{ $attendance->student_surname}}</td>
<td> {{ $attendance->seat_number }} </td>
</tr>
@endforeach
</table>
</div>
<div class="seat-chart-wrapper">
<div id="seat-map"></div>
<input type="hidden" class="room_arrangement" name="room_arrangement" id="room_arrangement" value="{{ $room_arrangement }}">
</div>
</div>
@endsection

View File

@ -5,8 +5,13 @@
@section('user_content') @section('user_content')
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-12"> <div class="col-md-12">
<div class="card-body"> <div class="card-header custom-header">
<h4 class="card-header"> Dodaj nowy przedmiot </h4> <h4> Moje przedmioty: ({{ $subjects->count() }}) </h4>
<button type="button" class="btn btn-primary btn-custom add-subject-btn"> Dodaj nowy </button>
</div>
<div class="card-body add-subject">
<h5> Dodaj nowy przedmiot </h5>
<form method="POST" action="{{ route('user_add_subject') }}"> <form method="POST" action="{{ route('user_add_subject') }}">
@csrf @csrf
<div class="form-group row"> <div class="form-group row">
@ -23,31 +28,12 @@
</div> </div>
</div> </div>
{{--<div class="form-group row">--}}
{{--<label for="type" class="col-md-4 col-form-label text-md-right">{{ __('Type') }}</label>--}}
{{--<div class="col-md-6">--}}
{{--<select id="type" class="form-control @error('type') is-invalid @enderror" name="type">--}}
{{--<option label="-- select type -- "></option>--}}
{{--@foreach ($types as $type)--}}
{{--<option value="{{ $type }}">{{ $type }}</option>--}}
{{--@endforeach--}}
{{--</select>--}}
{{--@error('type')--}}
{{--<span class="invalid-feedback" role="alert">--}}
{{--<strong>{{ $message }}</strong>--}}
{{--</span>--}}
{{--@enderror--}}
{{--</div>--}}
{{--</div>--}}
<div class="form-group row"> <div class="form-group row">
<label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Dzień tygodnia') }}</label> <label for="weekday" class="col-md-4 col-form-label text-md-right">{{ __('Dzień tygodnia') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<select id="weekday" class="form-control @error('weekday') is-invalid @enderror" name="weekday"> <select id="weekday" class="form-control @error('weekday') is-invalid @enderror" name="weekday" required>
<option label="-- select day of the week -- "></option> <option label="-- select day of the week -- "></option>
@foreach ($weekdays as $weekday) @foreach ($weekdays as $weekday)
@if ($weekday == $defaultWeekday) @if ($weekday == $defaultWeekday)
@ -71,7 +57,7 @@
<label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Godzina') }}</label> <label for="time" class="col-md-4 col-form-label text-md-right">{{ __('Godzina') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="time" type="time" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ $defaultTime }}" autocomplete="time"> <input id="time" type="time" class="form-control @error('time') is-invalid @enderror" name="time" value="{{ $defaultTime }}" required autocomplete="time">
@error('time') @error('time')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -103,7 +89,7 @@
<label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Prowadzący') }}</label> <label for="user_id" class="col-md-4 col-form-label text-md-right">{{ __('Prowadzący') }}</label>
<div class="col-md-6"> <div class="col-md-6">
<input id="user_id" type="text" class="@error('user_id') is-invalid @enderror form-control-plaintext" name="user_id" value="{{ Auth::user()->name }} {{ Auth::user()->surname }}" readonly> <input id="user_id" type="text" class="@error('user_id') is-invalid @enderror form-control-plaintext" name="user_id" value="{{ Auth::user()->name }} {{ Auth::user()->surname }}" required readonly>
@error('user_id') @error('user_id')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@ -122,19 +108,17 @@
</div> </div>
</form> </form>
</div> </div>
<div class="card-body">
@if ($subjects->count() > 0)
<h4 class="card-header"> Moje przedmioty: ({{ $subjects->count() }}) </h4>
@if ($subjects->count() > 0)
<div class="card-body"> <div class="card-body">
<span> Grupuj: </span> <span> Grupuj: </span>
<a href="{{ route('user_subjects', ['name']) }}" class="btn btn-primary"> po nazwie </a> <a href="{{ route('user_subjects', ['name']) }}" class="btn btn-primary btn-custom"> po nazwie </a>
{{--<a href="{{ route('user_subjects', ['type']) }}" class="btn btn-primary"> Type </a>--}} {{--<a href="{{ route('user_subjects', ['type']) }}" class="btn btn-primary"> Type </a>--}}
<a href="{{ route('user_subjects', ['weekday']) }}" class="btn btn-primary"> po dniu tygodnia </a> <a href="{{ route('user_subjects', ['weekday']) }}" class="btn btn-primary btn-custom"> po dniu tygodnia </a>
<a href="{{ route('user_subjects', ['time']) }}" class="btn btn-primary"> po godzinie </a> <a href="{{ route('user_subjects', ['time']) }}" class="btn btn-primary btn-custom"> po godzinie </a>
<a href="{{ route('user_subjects', ['room_id']) }}" class="btn btn-primary"> Room </a> <a href="{{ route('user_subjects', ['room_id']) }}" class="btn btn-primary btn-custom"> po sali </a>
</div> </div>
<div class="card-body">
@foreach ($subjects_grouped as $subject_group_name => $subjects_list) @foreach ($subjects_grouped as $subject_group_name => $subjects_list)
@if($subject_group_name) @if($subject_group_name)
@if($grouped_by == 'room_id') @if($grouped_by == 'room_id')
@ -145,7 +129,7 @@
@else @else
<h5 class="card-title"> Inne ({{ $subjects_list->count() }})</h5> <h5 class="card-title"> Inne ({{ $subjects_list->count() }})</h5>
@endif @endif
<table class="table table-striped"> <table class="table table-striped subjects-table">
<tr class="thead-dark"> <tr class="thead-dark">
<th> Nazwa </th> <th> Nazwa </th>
{{--<th> Type </th>--}} {{--<th> Type </th>--}}
@ -174,10 +158,12 @@
@endforeach @endforeach
</table> </table>
@endforeach @endforeach
</div>
@else @else
<div class="card-body">
<p> Brak przedmiotów. </p> <p> Brak przedmiotów. </p>
</div>
@endif @endif
</div> </div>
</div> </div>
</div>
@endsection @endsection

View File

@ -1,92 +0,0 @@
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@CHECK</title>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Nunito:200,600" rel="stylesheet">
<link rel="shortcut icon" href="{{ asset('img/favicon.png') }}">
<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Nunito', sans-serif;
font-weight: 200;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 13px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Strona Główna</a>
@else
<a href="{{ route('login') }}">Zaloguj się</a>
@if (Route::has('register'))
<a href="{{ route('register') }}">Zarejestruj się</a>
@endif
@endauth
</div>
@endif
<div class="content">
<div class="title m-b-md">
@CHECK
</div>
<h2>Witaj!</h2>
</div>
</div>
</body>
</html>

View File

@ -12,7 +12,7 @@
*/ */
Route::get('/', function () { Route::get('/', function () {
return view('welcome'); return view('home');
}); });
Auth::routes(); Auth::routes();
@ -58,6 +58,7 @@ Route::group(array('prefix' => 'user', 'namespace' => 'User'), function() { //TO
Route::get('/classes/start/{classes_id}', 'UserClassesController@start_classes')->name('user_start_classes'); Route::get('/classes/start/{classes_id}', 'UserClassesController@start_classes')->name('user_start_classes');
Route::post('/classes/start', 'UserClassesController@start_classes_verified')->name('user_start_classes_verified')->middleware('classesCode'); Route::post('/classes/start', 'UserClassesController@start_classes_verified')->name('user_start_classes_verified')->middleware('classesCode');
Route::post('/classes/save', 'UserClassesController@save_classes_data')->name('user_save_classes_data'); Route::post('/classes/save', 'UserClassesController@save_classes_data')->name('user_save_classes_data');
Route::get('/classes/preview/{classes_id?}', 'UserClassesController@preview_classes')->name('user_preview_classes');
Route::group(array('prefix' => 'add'), function() { Route::group(array('prefix' => 'add'), function() {
Route::post('/subject', 'UserSubjectsController@add_subject')->name('user_add_subject'); Route::post('/subject', 'UserSubjectsController@add_subject')->name('user_add_subject');