Update Laravel to 7.0

This commit is contained in:
George Frederick "Buzz" Beurling
2020-06-20 17:03:30 -04:00
parent f104c1b61b
commit 8866cafd31
57 changed files with 8739 additions and 2281 deletions

1325
.phpstorm.meta.php Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,37 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Booking
*
* @property int $id
* @property int $item_id
* @property int $amount
* @property int $bookable_id
* @property string $bookable_type
* @property int $user_id
* @property string $comment
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $bookable
* @property-read \App\Item $item
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereAmount($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereBookableId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereBookableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereComment($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereItemId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Booking whereUserId($value)
* @mixin \Eloquent
*/
class Booking extends Model class Booking extends Model
{ {
public function bookable() public function bookable()

View File

@@ -4,6 +4,46 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\ComplementaryActivity
*
* @property int $id
* @property string $name
* @property string $public_body
* @property string $public_slogan
* @property string $public_header_picture
* @property string $admin_desc
* @property string $calendar_color
* @property string $calendar_icon
* @property string $begin_time
* @property string $end_time
* @property string $location
* @property int $is_mandatory
* @property int $is_promoted
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Picture[] $pictures
* @property-read int|null $pictures_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereAdminDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereBeginTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereCalendarColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereCalendarIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereEndTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereIsMandatory($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereIsPromoted($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity wherePublicBody($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity wherePublicHeaderPicture($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity wherePublicSlogan($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ComplementaryActivity whereUpdatedAt($value)
* @mixin \Eloquent
*/
class ComplementaryActivity extends Model class ComplementaryActivity extends Model
{ {
public function pictures() public function pictures()

View File

@@ -4,6 +4,28 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Config
*
* @property int $id
* @property string $name
* @property int $state
* @property array $data
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereData($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereState($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Config whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Config extends Model class Config extends Model
{ {
protected $casts = [ protected $casts = [

View File

@@ -4,6 +4,47 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Course
*
* @property int $id
* @property string $name
* @property string $ocom
* @property int $periode
* @property int $level
* @property string $location
* @property string $desc
* @property string $comment
* @property string $comment_officer
* @property int $event_id
* @property string $user_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Booking[] $bookings
* @property-read int|null $bookings_count
* @property-read \App\Event $event
* @property-read \App\LessonPlan|null $lessonPlan
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereComment($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereCommentOfficer($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereEventId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereOcom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course wherePeriode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Course whereUserId($value)
* @mixin \Eloquent
*/
class Course extends Model class Course extends Model
{ {
public function bookings() public function bookings()

View File

@@ -4,11 +4,63 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Event
*
* @property int $id
* @property string $name
* @property string $date_begin
* @property string $date_end
* @property string $type
* @property string $user_id
* @property string $location
* @property int $is_mandatory
* @property int $use_weekly_msg
* @property int $use_schedule
* @property string $desc
* @property array $msg
* @property array $weekly_msg_file
* @property array $schedule
* @property string $calendar_color
* @property string $calendar_icon
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Booking[] $bookings
* @property-read int|null $bookings_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Course[] $courses
* @property-read int|null $courses_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereCalendarColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereCalendarIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereDateBegin($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereDateEnd($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereIsMandatory($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereMsg($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereSchedule($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereUseSchedule($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereUseWeeklyMsg($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Event whereWeeklyMsgFile($value)
* @mixin \Eloquent
*/
class Event extends Model class Event extends Model
{ {
protected $casts = [ protected $casts = [
'schedule' => 'array', 'schedule' => 'array',
'msg' => 'array' 'msg' => 'array',
'weekly_msg_file' => 'array'
]; ];
public function bookings() public function bookings()

View File

@@ -4,6 +4,46 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\EventType
*
* @property int $id
* @property string $name
* @property string $admin_desc
* @property string $calendar_color
* @property string $calendar_icon
* @property string $begin_time
* @property string $end_time
* @property string $location
* @property int $is_mandatory
* @property int $use_weekly_msg
* @property string $weekly_msg_publication_time
* @property int $use_schedule
* @property array $schedule_model
* @property int $is_promoted
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereAdminDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereBeginTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereCalendarColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereCalendarIcon($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereEndTime($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereIsMandatory($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereIsPromoted($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereLocation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereScheduleModel($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereUseSchedule($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereUseWeeklyMsg($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\EventType whereWeeklyMsgPublicationTime($value)
* @mixin \Eloquent
*/
class EventType extends Model class EventType extends Model
{ {
protected $casts = [ protected $casts = [

View File

@@ -2,7 +2,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Throwable;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@@ -32,7 +32,7 @@ class Handler extends ExceptionHandler
* @param \Exception $exception * @param \Exception $exception
* @return void * @return void
*/ */
public function report(Exception $exception) public function report(Throwable $exception)
{ {
parent::report($exception); parent::report($exception);
} }
@@ -44,7 +44,7 @@ class Handler extends ExceptionHandler
* @param \Exception $exception * @param \Exception $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $exception) public function render($request, Throwable $exception)
{ {
return parent::render($request, $exception); return parent::render($request, $exception);
} }

View File

@@ -7,6 +7,32 @@ use Illuminate\Support\Facades\Storage;
use League\Flysystem\FileNotFoundException; use League\Flysystem\FileNotFoundException;
use mysql_xdevapi\Exception; use mysql_xdevapi\Exception;
/**
* App\GoogleDriveFile
*
* @property string $id
* @property string $type
* @property string $name
* @property string $path
* @property array $rank_permission
* @property array $job_permission
* @property array $user_permission
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereJobPermission($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile wherePath($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereRankPermission($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\GoogleDriveFile whereUserPermission($value)
* @mixin \Eloquent
*/
class GoogleDriveFile extends Model class GoogleDriveFile extends Model
{ {
protected $primaryKey = 'id'; // or null protected $primaryKey = 'id'; // or null
@@ -409,4 +435,10 @@ class GoogleDriveFile extends Model
} }
return $sidebarArray; return $sidebarArray;
} }
public static function getDownloadURL($path,$file)
{
$dir = urlencode(\App\GoogleDriveFile::findByPath($path)->id);
return '/file/get?d='.$dir.'&f='.urlencode($file);
}
} }

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Event; use App\Event;
use App\GoogleDriveFile;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Http\Response; use Illuminate\Http\Response;
@@ -38,7 +39,25 @@ class EventController extends Controller
{ {
$event = new Event(); $event = new Event();
if (\App\GoogleDriveFile::checkConfig())
{
if (\request()->hasFile('files'))
{
$dir = \App\GoogleDriveFile::findByPath('.Systeme/.Fichier/.MessageDeLaSemaine');
$files = [];
foreach (\request()->file('files') as $f)
{
$name = urlencode(pathinfo($f->getClientOriginalName())['filename'].'_'.uniqid().'.'.$f->getClientOriginalExtension());
\Storage::cloud()->putFileAs($dir->id,$f,$name);
array_push($files,$name);
}
$event->weekly_msg_file = $files;
}
else
{
$event->weekly_msg_file = [''];
}
}
$event->name = request('name'); $event->name = request('name');
$event->date_begin = request('begin_time'); $event->date_begin = request('begin_time');
@@ -58,7 +77,7 @@ class EventController extends Controller
if(\request("use_weekly_msg")) if(\request("use_weekly_msg"))
{ {
$event->use_weekly_msg = 1; $event->use_weekly_msg = 1;
$event->msg = request('msg'); $event->msg = request('admin_desc');
} }
else else
{ {
@@ -132,15 +151,23 @@ class EventController extends Controller
{ {
$course->name = request('name_n'.$l.'_p'.$p); $course->name = request('name_n'.$l.'_p'.$p);
$course->ocom = request('ocom_n'.$l.'_p'.$p); $course->ocom = request('ocom_n'.$l.'_p'.$p);
$course->comment = ""; $course->desc = "";
} }
else else
{ {
$course->name = ""; $course->name = "";
$course->ocom = ""; $course->ocom = "";
$course->comment = request('desc_n'.$l.'_p'.$p); if (request('desc_n'.$l.'_p'.$p) == null)
{
$course->desc = "";
} }
else
{
$course->desc = request('desc_n'.$l.'_p'.$p);
}
}
$course->comment_officer = "";
$course->comment = "";
$course->save(); $course->save();
$ocom = \App\OCOM::where('ocom','=',request('ocom_n'.$l.'_p'.$p))->first(); $ocom = \App\OCOM::where('ocom','=',request('ocom_n'.$l.'_p'.$p))->first();
@@ -251,7 +278,7 @@ class EventController extends Controller
$course->location = request('loc_n'.$l.'_p'.$p); $course->location = request('loc_n'.$l.'_p'.$p);
$course->periode = $p; $course->periode = $p;
$course->level = $l; $course->level = $l;
$course->comment_officer = "";
$course->comment = ""; $course->comment = "";
$course->event_id = $event->id; $course->event_id = $event->id;

View File

@@ -24,7 +24,7 @@ class EventTypeController extends Controller
*/ */
public function create() public function create()
{ {
// return view('admin.event_type.create');
} }
/** /**
@@ -35,7 +35,83 @@ class EventTypeController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
// $eventType = new EventType();
$eventType->name = $request->name;
$eventType->location = $request->location;
$eventType->begin_time = $request->begin_time;
$eventType->end_time = $request->end_time;
$eventType->calendar_icon = $request->calendar_icon;
$eventType->calendar_color = $request->calendar_color;
$eventType->admin_desc = $request->admin_desc;
if ($request->use_weekly_msg == 'on')
{
$eventType->use_weekly_msg = 1;
$eventType->weekly_msg_publication_time = $request->weekly_msg_publication_time;
}
else
{
$eventType->use_weekly_msg = 0;
$eventType->weekly_msg_publication_time = '';
}
if ($request->use_schedule == 'on')
{
$eventType->use_schedule = 1;
}
else
{
$eventType->use_schedule = 0;
}
if ($request->is_mandatory == 'on')
{
$eventType->is_mandatory = 1;
}
else
{
$eventType->is_mandatory = 0;
}
$nbOfLevel = 1;
while (\request('level_name_'.$nbOfLevel))
{
$nbOfLevel++;
}
$nbOfLevel = $nbOfLevel-1;
$nbOfPeriode = 1;
while (\request('periode_name_'.$nbOfPeriode))
{
$nbOfPeriode++;
}
$nbOfPeriode = $nbOfPeriode -1;
$model = [];
for ($x = 1; $x <= $nbOfPeriode; $x++) {
$model['periodes'][$x-1] = [
'name' => \Request('periode_name_'.$x),
'begin_time' => \Request('periode_begin_time_'.$x),
'end_time' => \Request('periode_end_time_'.$x)
];
}
for ($i = 1; $i <= $nbOfLevel; $i++) {
$model['niveaux'][$i-1] = [
'name' => \Request('level_name_'.$i)
];
for ($x = 1; $x <= $nbOfPeriode; $x++) {
$model['default_value'][$x-1][$i-1] = [
'ocom' => \Request('ocom_n'.$i.'_p'.$x),
'name' => \Request('name_n'.$i.'_p'.$x),
'location' => \Request('location_n'.$i.'_p'.$x),
'instructor' => \Request('instruc_n'.$i.'_p'.$x),
'desc' => \Request('desc_n'.$i.'_p'.$x),
'use_course' => \Request('use_course_n'.$i.'_p'.$x),
];
}
}
$eventType->schedule_model = $model;
$eventType->save();
return redirect('/admin/config/instruction')->with('success','Type d\'évenement ajouté avec succès');
} }
/** /**
@@ -84,13 +160,11 @@ class EventTypeController extends Controller
{ {
$eventType->use_weekly_msg = 1; $eventType->use_weekly_msg = 1;
$eventType->weekly_msg_publication_time = $request->weekly_msg_publication_time; $eventType->weekly_msg_publication_time = $request->weekly_msg_publication_time;
$eventType->weekly_msg = $request->weekly_msg;
} }
else else
{ {
$eventType->use_weekly_msg = 0; $eventType->use_weekly_msg = 0;
$eventType->weekly_msg_publication_time = ''; $eventType->weekly_msg_publication_time = '';
$eventType->weekly_msg = '';
} }
if ($request->use_schedule == 'on') if ($request->use_schedule == 'on')
{ {
@@ -158,9 +232,10 @@ class EventTypeController extends Controller
* @param \App\EventType $eventType * @param \App\EventType $eventType
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function destroy(EventType $eventType) public function destroy($id)
{ {
// $e = EventType::findOrFail($id);
$e->delete();
} }
public function toJson($id) public function toJson($id)

View File

@@ -358,6 +358,11 @@ class GoogleDriveController extends Controller
'job' => [], 'job' => [],
'user' => [] 'user' => []
], ],
'.Systeme/.Fichier/.MessageDeLaSemaine' => [
'rank' => [1 => 'rwp',0 => 'r'],
'job' => [],
'user' => []
],
'.Systeme/.Fichier/.PlanDeCours' => [ '.Systeme/.Fichier/.PlanDeCours' => [
'rank' => [1 => 'rwp'], 'rank' => [1 => 'rwp'],
'job' => [], 'job' => [],

View File

@@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use phpDocumentor\Reflection\Types\Collection;
class StatsController extends Controller class StatsController extends Controller
{ {
@@ -28,10 +29,9 @@ class StatsController extends Controller
} }
} }
$coursesUTTD = $coursesTY; $coursesUTTD = clone $coursesTY;
$nbCoursePlanDoneUTDP = 0; $nbCoursePlanDoneUTDP = 0;
$nbCoursePlanDoneAndCheckUTDP = 0; $nbCoursePlanDoneAndCheckUTDP = 0;
foreach ($coursesUTTD as $key => $course) foreach ($coursesUTTD as $key => $course)
{ {
if (date('c',strtotime($course->event->date_begin)) >= date('c')) if (date('c',strtotime($course->event->date_begin)) >= date('c'))
@@ -55,9 +55,8 @@ class StatsController extends Controller
} }
} }
$instructorUTTD = $instructorUTTD->unique(); $instructorUTTD = $instructorUTTD->unique();
$eventTY = \App\Event::allThisYear(); $eventTY = \App\Event::allThisYear();
$eventUTTD = $eventTY; $eventUTTD = clone $eventTY;
foreach ($eventUTTD as $key => $event) foreach ($eventUTTD as $key => $event)
{ {
if (date('c',strtotime($event->date_begin)) >= date('c')) if (date('c',strtotime($event->date_begin)) >= date('c'))
@@ -65,6 +64,7 @@ class StatsController extends Controller
$eventUTTD->forget($key); $eventUTTD->forget($key);
} }
} }
return view('admin.stats.instruction',[ return view('admin.stats.instruction',[
'nbCourseThisYear' => count($coursesTY), 'nbCourseThisYear' => count($coursesTY),
'nbInstructorUpToThisDay' => count($instructorUTTD), 'nbInstructorUpToThisDay' => count($instructorUTTD),

View File

@@ -6,6 +6,34 @@ use Illuminate\Database\Eloquent\Model;
use mysql_xdevapi\Collection; use mysql_xdevapi\Collection;
use function foo\func; use function foo\func;
/**
* App\Item
*
* @property int $id
* @property int $category_id
* @property int $quantity
* @property string $name
* @property string $official_number
* @property string $desc
* @property array $metadata
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Booking[] $bookings
* @property-read int|null $bookings_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereCategoryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereMetadata($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereOfficialNumber($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereQuantity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Item whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Item extends Model class Item extends Model
{ {
public static function explodeItems($items) public static function explodeItems($items)

View File

@@ -4,6 +4,32 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\ItemCategory
*
* @property int $id
* @property string $name
* @property string $desc
* @property int $is_training
* @property int $is_op_appro
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Item[] $items
* @property-read int|null $items_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereIsOpAppro($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereIsTraining($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\ItemCategory whereUpdatedAt($value)
* @mixin \Eloquent
*/
class ItemCategory extends Model class ItemCategory extends Model
{ {
public function items() public function items()

View File

@@ -4,6 +4,26 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Job
*
* @property int $id
* @property string $name
* @property string $desc
* @property string $permissions
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job wherePermissions($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Job whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Job extends Model class Job extends Model
{ {
public function permissions() public function permissions()

View File

@@ -4,6 +4,33 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\LessonPlan
*
* @property int $id
* @property int $user_id
* @property string $file
* @property int|null $course_id
* @property string|null $desc
* @property string|null $comment
* @property int $approved
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Course|null $course
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereApproved($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereComment($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereCourseId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereFile($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\LessonPlan whereUserId($value)
* @mixin \Eloquent
*/
class LessonPlan extends Model class LessonPlan extends Model
{ {
public function course() public function course()

View File

@@ -4,6 +4,24 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Local
*
* @property int $id
* @property string $name
* @property string $desc
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Local whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Local extends Model class Local extends Model
{ {
// //

View File

@@ -4,6 +4,34 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Log
*
* @property int $id
* @property string $type
* @property string $result
* @property string $event
* @property int $user_id
* @property string $logable_type
* @property int $logable_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $logable
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereEvent($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereLogableId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereLogableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereResult($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Log whereUserId($value)
* @mixin \Eloquent
*/
class Log extends Model class Log extends Model
{ {
public function user() public function user()

View File

@@ -4,6 +4,34 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Message
*
* @property int $id
* @property string $title
* @property string $body
* @property int $publish
* @property int $private
* @property int $user_id
* @property array $data
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereBody($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereData($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message wherePrivate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message wherePublish($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Message whereUserId($value)
* @mixin \Eloquent
*/
class Message extends Model class Message extends Model
{ {
protected $casts = [ protected $casts = [

View File

@@ -4,6 +4,35 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\News
*
* @property int $id
* @property string $title
* @property string $body
* @property int $user_id
* @property int $publish
* @property array $tags
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Picture[] $pictures
* @property-read int|null $pictures_count
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\News newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\News newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\News query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereBody($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News wherePublish($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereTags($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\News whereUserId($value)
* @mixin \Eloquent
*/
class News extends Model class News extends Model
{ {
protected $casts = [ protected $casts = [
@@ -30,16 +59,13 @@ class News extends Model
$news = \App\News::all(); $news = \App\News::all();
foreach (\App\Event::future() as $event) foreach (\App\Event::all() as $event)
{ {
if($event->type == 1 && $event->msg != "") if($event->use_weekly_msg == 1)
{
if (date('U',strtotime($event->date_msg)) <= time())
{ {
$news->push(self::getWeeklyMsg($event)); $news->push(self::getWeeklyMsg($event));
} }
} }
}
return $news; return $news;
} }
@@ -50,13 +76,16 @@ class News extends Model
$n->event_id = $event->id; $n->event_id = $event->id;
$n->title = 'Message de la semaine du '.date('Y-m-d',strtotime($event->date_begin)); $n->title = 'Message de la semaine du '.date('Y-m-d',strtotime($event->date_begin));
$n->body = $event->msg; $n->body = $event->desc;
$n->user_id = $event->user_id; $n->user_id = $event->user_id;
$n->publish = 1; $n->publish = 1;
$n->created_at = $event->created_at; $n->created_at = $event->created_at;
$n->updated_at = $event->updated_at; $n->updated_at = $event->updated_at;
$n->tags = ['message de la semaine','Important']; $n->tags = ['message de la semaine','Important'];
if ($event->weekly_msg_file != null)
{
$n->files = $event->weekly_msg_file;
}
return $n; return $n;
} }
} }

View File

@@ -4,6 +4,34 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\OCOM
*
* @property int $id
* @property string $ocom
* @property string $objectif_competence
* @property string $nbPeriode
* @property string $objectif_rendement
* @property string $oren
* @property int $complementary
* @property string $course_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereComplementary($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereCourseId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereNbPeriode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereObjectifCompetence($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereObjectifRendement($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereOcom($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereOren($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\OCOM whereUpdatedAt($value)
* @mixin \Eloquent
*/
class OCOM extends Model class OCOM extends Model
{ {
public function courses() public function courses()

View File

@@ -5,6 +5,14 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr; use Illuminate\Support\Arr;
/**
* App\Permission
*
* @method static \Illuminate\Database\Eloquent\Builder|\App\Permission newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Permission newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Permission query()
* @mixin \Eloquent
*/
class Permission extends Model class Permission extends Model
{ {
const PERMISSIONS = [ const PERMISSIONS = [

View File

@@ -4,6 +4,33 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Picture
*
* @property int $id
* @property string $url
* @property string $title
* @property string $desc
* @property int $pictureable_id
* @property string $pictureable_type
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \Illuminate\Database\Eloquent\Model|\Eloquent $pictureable
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture wherePictureableId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture wherePictureableType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Picture whereUrl($value)
* @mixin \Eloquent
*/
class Picture extends Model class Picture extends Model
{ {
public function pictureable() public function pictureable()

View File

@@ -4,6 +4,28 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Rank
*
* @property int $id
* @property string $name
* @property string $desc
* @property string $acces_level
* @property string $permissions
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereAccesLevel($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereDesc($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank wherePermissions($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Rank whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Rank extends Model class Rank extends Model
{ {
public function permissions() public function permissions()

View File

@@ -5,6 +5,38 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use App\Item; use App\Item;
/**
* App\Schedule
*
* @property int $id
* @property string $date
* @property string $type
* @property string $n1_p1_item
* @property string $n1_p2_item
* @property string $n2_p1_item
* @property string $n2_p2_item
* @property string $n3_p1_item
* @property string $n3_p2_item
* @property array $data
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereData($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereDate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN1P1Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN1P2Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN2P1Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN2P2Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN3P1Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereN3P2Item($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereType($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Schedule whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Schedule extends Model class Schedule extends Model
{ {
protected $casts = [ protected $casts = [

View File

@@ -4,6 +4,27 @@ namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
/**
* App\Task
*
* @property int $id
* @property int $priority
* @property string $body
* @property int $completed
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task incomplete()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task whereBody($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task whereCompleted($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task wherePriority($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Task whereUpdatedAt($value)
* @mixin \Eloquent
*/
class Task extends Model class Task extends Model
{ {
public function scopeIncomplete($query) public function scopeIncomplete($query)

View File

@@ -5,6 +5,62 @@ namespace App;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
/**
* App\User
*
* @property int $id
* @property string $firstname
* @property string $lastname
* @property string $email
* @property string $password
* @property string $rank_id
* @property string $adress
* @property string $telephone
* @property string $age
* @property string $avatar
* @property string $sexe
* @property string $job_id
* @property string $api_token
* @property string|null $remember_token
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Booking[] $bookings
* @property-read int|null $bookings_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Course[] $courses
* @property-read int|null $courses_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Event[] $events
* @property-read int|null $events_count
* @property-read \App\Job $job
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Log[] $logs
* @property-read int|null $logs_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Message[] $messages
* @property-read int|null $messages_count
* @property-read \Illuminate\Database\Eloquent\Collection|\App\News[] $news
* @property-read int|null $news_count
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection|\Illuminate\Notifications\DatabaseNotification[] $notifications
* @property-read int|null $notifications_count
* @property-read \App\Rank $rank
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAdress($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAge($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereApiToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAvatar($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereFirstname($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereJobId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereLastname($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePassword($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereRankId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereRememberToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereSexe($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereTelephone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereUpdatedAt($value)
* @mixin \Eloquent
*/
class User extends Authenticatable class User extends Authenticatable
{ {
use Notifiable; use Notifiable;

View File

@@ -7,14 +7,16 @@
"require": { "require": {
"php": "^7.2", "php": "^7.2",
"barryvdh/laravel-dompdf": "^0.8.4", "barryvdh/laravel-dompdf": "^0.8.4",
"barryvdh/laravel-ide-helper": "v2.6.6", "barryvdh/laravel-ide-helper": "2.7.0",
"davejamesmiller/laravel-breadcrumbs": "5.3.1", "davejamesmiller/laravel-breadcrumbs": "5.3.2",
"facade/ignition": "^2.0",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3", "guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^6.0", "laravel/framework": "^7.0",
"laravel/helpers": "^1.1", "laravel/helpers": "^1.1",
"laravel/nexmo-notification-channel": "^2.2", "laravel/nexmo-notification-channel": "^2.2",
"laravel/tinker": "^1.0", "laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"nao-pon/flysystem-google-drive": "^1.1", "nao-pon/flysystem-google-drive": "^1.1",
"nexmo/client": "^2.0" "nexmo/client": "^2.0"
}, },
@@ -23,8 +25,8 @@
"fzaninotto/faker": "^1.4", "fzaninotto/faker": "^1.4",
"laravel/dusk": "^5.6", "laravel/dusk": "^5.6",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0", "nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^7.0", "phpunit/phpunit": "^8.5",
"staudenmeir/dusk-updater": "^1.1" "staudenmeir/dusk-updater": "^1.1"
}, },
"autoload": { "autoload": {

3068
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -164,7 +164,7 @@ return [
| |
*/ */
'secure' => env('SESSION_SECURE_COOKIE', false), 'secure' => env('SESSION_SECURE_COOKIE', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -26,6 +26,7 @@ class CreateEventsTable extends Migration
$table->boolean('use_schedule'); $table->boolean('use_schedule');
$table->text('desc'); $table->text('desc');
$table->text('msg'); $table->text('msg');
$table->string('weekly_msg_file');
$table->text('schedule'); $table->text('schedule');
$table->string('calendar_color'); $table->string('calendar_color');
$table->string('calendar_icon'); $table->string('calendar_icon');

View File

@@ -20,6 +20,7 @@ class CreateCoursesTable extends Migration
$table->integer('periode'); $table->integer('periode');
$table->integer('level'); $table->integer('level');
$table->string('location'); $table->string('location');
$table->text('desc');
$table->text('comment'); $table->text('comment');
$table->text('comment_officer'); $table->text('comment_officer');
$table->integer('event_id'); $table->integer('event_id');

View File

@@ -27,7 +27,6 @@ class CreateEventTypesTable extends Migration
$table->string('weekly_msg_publication_time')->default('-5day'); $table->string('weekly_msg_publication_time')->default('-5day');
$table->boolean('use_schedule')->default(false); $table->boolean('use_schedule')->default(false);
$table->text('schedule_model'); $table->text('schedule_model');
$table->text('weekly_msg');
$table->boolean('is_promoted')->default(false); $table->boolean('is_promoted')->default(false);
$table->timestamps(); $table->timestamps();
}); });

View File

@@ -33,6 +33,6 @@ class CreateGoogleDriveFileTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::dropIfExists('google_drive_file'); Schema::dropIfExists('google_drive_files');
} }
} }

View File

@@ -21,7 +21,6 @@ class EventTypeSeeder extends Seeder
'Location' => 'Escadron', 'Location' => 'Escadron',
'is_mandatory' => '0', 'is_mandatory' => '0',
'use_weekly_msg' => '0', 'use_weekly_msg' => '0',
'weekly_msg' => '<p><strong>/* Nom de l\'évènement */</strong></p><p>Heure (Cadets):</p><p>Lieu:</p><p>Tenue:</p><p>Matériel:</p><p>/* Commentaire */</p>',
'weekly_msg_publication_time' => '-5days', 'weekly_msg_publication_time' => '-5days',
'use_schedule' => '0', 'use_schedule' => '0',
'schedule_model' => '{"periodes":[{"name":"Periode 1","begin_time":"19:00","end_time":"20:10"},{"name":"Pause","begin_time":"20:10","end_time":"20:30"},{"name":"Periode 2","begin_time":"20:30","end_time":"21:20"}],"niveaux":[{"name":"Niveau 1"},{"name":"Niveau 2"},{"name":"Niveau 3"}]}', 'schedule_model' => '{"periodes":[{"name":"Periode 1","begin_time":"19:00","end_time":"20:10"},{"name":"Pause","begin_time":"20:10","end_time":"20:30"},{"name":"Periode 2","begin_time":"20:30","end_time":"21:20"}],"niveaux":[{"name":"Niveau 1"},{"name":"Niveau 2"},{"name":"Niveau 3"}]}',
@@ -37,12 +36,11 @@ class EventTypeSeeder extends Seeder
'Location' => 'Escadron', 'Location' => 'Escadron',
'is_mandatory' => '1', 'is_mandatory' => '1',
'use_weekly_msg' => '1', 'use_weekly_msg' => '1',
'weekly_msg' => '<p><strong>/* Nom de l\'évènement */</strong></p><p>Heure (Cadets):</p><p>Lieu:</p><p>Tenue:</p><p>Matériel:</p><p>/* Commentaire */</p>', 'admin_desc' => '<p><strong>/* Nom de l\'évènement */</strong></p><p>Heure (Cadets):</p><p>Lieu:</p><p>Tenue:</p><p>Matériel:</p><p>/* Commentaire */</p>',
'weekly_msg_publication_time' => '-5days', 'weekly_msg_publication_time' => '-5days',
'use_schedule' => '1', 'use_schedule' => '1',
'schedule_model' => '{"periodes":[{"name":"Periode 1","begin_time":"19:00","end_time":"20:10"},{"name":"Pause","begin_time":"20:10","end_time":"20:30"},{"name":"Periode 2","begin_time":"20:30","end_time":"21:20"}],"niveaux":[{"name":"Niveau 1"},{"name":"Niveau 2"},{"name":"Niveau 3"}]}', 'schedule_model' => '{"periodes":[{"name":"Periode 1","begin_time":"19:00","end_time":"20:10"},{"name":"Pause","begin_time":"20:10","end_time":"20:30"},{"name":"Periode 2","begin_time":"20:30","end_time":"21:20"}],"niveaux":[{"name":"Niveau 1"},{"name":"Niveau 2"},{"name":"Niveau 3"}]}',
'is_promoted' => '0', 'is_promoted' => '0',
'admin_desc' => 'Veuillez modifier la description admin par défaut',
] ]
]); ]);
} }

425
package-lock.json generated
View File

@@ -88,9 +88,9 @@
} }
}, },
"ajv": { "ajv": {
"version": "6.12.0", "version": "6.12.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
"integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==", "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
"requires": { "requires": {
"fast-deep-equal": "^3.1.1", "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0", "fast-json-stable-stringify": "^2.0.0",
@@ -369,9 +369,9 @@
"dev": true "dev": true
}, },
"aws4": { "aws4": {
"version": "1.9.1", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
"dev": true "dev": true
}, },
"axios": { "axios": {
@@ -1306,9 +1306,9 @@
} }
}, },
"bootstrap": { "bootstrap": {
"version": "4.4.1", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
"integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==", "integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==",
"dev": true "dev": true
}, },
"brace-expansion": { "brace-expansion": {
@@ -2792,6 +2792,12 @@
"minimalistic-crypto-utils": "^1.0.0" "minimalistic-crypto-utils": "^1.0.0"
} }
}, },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
"emojis-list": { "emojis-list": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
@@ -3043,9 +3049,9 @@
} }
}, },
"eventemitter3": { "eventemitter3": {
"version": "4.0.0", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
"integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==", "integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==",
"dev": true "dev": true
}, },
"events": { "events": {
@@ -3334,9 +3340,9 @@
"dev": true "dev": true
}, },
"fast-deep-equal": { "fast-deep-equal": {
"version": "3.1.1", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
}, },
"fast-json-stable-stringify": { "fast-json-stable-stringify": {
"version": "2.0.0", "version": "2.0.0",
@@ -3460,13 +3466,10 @@
} }
}, },
"follow-redirects": { "follow-redirects": {
"version": "1.10.0", "version": "1.12.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.0.tgz",
"integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==", "integrity": "sha512-JgawlbfBQKjbKegPn8vUsvJqplE7KHJuhGO4yPcb+ZOIYKSr+xobMVlfRBToZwZUUxy7lFiKBdFNloz9ui368Q==",
"dev": true, "dev": true
"requires": {
"debug": "^3.0.0"
}
}, },
"for-in": { "for-in": {
"version": "1.0.2", "version": "1.0.2",
@@ -4326,13 +4329,13 @@
} }
}, },
"globule": { "globule": {
"version": "1.3.1", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz", "resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz",
"integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==", "integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==",
"dev": true, "dev": true,
"requires": { "requires": {
"glob": "~7.1.1", "glob": "~7.1.1",
"lodash": "~4.17.12", "lodash": "~4.17.10",
"minimatch": "~3.0.2" "minimatch": "~3.0.2"
} }
}, },
@@ -4603,9 +4606,9 @@
"dev": true "dev": true
}, },
"http-proxy": { "http-proxy": {
"version": "1.18.0", "version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz", "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==", "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"eventemitter3": "^4.0.0", "eventemitter3": "^4.0.0",
@@ -4732,9 +4735,9 @@
"dev": true "dev": true
}, },
"in-publish": { "in-publish": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz", "resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz",
"integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=", "integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==",
"dev": true "dev": true
}, },
"indent-string": { "indent-string": {
@@ -5100,9 +5103,9 @@
"dev": true "dev": true
}, },
"jquery": { "jquery": {
"version": "3.4.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==", "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==",
"dev": true "dev": true
}, },
"js-base64": { "js-base64": {
@@ -5700,9 +5703,9 @@
} }
}, },
"minimist": { "minimist": {
"version": "0.0.8", "version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true "dev": true
}, },
"mississippi": { "mississippi": {
@@ -5763,12 +5766,12 @@
} }
}, },
"mkdirp": { "mkdirp": {
"version": "0.5.1", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "^1.2.5"
} }
}, },
"move-concurrently": { "move-concurrently": {
@@ -5967,9 +5970,9 @@
} }
}, },
"node-sass": { "node-sass": {
"version": "4.13.1", "version": "4.14.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz",
"integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", "integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==",
"dev": true, "dev": true,
"requires": { "requires": {
"async-foreach": "^0.1.3", "async-foreach": "^0.1.3",
@@ -5986,7 +5989,7 @@
"node-gyp": "^3.8.0", "node-gyp": "^3.8.0",
"npmlog": "^4.0.0", "npmlog": "^4.0.0",
"request": "^2.88.0", "request": "^2.88.0",
"sass-graph": "^2.2.4", "sass-graph": "2.2.5",
"stdout-stream": "^1.4.0", "stdout-stream": "^1.4.0",
"true-case-path": "^1.0.2" "true-case-path": "^1.0.2"
}, },
@@ -6471,6 +6474,13 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"dev": true "dev": true
}, },
"picomatch": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
"dev": true,
"optional": true
},
"pify": { "pify": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@@ -6508,9 +6518,9 @@
"dev": true "dev": true
}, },
"portfinder": { "portfinder": {
"version": "1.0.25", "version": "1.0.26",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz",
"integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==", "integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"async": "^2.6.2", "async": "^2.6.2",
@@ -8593,9 +8603,9 @@
"dev": true "dev": true
}, },
"psl": { "psl": {
"version": "1.7.0", "version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==", "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
"dev": true "dev": true
}, },
"public-encrypt": { "public-encrypt": {
@@ -8636,8 +8646,7 @@
"punycode": { "punycode": {
"version": "2.1.1", "version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
"dev": true
}, },
"q": { "q": {
"version": "1.5.1", "version": "1.5.1",
@@ -9183,62 +9192,148 @@
"dev": true "dev": true
}, },
"sass-graph": { "sass-graph": {
"version": "2.2.4", "version": "2.2.5",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz", "resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
"integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=", "integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==",
"dev": true, "dev": true,
"requires": { "requires": {
"glob": "^7.0.0", "glob": "^7.0.0",
"lodash": "^4.0.0", "lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3", "scss-tokenizer": "^0.2.3",
"yargs": "^7.0.0" "yargs": "^13.3.2"
}, },
"dependencies": { "dependencies": {
"camelcase": { "ansi-regex": {
"version": "3.0.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true "dev": true
}, },
"is-fullwidth-code-point": { "cliui": {
"version": "1.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true, "dev": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "string-width": "^3.1.0",
"strip-ansi": "^5.2.0",
"wrap-ansi": "^5.1.0"
} }
}, },
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"dev": true,
"requires": {
"locate-path": "^3.0.0"
}
},
"get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"dev": true
},
"locate-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dev": true,
"requires": {
"p-locate": "^3.0.0",
"path-exists": "^3.0.0"
}
},
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dev": true,
"requires": {
"p-limit": "^2.0.0"
}
},
"p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"dev": true
},
"require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
"dev": true
},
"string-width": { "string-width": {
"version": "1.0.2", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true, "dev": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^3.0.0" "strip-ansi": "^5.1.0"
} }
}, },
"yargs": { "strip-ansi": {
"version": "7.1.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^3.0.0", "ansi-regex": "^4.1.0"
"cliui": "^3.2.0", }
"decamelize": "^1.1.1", },
"get-caller-file": "^1.0.1", "which-module": {
"os-locale": "^1.4.0", "version": "2.0.0",
"read-pkg-up": "^1.0.1", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
"dev": true
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.0",
"string-width": "^3.0.0",
"strip-ansi": "^5.0.0"
}
},
"y18n": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==",
"dev": true
},
"yargs": {
"version": "13.3.2",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"requires": {
"cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1", "require-directory": "^2.1.1",
"require-main-filename": "^1.0.1", "require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0", "set-blocking": "^2.0.0",
"string-width": "^1.0.2", "string-width": "^3.0.0",
"which-module": "^1.0.0", "which-module": "^2.0.0",
"y18n": "^3.2.1", "y18n": "^4.0.0",
"yargs-parser": "^5.0.0" "yargs-parser": "^13.1.2"
} }
} }
} }
@@ -10578,13 +10673,6 @@
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": { "requires": {
"punycode": "^2.1.0" "punycode": "^2.1.0"
},
"dependencies": {
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
}
} }
}, },
"urix": { "urix": {
@@ -10796,14 +10884,136 @@
"dev": true "dev": true
}, },
"watchpack": { "watchpack": {
"version": "1.6.0", "version": "1.7.2",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz",
"integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==",
"dev": true, "dev": true,
"requires": { "requires": {
"chokidar": "^2.0.2", "chokidar": "^3.4.0",
"graceful-fs": "^4.1.2", "graceful-fs": "^4.1.2",
"neo-async": "^2.5.0" "neo-async": "^2.5.0",
"watchpack-chokidar2": "^2.0.0"
},
"dependencies": {
"anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
"dev": true,
"optional": true,
"requires": {
"normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
}
},
"binary-extensions": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
"integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
"dev": true,
"optional": true
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dev": true,
"optional": true,
"requires": {
"fill-range": "^7.0.1"
}
},
"chokidar": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz",
"integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==",
"dev": true,
"optional": true,
"requires": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
"fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.4.0"
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dev": true,
"optional": true,
"requires": {
"to-regex-range": "^5.0.1"
}
},
"fsevents": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"dev": true,
"optional": true
},
"glob-parent": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"dev": true,
"optional": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"optional": true,
"requires": {
"binary-extensions": "^2.0.0"
}
},
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"optional": true
},
"readdirp": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
"integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
"dev": true,
"optional": true,
"requires": {
"picomatch": "^2.2.1"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"optional": true,
"requires": {
"is-number": "^7.0.0"
}
}
}
},
"watchpack-chokidar2": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz",
"integrity": "sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA==",
"dev": true,
"optional": true,
"requires": {
"chokidar": "^2.1.8"
} }
}, },
"wbuf": { "wbuf": {
@@ -11255,18 +11465,19 @@
} }
}, },
"yargs-parser": { "yargs-parser": {
"version": "5.0.0", "version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true, "dev": true,
"requires": { "requires": {
"camelcase": "^3.0.0" "camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}, },
"dependencies": { "dependencies": {
"camelcase": { "camelcase": {
"version": "3.0.0", "version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true "dev": true
} }
} }

View File

@@ -11,16 +11,16 @@
}, },
"devDependencies": { "devDependencies": {
"axios": "^0.18.1", "axios": "^0.18.1",
"bootstrap": "^4.4.1", "bootstrap": "^4.5.0",
"cross-env": "^5.2.1", "cross-env": "^5.2.1",
"jquery": "^3.4.1", "jquery": "^3.5.1",
"laravel-mix": "^2.1.14", "laravel-mix": "^2.1.14",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"vue": "^2.6.11" "vue": "^2.6.11"
}, },
"dependencies": { "dependencies": {
"ajv": "^6.12.0", "ajv": "^6.12.2",
"sweetalert2": "^7.33.1" "sweetalert2": "^7.33.1"
} }
} }

204
public/css/app.css vendored
View File

@@ -1,7 +1,7 @@
@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);/*! @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/) * Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors * Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc. * Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/ */
@@ -201,6 +201,7 @@ pre {
margin-top: 0; margin-top: 0;
margin-bottom: 1rem; margin-bottom: 1rem;
overflow: auto; overflow: auto;
-ms-overflow-style: scrollbar;
} }
figure { figure {
@@ -268,6 +269,10 @@ select {
text-transform: none; text-transform: none;
} }
[role="button"] {
cursor: pointer;
}
select { select {
word-wrap: normal; word-wrap: normal;
} }
@@ -301,13 +306,6 @@ input[type="checkbox"] {
padding: 0; padding: 0;
} }
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea { textarea {
overflow: auto; overflow: auto;
resize: vertical; resize: vertical;
@@ -755,6 +753,7 @@ pre code {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex-positive: 1; -ms-flex-positive: 1;
flex-grow: 1; flex-grow: 1;
min-width: 0;
max-width: 100%; max-width: 100%;
} }
@@ -1033,6 +1032,7 @@ pre code {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex-positive: 1; -ms-flex-positive: 1;
flex-grow: 1; flex-grow: 1;
min-width: 0;
max-width: 100%; max-width: 100%;
} }
@@ -1316,6 +1316,7 @@ pre code {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex-positive: 1; -ms-flex-positive: 1;
flex-grow: 1; flex-grow: 1;
min-width: 0;
max-width: 100%; max-width: 100%;
} }
@@ -1599,6 +1600,7 @@ pre code {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex-positive: 1; -ms-flex-positive: 1;
flex-grow: 1; flex-grow: 1;
min-width: 0;
max-width: 100%; max-width: 100%;
} }
@@ -1882,6 +1884,7 @@ pre code {
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex-positive: 1; -ms-flex-positive: 1;
flex-grow: 1; flex-grow: 1;
min-width: 0;
max-width: 100%; max-width: 100%;
} }
@@ -2576,6 +2579,15 @@ pre code {
opacity: 1; opacity: 1;
} }
input[type="date"].form-control,
input[type="time"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
select.form-control:focus::-ms-value { select.form-control:focus::-ms-value {
color: #495057; color: #495057;
background-color: #fff; background-color: #fff;
@@ -3059,7 +3071,6 @@ textarea.form-control.is-invalid {
color: #212529; color: #212529;
text-align: center; text-align: center;
vertical-align: middle; vertical-align: middle;
cursor: pointer;
-webkit-user-select: none; -webkit-user-select: none;
-moz-user-select: none; -moz-user-select: none;
-ms-user-select: none; -ms-user-select: none;
@@ -3100,6 +3111,10 @@ textarea.form-control.is-invalid {
opacity: 0.65; opacity: 0.65;
} }
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
}
a.btn.disabled, a.btn.disabled,
fieldset:disabled a.btn { fieldset:disabled a.btn {
pointer-events: none; pointer-events: none;
@@ -3767,8 +3782,6 @@ fieldset:disabled a.btn {
.btn-link:focus, .btn-link:focus,
.btn-link.focus { .btn-link.focus {
text-decoration: underline; text-decoration: underline;
-webkit-box-shadow: none;
box-shadow: none;
} }
.btn-link:disabled, .btn-link:disabled,
@@ -4259,8 +4272,9 @@ input[type="button"].btn-block {
.input-group > .custom-file { .input-group > .custom-file {
position: relative; position: relative;
-webkit-box-flex: 1; -webkit-box-flex: 1;
-ms-flex: 1 1 0%; -ms-flex: 1 1 auto;
flex: 1 1 0%; flex: 1 1 auto;
width: 1%;
min-width: 0; min-width: 0;
margin-bottom: 0; margin-bottom: 0;
} }
@@ -5483,7 +5497,7 @@ input[type="button"].btn-block {
} }
.navbar-light .navbar-toggler-icon { .navbar-light .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
} }
.navbar-light .navbar-text { .navbar-light .navbar-text {
@@ -5534,7 +5548,7 @@ input[type="button"].btn-block {
} }
.navbar-dark .navbar-toggler-icon { .navbar-dark .navbar-toggler-icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
} }
.navbar-dark .navbar-text { .navbar-dark .navbar-text {
@@ -5572,14 +5586,21 @@ input[type="button"].btn-block {
margin-left: 0; margin-left: 0;
} }
.card > .list-group:first-child .list-group-item:first-child { .card > .list-group {
border-top-left-radius: 0.25rem; border-top: inherit;
border-top-right-radius: 0.25rem; border-bottom: inherit;
} }
.card > .list-group:last-child .list-group-item:last-child { .card > .list-group:first-child {
border-bottom-right-radius: 0.25rem; border-top-width: 0;
border-bottom-left-radius: 0.25rem; border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.card > .list-group:last-child {
border-bottom-width: 0;
border-bottom-right-radius: calc(0.25rem - 1px);
border-bottom-left-radius: calc(0.25rem - 1px);
} }
.card-body { .card-body {
@@ -5817,6 +5838,12 @@ input[type="button"].btn-block {
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.breadcrumb-item {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.breadcrumb-item + .breadcrumb-item { .breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem; padding-left: 0.5rem;
} }
@@ -6305,6 +6332,7 @@ a.badge-dark.focus {
display: flex; display: flex;
height: 1rem; height: 1rem;
overflow: hidden; overflow: hidden;
line-height: 0;
font-size: 0.675rem; font-size: 0.675rem;
background-color: #e9ecef; background-color: #e9ecef;
border-radius: 0.25rem; border-radius: 0.25rem;
@@ -6379,6 +6407,7 @@ a.badge-dark.focus {
flex-direction: column; flex-direction: column;
padding-left: 0; padding-left: 0;
margin-bottom: 0; margin-bottom: 0;
border-radius: 0.25rem;
} }
.list-group-item-action { .list-group-item-action {
@@ -6409,13 +6438,13 @@ a.badge-dark.focus {
} }
.list-group-item:first-child { .list-group-item:first-child {
border-top-left-radius: 0.25rem; border-top-left-radius: inherit;
border-top-right-radius: 0.25rem; border-top-right-radius: inherit;
} }
.list-group-item:last-child { .list-group-item:last-child {
border-bottom-right-radius: 0.25rem; border-bottom-right-radius: inherit;
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: inherit;
} }
.list-group-item.disabled, .list-group-item.disabled,
@@ -6448,26 +6477,26 @@ a.badge-dark.focus {
flex-direction: row; flex-direction: row;
} }
.list-group-horizontal .list-group-item:first-child { .list-group-horizontal > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0; border-top-right-radius: 0;
} }
.list-group-horizontal .list-group-item:last-child { .list-group-horizontal > .list-group-item:last-child {
border-top-right-radius: 0.25rem; border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.list-group-horizontal .list-group-item.active { .list-group-horizontal > .list-group-item.active {
margin-top: 0; margin-top: 0;
} }
.list-group-horizontal .list-group-item + .list-group-item { .list-group-horizontal > .list-group-item + .list-group-item {
border-top-width: 1px; border-top-width: 1px;
border-left-width: 0; border-left-width: 0;
} }
.list-group-horizontal .list-group-item + .list-group-item.active { .list-group-horizontal > .list-group-item + .list-group-item.active {
margin-left: -1px; margin-left: -1px;
border-left-width: 1px; border-left-width: 1px;
} }
@@ -6480,26 +6509,26 @@ a.badge-dark.focus {
flex-direction: row; flex-direction: row;
} }
.list-group-horizontal-sm .list-group-item:first-child { .list-group-horizontal-sm > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0; border-top-right-radius: 0;
} }
.list-group-horizontal-sm .list-group-item:last-child { .list-group-horizontal-sm > .list-group-item:last-child {
border-top-right-radius: 0.25rem; border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.list-group-horizontal-sm .list-group-item.active { .list-group-horizontal-sm > .list-group-item.active {
margin-top: 0; margin-top: 0;
} }
.list-group-horizontal-sm .list-group-item + .list-group-item { .list-group-horizontal-sm > .list-group-item + .list-group-item {
border-top-width: 1px; border-top-width: 1px;
border-left-width: 0; border-left-width: 0;
} }
.list-group-horizontal-sm .list-group-item + .list-group-item.active { .list-group-horizontal-sm > .list-group-item + .list-group-item.active {
margin-left: -1px; margin-left: -1px;
border-left-width: 1px; border-left-width: 1px;
} }
@@ -6513,26 +6542,26 @@ a.badge-dark.focus {
flex-direction: row; flex-direction: row;
} }
.list-group-horizontal-md .list-group-item:first-child { .list-group-horizontal-md > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0; border-top-right-radius: 0;
} }
.list-group-horizontal-md .list-group-item:last-child { .list-group-horizontal-md > .list-group-item:last-child {
border-top-right-radius: 0.25rem; border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.list-group-horizontal-md .list-group-item.active { .list-group-horizontal-md > .list-group-item.active {
margin-top: 0; margin-top: 0;
} }
.list-group-horizontal-md .list-group-item + .list-group-item { .list-group-horizontal-md > .list-group-item + .list-group-item {
border-top-width: 1px; border-top-width: 1px;
border-left-width: 0; border-left-width: 0;
} }
.list-group-horizontal-md .list-group-item + .list-group-item.active { .list-group-horizontal-md > .list-group-item + .list-group-item.active {
margin-left: -1px; margin-left: -1px;
border-left-width: 1px; border-left-width: 1px;
} }
@@ -6546,26 +6575,26 @@ a.badge-dark.focus {
flex-direction: row; flex-direction: row;
} }
.list-group-horizontal-lg .list-group-item:first-child { .list-group-horizontal-lg > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0; border-top-right-radius: 0;
} }
.list-group-horizontal-lg .list-group-item:last-child { .list-group-horizontal-lg > .list-group-item:last-child {
border-top-right-radius: 0.25rem; border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.list-group-horizontal-lg .list-group-item.active { .list-group-horizontal-lg > .list-group-item.active {
margin-top: 0; margin-top: 0;
} }
.list-group-horizontal-lg .list-group-item + .list-group-item { .list-group-horizontal-lg > .list-group-item + .list-group-item {
border-top-width: 1px; border-top-width: 1px;
border-left-width: 0; border-left-width: 0;
} }
.list-group-horizontal-lg .list-group-item + .list-group-item.active { .list-group-horizontal-lg > .list-group-item + .list-group-item.active {
margin-left: -1px; margin-left: -1px;
border-left-width: 1px; border-left-width: 1px;
} }
@@ -6579,42 +6608,40 @@ a.badge-dark.focus {
flex-direction: row; flex-direction: row;
} }
.list-group-horizontal-xl .list-group-item:first-child { .list-group-horizontal-xl > .list-group-item:first-child {
border-bottom-left-radius: 0.25rem; border-bottom-left-radius: 0.25rem;
border-top-right-radius: 0; border-top-right-radius: 0;
} }
.list-group-horizontal-xl .list-group-item:last-child { .list-group-horizontal-xl > .list-group-item:last-child {
border-top-right-radius: 0.25rem; border-top-right-radius: 0.25rem;
border-bottom-left-radius: 0; border-bottom-left-radius: 0;
} }
.list-group-horizontal-xl .list-group-item.active { .list-group-horizontal-xl > .list-group-item.active {
margin-top: 0; margin-top: 0;
} }
.list-group-horizontal-xl .list-group-item + .list-group-item { .list-group-horizontal-xl > .list-group-item + .list-group-item {
border-top-width: 1px; border-top-width: 1px;
border-left-width: 0; border-left-width: 0;
} }
.list-group-horizontal-xl .list-group-item + .list-group-item.active { .list-group-horizontal-xl > .list-group-item + .list-group-item.active {
margin-left: -1px; margin-left: -1px;
border-left-width: 1px; border-left-width: 1px;
} }
} }
.list-group-flush .list-group-item { .list-group-flush {
border-right-width: 0;
border-left-width: 0;
border-radius: 0; border-radius: 0;
} }
.list-group-flush .list-group-item:first-child { .list-group-flush > .list-group-item {
border-top-width: 0; border-width: 0 0 1px;
} }
.list-group-flush:last-child .list-group-item:last-child { .list-group-flush > .list-group-item:last-child {
border-bottom-width: 0; border-bottom-width: 0;
} }
@@ -6778,9 +6805,6 @@ button.close {
padding: 0; padding: 0;
background-color: transparent; background-color: transparent;
border: 0; border: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
} }
a.close.disabled { a.close.disabled {
@@ -6926,6 +6950,9 @@ a.close.disabled {
.modal-dialog-centered::before { .modal-dialog-centered::before {
display: block; display: block;
height: calc(100vh - 1rem); height: calc(100vh - 1rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
content: ""; content: "";
} }
@@ -7068,6 +7095,9 @@ a.close.disabled {
.modal-dialog-centered::before { .modal-dialog-centered::before {
height: calc(100vh - 3.5rem); height: calc(100vh - 3.5rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
} }
.modal-sm { .modal-sm {
@@ -7648,6 +7678,8 @@ a.close.disabled {
50% { 50% {
opacity: 1; opacity: 1;
-webkit-transform: none;
transform: none;
} }
} }
@@ -7659,6 +7691,8 @@ a.close.disabled {
50% { 50% {
opacity: 1; opacity: 1;
-webkit-transform: none;
transform: none;
} }
} }
@@ -9244,6 +9278,27 @@ button.bg-dark:focus {
} }
} }
.user-select-all {
-webkit-user-select: all !important;
-moz-user-select: all !important;
-ms-user-select: all !important;
user-select: all !important;
}
.user-select-auto {
-webkit-user-select: auto !important;
-moz-user-select: auto !important;
-ms-user-select: auto !important;
user-select: auto !important;
}
.user-select-none {
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
user-select: none !important;
}
.overflow-auto { .overflow-auto {
overflow: auto !important; overflow: auto !important;
} }
@@ -9404,18 +9459,6 @@ button.bg-dark:focus {
height: 100vh !important; height: 100vh !important;
} }
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.m-0 { .m-0 {
margin: 0 !important; margin: 0 !important;
} }
@@ -11584,6 +11627,18 @@ button.bg-dark:focus {
} }
} }
.stretched-link::after {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
pointer-events: auto;
content: "";
background-color: rgba(0, 0, 0, 0);
}
.text-monospace { .text-monospace {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important; font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
} }
@@ -11815,8 +11870,7 @@ a.text-dark:focus {
} }
.text-break { .text-break {
word-break: break-word !important; word-wrap: break-word !important;
overflow-wrap: break-word !important;
} }
.text-reset { .text-reset {

14
public/css/custom.css vendored
View File

@@ -1175,14 +1175,18 @@ a.fc-more:hover {
.fc-toolbar { .fc-toolbar {
text-align: center; text-align: center;
margin-bottom: 1em; margin-bottom: 1em;
flex-wrap: wrap;
} }
.fc-toolbar .fc-left { .fc-toolbar .fc-left {
float: left; float: left;
h2{
color: rgba(0, 0, 0, 0.87);
font-weight: 300;
} }
@media (max-width: 576px) {
.fc-left {
float: none !important;
width: 100%;
}
} }
.fc-toolbar .fc-right { .fc-toolbar .fc-right {
@@ -1841,3 +1845,7 @@ h2 {
tfoot > tr { tfoot > tr {
width: 100%; width: 100%;
} }
.iconpicker-popover {
z-index: 15 !important;
}

View File

@@ -4,6 +4,7 @@ var eventType;
var editorMode = 'schedule'; var editorMode = 'schedule';
function initEditor(event_id = 1, mode = 'schedule') function initEditor(event_id = 1, mode = 'schedule')
{ {
let isLoad = $.Deferred();
let editor = $('#editor'); let editor = $('#editor');
editorMode = mode; editorMode = mode;
eventType = null; eventType = null;
@@ -24,8 +25,27 @@ function initEditor(event_id = 1, mode = 'schedule')
nbOfPeriode = eventType['schedule_model']['periodes'].length; nbOfPeriode = eventType['schedule_model']['periodes'].length;
updateWidth(); updateWidth();
editor.html(getTemplate(eventType['schedule_model'])); editor.html(getTemplate(eventType['schedule_model']));
$('.richeditor').trumbowyg({
if (mode == 'eventType') lang: 'fr',
btns: [
['viewHTML'],
['emoji'],
['undo', 'redo'], // Only supported in Blink browsers
['strong', 'em', 'del'],
['superscript', 'subscript'],
['fontfamily'],
['fontsize'],
['foreColor', 'backColor'],
['link'],
['insertImage'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
['fullscreen']
]
});
if (mode == 'eventType' || mode == 'schedule-add')
{ {
let scheduleModel = eventType['schedule_model']; let scheduleModel = eventType['schedule_model'];
if (scheduleModel['default_value']) if (scheduleModel['default_value'])
@@ -39,11 +59,32 @@ function initEditor(event_id = 1, mode = 'schedule')
}); });
}); });
} }
$('.no-mandatory').removeAttr('required') if (mode != 'schedule-add')
{
$('.scheduleInput').removeAttr('required')
}
}
if (mode == 'schedule-add')
{
$('.datetimepicker').datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
}
});
} }
initAutoComplete("AutoCompleteUser"); initAutoComplete("AutoCompleteUser");
initAutoCompleteOCOM('AutoCompleteOCOM'); initAutoCompleteOCOM('AutoCompleteOCOM');
isLoad.resolve();
}); });
return isLoad.promise();
} }
function updateWidth() function updateWidth()
@@ -167,6 +208,14 @@ function getPeriode(id,periode,niveaux) {
function getCourse(level_id,periode_id) function getCourse(level_id,periode_id)
{ {
let isCourse = "";
if (eventType['schedule_model']['default_value'])
{
if(eventType['schedule_model']['default_value'][periode_id][level_id]['use_course'] != null)
{
isCourse = "required";
}
}
level_id++; level_id++;
periode_id++; periode_id++;
return '<div id="container-'+level_id+'-'+periode_id+'" niveau="'+level_id+'" periode="'+periode_id+'" class="col m-0 border-bottom border-right scheduleEditor-course">\n' + return '<div id="container-'+level_id+'-'+periode_id+'" niveau="'+level_id+'" periode="'+periode_id+'" class="col m-0 border-bottom border-right scheduleEditor-course">\n' +
@@ -191,14 +240,13 @@ function getCourse(level_id,periode_id)
' <div class="row pt-2">\n' + ' <div class="row pt-2">\n' +
' <div class="col-12 d-none" id="descContainer'+level_id+'-'+periode_id+'">\n' + ' <div class="col-12 d-none" id="descContainer'+level_id+'-'+periode_id+'">\n' +
' <div class="form-group">\n' + ' <div class="form-group">\n' +
' <label for="exampleFormControlTextarea1">Description de la période</label>\n' + ' <textarea class="form-control scheduleInput" id="desc_n'+level_id+'_p'+periode_id+'" name="desc_n'+level_id+'_p'+periode_id+'" rows="2" placeholder="Description de la période"></textarea>\n' +
' <textarea class="form-control" id="desc_n'+level_id+'_p'+periode_id+' name="desc_n'+level_id+'_p'+periode_id+' no-mandatory" id="exampleFormControlTextarea1" rows="2"></textarea>\n' +
' </div>\n' + ' </div>\n' +
' </div>\n' + ' </div>\n' +
' <div class="col-6 mb-1" id="OCOMContainer'+level_id+'-'+periode_id+'">\n' + ' <div class="col-6 mb-1" id="OCOMContainer'+level_id+'-'+periode_id+'">\n' +
' <div class="form-group label-floating">\n' + ' <div class="form-group label-floating">\n' +
' <div class="autocomplete">\n' + ' <div class="autocomplete">\n' +
' <input type="text" placeholder="OCOM du cours" id="ocom_n'+level_id+'_p'+periode_id+'" name="ocom_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteOCOM no-mandatory" aria-describedby="nameHelp" autocomplete="off" required onblur="updateCourseName(\''+level_id+'\',\''+periode_id+'\')">\n' + ' <input type="text" placeholder="OCOM du cours" id="ocom_n'+level_id+'_p'+periode_id+'" name="ocom_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteOCOM scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+' onblur="updateCourseName(\''+level_id+'\',\''+periode_id+'\')">\n' +
' </div>\n' + ' </div>\n' +
' <span class="form-control-feedback">\n' + ' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' + ' <i class="material-icons">done</i>\n' +
@@ -207,7 +255,7 @@ function getCourse(level_id,periode_id)
' </div>\n' + ' </div>\n' +
' <div class="col-6" id="nameContainer'+level_id+'-'+periode_id+'">\n' + ' <div class="col-6" id="nameContainer'+level_id+'-'+periode_id+'">\n' +
' <div class="form-group label-floating">\n' + ' <div class="form-group label-floating">\n' +
' <input type="text" placeholder="Nom du cours" id="name_n'+level_id+'_p'+periode_id+'" name="name_n'+level_id+'_p'+periode_id+'" class="form-control no-mandatory" required />\n' + ' <input type="text" placeholder="Nom du cours" id="name_n'+level_id+'_p'+periode_id+'" name="name_n'+level_id+'_p'+periode_id+'" class="form-control scheduleInput" '+isCourse+' />\n' +
' <span class="form-control-feedback">\n' + ' <span class="form-control-feedback">\n' +
' <i class="material-icons">clear</i>\n' + ' <i class="material-icons">clear</i>\n' +
' </span>\n' + ' </span>\n' +
@@ -215,7 +263,7 @@ function getCourse(level_id,periode_id)
' </div>\n' + ' </div>\n' +
' <div class="col-6 mb-1">\n' + ' <div class="col-6 mb-1">\n' +
' <div class="form-group label-floating">\n' + ' <div class="form-group label-floating">\n' +
' <input type="text" placeholder="Lieu du cours" id="location_n'+level_id+'_p'+periode_id+'" name="location_n'+level_id+'_p'+periode_id+'" class="form-control no-mandatory" required/>\n' + ' <input type="text" placeholder="Lieu du cours" id="location_n'+level_id+'_p'+periode_id+'" name="location_n'+level_id+'_p'+periode_id+'" class="form-control scheduleInput" '+isCourse+'/>\n' +
' <span class="form-control-feedback">\n' + ' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' + ' <i class="material-icons">done</i>\n' +
' </span>\n' + ' </span>\n' +
@@ -224,7 +272,7 @@ function getCourse(level_id,periode_id)
' <div class="col-6">\n' + ' <div class="col-6">\n' +
' <div class="form-group label-floating">\n' + ' <div class="form-group label-floating">\n' +
' <div class="autocomplete">\n' + ' <div class="autocomplete">\n' +
' <input type="text" placeholder="Nom de l\'instructeur" id="instruc_n'+level_id+'_p'+periode_id+'" name="instruc_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteUser no-mandatory" aria-describedby="nameHelp" autocomplete="off" required>\n' + ' <input type="text" placeholder="Nom de l\'instructeur" id="instruc_n'+level_id+'_p'+periode_id+'" name="instruc_n'+level_id+'_p'+periode_id+'" class="form-control AutoCompleteUser scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+'>\n' +
' </div>\n' + ' </div>\n' +
' <span class="form-control-feedback">\n' + ' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' + ' <i class="material-icons">done</i>\n' +
@@ -288,7 +336,7 @@ function addLevel()
initAutoCompleteOCOM('AutoCompleteOCOM'); initAutoCompleteOCOM('AutoCompleteOCOM');
if (editorMode == 'eventType') if (editorMode == 'eventType')
{ {
$('.no-mandatory').removeAttr('required') $('.scheduleInput').removeAttr('required')
} }
} }
@@ -310,7 +358,7 @@ function addPeriode()
initAutoCompleteOCOM('AutoCompleteOCOM'); initAutoCompleteOCOM('AutoCompleteOCOM');
if (editorMode == 'eventType') if (editorMode == 'eventType')
{ {
$('.no-mandatory').removeAttr('required') $('.scheduleInput').removeAttr('required')
} }
} }
@@ -323,6 +371,9 @@ function selectCourseMode(mode, niveau, periode)
$('#isDoneContainer'+niveau+'-'+periode).addClass('d-flex'); $('#isDoneContainer'+niveau+'-'+periode).addClass('d-flex');
$('#OCOMContainer'+niveau+'-'+periode).removeClass('d-none'); $('#OCOMContainer'+niveau+'-'+periode).removeClass('d-none');
$('#nameContainer'+niveau+'-'+periode).removeClass('d-none'); $('#nameContainer'+niveau+'-'+periode).removeClass('d-none');
$('#ocom_n'+niveau+'_p'+periode).prop('required',true);
$('#name_n'+niveau+'_p'+periode).prop('required',true);
$('#instruc_n'+niveau+'_p'+periode).prop('required',true);
$('#modeSwitchC'+niveau+'-'+periode).addClass('active'); $('#modeSwitchC'+niveau+'-'+periode).addClass('active');
$('#modeSwitchO'+niveau+'-'+periode).removeClass('active'); $('#modeSwitchO'+niveau+'-'+periode).removeClass('active');
$('#use_course_n'+niveau+'_p'+periode).prop("checked", true); $('#use_course_n'+niveau+'_p'+periode).prop("checked", true);
@@ -334,6 +385,9 @@ function selectCourseMode(mode, niveau, periode)
$('#isDoneContainer'+niveau+'-'+periode).removeClass('d-flex'); $('#isDoneContainer'+niveau+'-'+periode).removeClass('d-flex');
$('#OCOMContainer'+niveau+'-'+periode).addClass('d-none'); $('#OCOMContainer'+niveau+'-'+periode).addClass('d-none');
$('#nameContainer'+niveau+'-'+periode).addClass('d-none'); $('#nameContainer'+niveau+'-'+periode).addClass('d-none');
$('#ocom_n'+niveau+'_p'+periode).removeAttr('required');
$('#name_n'+niveau+'_p'+periode).removeAttr('required');
$('#instruc_n'+niveau+'_p'+periode).prop('required',true);
$('#modeSwitchC'+niveau+'-'+periode).removeClass('active'); $('#modeSwitchC'+niveau+'-'+periode).removeClass('active');
$('#modeSwitchO'+niveau+'-'+periode).addClass('active'); $('#modeSwitchO'+niveau+'-'+periode).addClass('active');
$('#use_course_n'+niveau+'_p'+periode).prop("checked", false); $('#use_course_n'+niveau+'_p'+periode).prop("checked", false);
@@ -391,3 +445,149 @@ function updateCourseName(niveau, periode) {
} }
}, 100); }, 100);
} }
function loadEventType(date,id = 1)
{
if ($('#type'))
{
id = $('#type').val();
}
initEditor(id,'schedule-add').done(function () {
if (eventType['is_mandatory'] == 1)
{
$('#is_mandatory').prop('checked',true);
}
else
{
$('#is_mandatory').removeAttr('checked');
}
if (eventType['use_schedule'] == 1)
{
$('#use_schedule').prop('checked',true);
switchUseSchedule();
}
else
{
$('#use_schedule').removeAttr('checked');
switchUseSchedule();
}
if (eventType['use_weekly_msg'] == 1)
{
$('#use_weekly_msg').prop('checked',true);
switchUseWeeklyMsg();
}
else
{
$('#use_weekly_msg').removeAttr('checked');
switchUseWeeklyMsg();
}
let begin_time = $('#begin_time');
begin_time.data("DateTimePicker").destroy();
begin_time.datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(moment(date+" "+eventType['begin_time']))
});
let end_time = $('#end_time');
end_time.data("DateTimePicker").destroy();
end_time.datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(moment(date+" "+eventType['end_time']))
});
let weekly_msg_publication_time = $('#weekly_msg_publication_time');
weekly_msg_publication_time.data("DateTimePicker").destroy();
if (eventType['weekly_msg_publication_time'].match(/\d+/) != null || eventType['weekly_msg_publication_time'].match(/\d+/) != null)
{
weekly_msg_publication_time.datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(moment(date+" "+eventType['begin_time']).subtract(
eventType['weekly_msg_publication_time'].match(/\d+/)[0],
eventType['weekly_msg_publication_time'].match(/[a-z]+/)[0]
))
});
}
else
{
weekly_msg_publication_time.datetimepicker({
icons: {
time: "fa fa-clock-o",
date: "fa fa-calendar",
up: "fa fa-chevron-up",
down: "fa fa-chevron-down",
previous: 'fa fa-chevron-left',
next: 'fa fa-chevron-right',
today: 'fa fa-screenshot',
clear: 'fa fa-trash',
close: 'fa fa-remove'
},
date: new Date(moment(date+" "+eventType['begin_time']).subtract(1,'days'))
});
}
$('#location').val(eventType['location']);
$('#name').val(eventType['name']);
$('#admin_desc').trumbowyg('html', eventType['admin_desc']);
$('#calendar_color').val(eventType['calendar_color']);
pickr.setColor(eventType['calendar_color']);
$('#calendar_icon').val(eventType['calendar_icon']);
$('#calendar_icon_display').removeAttr('class');
$('#calendar_icon_display').addClass(eventType['calendar_icon']);
})
}
function switchUseSchedule()
{
if($('#use_schedule').is(":checked"))
{
$('#collschedule').removeClass('d-none');
$('.scheduleInput').removeAttr('disabled')
}
else
{
$('#collschedule').addClass('d-none');
$('.scheduleInput').prop('disabled',true)
}
}
function switchUseWeeklyMsg()
{
if($('#use_weekly_msg').is(":checked"))
{
$('#collmessagedelasemaine').removeClass('d-none');
}
else
{
$('#collmessagedelasemaine').addClass('d-none');
}
}

