diff --git a/app/Http/Controllers/User/UserSubjectsController.php b/app/Http/Controllers/User/UserSubjectsController.php
index f7aedd3..f5048c1 100644
--- a/app/Http/Controllers/User/UserSubjectsController.php
+++ b/app/Http/Controllers/User/UserSubjectsController.php
@@ -12,18 +12,16 @@ use App\Room;
class UserSubjectsController extends Controller
{
public function index($groupBy = 'weekday') {
- setlocale(LC_ALL, 'pl', 'pl_PL', 'pl_PL.ISO8859-2', 'plk', 'polish', 'Polish');
$user_id = Auth::id();
$subjects = Subject::where('user_id', $user_id)->orderBy('name','ASC')->get();
$subjects_grouped = $subjects->groupBy($groupBy);
$rooms = Room::all();
$weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
-// $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
$defaultTime = date("H:i");
if(date('w')-1 < 0 ) {
$defaultWeekday = $weekdays[6];
} else {
- $defaultWeekday = "Poniedziałek";//$weekdays[date('w') - 1];
+ $defaultWeekday = $weekdays[date('w') - 1];
}
return view('user.user_subjects', ['subjects' => $subjects, 'weekdays' => $weekdays, 'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy, 'defaultTime' => $defaultTime, 'defaultWeekday' => $defaultWeekday, 'rooms' => $rooms]);
}
diff --git a/config/app.php b/config/app.php
index 378c6ee..4d62c15 100644
--- a/config/app.php
+++ b/config/app.php
@@ -67,7 +67,7 @@ return [
|
*/
- 'timezone' => 'UTC',
+ 'timezone' => 'Europe/Warsaw',
/*
|--------------------------------------------------------------------------
diff --git a/public/css/app.css b/public/css/app.css
index 7659e9e..2e3542a 100644
--- a/public/css/app.css
+++ b/public/css/app.css
@@ -11157,7 +11157,7 @@ a.text-dark:focus {
margin-bottom: 50px;
}
-.subjects-table {
+.custom-table {
margin-bottom: 50px;
}
@@ -11198,3 +11198,4 @@ a.text-dark:focus {
main {
padding-top: 20px;
}
+
diff --git a/public/css/map/jquery.seat-charts.css b/public/css/map/jquery.seat-charts.css
index 6267de7..e60e2e0 100644
--- a/public/css/map/jquery.seat-charts.css
+++ b/public/css/map/jquery.seat-charts.css
@@ -217,10 +217,18 @@ a.checkout-button {
padding: 50px 100px;
font-size: 30px;
display: none;
- width: 70%;
+ width: 50%;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 3px 10px 0 rgba(0, 0, 0, 0.1);
}
-
+.card-reader div {
+ margin: 5px 0;
+}
+.card-reader-form input {
+ width: 50%;
+ padding: 10px;
+ font-size: 20px;
+ border: 1px solid #3490dc;
+}
.card-reader.open {
display: block;
}
diff --git a/public/css/map/seatchart-preview.css b/public/css/map/seatchart-preview.css
index 525b597..fc325cf 100644
--- a/public/css/map/seatchart-preview.css
+++ b/public/css/map/seatchart-preview.css
@@ -5,7 +5,7 @@
.preview-page-content {
display: flex;
justify-content: space-between;
- align-items: center;
+ align-items: flex-start;
height: 100%;
margin: 40px;
}
diff --git a/public/js/custom.js b/public/js/custom.js
index 705828e..a83c10f 100644
--- a/public/js/custom.js
+++ b/public/js/custom.js
@@ -7,18 +7,26 @@ $(document).ready(function(){
$('.add-subject-btn').on('click', function () {
$('.add-subject').toggleClass('open');
if ($('.add-subject').first().hasClass('open')) {
- $(this).text('Anuluj')
+ $(this).addClass('btn-danger');
+ $(this).html(' Anuluj');
+ $(this).attr('title', 'Anuluj');
} else {
- $(this).text('Dodaj nowy')
+ $(this).removeClass('btn-danger');
+ $(this).html(' Dodaj nowy przedmiot');
+ $(this).attr('title', 'Dodaj nowy przedmiot');
}
});
$('.add-attendance-btn').on('click', function () {
$('.add-attendance').toggleClass('open');
if ($('.add-attendance').first().hasClass('open')) {
- $(this).text('Anuluj')
+ $(this).addClass('btn-danger');
+ $(this).html(' Anuluj');
+ $(this).attr('title', 'Anuluj');
} else {
- $(this).text('Dodaj nowy wpis')
+ $(this).removeClass('btn-danger');
+ $(this).html(' Dodaj nowy wpis');
+ $(this).attr('title', 'Dodaj nowy wpis');
}
});
@@ -59,5 +67,4 @@ $(document).ready(function(){
});
}
setSelectedOptionGroup();
-
});
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 85e9bcf..232d910 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -16,6 +16,7 @@
+
@yield('additional_meta')
@@ -61,8 +62,8 @@
diff --git a/resources/views/user/attendances_table.blade.php b/resources/views/user/attendances_table.blade.php
index a00c083..1f6ac63 100644
--- a/resources/views/user/attendances_table.blade.php
+++ b/resources/views/user/attendances_table.blade.php
@@ -1,4 +1,4 @@
-
+
Nazwa zajęć
Nr indeksu
@@ -21,24 +21,25 @@
{{ $attendance->student_name}}
{{ $attendance->seat_number }}
@if(!$export == 1)
-
- Usuń
-
@if(!$attendance->notes)
- Dodaj notatkę
+ Dodaj notatkę
@else
- Edytuj notatkę
+ Edytuj notatkę
@endif
- @include('user.attendance_note', [$attendance])
+
+ Usuń
+
@else
{{ $attendance->notes }}
@endif
+ @include('user.attendance_note', [$attendance])
+ @include('user.delete_confirmation_attendance', [$attendance])
@endforeach
diff --git a/resources/views/user/attendances_table_preview.blade.php b/resources/views/user/attendances_table_preview.blade.php
index fa10a8b..3dcc997 100644
--- a/resources/views/user/attendances_table_preview.blade.php
+++ b/resources/views/user/attendances_table_preview.blade.php
@@ -1,4 +1,4 @@
-
+
Nr indeksu
Nazwisko
@@ -18,25 +18,26 @@
{{ $attendance->student_name}}
{{ $attendance->seat_number }}
@if(!$export == 1)
-
- Usuń
-
@if(!$attendance->notes)
- Dodaj notatkę
+
@else
- Edytuj notatkę
+
@endif
- @include('user.attendance_note', [$attendance])
+
+
+
@else
{{ $attendance->notes }}
@endif
+ @include('user.attendance_note', [$attendance])
+ @include('user.delete_confirmation_attendance', [$attendance])
@endforeach
diff --git a/resources/views/user/delete_confirmation_attendance.blade.php b/resources/views/user/delete_confirmation_attendance.blade.php
new file mode 100644
index 0000000..02b77b5
--- /dev/null
+++ b/resources/views/user/delete_confirmation_attendance.blade.php
@@ -0,0 +1,21 @@
+
+
+
+
+
+
Czy na pewno chcesz usunąć obecność studenta {{ $attendance->student_name }} {{ $attendance->student_surname }}
+ (numer indeksu {{ $attendance->student_id_number }}) z zajęć {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
+ które odbyły się {{ App\Classes::find($attendance->classes_id)-> date }} o godzinie {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }}?
+
+
+
+
+
diff --git a/resources/views/user/delete_confirmation_classes.blade.php b/resources/views/user/delete_confirmation_classes.blade.php
new file mode 100644
index 0000000..c8185af
--- /dev/null
+++ b/resources/views/user/delete_confirmation_classes.blade.php
@@ -0,0 +1,20 @@
+
+
+
+
+
+
Czy na pewno chcesz usunąć zajęcia {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->name }}, które odbyły się
+ {{ App\Classes::find($classes_item->id)-> date }} o godzinie {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->time }}?
+
+
+
+
+
diff --git a/resources/views/user/delete_confirmation_subject.blade.php b/resources/views/user/delete_confirmation_subject.blade.php
new file mode 100644
index 0000000..2339642
--- /dev/null
+++ b/resources/views/user/delete_confirmation_subject.blade.php
@@ -0,0 +1,19 @@
+
+
+
+
+
+
Czy na pewno chcesz usunąć przedmiot {{ $subject->name }}, który odbywa się w każdy {{ $subject->weekday }} o godzinie {{ $subject->time }} w sali {{ App\Room::find($subject->room_id)->name }}?
+
+
+
+
+
diff --git a/resources/views/user/user_attendances.blade.php b/resources/views/user/user_attendances.blade.php
index 54fcf9e..ea004bd 100644
--- a/resources/views/user/user_attendances.blade.php
+++ b/resources/views/user/user_attendances.blade.php
@@ -6,8 +6,11 @@
@@ -22,7 +25,6 @@
@foreach ($classes as $classes_item)
{{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->name }},
- {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->type }},
{{ App\Classes::find($classes_item->id)-> date }} {{ App\Subject::find(App\Classes::find($classes_item->id)->subject_id)->time }}
@endforeach
@@ -108,7 +110,7 @@
@else
diff --git a/resources/views/user/user_preview_classes.blade.php b/resources/views/user/user_preview_classes.blade.php
index 61cf713..a53c3ea 100644
--- a/resources/views/user/user_preview_classes.blade.php
+++ b/resources/views/user/user_preview_classes.blade.php
@@ -28,8 +28,8 @@
Sortuj:
@@ -44,7 +44,9 @@
po numerze miejsca malejąco
- @include('user.attendances_table_preview', ['attendances' => $attendances, 'export' => 0])
+
+ @include('user.attendances_table_preview', ['attendances' => $attendances, 'export' => 0])
+
@if($twoparts)
diff --git a/resources/views/user/user_subjects.blade.php b/resources/views/user/user_subjects.blade.php
index bd1569d..6744a65 100644
--- a/resources/views/user/user_subjects.blade.php
+++ b/resources/views/user/user_subjects.blade.php
@@ -6,8 +6,8 @@
@@ -101,7 +101,7 @@
@endforeach
@else