room arrangements added
This commit is contained in:
parent
a5c9c2cb86
commit
5bc28b56cd
@ -7,6 +7,6 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class Attendance extends Model
|
class Attendance extends Model
|
||||||
{
|
{
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'classes_id', 'student_id_number', 'student_name', 'student_surname', 'seat_number'
|
'classes_id', 'student_id_number', 'student_name', 'student_surname', 'seat_number', 'notes'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ use Illuminate\Http\Request;
|
|||||||
|
|
||||||
use App\Subject;
|
use App\Subject;
|
||||||
use App\Classes;
|
use App\Classes;
|
||||||
|
use App\Room;
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
|
||||||
@ -67,7 +68,6 @@ class UserClassesController extends Controller
|
|||||||
$classes->save();
|
$classes->save();
|
||||||
$classes->refresh();
|
$classes->refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('map.start_map', ['classes_code' => $classes_code, 'classes' => $classes]);
|
return view('map.start_map', ['classes_code' => $classes_code, 'classes' => $classes]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,12 @@ class UserClassesController extends Controller
|
|||||||
$classes = Classes::find($request->get('classes_id'));
|
$classes = Classes::find($request->get('classes_id'));
|
||||||
$attendances = Attendance::where('classes_id', $classes->id)->get();
|
$attendances = Attendance::where('classes_id', $classes->id)->get();
|
||||||
$seat_numbers = $attendances->pluck('seat_number')->toArray();
|
$seat_numbers = $attendances->pluck('seat_number')->toArray();
|
||||||
return view('map.seat_map', ['student_name' => $student_name, 'student_surname' => $student_surname, 'student_id_number' => $student_id_number, 'classes_id' => $classes->id, 'seat_numbers' => $seat_numbers]);
|
$subject = Subject::find($classes->subject_id);
|
||||||
|
$room_arrangement = Room::find($subject->room_id)->arrangement;
|
||||||
|
if(!$room_arrangement) {
|
||||||
|
$room_arrangement = Room::where('name', 'Inna sala')->get()->arrangement;
|
||||||
|
}
|
||||||
|
return view('map.seat_map', ['student_name' => $student_name, 'student_surname' => $student_surname, 'student_id_number' => $student_id_number, 'classes_id' => $classes->id, 'seat_numbers' => $seat_numbers, 'room_arrangement' => $room_arrangement]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function save_classes_data(Request $request)
|
public function save_classes_data(Request $request)
|
||||||
|
@ -18,13 +18,13 @@ class UserSubjectsController 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_grouped = $subjects->groupBy($groupBy);
|
$subjects_grouped = $subjects->groupBy($groupBy);
|
||||||
// $rooms = Room::all();
|
$rooms = Room::all();
|
||||||
$weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
|
$weekdays = ['Poniedziałek', 'Wtorek', 'Środa', 'Czwartek', 'Piątek', 'Sobota', 'Niedziela'];
|
||||||
// $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
|
// $types = ['Lecture', 'Excercises', 'Labs', 'Other'];
|
||||||
$defaultTime = date("H:i");
|
$defaultTime = date("H:i");
|
||||||
$defaultWeekday = $weekdays[date('w')-1];
|
$defaultWeekday = $weekdays[date('w')-1];
|
||||||
return view('user.user_subjects', ['subjects' => $subjects, 'weekdays' => $weekdays,
|
return view('user.user_subjects', ['subjects' => $subjects, 'weekdays' => $weekdays,
|
||||||
'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy, 'defaultTime' => $defaultTime, 'defaultWeekday' => $defaultWeekday]);
|
'subjects_grouped' => $subjects_grouped, 'grouped_by' => $groupBy, 'defaultTime' => $defaultTime, 'defaultWeekday' => $defaultWeekday, 'rooms' => $rooms]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function add_subject(Request $request)
|
public function add_subject(Request $request)
|
||||||
@ -33,14 +33,14 @@ class UserSubjectsController extends Controller
|
|||||||
// $type = $request->input('type');
|
// $type = $request->input('type');
|
||||||
$weekday = $request->input('weekday');
|
$weekday = $request->input('weekday');
|
||||||
$time = $request->input('time');
|
$time = $request->input('time');
|
||||||
// $room_id = $request->input('room_id');
|
$room_id = $request->input('room_id');
|
||||||
$user_id_n = Auth::id();
|
$user_id_n = Auth::id();
|
||||||
Subject::create([
|
Subject::create([
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
// 'type' => $type,
|
// 'type' => $type,
|
||||||
'weekday'=> $weekday,
|
'weekday'=> $weekday,
|
||||||
'time' => $time,
|
'time' => $time,
|
||||||
// 'room_id' => $room_id,
|
'room_id' => $room_id,
|
||||||
'user_id' => $user_id_n
|
'user_id' => $user_id_n
|
||||||
]);
|
]);
|
||||||
return redirect(route('user_subjects'));
|
return redirect(route('user_subjects'));
|
||||||
|
@ -19,7 +19,7 @@ class CreateSubjectsTable extends Migration
|
|||||||
// $table->string('type')->nullable();
|
// $table->string('type')->nullable();
|
||||||
$table->string('weekday')->nullable();
|
$table->string('weekday')->nullable();
|
||||||
$table->string('time')->nullable();
|
$table->string('time')->nullable();
|
||||||
// $table->integer('room_id');
|
$table->integer('room_id');
|
||||||
$table->integer('user_id');
|
$table->integer('user_id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
@ -17,7 +17,7 @@ class CreateRoomsTable extends Migration
|
|||||||
$table->bigIncrements('id')->unique();
|
$table->bigIncrements('id')->unique();
|
||||||
$table->string('name')->unique();
|
$table->string('name')->unique();
|
||||||
$table->integer('capacity')->nullable();
|
$table->integer('capacity')->nullable();
|
||||||
$table->string('arrangement')->nullable();
|
$table->text('arrangement')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ class CreateAttendancesTable extends Migration
|
|||||||
$table->string('student_name');
|
$table->string('student_name');
|
||||||
$table->string('student_surname');
|
$table->string('student_surname');
|
||||||
$table->integer('seat_number');
|
$table->integer('seat_number');
|
||||||
|
$table->text('notes')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
$this->call([
|
$this->call([
|
||||||
UsersTableSeeder::class,
|
UsersTableSeeder::class,
|
||||||
// RoomsTableSeeder::class,
|
RoomsTableSeeder::class,
|
||||||
SubjectsTableSeeder::class,
|
SubjectsTableSeeder::class,
|
||||||
ClassesTableSeeder::class,
|
ClassesTableSeeder::class,
|
||||||
AttendancesTableSeeder::class,
|
AttendancesTableSeeder::class,
|
||||||
|
@ -12,61 +12,76 @@ class RoomsTableSeeder extends Seeder
|
|||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
$rooms = [
|
$rooms = [
|
||||||
array('name' => 'A0-1', 'capacity' => 30),
|
array('name' => 'A0-1', 'capacity' => 30, 'arrangement' =>
|
||||||
array('name' => 'A0-11', 'capacity' => 24),
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]c[6,6]++_++c[7,7]c[8,8]c[9,9]c[10,10]c[11,11]c[12,12]++c[13,13]c[14,14]c[15,15]c[16,16]c[17,17]c[18,18]'
|
||||||
array('name' => 'A0-12', 'capacity' => 24),
|
),
|
||||||
array('name' => 'A0-3', 'capacity' => 13),
|
array('name' => 'A0-11', 'capacity' => 24, 'arrangement' =>
|
||||||
array('name' => 'A0-5', 'capacity' => 13),
|
'__c[3,3]c[4,4]c[5,5]c[6,6]++c[7,7]c[8,8]_c[10,10]c[11,11]c[12,12]++c[13,13]c[14,14]c[15,15]c[16,16]c[17,17]c[18,18]'
|
||||||
array('name' => 'A1-14/15', 'capacity' => 25),
|
),
|
||||||
array('name' => 'A1-16/17', 'capacity' => 25),
|
array('name' => 'A0-12', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'A1-18', 'capacity' => 13),
|
array('name' => 'A0-3', 'capacity' => 13, 'arrangement' => ''),
|
||||||
array('name' => 'A1-20', 'capacity' => 13),
|
array('name' => 'A0-5', 'capacity' => 13, 'arrangement' => ''),
|
||||||
array('name' => 'A1-22/23', 'capacity' => 25),
|
array('name' => 'A1-14/15', 'capacity' => 25, 'arrangement' =>
|
||||||
array('name' => 'A1-24/25', 'capacity' => 25),
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
|
||||||
array('name' => 'A1-33 (Sala RW)', 'capacity' => 64),
|
),
|
||||||
array('name' => 'A2-1', 'capacity' => 24),
|
array('name' => 'A1-16/17', 'capacity' => 25, 'arrangement' =>
|
||||||
array('name' => 'A2-10', 'capacity' => 34),
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
|
||||||
array('name' => 'A2-11', 'capacity' => 34),
|
),
|
||||||
array('name' => 'A2-12', 'capacity' => 34),
|
array('name' => 'A1-18', 'capacity' => 13, 'arrangement' => ''),
|
||||||
array('name' => 'A2-14', 'capacity' => 48),
|
array('name' => 'A1-20', 'capacity' => 13, 'arrangement' => ''),
|
||||||
array('name' => 'A2-19', 'capacity' => 48),
|
array('name' => 'A1-22/23', 'capacity' => 25, 'arrangement' =>
|
||||||
array('name' => 'A2-2', 'capacity' => 34),
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
|
||||||
array('name' => 'A2-20', 'capacity' => 32),
|
),
|
||||||
array('name' => 'A2-21', 'capacity' => 48),
|
array('name' => 'A1-24/25', 'capacity' => 25, 'arrangement' =>
|
||||||
array('name' => 'A2-22', 'capacity' => 48),
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
|
||||||
array('name' => 'A2-23', 'capacity' => 48),
|
),
|
||||||
array('name' => 'A2-24', 'capacity' => 48),
|
array('name' => 'A1-33 (Sala RW)', 'capacity' => 64, 'arrangement' => ''),
|
||||||
array('name' => 'A2-3', 'capacity' => 24),
|
array('name' => 'A2-1', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'A2-4', 'capacity' => 24),
|
array('name' => 'A2-10', 'capacity' => 34, 'arrangement' => ''),
|
||||||
array('name' => 'A2-5', 'capacity' => 24),
|
array('name' => 'A2-11', 'capacity' => 34, 'arrangement' => ''),
|
||||||
array('name' => 'A2-8', 'capacity' => 24),
|
array('name' => 'A2-12', 'capacity' => 34, 'arrangement' => ''),
|
||||||
array('name' => 'A2-9', 'capacity' => 34),
|
array('name' => 'A2-14', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'Aula A', 'capacity' => 196),
|
array('name' => 'A2-19', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'Aula B', 'capacity' => 117),
|
array('name' => 'A2-2', 'capacity' => 34, 'arrangement' => ''),
|
||||||
array('name' => 'Aula C', 'capacity' => 117),
|
array('name' => 'A2-20', 'capacity' => 32, 'arrangement' => ''),
|
||||||
array('name' => 'B1-06', 'capacity' => 4),
|
array('name' => 'A2-21', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'B1-07/08', 'capacity' => 16),
|
array('name' => 'A2-22', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'B1-37', 'capacity' => 18),
|
array('name' => 'A2-23', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'B1-38', 'capacity' => 12),
|
array('name' => 'A2-24', 'capacity' => 48, 'arrangement' => ''),
|
||||||
array('name' => 'B2-08/09', 'capacity' => 16),
|
array('name' => 'A2-3', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'B2-38', 'capacity' => 15),
|
array('name' => 'A2-4', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'B2-39', 'capacity' => 12),
|
array('name' => 'A2-5', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'B2-44', 'capacity' => 4),
|
array('name' => 'A2-8', 'capacity' => 24, 'arrangement' => ''),
|
||||||
array('name' => 'B3-08/09', 'capacity' => 16),
|
array('name' => 'A2-9', 'capacity' => 34, 'arrangement' => ''),
|
||||||
array('name' => 'B3-38', 'capacity' => 18),
|
array('name' => 'Aula A', 'capacity' => 196, 'arrangement' => ''),
|
||||||
array('name' => 'B3-39', 'capacity' => 18),
|
array('name' => 'Aula B', 'capacity' => 117, 'arrangement' => ''),
|
||||||
array('name' => 'B3-49', 'capacity' => 12),
|
array('name' => 'Aula C', 'capacity' => 117, 'arrangement' => ''),
|
||||||
array('name' => 'C2-3', 'capacity' => 1),
|
array('name' => 'B1-06', 'capacity' => 4, 'arrangement' => ''),
|
||||||
array('name' => 'D-1', 'capacity' => 22),
|
array('name' => 'B1-07/08', 'capacity' => 16, 'arrangement' => ''),
|
||||||
array('name' => 'D-2', 'capacity' => 21),
|
array('name' => 'B1-37', 'capacity' => 18, 'arrangement' => ''),
|
||||||
array('name' => 'D-3', 'capacity' => 22),
|
array('name' => 'B1-38', 'capacity' => 12, 'arrangement' => ''),
|
||||||
array('name' => 'Klub Profesorski', 'capacity' => null)
|
array('name' => 'B2-08/09', 'capacity' => 16, 'arrangement' => ''),
|
||||||
|
array('name' => 'B2-38', 'capacity' => 15, 'arrangement' => ''),
|
||||||
|
array('name' => 'B2-39', 'capacity' => 12, 'arrangement' => ''),
|
||||||
|
array('name' => 'B2-44', 'capacity' => 4, 'arrangement' => ''),
|
||||||
|
array('name' => 'B3-08/09', 'capacity' => 16, 'arrangement' => ''),
|
||||||
|
array('name' => 'B3-38', 'capacity' => 18, 'arrangement' => ''),
|
||||||
|
array('name' => 'B3-39', 'capacity' => 18, 'arrangement' => ''),
|
||||||
|
array('name' => 'B3-49', 'capacity' => 12, 'arrangement' => ''),
|
||||||
|
array('name' => 'C2-3', 'capacity' => 1, 'arrangement' => ''),
|
||||||
|
array('name' => 'D-1', 'capacity' => 22, 'arrangement' => ''),
|
||||||
|
array('name' => 'D-2', 'capacity' => 21, 'arrangement' => ''),
|
||||||
|
array('name' => 'D-3', 'capacity' => 22, 'arrangement' => ''),
|
||||||
|
array('name' => 'Klub Profesorski', 'capacity' => null, 'arrangement' => ''),
|
||||||
|
array('name' => 'Inna sala', 'capacity' => null, 'arrangement' =>
|
||||||
|
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]++_++c[6,6]c[7,7]c[8,8]c[9,9]++c[10,10]c[11,11]c[12,12]c[13,13]++_++c[14,14]c[15,15]c[16,16]c[17,17]++_++c[18,18]c[19,19]c[20,20]c[21,21]++c[22,22]c[23,23]c[24,24]c[25,25]'
|
||||||
|
)
|
||||||
];
|
];
|
||||||
foreach ($rooms as $room) {
|
foreach ($rooms as $room) {
|
||||||
DB::table('rooms')->insert([
|
DB::table('rooms')->insert([
|
||||||
'name' => $room['name'],
|
'name' => $room['name'],
|
||||||
'capacity' => $room['capacity'],
|
'capacity' => $room['capacity'],
|
||||||
'arrangement' => ''
|
'arrangement' => $room['arrangement']
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ class SubjectsTableSeeder extends Seeder
|
|||||||
'name' => 'Systemy Informatyczne UA0',
|
'name' => 'Systemy Informatyczne UA0',
|
||||||
'weekday' => 'Poniedziałek',
|
'weekday' => 'Poniedziałek',
|
||||||
'time' => '15:30',
|
'time' => '15:30',
|
||||||
|
'room_id' => 1,
|
||||||
'user_id' => 2
|
'user_id' => 2
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ class SubjectsTableSeeder extends Seeder
|
|||||||
'name' => 'Systemy Informatyczne UA0',
|
'name' => 'Systemy Informatyczne UA0',
|
||||||
'weekday' => 'Wtorek',
|
'weekday' => 'Wtorek',
|
||||||
'time' => '17:15',
|
'time' => '17:15',
|
||||||
|
'room_id' => 2,
|
||||||
'user_id' => 3
|
'user_id' => 3
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ function checkForUnavailablePlaces() {
|
|||||||
unavailablePlaces.push($(this).val());
|
unavailablePlaces.push($(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(unavailablePlaces);
|
|
||||||
const allPlaces = $('.seatCharts-seat.seatCharts-cell.available');
|
const allPlaces = $('.seatCharts-seat.seatCharts-cell.available');
|
||||||
if(unavailablePlaces){
|
if(unavailablePlaces){
|
||||||
allPlaces.each(function(){
|
allPlaces.each(function(){
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
var firstSeatLabel = 1;
|
var firstSeatLabel = 1;
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
const seat_map = $('#room_arrangement').val().split('++');
|
||||||
|
|
||||||
var $cart = $('#selected-seats'),
|
var $cart = $('#selected-seats'),
|
||||||
seatNumber = '',
|
seatNumber = '',
|
||||||
placeNumber = ('#sel-seat'),
|
placeNumber = ('#sel-seat'),
|
||||||
@ -8,12 +10,7 @@ var firstSeatLabel = 1;
|
|||||||
$name = $('#studentName'),
|
$name = $('#studentName'),
|
||||||
$total = $('#total'),
|
$total = $('#total'),
|
||||||
sc = $('#seat-map').seatCharts({
|
sc = $('#seat-map').seatCharts({
|
||||||
map: [
|
map: seat_map,
|
||||||
'c[1,1]c[2,2]c[3,3]c[4,4]c[5,5]c[6,6]',
|
|
||||||
'_',
|
|
||||||
'c[7,7]c[8,8]c[9,9]c[10,10]c[11,11]c[12,12]',
|
|
||||||
'c[13,13]c[14,14]c[15,15]c[16,16]c[17,17]c[18,18]',
|
|
||||||
],
|
|
||||||
seats: {
|
seats: {
|
||||||
h: {
|
h: {
|
||||||
price : 2500,
|
price : 2500,
|
||||||
@ -25,11 +22,11 @@ var firstSeatLabel = 1;
|
|||||||
rows: ['','','',''],
|
rows: ['','','',''],
|
||||||
top : false,
|
top : false,
|
||||||
getLabel : function (character, row, column) {
|
getLabel : function (character, row, column) {
|
||||||
if (row == '1') {
|
if (row === '1') {
|
||||||
return column;
|
return column;
|
||||||
} else if (row == '2') {
|
} else if (row === '2') {
|
||||||
return column;
|
return column;
|
||||||
} else if (row == '3') {
|
} else if (row === '3') {
|
||||||
return column;
|
return column;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -26,11 +26,10 @@
|
|||||||
<h3>Wybrane miejsce:
|
<h3>Wybrane miejsce:
|
||||||
<span id="selected-seats"></span>
|
<span id="selected-seats"></span>
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
||||||
@foreach($seat_numbers as $seat_number)
|
@foreach($seat_numbers as $seat_number)
|
||||||
<input type="hidden" class="unavailable_place" value="{{ $seat_number }}">
|
<input type="hidden" class="unavailable_place" value="{{ $seat_number }}">
|
||||||
@endforeach
|
@endforeach
|
||||||
|
<input type="hidden" class="room_arrangement" name="room_arrangement" id="room_arrangement" value="{{ $room_arrangement }}">
|
||||||
<form method="POST" action="{{ route('user_save_classes_data') }}">
|
<form method="POST" action="{{ route('user_save_classes_data') }}">
|
||||||
<input type="hidden" value="{{ $classes_id }}" class="classes_id" name="classes_id">
|
<input type="hidden" value="{{ $classes_id }}" class="classes_id" name="classes_id">
|
||||||
<input type="hidden" value="{{ $student_name }}" class="student_name" name="student_name">
|
<input type="hidden" value="{{ $student_name }}" class="student_name" name="student_name">
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
@foreach ($attendances_list as $attendance)
|
@foreach ($attendances_list as $attendance)
|
||||||
<tr>
|
<tr>
|
||||||
<td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
|
<td> {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->name }},
|
||||||
{{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }} </td>
|
{{ App\Classes::find($attendance->classes_id)-> date }} {{ App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->time }}, sala {{ App\Room::find(App\Subject::find(App\Classes::find($attendance->classes_id)->subject_id)->room_id) }} </td>
|
||||||
<td> {{ $attendance->student_id_number }} </td>
|
<td> {{ $attendance->student_id_number }} </td>
|
||||||
<td> {{ $attendance->student_name}}</td>
|
<td> {{ $attendance->student_name}}</td>
|
||||||
<td> {{ $attendance->student_surname}}</td>
|
<td> {{ $attendance->student_surname}}</td>
|
||||||
@ -141,9 +141,9 @@
|
|||||||
<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>
|
{{--<td>--}}
|
||||||
<a href="{{ route('user_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edytuj </a>
|
{{--<a href="{{ route('user_edit_attendance', [$attendance->id]) }}" name="edit-attendance-btn" class="btn btn-secondary"> Edytuj </a>--}}
|
||||||
</td>
|
{{--</td>--}}
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
@foreach ($classes_list as $classes_item)
|
@foreach ($classes_list as $classes_item)
|
||||||
<tr>
|
<tr>
|
||||||
<td> {{ App\Subject::find($classes_item->subject_id)->name }},
|
<td> {{ App\Subject::find($classes_item->subject_id)->name }},
|
||||||
{{ 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 }}, sala {{ App\Room::find(App\Subject::find($classes_item->subject_id)->room_id)->name }}</td>
|
||||||
<td> {{ $classes_item->date }} </td>
|
<td> {{ $classes_item->date }} </td>
|
||||||
<td>
|
<td>
|
||||||
@if($classes_item->classes_code)
|
@if($classes_item->classes_code)
|
||||||
|
@ -81,23 +81,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{--<div class="form-group row">--}}
|
<div class="form-group row">
|
||||||
{{--<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Room') }}</label>--}}
|
<label for="room_id" class="col-md-4 col-form-label text-md-right">{{ __('Sala') }}</label>
|
||||||
|
|
||||||
{{--<div class="col-md-6">--}}
|
<div class="col-md-6">
|
||||||
{{--<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required>--}}
|
<select id="room_id" class="form-control @error('room_id') is-invalid @enderror" name="room_id" required>
|
||||||
{{--@foreach ($rooms as $room)--}}
|
@foreach ($rooms as $room)
|
||||||
{{--<option value="{{ $room->id }}">{{ $room->name }}</option>--}}
|
<option value="{{ $room->id }}">{{ $room->name }}</option>
|
||||||
{{--@endforeach--}}
|
@endforeach
|
||||||
{{--</select>--}}
|
</select>
|
||||||
|
|
||||||
{{--@error('room_id')--}}
|
@error('room_id')
|
||||||
{{--<span class="invalid-feedback" role="alert">--}}
|
<span class="invalid-feedback" role="alert">
|
||||||
{{--<strong>{{ $message }}</strong>--}}
|
<strong>{{ $message }}</strong>
|
||||||
{{--</span>--}}
|
</span>
|
||||||
{{--@enderror--}}
|
@enderror
|
||||||
{{--</div>--}}
|
</div>
|
||||||
{{--</div>--}}
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<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>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
{{--<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"> 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"> 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"> Room </a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@foreach ($subjects_grouped as $subject_group_name => $subjects_list)
|
@foreach ($subjects_grouped as $subject_group_name => $subjects_list)
|
||||||
@ -152,7 +152,7 @@
|
|||||||
<th> Dzień tygodnia </th>
|
<th> Dzień tygodnia </th>
|
||||||
<th> Godzina </th>
|
<th> Godzina </th>
|
||||||
<th> Prowadzący </th>
|
<th> Prowadzący </th>
|
||||||
{{--<th> Room </th>--}}
|
<th> Sala </th>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -163,13 +163,13 @@
|
|||||||
<td> {{ $subject->weekday }} </td>
|
<td> {{ $subject->weekday }} </td>
|
||||||
<td> {{ $subject->time }} </td>
|
<td> {{ $subject->time }} </td>
|
||||||
<td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td>
|
<td> {{ App\User::find($subject->user_id)->name }} {{ App\User::find($subject->user_id)->surname }}</td>
|
||||||
{{--<td> {{ App\Room::find($subject->room_id)->name }} </td>--}}
|
<td> {{ App\Room::find($subject->room_id)->name }} </td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Usuń </a>
|
<a href="{{ route('user_delete_subject', [$subject->id]) }}" name="delete-subject-btn" class="btn btn-danger"> Usuń </a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
{{--<td>--}}
|
||||||
<a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edytuj </a>
|
{{--<a href="{{ route('user_edit_subject', [$subject->id]) }}" name="edit-subject-btn" class="btn btn-secondary"> Edytuj </a>--}}
|
||||||
</td>
|
{{--</td>--}}
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user