14
resources/custom.css vendored
View File

@@ -1175,14 +1175,18 @@ a.fc-more:hover {
.fc-toolbar { .fc-toolbar {
text-align: center; text-align: center;
margin-bottom: 1em; margin-bottom: 1em;
flex-wrap: wrap;
} }
.fc-toolbar .fc-left { .fc-toolbar .fc-left {
float: left; float: left;
h2{
color: rgba(0, 0, 0, 0.87);
font-weight: 300;
} }
@media (max-width: 576px) {
.fc-left {
float: none !important;
width: 100%;
}
} }
.fc-toolbar .fc-right { .fc-toolbar .fc-right {
@@ -1841,3 +1845,7 @@ h2 {
tfoot > tr { tfoot > tr {
width: 100%; width: 100%;
} }
.iconpicker-popover {
z-index: 15 !important;
}

View File

@@ -10,15 +10,107 @@
<form action="/admin/config/customisation" method="POST"> <form action="/admin/config/customisation" method="POST">
@csrf @csrf
<div class="row ml-2"> <div class="row ml-2">
<div class="col-md-6 p-2"> <div class="col-md-12 p-2">
<div class="form-group"> <div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label> <label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="escadron_name_full" name="public_index_img_url" aria-describedby="emailHelp" value="{{\App\Config::getData('public_index_img_url')}}"> <input type="text" class="form-control" id="escadron_name_full" name="public_index_img_url" aria-describedby="emailHelp" value="{{\App\Config::getData('public_index_img_url')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small> <small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div> </div>
</div> </div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_banner_cadet_desc" name="text_public_banner_cadet_desc" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_banner_cadet_desc')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_banner_apprendre_plus" name="text_public_banner_apprendre_plus" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_banner_apprendre_plus')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_intro_title" name="text_public_intro_title" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_intro_title')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_intro_desc" name="text_public_intro_desc" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_intro_desc')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_picture_title" name="text_public_picture_title" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_picture_title')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_picture_desc" name="text_public_picture_desc" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_picture_desc')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_news_title" name="text_public_news_title" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_news_title')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_news_desc" name="text_public_news_desc" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_news_desc')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_news_button" name="text_public_news_button" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_news_button')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_schedule_desc" name="text_public_schedule_desc" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_schedule_desc')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_schedule_title" name="text_public_schedule_title" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_schedule_title')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_picture_nb" name="text_public_picture_nb" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_picture_nb')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-6 p-2">
<div class="form-group">
<label for="exampleInputEmail1">Photo page publique</label>
<input type="text" class="form-control" id="text_public_cta" name="text_public_cta" aria-describedby="emailHelp" value="{{\App\Config::getData('text_public_cta')}}">
<small id="emailHelp" class="form-text text-muted">URL vers la photo a afficher dans l'en tête de la page publique.</small>
</div>
</div>
<div class="col-md-12 p-2"> <div class="col-md-12 p-2">
<button type="submit" class="btn btn-primary">Sauvegarder</button> <button type="submit" class="btn btn-primary">Sauvegarder</button>
<a href="/?editMode" target="_blank" class="btn btn-outline-secondary">Activer le mode édition</a>
</div> </div>
</div> </div>
</form> </form>

