aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/js/reserve.js9
-rw-r--r--resources/views/layouts/app.blade.php2
-rw-r--r--resources/views/pages/reserve.blade.php10
3 files changed, 20 insertions, 1 deletions
diff --git a/resources/js/reserve.js b/resources/js/reserve.js
new file mode 100644
index 0000000..7a20c37
--- /dev/null
+++ b/resources/js/reserve.js
@@ -0,0 +1,9 @@
+jQuery('select#special-call').change(setCallDesc);
+jQuery(document).ready(setCallDesc);
+
+function setCallDesc() {
+ sign = jQuery('select#special-call').first().val();
+ jQuery.get('/special-calls/show/' + sign, function (data, status) {
+ jQuery('div#call-desc').html(data);
+ });
+}
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 8d2d01a..3cb8667 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -16,7 +16,7 @@
<div class="container pt-3">
@yield('content')
</div>
- <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
+ <script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
@yield('scripts')
diff --git a/resources/views/pages/reserve.blade.php b/resources/views/pages/reserve.blade.php
index 16bdda5..868ae24 100644
--- a/resources/views/pages/reserve.blade.php
+++ b/resources/views/pages/reserve.blade.php
@@ -31,6 +31,12 @@
@enderror
</div>
+<div class="card mb-3">
+ <div class="card-body pb-2">
+ <div class="card-text" id="call-desc"></div>
+ </div>
+</div>
+
<!-- START TIME -->
<div class="form-group">
<label for="start-date">Start date:</label>
@@ -229,3 +235,7 @@
</div>
</form>
@endsection()
+
+@section('scripts')
+ <script src="{{ asset('js/reserve.js') }}"></script>
+@endsection