diff --git a/app/Booking.php b/app/Booking.php new file mode 100644 index 00000000..86282d55 --- /dev/null +++ b/app/Booking.php @@ -0,0 +1,23 @@ +morphTo(); + } + + public function user() + { + return $this->belongsTo('App\User'); + } + + public function item() + { + return $this->belongsTo('App\Item'); + } +} diff --git a/app/Course.php b/app/Course.php new file mode 100644 index 00000000..f4af73f0 --- /dev/null +++ b/app/Course.php @@ -0,0 +1,23 @@ +morphMany('App\Booking', 'bookable'); + } + + public function user() + { + return $this->belongsTo('App\User'); + } + + public function event() + { + return $this->belongsTo('App\Event'); + } +} diff --git a/app/Event.php b/app/Event.php new file mode 100644 index 00000000..1d534b48 --- /dev/null +++ b/app/Event.php @@ -0,0 +1,23 @@ +morphMany('App\Booking', 'bookable'); + } + + public function courses() + { + return $this->hasMany('App\Course'); + } + + public function user() + { + return $this->belongsTo('App\User'); + } +} diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php new file mode 100644 index 00000000..078761c0 --- /dev/null +++ b/app/Http/Controllers/BookingController.php @@ -0,0 +1,85 @@ +where('name',request('perm'))->first(); if (request('value') == "true") { - $config->state = 1; + $config->data = ["true"]; } else { - $config->state = 0; + $config->data = ["false"]; } $config->save(); diff --git a/app/Http/Controllers/CourseController.php b/app/Http/Controllers/CourseController.php new file mode 100644 index 00000000..6e495f85 --- /dev/null +++ b/app/Http/Controllers/CourseController.php @@ -0,0 +1,85 @@ +start,0,10); + $end = substr(request()->end,0,10); + $allschedules = Schedule::all(); + $allevents = \App\Event::all(); $events = []; + $jsonevents = []; + $schedules = []; + + foreach ($allschedules as $schedule) { + if($schedule->date >= $start && $schedule->date <= $end) { + array_push($schedules,$schedule); + } + } + + foreach ($allevents as $event) { + if($event->date_begin >= $start && $event->date_begin <= $end) { + array_push($events,$event); + } + else if($event->date_end >= $start && $event->date_end <= $end) { + array_push($events,$event); + } + } + foreach ($schedules as $schedule) { - $color = 'blue'; - switch ($schedule->type) { - case 'regular': - $color = 'orange'; - break; - - case 'pilotage': - $color = '#58D3F7'; - break; - - case 'drill': - $color = 'blue'; - break; - - case 'music': - $color = 'green'; - break; - - case 'biathlon': - $color = 'red'; - break; - - case 'marksmanship': - $color = 'grey'; - break; - - case 'founding': - $color = '#00FF40'; - break; - - case 'volunteer': - $color = '#DF0174'; - break; - - case 'other': - $color = '#DF0174'; - break; - - default: - if ($activity->find($schedule->type)) { - $color = $activity->find($schedule->type)->calendar_color; - } - break; - }; + + $color = $this->getColor($schedule->type); $event = [ 'title' => $schedule->data['event_name'], 'start' => $schedule->date.'T'.$schedule->data['event_begin_time'], 'end' => $schedule->date.'T'.$schedule->data['event_end_time'], 'color' => $color, + 'source' => 'schedule', 'id' => $schedule->id ]; - array_push($events,$event); + array_push($jsonevents,$event); } - return json_encode($events); + foreach ($events as $event) { + + $color = $this->getColor($event->type); + + $myevent = [ + 'title' => $event->name, + 'start' => $event->date_begin, + 'end' => $event->date_end, + 'color' => $color, + 'extraParams' => [ + 'db_type' => 'event'], + 'id' => $event->id + ]; + array_push($jsonevents,$myevent); + } + + return json_encode($jsonevents); } - public function loadModal($id) + public function loadModal($id,$db_type) { - return view('public.modal.schedule',['event' => \App\Schedule::find($id)]); + if($db_type == "event") + { + $event = \App\Event::find($id); + } + else + { + $event = \App\Schedule::find($id); + } + return view('public.modal.schedule',['event' => $event]); + } + + public function loadModalFull($id,$db_type) + { + if($db_type == "event") + { + $event = \App\Event::find($id); + } + else + { + $event = \App\Schedule::find($id); + } + return view('admin.schedule.modal.show',['event' => $event]); + } + + public function getColor($type) + { + $activity = \App\ComplementaryActivity::all(); + $color = 'blue'; + switch ($type) { + case 'regular': + $color = 'orange'; + break; + + case 'pilotage': + $color = '#58D3F7'; + break; + + case 'drill': + $color = 'blue'; + break; + + case 'music': + $color = 'green'; + break; + + case 'biathlon': + $color = 'red'; + break; + + case 'marksmanship': + $color = 'grey'; + break; + + case 'founding': + $color = '#00FF40'; + break; + + case 'volunteer': + $color = '#DF0174'; + break; + + case 'other': + $color = '#DF0174'; + break; + + default: + if ($activity->find($type)) { + $color = $activity->find($type)->calendar_color; + } + break; + }; + return $color; + } + + public function printtopdf($id) + { + $event = \App\Event::find($id); + $pdf = PDF::loadView('admin.schedule.modal.show',['event' => $event]); + return $pdf->download($event->date_begin.'.pdf'); } } diff --git a/app/Item.php b/app/Item.php index 8f6d7da0..de83e594 100644 --- a/app/Item.php +++ b/app/Item.php @@ -17,4 +17,9 @@ class Item extends Model $col_items->forget(0); return $col_items; } + + public function bookings() + { + return $this->hasMany('App\Booking'); + } } diff --git a/app/User.php b/app/User.php index 69657d4c..6fe3f330 100644 --- a/app/User.php +++ b/app/User.php @@ -50,6 +50,21 @@ class User extends Authenticatable return $this->hasMany(Message::class); } + public function events() + { + return $this->hasMany('App\Event'); + } + + public function bookings() + { + return $this->hasMany('App\Booking'); + } + + public function courses() + { + return $this->hasMany('App\Course'); + } + public function routeNotificationForNexmo($notification) { return $this->telephone; diff --git a/composer.json b/composer.json index 0d801e5b..0004d34c 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "type": "project", "require": { "php": "^7.1.3", + "barryvdh/laravel-dompdf": "^0.8.4", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "5.6.*", diff --git a/composer.lock b/composer.lock index 5a9f8658..bd358bd1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,64 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b914f34bb5ca62a2b7d916629dc30d1a", + "content-hash": "a92d2a9579b7e0ef7e3c8b77e8c5dcde", "packages": [ + { + "name": "barryvdh/laravel-dompdf", + "version": "v0.8.4", + "source": { + "type": "git", + "url": "https://github.com/barryvdh/laravel-dompdf.git", + "reference": "3fd817065e1c820b1ddace8b2bf65ca45088df4f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/3fd817065e1c820b1ddace8b2bf65ca45088df4f", + "reference": "3fd817065e1c820b1ddace8b2bf65ca45088df4f", + "shasum": "" + }, + "require": { + "dompdf/dompdf": "^0.8", + "illuminate/support": "5.5.x|5.6.x|5.7.x|5.8.x", + "php": ">=7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.8-dev" + }, + "laravel": { + "providers": [ + "Barryvdh\\DomPDF\\ServiceProvider" + ], + "aliases": { + "PDF": "Barryvdh\\DomPDF\\Facade" + } + } + }, + "autoload": { + "psr-4": { + "Barryvdh\\DomPDF\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "A DOMPDF Wrapper for Laravel", + "keywords": [ + "dompdf", + "laravel", + "pdf" + ], + "time": "2019-02-26T18:07:43+00:00" + }, { "name": "dnoegel/php-xdg-base-dir", "version": "0.1", @@ -168,6 +224,72 @@ ], "time": "2019-07-30T19:33:28+00:00" }, + { + "name": "dompdf/dompdf", + "version": "v0.8.3", + "source": { + "type": "git", + "url": "https://github.com/dompdf/dompdf.git", + "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/75f13c700009be21a1965dc2c5b68a8708c22ba2", + "reference": "75f13c700009be21a1965dc2c5b68a8708c22ba2", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "phenx/php-font-lib": "0.5.*", + "phenx/php-svg-lib": "0.3.*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.5|^6.5", + "squizlabs/php_codesniffer": "2.*" + }, + "suggest": { + "ext-gd": "Needed to process images", + "ext-gmagick": "Improves image processing performance", + "ext-imagick": "Improves image processing performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-develop": "0.7-dev" + } + }, + "autoload": { + "psr-4": { + "Dompdf\\": "src/" + }, + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + }, + { + "name": "Brian Sweeney", + "email": "eclecticgeek@gmail.com" + }, + { + "name": "Gabriel Bull", + "email": "me@gabrielbull.com" + } + ], + "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", + "homepage": "https://github.com/dompdf/dompdf", + "time": "2018-12-14T02:40:31+00:00" + }, { "name": "dragonmantank/cron-expression", "version": "v2.3.0", @@ -1319,6 +1441,83 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "phenx/php-font-lib", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/PhenX/php-font-lib.git", + "reference": "760148820110a1ae0936e5cc35851e25a938bc97" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97", + "reference": "760148820110a1ae0936e5cc35851e25a938bc97", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "FontLib\\": "src/FontLib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse, export and make subsets of different types of font files.", + "homepage": "https://github.com/PhenX/php-font-lib", + "time": "2017-09-13T16:14:37+00:00" + }, + { + "name": "phenx/php-svg-lib", + "version": "v0.3.2", + "source": { + "type": "git", + "url": "https://github.com/PhenX/php-svg-lib.git", + "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/ccc46ef6340d4b8a4a68047e68d8501ea961442c", + "reference": "ccc46ef6340d4b8a4a68047e68d8501ea961442c", + "shasum": "" + }, + "require": { + "sabberworm/php-css-parser": "8.1.*" + }, + "require-dev": { + "phpunit/phpunit": "~5.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Svg\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Fabien Ménager", + "email": "fabien.menager@gmail.com" + } + ], + "description": "A library to read, parse and export to PDF SVG files.", + "homepage": "https://github.com/PhenX/php-svg-lib", + "time": "2018-06-03T10:10:03+00:00" + }, { "name": "php-http/guzzle6-adapter", "version": "v1.1.1", @@ -1927,6 +2126,50 @@ ], "time": "2018-07-19T23:38:55+00:00" }, + { + "name": "sabberworm/php-css-parser", + "version": "8.1.0", + "source": { + "type": "git", + "url": "https://github.com/sabberworm/PHP-CSS-Parser.git", + "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/850cbbcbe7fbb155387a151ea562897a67e242ef", + "reference": "850cbbcbe7fbb155387a151ea562897a67e242ef", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "type": "library", + "autoload": { + "psr-0": { + "Sabberworm\\CSS": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Raphael Schweikert" + } + ], + "description": "Parser for CSS Files written in PHP", + "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser", + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "time": "2016-07-19T19:14:21+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.1", diff --git a/config/app.php b/config/app.php index 13b36021..bc2ac278 100644 --- a/config/app.php +++ b/config/app.php @@ -157,10 +157,12 @@ return [ Illuminate\Translation\TranslationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, + /* * Package Service Providers... */ + Barryvdh\DomPDF\ServiceProvider::class, /* * Application Service Providers... @@ -219,6 +221,7 @@ return [ 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, + 'PDF' => Barryvdh\DomPDF\Facade::class, ], diff --git a/database/migrations/2019_08_17_102431_create_events_table.php b/database/migrations/2019_08_17_102431_create_events_table.php new file mode 100644 index 00000000..ad681b15 --- /dev/null +++ b/database/migrations/2019_08_17_102431_create_events_table.php @@ -0,0 +1,39 @@ +increments('id'); + $table->string('name'); + $table->string('date_begin'); + $table->string('date_end'); + $table->string('type'); + $table->string('user_id'); + $table->string('location'); + $table->boolean('is_mandatory'); + $table->text('desc'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('events'); + } +} diff --git a/database/migrations/2019_08_17_102836_create_courses_table.php b/database/migrations/2019_08_17_102836_create_courses_table.php new file mode 100644 index 00000000..16314a66 --- /dev/null +++ b/database/migrations/2019_08_17_102836_create_courses_table.php @@ -0,0 +1,39 @@ +increments('id'); + $table->string('name'); + $table->string('ocom'); + $table->integer('periode'); + $table->integer('level'); + $table->string('location'); + $table->text('comment'); + $table->integer('event_id'); + $table->integer('user_id'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('courses'); + } +} diff --git a/database/migrations/2019_08_17_102916_create_bookings_table.php b/database/migrations/2019_08_17_102916_create_bookings_table.php new file mode 100644 index 00000000..7763b376 --- /dev/null +++ b/database/migrations/2019_08_17_102916_create_bookings_table.php @@ -0,0 +1,37 @@ +increments('id'); + $table->integer('item_id'); + $table->integer('amount'); + $table->integer('bookable_id'); + $table->string('bookable_type'); + $table->integer('user_id'); + $table->text('comment'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('bookings'); + } +} diff --git a/public/css/custom.css b/public/css/custom.css index c158eb75..2ab92f9d 100644 --- a/public/css/custom.css +++ b/public/css/custom.css @@ -1,87 +1,107 @@ -.calendar{ - margin-top: 50px; +.calendar { + margin-top: 50px; +} + +.calendar-body-column { + display: flex; +} + +.calendar-container { + width: 14%; + height: 7.5rem; + text-align: center; + vertical-align: middle !important; + border: solid 1px #d9d9d9 !important; + padding: 0px !important; + background-color: white; +} + +.calendar-date { + float: left; + margin-left: 1rem; +} + +.calendar-text { + float: right; +} + +.calendar-text>div { + text-align: start; +} + +.calendar_event_name { + height: 3rem; + overflow: hidden; +} + +@media only screen and (max-width: 800px) { + .calendar-container { + width: 100%; } - - .calendar-body-column { - display: flex; + .calendar-head { + display: none; } - .calendar-container{ - width: 14%; - height: 7.5rem; - text-align: center; - vertical-align: middle !important; - border: solid 1px #d9d9d9 !important; - padding: 0px !important; - background-color: white; + .calendar-empty { + display: none; } - .calendar-date{ - float: left; - margin-left: 1rem; +} + +.btn-calendar { + padding: 36px 0; + height: 7.5rem; + margin: 0px; +} + +.btn-calendar:hover { + background-color: #f2f2f26e; +} + +.thead-dark { + color: #fff; + background-color: #212529; + border-color: #32383e; + text-align: center; +} + +.loader { + text-align: center; +} + +.loader-bg { + width: 70px; + margin-top: 50px; + margin-bottom: 50px; +} + +.loader-spinner { + position: absolute; + border: 16px solid #f3f3f3; + border-top: 16px solid #272c33; + border-radius: 50%; + width: 120px; + height: 120px; + animation: spin 2s linear infinite; + left: 0px; + right: 0px; + margin-left: auto; + margin-right: auto; + top: 44px; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); } - .calendar-text{ - float: right; + 100% { + transform: rotate(360deg); } - .calendar-text > div { - text-align:start; - } - .calendar_event_name { - height: 3rem; - overflow: hidden; - } - @media only screen and (max-width: 800px) { - .calendar-container{ - width: 100%; - } - .calendar-head{ - display: none; - } - .calendar-empty{ - display: none; - } - } - - .btn-calendar{ - padding: 36px 0; - height: 7.5rem; - margin: 0px; - } - .btn-calendar:hover{ - background-color: #f2f2f26e; - } - .thead-dark { - color: #fff; - background-color: #212529; - border-color: #32383e; - text-align: center; - } - .loader{ - text-align: center; - } - .loader-bg{ - width: 70px; - margin-top: 50px; - margin-bottom: 50px; - } - .loader-spinner { - position: absolute; - border: 16px solid #f3f3f3; - border-top: 16px solid #272c33; - border-radius: 50%; - width: 120px; - height: 120px; - animation: spin 2s linear infinite; - left: 0px; - right: 0px; - margin-left: auto; - margin-right: auto; - top: 44px; - } - - @keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } - } - .cs-notification:hover { - background-color: #F2F2F2 !important; - color:white; - } \ No newline at end of file +} + +.cs-notification:hover { + background-color: #F2F2F2 !important; + color: white; +} + +.modal-lg { + max-width: 1150px !important; +} \ No newline at end of file diff --git a/public/js/calendar.js b/public/js/calendar.js new file mode 100644 index 00000000..bf51cddd --- /dev/null +++ b/public/js/calendar.js @@ -0,0 +1,40 @@ +function initFullCalendar(authToken) { + document.addEventListener('DOMContentLoaded', function () { + var calendarEl = document.getElementById('fullCalendar'); + + var calendar = new FullCalendar.Calendar(calendarEl, { + plugins: ['dayGrid','interaction'], + locale: 'fr-ca', + header: { + left: 'title', + center: '', + right: 'prev,next' + }, + events: '/api/schedule/events', + eventClick: function (info) { + $.get("/api/schedule/full/events/" + info.event.id + "/"+ info.event.extendedProps.extraParams.db_type + "/modal?api_token="+authToken, function (data) { + $("#modal-content").html(data); + }); + $('#schedulemodal').modal('toggle') + }, + dateClick: function (info) { + var date = moment(info.date).format("YYYY-MM-DD"); + Swal.fire({ + title: 'Ajouter un evenement?', + text: "Voulez vous ajouter un evenement le "+date, + type: 'warning', + showCancelButton: true, + confirmButtonText: 'Oui', + cancelButtonText: 'Non', + }).then((result) => { + if (result.value) { + window.location.href = '/admin/schedule/add/'+date; + } + }) + } + }); + + calendar.render(); + }); + +} \ No newline at end of file diff --git a/resources/custom.css b/resources/custom.css index c158eb75..326af695 100644 --- a/resources/custom.css +++ b/resources/custom.css @@ -1,87 +1,107 @@ -.calendar{ - margin-top: 50px; +.calendar { + margin-top: 50px; +} + +.calendar-body-column { + display: flex; +} + +.calendar-container { + width: 14%; + height: 7.5rem; + text-align: center; + vertical-align: middle !important; + border: solid 1px #d9d9d9 !important; + padding: 0px !important; + background-color: white; +} + +.calendar-date { + float: left; + margin-left: 1rem; +} + +.calendar-text { + float: right; +} + +.calendar-text>div { + text-align: start; +} + +.calendar_event_name { + height: 3rem; + overflow: hidden; +} + +@media only screen and (max-width: 800px) { + .calendar-container { + width: 100%; } - - .calendar-body-column { - display: flex; + .calendar-head { + display: none; } - .calendar-container{ - width: 14%; - height: 7.5rem; - text-align: center; - vertical-align: middle !important; - border: solid 1px #d9d9d9 !important; - padding: 0px !important; - background-color: white; + .calendar-empty { + display: none; } - .calendar-date{ - float: left; - margin-left: 1rem; +} + +.btn-calendar { + padding: 36px 0; + height: 7.5rem; + margin: 0px; +} + +.btn-calendar:hover { + background-color: #f2f2f26e; +} + +.thead-dark { + color: #fff; + background-color: #212529; + border-color: #32383e; + text-align: center; +} + +.loader { + text-align: center; +} + +.loader-bg { + width: 70px; + margin-top: 50px; + margin-bottom: 50px; +} + +.loader-spinner { + position: absolute; + border: 16px solid #f3f3f3; + border-top: 16px solid #272c33; + border-radius: 50%; + width: 120px; + height: 120px; + animation: spin 2s linear infinite; + left: 0px; + right: 0px; + margin-left: auto; + margin-right: auto; + top: 44px; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); } - .calendar-text{ - float: right; + 100% { + transform: rotate(360deg); } - .calendar-text > div { - text-align:start; - } - .calendar_event_name { - height: 3rem; - overflow: hidden; - } - @media only screen and (max-width: 800px) { - .calendar-container{ - width: 100%; - } - .calendar-head{ - display: none; - } - .calendar-empty{ - display: none; - } - } - - .btn-calendar{ - padding: 36px 0; - height: 7.5rem; - margin: 0px; - } - .btn-calendar:hover{ - background-color: #f2f2f26e; - } - .thead-dark { - color: #fff; - background-color: #212529; - border-color: #32383e; - text-align: center; - } - .loader{ - text-align: center; - } - .loader-bg{ - width: 70px; - margin-top: 50px; - margin-bottom: 50px; - } - .loader-spinner { - position: absolute; - border: 16px solid #f3f3f3; - border-top: 16px solid #272c33; - border-radius: 50%; - width: 120px; - height: 120px; - animation: spin 2s linear infinite; - left: 0px; - right: 0px; - margin-left: auto; - margin-right: auto; - top: 44px; - } - - @keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } - } - .cs-notification:hover { - background-color: #F2F2F2 !important; - color:white; - } \ No newline at end of file +} + +.cs-notification:hover { + background-color: #F2F2F2 !important; + color: white; +} + +.modal-lg { + width: 80%; +} \ No newline at end of file diff --git a/resources/views/admin/calendar/calendar_display.blade.php b/resources/views/admin/calendar/calendar_display.blade.php index 77af26b2..bcf02a9b 100644 --- a/resources/views/admin/calendar/calendar_display.blade.php +++ b/resources/views/admin/calendar/calendar_display.blade.php @@ -4,14 +4,7 @@
- -
+
@@ -61,8 +54,14 @@ @endsection @section('custom_scripts') -
+ + + + +
+ @endsection \ No newline at end of file diff --git a/resources/views/admin/configs/general.blade.php b/resources/views/admin/configs/general.blade.php index 8d03c863..2f0fa470 100644 --- a/resources/views/admin/configs/general.blade.php +++ b/resources/views/admin/configs/general.blade.php @@ -12,14 +12,14 @@
L'horaire est t-il disponible publique sur la page d'accueil du site
- +
L'horaire est t-il complet ? Si cette option est désactivé les utilisateurs ne reseverons pas de notification concernant l'horaire
- +
diff --git a/resources/views/admin/schedule/modal/show.blade.php b/resources/views/admin/schedule/modal/show.blade.php new file mode 100644 index 00000000..4751c115 --- /dev/null +++ b/resources/views/admin/schedule/modal/show.blade.php @@ -0,0 +1,105 @@ +@extends('layouts.modal.schedule.show') + +@section('content') + +
+
+ Du {{$event->date_begin}} au {{$event->date_end}}
+ {{$event->location}} +
+
+ @if ($event->is_mandatory) + Obligatoire + @else + Optionnel + @endif + @if (is_int($event->type)) + {{$event->type}} + @else + {{\App\ComplementaryActivity::find($event->type)->name}} + @endif +
+
+
+
+ {{$event->desc}} +
+
+ @if (!$event->courses->isEmpty()) +
+
+

Horaire

+
+
+ @for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++) +
+ Période {{$p}} {{\App\Config::all()->where('name','admin_periode_begin')->first()->data[$p]}} à {{\App\Config::all()->where('name','admin_periode_end')->first()->data[$p]}} +
+ @endfor +
+ @for ($l = 1; $l <= \App\Config::getData('admin_level_in_schedule_nb'); $l++) +
+
+ Niveau {{$l}} +
+ @for ($p = 1; $p <= \App\Config::getData('admin_periode_nb'); $p++) +
+ @foreach ($event->courses as $course) + @if ($course->periode == $p && $course->level == $l) +
+
+ {{$course->name}} +
+
+ {{\App\User::find($course->user_id)->fullname()}} +
+
+ {{$course->ocom}} +
+
+ {{$course->location}} +
+
+ +
+
+ @if (!$course->bookings->isEmpty()) +
+
+ Item +
+
+ Quantité +
+
+ @foreach ($course->bookings as $booking) + +
+ {{$booking->amount}} +
+ @endforeach +
+ @else +

+ Aucune réservation +

+ @endif +
+ Modifier les réservation +
+
+
+
+ @endif + @endforeach +
+ @endfor +
+ @endfor +
+
+ @endif + +@endsection \ No newline at end of file diff --git a/resources/views/layouts/admin/head.blade.php b/resources/views/layouts/admin/head.blade.php index ce0451c7..eb925755 100644 --- a/resources/views/layouts/admin/head.blade.php +++ b/resources/views/layouts/admin/head.blade.php @@ -20,5 +20,9 @@ + + + + - + \ No newline at end of file diff --git a/resources/views/layouts/admin/scripts.blade.php b/resources/views/layouts/admin/scripts.blade.php index d6efd62d..313a20c7 100644 --- a/resources/views/layouts/admin/scripts.blade.php +++ b/resources/views/layouts/admin/scripts.blade.php @@ -13,8 +13,6 @@ - - diff --git a/resources/views/layouts/modal/schedule/show.blade.php b/resources/views/layouts/modal/schedule/show.blade.php new file mode 100644 index 00000000..8a367fde --- /dev/null +++ b/resources/views/layouts/modal/schedule/show.blade.php @@ -0,0 +1,14 @@ + + + diff --git a/resources/views/layouts/public/header.blade.php b/resources/views/layouts/public/header.blade.php index cdf766d9..d67d6d91 100644 --- a/resources/views/layouts/public/header.blade.php +++ b/resources/views/layouts/public/header.blade.php @@ -22,16 +22,16 @@ airplanemode_active L'escadron