View File

@@ -82,7 +82,7 @@
<p class="my-auto ml-3">N'utilise pas un horaire</p> <p class="my-auto ml-3">N'utilise pas un horaire</p>
@endif @endif
</div> </div>
<div> <div style="height: 2.7rem;overflow: hidden">
{!! $event_type->admin_desc !!} {!! $event_type->admin_desc !!}
</div> </div>
<div class="row"> <div class="row">
@@ -93,7 +93,7 @@
</div> </div>
<div class="col-md-4 text-right"> <div class="col-md-4 text-right">
@if($event_type->id != 1) @if($event_type->id != 1)
<button class="btn btn-danger btn-just-icon"> <button class="btn btn-danger btn-just-icon" onclick="deleteEventType({{$event_type->id}})">
<i class="fas fa-trash-alt"></i> <i class="fas fa-trash-alt"></i>
</button> </button>
@else @else
@@ -107,6 +107,9 @@
</div> </div>
</div> </div>
@endforeach @endforeach
<div class="col-12 text-right">
<a class="btn btn-primary" href="/admin/config/instruction/event_type/create">Ajouter un type d'évenement</a>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -146,5 +149,45 @@
}, },
date: new Date(end) date: new Date(end)
}); });
function deleteEventType(id)
{
Swal.fire({
title: 'Êtes vous certain ?',
text: "Vous ne pourrez annuler cette action",
type: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Oui',
cancelButtonText: 'Non'
}).then((result) => {
if (result.value) {
let request = $.ajax({
url: "/api/eventType/"+id,
method: "DELETE",
data: { api_token : api_token },
dataType: "html"
});
request.done(function (msg) {
Swal.fire(
'Supprimé!',
'Le type d\'évenement a été supprimé',
'success'
).then(() => {
window.location.href = '/admin/config/instruction';
});
});
request.fail(function (jqXHR, textStatus) {
Swal.fire({
type: 'error',
title: 'Oops...',
text: 'Le type d\'évenement n\'a pas pus être supprimé',
footer: '<small>'+textStatus+'</small>'
})
})
}
});
}
</script> </script>
@endsection @endsection

