app deployed with Heroku

This commit is contained in:
s416422 2019-12-08 00:00:52 +01:00
parent 81a03268a7
commit 581429d99f
14 changed files with 52 additions and 24 deletions

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 public/

View File

@ -8,10 +8,8 @@ use Illuminate\Http\Request;
use App\Subject;
use App\Classes;
use App\Room;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class UserClassesController extends Controller
{
@ -40,11 +38,10 @@ class UserClassesController extends Controller
{
$subject_id = $request->input('subject_id');
$date = $request->input('date');
Classes::create([
$classes_id = Classes::create([
'subject_id' => $subject_id,
'date' => $date
]);
$classes_id = Classes::orderBy('created_at', 'desc')->first()->id;
])->id;
return redirect(route('user_start_classes', ['classes_id' => $classes_id]));
}

View File

@ -21,11 +21,13 @@ body {
font-size: 22px;
}
#selected-seats {
#sel-seat {
font-size: 30px;
text-shadow: 1px 1px 1px rgb(160, 160, 160);
margin-top: -15px;
margin-bottom: 100px;
padding: 0;
}
button {

View File

@ -15,7 +15,7 @@
<h2>Anna Kowalska</h2>
<h3>wybrane miejsce:</h3>
<h3 id="selected-seats">rząd 2 miejsce 3</h3>
<ul id="sel-seat"></ul>
<button class="gotomain-button" onclick="doStronyGlownej()">Przejdź do strony głównej &raquo;</button>
</div>
@ -24,7 +24,11 @@
<script>
function doStronyGlownej() {
window.location = "przylozlegitke.html";
}
//alert(localStorage.getItem('myElement')); //Przykładowa wartość
$( document ).ready(function() {
$("#sel-seat").text(localStorage.getItem('myElement'));
});
</script>
</html>

View File

@ -24,7 +24,7 @@
<div id="legend">
</div>
<div class="booking-details">
<h2>Anna Kowalska</h2>
<h2 id="studentName">Anna Kowalska</h2>
<h3>Wybrane miejsce:</h3>
<ul id="selected-seats"></ul>
@ -35,7 +35,6 @@
</div>
</body>
<script>
function goToKoncowa() {
window.location = "koncowastrona.html";
}

View File

@ -2,7 +2,10 @@ var firstSeatLabel = 1;
$(document).ready(function() {
var $cart = $('#selected-seats'),
seatNumber = '',
$placeNumber = ('#sel-seat'),
$counter = $('#counter'),
$name = $('#studentName'),
$total = $('#total'),
sc = $('#seat-map').seatCharts({
map: [
@ -46,6 +49,9 @@ var firstSeatLabel = 1;
.data('seatId', this.settings.id)
.appendTo($cart);
seatNumber = 'rząd: ' + this.settings.row + ' miejsce: ' + this.settings.label;
localStorage.setItem('myElement', seatNumber);
/*
* Lets update the counter and total
*
@ -64,6 +70,7 @@ var firstSeatLabel = 1;
//remove the item from our cart
$('#cart-item-'+this.settings.id).remove();
$('#item-'+this.settings.id).remove();
//seat has been vacated
return 'available';
@ -76,6 +83,7 @@ var firstSeatLabel = 1;
}
});
//this will handle "[cancel]" link clicks
$('#selected-seats').on('click', '.cancel-cart-item', function () {
//let's just trigger Click event on the appropriate seat, so we don't have to repeat the logic here

View File

@ -21,11 +21,12 @@ body {
font-size: 22px;
}
#selected-seats {
#sel-seat {
font-size: 30px;
text-shadow: 1px 1px 1px rgb(160, 160, 160);
margin-top: -15px;
margin-bottom: 100px;
padding: 0;
}
button {

View File

@ -144,6 +144,10 @@ span.seatCharts-legendDescription {
box-shadow: 0 0 #b85a5b;
background-color: #3654ff;
}
a.checkout-button {
color: black;
text-decoration: none;
}
#selected-seats {
list-style-type: none;

View File

@ -8,16 +8,21 @@ function savePlaceNumber() {
}
function toggleButtonAvailability() {
const button = $('.checkout-button')[0];
const buttons = $('.checkout-button');
const selected_place = $('.selected')[0];
if(!selected_place){
$(button).css('pointer-events', 'none');
$(button).css('cursor', 'unset');
buttons.each(function(e) {
if(!$(this).hasClass('end-button')) {
if(!selected_place){
$(this).css('pointer-events', 'none');
$(this).css('cursor', 'unset');
} else {
$(this).css('pointer-events', 'unset');
$(this).css('cursor', 'pointer');
}
}
})
} else {
$(button).css('pointer-events', 'unset');
$(button).css('cursor', 'pointer');
}
}
function checkForUnavailablePlaces() {

View File

@ -2,7 +2,10 @@ var firstSeatLabel = 1;
$(document).ready(function() {
var $cart = $('#selected-seats'),
seatNumber = '',
placeNumber = ('#sel-seat'),
$counter = $('#counter'),
$name = $('#studentName'),
$total = $('#total'),
sc = $('#seat-map').seatCharts({
map: [
@ -46,6 +49,8 @@ var firstSeatLabel = 1;
.data('seatId', this.settings.id)
.appendTo($cart);
seatNumber = 'rząd: ' + this.settings.row + ' miejsce: ' + this.settings.label;
localStorage.setItem('myElement', seatNumber);
/*
* Lets update the counter and total
*
@ -64,6 +69,7 @@ var firstSeatLabel = 1;
//remove the item from our cart
$('#cart-item-'+this.settings.id).remove();
$('#item-'+this.settings.id).remove();
//seat has been vacated
return 'available';

View File

@ -7,6 +7,7 @@
<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 type="text/javascript" src="{{ asset('js/map/jquery.seat-charts.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('css/map/seatchart.css') }}">
<title> @CHECK | @yield('map_title') </title>
@yield('map_meta')
</head>
@ -14,7 +15,7 @@
<body>
<div class="wrapper">
<a href="{{ route('user_classes') }}"> Zakończ zapisy </a>
<a href="{{ route('user_classes') }}" class="checkout-button end-button"> Zakończ zapisy </a>
@yield('map_content')
</div>

View File

@ -21,7 +21,7 @@
<div id="legend">
</div>
<div class="booking-details">
<h2> <span class="student_name"> {{ $student_name }} </span><span class="student_surname"> {{ $student_surname }} </span> </h2>
<h2 id="studentName"> <span class="student_name"> {{ $student_name }} </span><span class="student_surname"> {{ $student_surname }} </span> </h2>
<h3 class="student_id_number"> {{ $student_id_number }}</h3>
<h3>Wybrane miejsce:
<span id="selected-seats"></span>

View File

@ -28,7 +28,7 @@
<label for="student_surname"> Nazwisko studenta: </label>
<input type="text" name="student_surname" id="student_surname">
</div>
<button type="submit"> Wyślij requesta </button>
<button type="submit" class="checkout-button"> Wyślij requesta </button>
</form>
</div>
@endsection

View File

@ -11,7 +11,7 @@
<h3>{{ $student_id_number }} </h3>
<h3>wybrane miejsce:</h3>
<h3 id="selected-seats">{{ $seat_number }}</h3>
<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>
@endsection