map preview added, nav updated

This commit is contained in:
s416422 2019-12-13 23:28:16 +01:00
parent de06beeb6d
commit 9df9c7cb4e
25 changed files with 705 additions and 367 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,6 +1,3 @@
body {
font-family: monospace, sans-serif;
}
.wrapper { .wrapper {
text-align: center; text-align: center;
@ -54,3 +51,35 @@ button:active {
box-shadow: 0 0 #b85a5b; box-shadow: 0 0 #b85a5b;
background-color: #3654ff; 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;
font-family: monospace;
}
.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;
}
.add-mn-btn {
display: none;
}

View File

@ -13,28 +13,24 @@ body {
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: -20%;
transform: translate(-50%, -10%); transform: translate(-50%, -10%);
background-color: rgba(139, 152, 172, 0.856); box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9;
padding: 30px 40px; padding: 30px 40px;
font-family: monospace; font-family: monospace;
font-size: 30px; font-size: 30px;
display: none;
width: 70%;
} }
.czytnik.open {
.czytnik:hover { display: block;
box-shadow: 0 0 rgb(103, 88, 184);
background-color: #3654c9;
cursor: progress;
} }
.code-p { .code-p {
text-align: center; text-align: center;
} }
@ -103,3 +99,46 @@ body {
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;
font-family: monospace;
}
.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: 60px!important;
}
.preview-name {
color: rgba(0,0,0,0.7);
}

View File

@ -124,7 +124,7 @@ span.seatCharts-legendDescription {
margin: 10px 0; margin: 10px 0;
font-size: 14px; font-size: 14px;
background-color: #5d7cd3; background-color: #5d7cd3;
border-radius: 2px; border-radius: 3px;
border: 0; border: 0;
padding: 15px 40px; padding: 15px 40px;
display: inline-block; display: inline-block;
@ -155,3 +155,11 @@ a.checkout-button {
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', '#a8b9bd');
$(this).css('backgroundColor', 'unset');
});
$(this).on('mouseover', () => {
map_seat.css('backgroundColor', 'lightgrey');
$(this).css('backgroundColor', 'lightgrey');
}).on('mouseleave', () => {
map_seat.css('backgroundColor', '#a8b9bd');
$(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,54 @@
@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>
@stop
@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

@ -11,6 +11,8 @@
<!-- Scripts --> <!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script> <script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{ asset('js/custom.js') }}" defer></script>
<!-- Fonts --> <!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com"> <link rel="dns-prefetch" href="//fonts.gstatic.com">
@ -19,6 +21,8 @@
<!-- Styles --> <!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet"> <link href="{{ asset('css/app.css') }}" rel="stylesheet">
<link rel="shortcut icon" href="{{ asset('img/favicon.png') }}"> <link rel="shortcut icon" href="{{ 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,128 @@
<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>
{{--<main class="py-4">--}}
{{--<div class="container">--}}
{{--@auth--}}
{{--<div class="container">--}}
{{--<div class="row justify-content-center">--}}
{{--<div class="col-md-12">--}}
{{--<div class="card">--}}
{{--<div class="card-header">Mój Panel</div>--}}
{{--<div class="card-body">--}}
{{--@if (session('status'))--}}
{{--<div class="alert alert-success" role="alert">--}}
{{--{{ session('status') }}--}}
{{--</div>--}}
{{--@endif--}}
{{--</div>--}}
{{--<div class="card-body">--}}
{{--<a href="{{ route('user_subjects') }}" class="btn btn-primary"> Moje przedmioty </a>--}}
{{--<a href="{{ route('user_classes') }}" class="btn btn-primary"> My classes </a>--}}
{{--<a href="{{ route('user_classes') }}" class="btn btn-primary"> Sprawdź obecność </a>--}}
{{--<a href="{{ route('user_attendances') }}" class="btn btn-primary"> Obecności </a>--}}
{{--<a href="{{ route('user_preview_classes', [0]) }}" name="preview-classes-btn" class="btn btn-primary"> Podgląd sali </a>--}}
{{--</div>--}}
{{--<div class="card-body">--}}
{{--@yield('user_content')--}}
{{--</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--}}
{{--</div>--}}
{{--</main>--}}
<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,23 @@
@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>
@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

@ -3,32 +3,30 @@
@section('title') Wybór miejsca @endsection @section('title') Wybór miejsca @endsection
@section('map_meta') @section('map_meta')
<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"> ID studenta: </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ę studenta: </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 studenta: </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

@ -3,7 +3,6 @@
@section('title') Wybór miejsca @endsection @section('title') Wybór miejsca @endsection
@section('map_meta') @section('map_meta')
<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 +12,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 studenta') }}</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>
@ -49,7 +54,7 @@
<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ę studenta') }}</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">
@ -63,7 +68,7 @@
<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 studenta') }}</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,10 +123,10 @@
<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ę studenta </th>
<th> Nazwisko studenta </th> <th> Nazwisko studenta </th>
<th> Nr miejsca </th> <th> Nr miejsca </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ę studenta </th>
<th> Nazwisko studenta </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');