View File

@@ -0,0 +1,207 @@
@extends('layouts.admin.main')
@section('content')
<div class="col-12">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title">Ajouter un type d'évenement</h4>
</div>
<div class="card-body">
<div class="content">
<form method="post">
@csrf
<div class="row">
<div class="col-md-5">
<div class="form-group">
<label class="label-control">Nom</label>
<input type="text" class="form-control" name="name" />
</div>
</div>
<div class="col-md-5">
<div class="form-group">
<label class="label-control">Emplacement</label>
<input type="text" class="form-control" name="location" />
</div>
</div>
<div class="col-md-2">
<div class="togglebutton">
<label>
<input type="checkbox" checked="" name="is_mandatory">
<span class="toggle"></span>
Obligatoire
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="label-control">Heure de début</label>
<input name="begin_time" type="time" class="form-control"/>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="label-control">Heure de fin</label>
<input name="end_time" type="time" class="form-control"/>
</div>
</div>
<div class="col-md-3">
<div class="form-group iconpicker-container">
<label for="type">Icone</label>
<div class="input-group iconpicker-container">
<input id="calendar_icon" name="calendar_icon" data-placement="bottomRight" class="form-control icp icp-auto iconpicker-element iconpicker-input" type="text">
<span class="input-group-addon"><i id="calendar_icon_display" class="fas fa-assistive-listening-systems"></i></span>
</div>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label for="type">Couleur</label>
<div class="input-group iconpicker-container">
<input class="form-control" type="text" name="calendar_color" id="calendar_color" onclick="pickr.show()">
<span class="color-picker"></span>
</div>
</div>
</div>
<div class="col-md-12">
<label class="mb-0">Description</label>
<div class="form-group">
<textarea name="admin_desc" class="form-control richeditor" name="admin_desc" id="admin_desc" rows="6" required>
</textarea>
</div>
<hr>
</div>
<div class="col-md-12">
<label class="mb-0">Message de la semaine</label>
<div class="togglebutton float-right">
<label>
<input type="checkbox" name="use_weekly_msg" type="button" data-toggle="collapse" data-target="#collapseMSG" aria-expanded="false" aria-controls="collapseMSG">
<span class="toggle"></span>
</label>
</div>
</div>
<div class="collapse w-100" id="collapseMSG">
<div class="col-md-12">
<div class="form-group">
<label>Heure publication des messages de la semaine</label>
<select class="form-control mt-3" name="weekly_msg_publication_time">
<option value="-1days">-1 Jour</option>
<option value="-2days">-2 Jours</option>
<option value="-3days">-3 Jours</option>
<option value="-4days">-4 Jours</option>
<option value="-5days">-5 Jours</option>
<option value="-6days">-6 Jours</option>
<option value="-7days">-7 Jours</option>
<option value="-2weeks">-2 Semaines</option>
</select>
</div>
<label class="mb-0 mt-4">Message par défaut</label>
<div class="form-group mt-0">
<textarea name="weekly_msg" class="form-control richeditor" name="admin_desc" id="admin_desc" rows="6">
</textarea>
</div>
</div>
</div>
<div class="col-md-12">
<hr>
<label class="mb-0">Horaire</label>
<div class="togglebutton float-right">
<label>
<input type="checkbox" name="use_schedule" type="button" data-toggle="collapse" data-target="#collapseSchedule" aria-expanded="false" aria-controls="collapseSchedule">
<span class="toggle"></span>
</label>
</div>
</div>
<div class="col-md-12">
<div class="collapse" id="collapseSchedule">
<div class="card-body" style="overflow: scroll">
<div id="editor" class="m-3" style="width: 110vw">
@loaderDot
</div>
</div>
</div>
</div>
<div class="col-md-12 text-right">
<button type="submit" class="btn btn-primary">Sauvegarder</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
@endsection
@section('custom_scripts')
<script src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js"></script>
<script src="/js/plugins/fontawesome-icon-picker/fontawesome-iconpicker.js"></script>
<script src="/js/plugins/schedule/editorv2.js"></script>
<script src="/js/plugins/autocomplete.js"></script>
<script>
$('.richeditor').trumbowyg({
lang: 'fr',
btns: [
['viewHTML'],
['emoji'],
['undo', 'redo'], // Only supported in Blink browsers
['strong', 'em', 'del'],
['superscript', 'subscript'],
['fontfamily'],
['fontsize'],
['foreColor', 'backColor'],
['link'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
['fullscreen']
]
});
$('.icp-auto').iconpicker({ placement: 'right',animation: 'false'});
const pickr = Pickr.create({
el: '.color-picker',
theme: 'monolith', // or 'monolith', or 'nano'
swatches: [
'rgba(244, 67, 54, 1)',
'rgba(233, 30, 99, 1)',
'rgba(156, 39, 176, 1)',
'rgba(103, 58, 183, 1)',
'rgba(63, 81, 181, 1)',
'rgba(33, 150, 243, 1)',
'rgba(3, 169, 244, 1)',
'rgba(0, 188, 212, 1)',
'rgba(0, 150, 136, 1)',
'rgba(76, 175, 80, 1)',
'rgba(139, 195, 74, 1)',
'rgba(205, 220, 57, 1)',
'rgba(255, 235, 59, 1)',
'rgba(255, 193, 7, 1)'
],
comparison: false,
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: true,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: false
}
}
});
pickr.on('change', (color,instance) => {
$('#calendar_color').val(color.toHEXA().toString());
});
initEditor(1,'eventType');
</script>
@endsection

