diff --git a/app/Http/Controllers/User/UserAttendancesController.php b/app/Http/Controllers/User/UserAttendancesController.php
index 5329536..c58bf37 100644
--- a/app/Http/Controllers/User/UserAttendancesController.php
+++ b/app/Http/Controllers/User/UserAttendancesController.php
@@ -17,7 +17,7 @@ class UserAttendancesController extends Controller
$user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get();
$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();
$attendances = Attendance::whereIn('classes_id', $classes_ids)->get();
$attendances_grouped = $attendances->groupBy($groupBy);
diff --git a/app/Http/Controllers/User/UserClassesController.php b/app/Http/Controllers/User/UserClassesController.php
index 2cd9cb2..b96b920 100644
--- a/app/Http/Controllers/User/UserClassesController.php
+++ b/app/Http/Controllers/User/UserClassesController.php
@@ -19,12 +19,12 @@ class UserClassesController extends Controller
$user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->get();
$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) {
$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);
- if ($hours_difference > 24) {
+ if ($hours_difference > 1.5) {
$classes_item->classes_code = null;
$classes_item->save();
$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]);
}
+
+ 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]);
+ }
}
diff --git a/public/css/app.css b/public/css/app.css
index a194447..268d107 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -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);
+}
diff --git a/public/css/map/jquery.seat-charts.css b/public/css/map/jquery.seat-charts.css
index 15a0f4c..65093ac 100644
--- a/public/css/map/jquery.seat-charts.css
+++ b/public/css/map/jquery.seat-charts.css
@@ -1,5 +1,5 @@
div.seatCharts-container {
- /*min-width: 700px;*/
+ min-width: 700px;
}
div.seatCharts-cell {
@@ -25,11 +25,11 @@ div.seatCharts-seat {
div.seatCharts-seat:focus {
border: none;
}
-/*
+
.seatCharts-seat:focus {
outline: none;
}
-*/
+
div.seatCharts-space {
background-color: white;
@@ -61,6 +61,7 @@ div.seatCharts-seat.unavailable {
ul.seatCharts-legendList {
list-style: none;
+ cursor: default;
}
li.seatCharts-legendItem {
margin-top: 10px;
@@ -69,3 +70,6 @@ li.seatCharts-legendItem {
li.seatCharts-legendItem div {
cursor: default;
}
+li.seatCharts-legendItem > .seatCharts-cell {
+ cursor: default;
+}
diff --git a/public/css/map/koncowastrona.css b/public/css/map/koncowastrona.css
index f82d79a..ee1643b 100644
--- a/public/css/map/koncowastrona.css
+++ b/public/css/map/koncowastrona.css
@@ -1,56 +1,93 @@
body {
- font-family: monospace, sans-serif;
+ font-family: 'Nunito', sans-serif;
+ background-color: #f8fafc;
}
.wrapper {
text-align: center;
margin: 100px;
- background-color: rgba(159, 183, 218, 0.856);
border-radius: 10px;
padding: 50px 0;
-
+ text-shadow: 0 0 2px rgba(56, 55, 55, 0.6);
+ color: #545c5f;
}
.wrapper h2 {
- font-size: 38px;
- padding: 15px 0;
-
+ font-size: 64px;
+ padding: 0;
}
.wrapper h3 {
- font-size: 22px;
+ font-size: 36px;
+ font-weight: 400;
+ text-shadow: 1px 0px 0px rgb(160, 160, 160);
}
#sel-seat {
- font-size: 30px;
- text-shadow: 1px 1px 1px rgb(160, 160, 160);
+ font-size: 24px;
+ text-shadow: 0px 0px 1px rgb(160, 160, 160);
margin-top: -15px;
margin-bottom: 100px;
padding: 0;
+ font-weight: 600;
+ letter-spacing: 0.2em;
}
button {
margin: auto 0;
font-size: 18px;
- background-color: #5d7cd3;
border-radius: 2px;
border: 0;
min-width: 250px;
padding: 25px 60px;
text-align: center;
- box-shadow:0px 4px 0px #1e3572;
- font-family: monospace;
- float: right;
+ color: #fff;
+ background-color: #3490dc;
+ border-color: #3490dc;
+ display: inline-block;
+ position: absolute;
+ left: 50%;
+ bottom: 30%;
+ transform: translate(-50%, -10%);
}
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);
background-color: #3654c9;
cursor: pointer;
}
-button:active {
- top: 4px;
+.checkout-button:active {
box-shadow: 0 0 #b85a5b;
background-color: #3654ff;
}
+a.checkout-button {
+ color: black;
+ text-decoration: none;
+}
+.add-mn-btn {
+ display: none;
+}
+
diff --git a/public/css/map/przylozlegitke.css b/public/css/map/przylozlegitke.css
index 094c7c8..94fadbe 100644
--- a/public/css/map/przylozlegitke.css
+++ b/public/css/map/przylozlegitke.css
@@ -1,42 +1,46 @@
body {
- background: rgb(210, 218, 231);
+ background-color: #f8fafc;
}
.wrapper {
margin: 0 auto;
display: inline-block;
- background-color: rgba(159, 183, 218, 0.856);
- border-radius: 10px;
+ padding: 20px;
width: 70%;
height:60vh;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
-
}
-
.czytnik {
- display: inline-block;
text-align: center;
position: absolute;
left: 50%;
- bottom: -20%;
+ bottom: -30%;
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);
- background-color: #3654c9;
- cursor: progress;
+ color: #fff;
+ 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 {
text-align: center;
+ font-size: 20px;
+ margin-bottom: 100px;
}
.test-form {
display: flex;
@@ -49,34 +53,30 @@ body {
justify-content: space-between;
}
.main-text {
-
- font-family: "Oswald", Tahoma, sans-serif;
- font-weight: bold;
text-transform: uppercase;
- letter-spacing: .15em;
- display: inline-block;
- text-shadow: 0 0 80px rgba(255,255,255,.5);
- color: #1C1C1C;
+ font-family: 'Nunito', sans-serif;
+ font-weight: 500;
+ text-shadow: 0 0 2px rgba(56, 55, 55, 0.6);
+ color: #636b6f;
text-align: center;
- line-height: 15vh;
- font-size: 11vh;
- height: 10%;
+ font-size: 12vh;
}
@media (max-width: 1300px) {
- .main-text {
- font-size: 7.5vh;
- width: 100%;
- }
-
- }
-
- @media (max-width: 900px) {
.wrapper {
- height: 40%;
+ height: 50%;
}
.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;
width: 100%;
}
@@ -97,9 +97,51 @@ body {
}
.main-text {
- font-size: 2.1em;
+ font-size: 2.7em;
line-height: 6vh;
width: 100%;
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;
+}
diff --git a/public/css/map/seatchart-preview.css b/public/css/map/seatchart-preview.css
new file mode 100644
index 0000000..642b77a
--- /dev/null
+++ b/public/css/map/seatchart-preview.css
@@ -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);
+}
diff --git a/public/css/map/seatchart.css b/public/css/map/seatchart.css
index d60de81..d6b6898 100644
--- a/public/css/map/seatchart.css
+++ b/public/css/map/seatchart.css
@@ -1,6 +1,7 @@
body {
- font-family: 'Lato', sans-serif;
- font-style: #b71a4c;
+ background-color: #f8fafc;
+ font-family: 'Nunito', sans-serif;
+ font-weight: 600;
}
a {
color: #b71a4c;
@@ -8,8 +9,8 @@ a {
.front-indicator {
width: 90%;
margin: 5px 32px 5px 32px;
- background-color: #f6f6f6;
- color: #adadad;
+ background-color: #ececec;
+ color: #a1a1a1;
text-align: center;
padding: 15px;
border-radius: 5px;
@@ -26,7 +27,6 @@ a {
width: 49%;
margin: 0 auto;
float: left;
- font-family: monospace;
font-size: 16px;
}
.booking-details {
@@ -50,15 +50,13 @@ a {
margin: 25px 0 20px 0;
font-size: 35px;
color: #333333;
- font-family: monospace;
letter-spacing: 0.15em;
font-weight: bold;
}
.booking-details h3 {
margin: 5px 5px 0 0;
- font-size: 18px;
+ font-size: 40px;
color: #333333;
- font-family: monospace;
font-weight: bold;
}
div.seatCharts-cell {
@@ -70,8 +68,7 @@ div.seatCharts-cell {
}
div.seatCharts-seat {
color: #FFFFFF;
- cursor: pointer;
-
+ cursor: pointer;
}
div.seatCharts-row {
height: 100px;
@@ -81,20 +78,19 @@ div.seatCharts-row {
justify-content: center;
}
div.seatCharts-seat.available {
- background-color: #a8b9bd;
-
+ background-color: #649a24;
}
div.seatCharts-seat.available.student-class {
background-color: #a8b9bd;
}
div.seatCharts-seat.focused {
- background-color: #758184;
+ background-color: #1F5684;
}
div.seatCharts-seat.selected {
- background-color: rgb(216, 196, 230);
+ background-color: #1b4d76;
}
div.seatCharts-seat.unavailable {
- background-color: #caaa41;
+ background-color: #6F7881;
}
div.seatCharts-container {
@@ -123,26 +119,20 @@ span.seatCharts-legendDescription {
.checkout-button {
margin: 10px 0;
font-size: 14px;
- background-color: #5d7cd3;
- border-radius: 2px;
+ color: #fff;
+ background-color: #3490dc;
+ border-color: #3490dc;
+ 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;
+ background-color: #227dc7;
+ border-color: #2176bd;
}
a.checkout-button {
color: black;
@@ -151,7 +141,14 @@ a.checkout-button {
#selected-seats {
list-style-type: none;
- font-size: 14px;
margin-left: 0;
padding-left: 0;
}
+.add-mn-btn {
+ display: none;
+}
+.seat-p {
+ font-weight: bold;
+ margin-bottom: 0;
+ font-size: 20px;
+}
diff --git a/public/js/custom.js b/public/js/custom.js
new file mode 100644
index 0000000..d18547b
--- /dev/null
+++ b/public/js/custom.js
@@ -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')
+ }
+ });
+});
diff --git a/public/js/map/jquery.seat-charts.js b/public/js/map/jquery.seat-charts.js
index 63ef61a..bb042ba 100644
--- a/public/js/map/jquery.seat-charts.js
+++ b/public/js/map/jquery.seat-charts.js
@@ -24,8 +24,8 @@
settings = {
animate : false, //requires jQuery UI
naming : {
- top : true,
- left : true,
+ top : false,
+ left : false,
getId : function(character, row, column) {
return row + '_' + column;
},
diff --git a/public/js/map/seatchart-preview.js b/public/js/map/seatchart-preview.js
new file mode 100644
index 0000000..277026a
--- /dev/null
+++ b/public/js/map/seatchart-preview.js
@@ -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(`${seat_number}
${name} ${surname}`)
+ 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();
+});
diff --git a/public/js/map/seatchart.js b/public/js/map/seatchart.js
index 5f22d2f..39126bb 100644
--- a/public/js/map/seatchart.js
+++ b/public/js/map/seatchart.js
@@ -5,9 +5,7 @@ $(document).ready(function() {
var $cart = $('#selected-seats'),
seatNumber = '',
- placeNumber = ('#sel-seat'),
$counter = $('#counter'),
- $name = $('#studentName'),
$total = $('#total'),
sc = $('#seat-map').seatCharts({
map: seat_map,
@@ -21,6 +19,7 @@ $(document).ready(function() {
naming : {
rows: ['','','',''],
top : false,
+ left: false,
getLabel : function (character, row, column) {
if (row === '1') {
return column;
diff --git a/resources/views/admin/admin_classes.blade.php b/resources/views/admin/admin_classes.blade.php
index f3b65ca..0dd618e 100644
--- a/resources/views/admin/admin_classes.blade.php
+++ b/resources/views/admin/admin_classes.blade.php
@@ -57,6 +57,7 @@
W zakładce Moje przedmioty znajdują się przedmioty, których jesteś prowadzącym.
+
Możesz tam także dodać nowy przedmiot.
+
Sprawdzanie obecności możesz rozpocząć w zakładce Sprawdź obecność.
+
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.
+
W tej zakładce znajdziesz także listę wszystkich minionych zajęć.
+
W każdym momencie możesz zobaczyć podgląd sali i listę obecności dla konkretnych zajęć.
+
+ Dane dotyczące obecności znajdziesz także w zakładce Obecności. +
+ @endsection + @yield('user_content') +