From cddef1ffc9cb204d87299cea7e9f2de0cf6e58c3 Mon Sep 17 00:00:00 2001 From: Mateja Date: Fri, 13 Nov 2020 01:47:38 +0100 Subject: Work on activities... --- resources/js/activities.js | 15 ++++++ resources/js/reservations.js | 0 resources/views/pages/activities.blade.php | 75 +++++++++++++++++------------- 3 files changed, 57 insertions(+), 33 deletions(-) create mode 100644 resources/js/activities.js create mode 100644 resources/js/reservations.js (limited to 'resources') diff --git a/resources/js/activities.js b/resources/js/activities.js new file mode 100644 index 0000000..f9c19ac --- /dev/null +++ b/resources/js/activities.js @@ -0,0 +1,15 @@ +$.ajaxSetup({ + headers: { + 'X-CSRF-TOKEN': $('input[name="csrf-token"]').attr('content') + } +}); + +jQuery('select#call-sign').change(fillTable); +jQuery(document).ready(fillTable); + +function fillTable() { + sign = jQuery('select#call-sign').first().val(); + jQuery.post('/api/activities', {'call-sign': sign}, function (data, status) { + console.log(data); + }); +} diff --git a/resources/js/reservations.js b/resources/js/reservations.js new file mode 100644 index 0000000..e69de29 diff --git a/resources/views/pages/activities.blade.php b/resources/views/pages/activities.blade.php index 57b5100..0c558af 100644 --- a/resources/views/pages/activities.blade.php +++ b/resources/views/pages/activities.blade.php @@ -5,40 +5,49 @@ @section('navbar', View::make('inc.special_navbar')) @section('content') -@if (count($activities) > 0) + + + +
- - - - - - @foreach ($activities as $row) -{{--'approved'--}} -{{--'specialCall'--}} -{{--'fromTime'--}} -{{--'toTime'--}} -{{--'frequencies'--}} -{{--'modes'--}} -{{--'operatorCall'--}} -{{--'operatorName'--}} -{{--'operatorEmail'--}} -{{--'operatorPhone'--}} -{{--'qso'--}} - - - - - - - - - @endforeach - +
OperatorFromToSpecial CallsignFrequenciesQSO
{{ $row->operatorCall }}{{ $row->fromTime }}{{ $row->toTime }}{{ $row->specialCall }}{{ $row->frequencies }}{{ $row->qso }}
-@else -
- There are currently no approved activities. -
-@endif + +{{--@if (count($activities) > 0)--}} +{{--
--}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{--@foreach ($activities as $row)--}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{----}} + {{--@endforeach--}} + {{----}} + {{--
OperatorFromToSpecial CallsignFrequenciesQSO
{{ $row->operatorCall }}{{ $row->fromTime }}{{ $row->toTime }}{{ $row->specialCall }}{{ $row->frequencies }}{{ $row->qso }}
--}} +{{--
--}} +{{--@else--}} +{{--
--}} + {{--There are currently no approved activities.--}} +{{--
--}} +{{--@endif--}} @endsection() + +@section('scripts') + +@endsection -- cgit v1.2.3