View File

@@ -27,7 +27,7 @@
<div class="col-md-2"> <div class="col-md-2">
<div class="togglebutton"> <div class="togglebutton">
<label> <label>
<input type="checkbox" checked="" name="is_mandatory"> <input type="checkbox" name="is_mandatory" @if($event_type->is_mandatory == 1) checked @endif>
<span class="toggle"></span> <span class="toggle"></span>
Obligatoire Obligatoire
</label> </label>
@@ -96,12 +96,6 @@
<option value="-2weeks" @if($event_type->weekly_msg_publication_time == '-2weeks') selected @endif>-2 Semaines</option> <option value="-2weeks" @if($event_type->weekly_msg_publication_time == '-2weeks') selected @endif>-2 Semaines</option>
</select> </select>
</div> </div>
<label class="mb-0 mt-4">Message par défaut</label>
<div class="form-group mt-0">
<textarea name="weekly_msg" class="form-control richeditor" name="admin_desc" id="admin_desc" rows="6" required>
{!! $event_type->weekly_msg!!}
</textarea>
</div>
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">

View File

@@ -20,7 +20,7 @@
<div class="col-12 d-none" id="descContainer{{$niveau}}-{{$periode}}"> <div class="col-12 d-none" id="descContainer{{$niveau}}-{{$periode}}">
<div class="form-group"> <div class="form-group">
<label for="exampleFormControlTextarea1">Description de la période</label> <label for="exampleFormControlTextarea1">Description de la période</label>
<textarea class="form-control" name="desc_n{{$niveau}}_p{{$periode}} no-mandatory" id="exampleFormControlTextarea1" rows="2">{{$desc}}</textarea> <textarea class="form-control" name="desc_n{{$niveau}}_p{{$periode}} no-mandatory" id="exampleFormControlTextarea1" rows="2" placeholder="Description de la période">{{$desc}}</textarea>
</div> </div>
</div> </div>
<div class="col-6 mb-1" id="OCOMContainer{{$niveau}}-{{$periode}}"> <div class="col-6 mb-1" id="OCOMContainer{{$niveau}}-{{$periode}}">

View File

@@ -1,7 +1,7 @@
@extends('layouts.admin.main') @extends('layouts.admin.main')
@section('content') @section('content')
<form action="/admin/schedule/event/add" method="POST"> <form action="/admin/schedule/event/add" method="POST" enctype="multipart/form-data">
<div class="row"> <div class="row">
@csrf @csrf
<div class="col-9"> <div class="col-9">
@@ -69,7 +69,7 @@
<span class="input-group-text btn-file"> <span class="input-group-text btn-file">
<span class="fileinput-new cursor">Select file</span> <span class="fileinput-new cursor">Select file</span>
<span class="fileinput-exists cursor">Change</span> <span class="fileinput-exists cursor">Change</span>
<input type="file" name="file_msg" multiple> <input type="file" name="files[]" multiple>
</span> </span>
</span> </span>
</div> </div>
@@ -97,7 +97,7 @@
</div> </div>
<div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree" data-parent="#accordion"> <div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree" data-parent="#accordion">
<div class="card-body" style="overflow: scroll"> <div class="card-body" style="overflow: scroll">
<div id="scheduleEditor" class="m-3" style="width: 110vw"> <div id="editor" class="m-3" style="width: 110vw">
@loaderDot @loaderDot
</div> </div>
</div> </div>
@@ -250,13 +250,12 @@
}); });
</script> </script>
<script src="/js/calendar.js"></script> <script src="/js/calendar.js"></script>
<script src="/js/plugins/schedule/editor.js"></script> <script src="/js/plugins/schedule/editorv2.js"></script>
<script src="/js/plugins/autocomplete.js"></script> <script src="/js/plugins/autocomplete.js"></script>
<script> <script>
$(function () { $(function () {
console.log('Document READY loading schedule editor'); console.log('Document READY loading schedule editor');
loadEventType('{{$date}}'); loadEventType('{{$date}}',2);
}) })
</script> </script>
@endsection @endsection

View File

@@ -151,6 +151,26 @@
</div> </div>
</div> </div>
</li> </li>
<li class="list-group-item">
<div class="row">
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
<i class="fas fa-coffee"></i>
</div>
<div class="col m-auto text-left">
Mise à jour du calendrier
</div>
</div>
</li>
<li class="list-group-item">
<div class="row">
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">
<i class="fas fa-coffee"></i>
</div>
<div class="col m-auto text-left">
Mise à jour de la section nouvelle
</div>
</div>
</li>
<li class="list-group-item"> <li class="list-group-item">
<div class="row"> <div class="row">
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem"> <div class="text-success" style="font-size: 1.3rem;width: 1.5rem">

View File

@@ -16,3 +16,4 @@
<!-- Plugin CSS --> <!-- Plugin CSS -->
<link href='/assets/fullcalendar/core/main.css' rel='stylesheet' /> <link href='/assets/fullcalendar/core/main.css' rel='stylesheet' />
<link href='/assets/fullcalendar/daygrid/main.css' rel='stylesheet' /> <link href='/assets/fullcalendar/daygrid/main.css' rel='stylesheet' />
<link href='/assets/fullcalendar/list/main.css' rel='stylesheet' />

View File

@@ -41,7 +41,10 @@
<script src="/js/material-dashboard.js"></script> <script src="/js/material-dashboard.js"></script>
<script src="/js/material-kit.min.js"></script> <script src="/js/material-kit.min.js"></script>
<script src='/assets/fullcalendar/core/main.js'></script> <script src='/assets/fullcalendar/core/main.js'></script>
<script src='/assets/fullcalendar/core/locales/fr-ca.js'></script>
<script src='/assets/fullcalendar/daygrid/main.js'></script> <script src='/assets/fullcalendar/daygrid/main.js'></script>
<script src='/assets/fullcalendar/interaction/main.js'></script>
<script src='/assets/fullcalendar/list/main.js'></script>
<script> <script>
function toggleEdit() { function toggleEdit() {
if ($('#edit-switch').prop("checked")) { if ($('#edit-switch').prop("checked")) {
@@ -56,14 +59,28 @@
var calendarEl = document.getElementById('public_calendar'); var calendarEl = document.getElementById('public_calendar');
var calendar = new FullCalendar.Calendar(calendarEl, { var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['dayGrid'], plugins: ['dayGrid','interaction','list'],
locale: 'fr', locale: 'fr',
header: { header: {
left: 'title', left: 'title',
center: '', center: 'dayGridMonth,listWeek',
right: 'prev,next' right: 'prev,next'
}, },
events: '/api/schedule/events', events: '/api/schedule/events',
eventRender: function(event, element) {
if (event.event.extendedProps.icon && event.view.type == 'dayGridMonth')
{
let i = document.createElement('i');
i.className = event.event.extendedProps.icon+' mx-1';
event.el.querySelector('.fc-content').prepend(i);
}
else if(event.event.extendedProps.icon && event.view.type == 'listWeek')
{
let i = document.createElement('i');
i.className = event.event.extendedProps.icon+' mr-1';
event.el.querySelector('.fc-list-item-title').prepend(i);
}
},
eventClick: function (info) { eventClick: function (info) {
console.log(info.event.id) console.log(info.event.id)
$.get("/api/schedule/events/modal/" + info.event.id + "/" + info.event.extendedProps.extraParams.db_type, function (data) { $.get("/api/schedule/events/modal/" + info.event.id + "/" + info.event.extendedProps.extraParams.db_type, function (data) {

View File

@@ -5,7 +5,7 @@
<hr> <hr>
@if ($pictures->isEmpty()) @if ($pictures->isEmpty())
<h4 class="text-center mt-5 mb-5">Aucune Photo</h4> <h4 class="text-center mt-5 mb-5">Aucune Photo</h4>
@endif @else
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> <div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators"> <ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> <li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
@@ -31,3 +31,4 @@
<div class="m-5"> <div class="m-5">
<a href="/pictures" class="btn btn-primary btn-block p-2">Voir toutes les photos</a> <a href="/pictures" class="btn btn-primary btn-block p-2">Voir toutes les photos</a>
</div> </div>
@endif

View File

@@ -16,11 +16,6 @@
@else @else
<span class="badge badge-pill badge-info">Optionnel</span> <span class="badge badge-pill badge-info">Optionnel</span>
@endif @endif
@if (is_int($event->type))
<span class="badge badge-pill badge-default">{{$event->type}}</span>
@else
<span class="badge badge-pill" style="background-color: {{\App\ComplementaryActivity::find($event->type)->calendar_color}}">{{\App\ComplementaryActivity::find($event->type)->name}}</span>
@endif
</div> </div>
</div> </div>
<div class="row mt-4"> <div class="row mt-4">

View File

@@ -1,15 +1,9 @@
@extends('layouts.public.main') @extends('layouts.public.main')
@section('content') @section('content')
<div class="page-header header-filter clear-filter" data-parallax="true" style="background-image: url({{'"'.\App\Config::getData('public_index_img_url').'"'}});"> <div class="row" style="height: 45vh; width: 100vw">
<div class="container"> <div class="col-12 text-center m-auto">
<div class="row"> <h2 class="news-title text-white">{{ $new->title }}</h2>
<div class="col-md-8 ml-auto mr-auto">
<div class="brand">
<h2 class="news-title">{{ $new->title }}</h2>
</div>
</div>
</div>
</div> </div>
</div> </div>
<div class="main main-raised"> <div class="main main-raised">
@@ -23,7 +17,9 @@
class="col-12" class="col-12"
@else @else
class="col-4" class="col-4"
@endif><span class="image fit"><a href="/picture/{{$picture->id}}"><img src="{{ $picture->url }}" alt="{{ $picture->title }}"></a></span></div> @endif>
<span class="image fit"><a href="/picture/{{$picture->id}}"><img src="{{ $picture->url }}" alt="{{ $picture->title }}"></a></span>
</div>
@endforeach @endforeach
</div> </div>
<p> <p>
@@ -41,9 +37,14 @@
@endforeach @endforeach
@endif @endif
</div> </div>
<div class="col-12 mt-3">
@foreach($new->files as $file)
<a href="{{\App\GoogleDriveFile::getDownloadURL('.Systeme/.Fichier/.MessageDeLaSemaine',$file)}}" class="btn btn-outline-primary btn-round"><div class="d-inline-flex" style="max-width: 10rem;overflow: hidden">{{$file}}</div><i class="fas fa-cloud-download-alt ml-2"></i></a>
@endforeach
</div> </div>
</div> </div>
<a href="{{ url()->previous() }}" class="btn button primary">Retour</a> </div>
<a href="/" class="btn button primary">Retour</a>
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -36,6 +36,7 @@ Route::middleware('auth:api')->group(function () {
/** Event Type */ /** Event Type */
Route::get('/eventType/{id}','EventTypeController@toJson'); Route::get('/eventType/{id}','EventTypeController@toJson');
Route::delete('/eventType/{id}','EventTypeController@destroy');
/** Message Route */ /** Message Route */
Route::post('/message/delete', 'MessageController@destroy')->middleware('perm:msg_delete'); Route::post('/message/delete', 'MessageController@destroy')->middleware('perm:msg_delete');

View File

@@ -70,6 +70,8 @@ Route::middleware(['auth'])->name('admin.')->group(function () {
/** Config */ /** Config */
Route::get('/admin/config/instruction', 'ScheduleController@index')->middleware('perm:config_edit')->name('config.schedule'); Route::get('/admin/config/instruction', 'ScheduleController@index')->middleware('perm:config_edit')->name('config.schedule');
Route::get('/admin/config/instruction/event_type/create', 'EventTypeController@create')->middleware('perm:config_edit')->name('config.schedule.event_type.create');
Route::post('/admin/config/instruction/event_type/create', 'EventTypeController@store')->middleware('perm:config_edit');
Route::get('/admin/config/instruction/event_type/{id}', 'EventTypeController@show')->middleware('perm:config_edit')->name('config.schedule.event_type'); Route::get('/admin/config/instruction/event_type/{id}', 'EventTypeController@show')->middleware('perm:config_edit')->name('config.schedule.event_type');
Route::patch('/admin/config/instruction/event_type/{id}', 'EventTypeController@update')->middleware('perm:config_edit'); Route::patch('/admin/config/instruction/event_type/{id}', 'EventTypeController@update')->middleware('perm:config_edit');
Route::patch('/admin/config/instruction' , 'ScheduleController@update')->middleware('perm:config_edit'); Route::patch('/admin/config/instruction' , 'ScheduleController@update')->middleware('perm:config_edit');