Merge branch '3.2.5' into 'dev'

3.2.5

See merge request TheGamecraft/c-cms!99
This commit is contained in:
Mathieu Lagace
2020-06-21 16:43:03 +00:00
71 changed files with 9591 additions and 2416 deletions

View File

@@ -4,15 +4,25 @@ services:
- mysql:5.7
variables:
MYSQL_DATABASE: homestead
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: ddb
MYSQL_ROOT_PASSWORD: password
DB_HOST: mysql
DB_USERNAME: root
stages:
- build
- test
- deploy
- deploy
unit_test:
stage: test
script:
- cp .env.example .env
- composer install
- php artisan key:generate
- php artisan migrate
- php artisan db:seed
- vendor/bin/phpunit
build:
stage: build

1325
.phpstorm.meta.php Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
C:30:"PHPUnit\Runner\TestResultCache":187:{a:2:{s:7:"defects";a:1:{s:32:"Tests\Browser\UserTest::testUser";i:3;}s:5:"times";a:2:{s:34:"Tests\Browser\LoginTest::testLogin";d:5.605;s:32:"Tests\Browser\UserTest::testUser";d:14.139;}}}
C:37:"PHPUnit\Runner\DefaultTestResultCache":273:{a:2:{s:7:"defects";a:2:{s:32:"Tests\Feature\AdminTest::testUrl";i:3;s:30:"Tests\Feature\ECCTest::testUrl";i:3;}s:5:"times";a:3:{s:32:"Tests\Feature\AdminTest::testUrl";d:0.099;s:30:"Tests\Feature\ECCTest::testUrl";d:0.014;s:33:"Tests\Feature\PublicTest::testUrl";d:0.031;}}}

View File

@@ -1,5 +1,5 @@
# Set the base image for subsequent instructions
FROM php:7.3
FROM php:7.4
# Update packages
RUN apt-get update

View File

@@ -41,6 +41,7 @@
clone_repository_dev
run_composer_dev
update_symlinks_dev
remove_old_release_dev
@endstory
@story('deploy_227')
@@ -160,6 +161,11 @@
@endtask
@task('remove_old_release_dev')
cd {{ $releases_dir_dev@ }}
rm -fr $(ls -t1 | tail -n +3)
@endtask
@task('clone_repository_227')
echo 'Cloning repository'
[ -d {{ $releases_dir_227 }} ] || mkdir {{ $releases_dir_227 }}

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,37 @@ namespace App;
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
{
public function bookable()

View File

@@ -4,6 +4,46 @@ namespace App;
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
{
public function pictures()

View File

@@ -4,6 +4,28 @@ namespace App;
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
{
protected $casts = [

View File

@@ -4,6 +4,47 @@ namespace App;
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
{
public function bookings()

View File

@@ -4,11 +4,63 @@ namespace App;
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
{
protected $casts = [
'schedule' => 'array',
'msg' => 'array'
'msg' => 'array',
'weekly_msg_file' => 'array'
];
public function bookings()

View File

@@ -4,9 +4,78 @@ namespace App;
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
{
protected $casts = [
'schedule_model' => 'array',
];
public function getScheduleModelData($level,$periode)
{
if (isset($this->schedule_model['default_value']))
{
dd($this->schedule_model ['default_value']);
return $this->schedule_model['default_value'][$periode-1][$level-1];
}
else
{
return [
'ocom' => 'M103.03',
'name' => 'Super cours',
'location' => 'Bic',
'instructor' => 'Math',
'desc' => ''
];
}
}
public function nbLevel()
{
return count($this->schedule_model['niveaux']);
}
public function nbPeriode()
{
return count($this->schedule_model['periodes']);
}
}

View File

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

View File

@@ -7,6 +7,32 @@ use Illuminate\Support\Facades\Storage;
use League\Flysystem\FileNotFoundException;
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
{
protected $primaryKey = 'id'; // or null
@@ -337,6 +363,9 @@ class GoogleDriveFile extends Model
$user = \Auth::user();
$sidebarArray = [];
$dirList = \App\GoogleDriveFile::all();
$temp = $dirList->where('path','=','.Privé/.Cadet')->first();
if ($temp != null)
{
if ($dirList->where('path','=','.Privé/.Cadet')->first()->canAuthUser())
{
$sidebarArray['Cadet'] = [
@@ -346,6 +375,11 @@ class GoogleDriveFile extends Model
'child' => null
];
}
}
$temp = $dirList->where('path','=','.Privé/.Staff')->first();
if ($temp != null)
{
if ($dirList->where('path','=','.Privé/.Staff')->first()->canAuthUser())
{
$sidebarArray['Staff'] = [
@@ -355,6 +389,11 @@ class GoogleDriveFile extends Model
'child' => null
];
}
}
$temp = $dirList->where('path','=','.Privé/.ETAMAS')->first();
if ($temp != null)
{
if ($dirList->where('path','=','.Privé/.ETAMAS')->first()->canAuthUser())
{
$sidebarArray['ETAMAS'] = [
@@ -364,6 +403,11 @@ class GoogleDriveFile extends Model
'child' => null
];
}
}
$temp = $dirList->where('path','=','.Privé/.Officier')->first();
if ($temp != null)
{
if ($dirList->where('path','=','.Privé/.Officier')->first()->canAuthUser())
{
$sidebarArray['Officier'] = [
@@ -373,6 +417,7 @@ class GoogleDriveFile extends Model
'child' => null
];
}
}
$sidebarArray['Publique'] = [
'route' => 'admin.files.publique',
'icon' => 'fas fa-folder-open',
@@ -390,4 +435,10 @@ class GoogleDriveFile extends Model
}
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;
use App\Event;
use App\GoogleDriveFile;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
@@ -38,7 +39,25 @@ class EventController extends Controller
{
$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->date_begin = request('begin_time');
@@ -58,7 +77,7 @@ class EventController extends Controller
if(\request("use_weekly_msg"))
{
$event->use_weekly_msg = 1;
$event->msg = request('msg');
$event->msg = request('admin_desc');
}
else
{
@@ -132,15 +151,23 @@ class EventController extends Controller
{
$course->name = request('name_n'.$l.'_p'.$p);
$course->ocom = request('ocom_n'.$l.'_p'.$p);
$course->comment = "";
$course->desc = "";
}
else
{
$course->name = "";
$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();
$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->periode = $p;
$course->level = $l;
$course->comment_officer = "";
$course->comment = "";
$course->event_id = $event->id;

View File

@@ -24,7 +24,7 @@ class EventTypeController extends Controller
*/
public function create()
{
//
return view('admin.event_type.create');
}
/**
@@ -35,7 +35,83 @@ class EventTypeController extends Controller
*/
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');
}
/**
@@ -68,9 +144,86 @@ class EventTypeController extends Controller
* @param \App\EventType $eventType
* @return \Illuminate\Http\Response
*/
public function update(Request $request, EventType $eventType)
public function update(Request $request, $id)
{
//
$eventType = EventType::findOrFail($id);
$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()->back()->with('success','Modification sauvegardé avec succès');
}
/**
@@ -79,8 +232,14 @@ class EventTypeController extends Controller
* @param \App\EventType $eventType
* @return \Illuminate\Http\Response
*/
public function destroy(EventType $eventType)
public function destroy($id)
{
//
$e = EventType::findOrFail($id);
$e->delete();
}
public function toJson($id)
{
return EventType::findOrFail($id)->toArray();
}
}

View File

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

View File

@@ -11,9 +11,24 @@ class ScheduleEditorController extends Controller
return view('admin.schedule.editor.course');
}
public function getCourseEmpty(int $niveau,int $periode)
public function getCourseEmpty(int $niveau,int $periode,$event_type = 1)
{
return view('admin.schedule.editor.course',['periode' => $periode, 'niveau' => $niveau]);
$eventType = \App\EventType::findOrFail($event_type);
$data = $eventType->getScheduleModelData($niveau,$periode);
$ocom = $data['ocom'];
$name = $data['name'];
$location = $data['location'];
$instructor = $data['instructor'];
$desc = $data['desc'];
return view('admin.schedule.editor.course',[
'periode' => $periode,
'niveau' => $niveau,
'ocom' => $ocom,
'name' => $name,
'location' => $location,
'instructor' => $instructor,
'desc' => $desc]);
}
public function getTemplate(int $id)

View File

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

View File

@@ -6,6 +6,34 @@ use Illuminate\Database\Eloquent\Model;
use mysql_xdevapi\Collection;
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
{
public static function explodeItems($items)

View File

@@ -4,6 +4,32 @@ namespace App;
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
{
public function items()

View File

@@ -4,6 +4,26 @@ namespace App;
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
{
public function permissions()

View File

@@ -4,6 +4,33 @@ namespace App;
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
{
public function course()

View File

@@ -4,6 +4,24 @@ namespace App;
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
{
//

View File

@@ -4,6 +4,34 @@ namespace App;
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
{
public function user()

View File

@@ -4,6 +4,34 @@ namespace App;
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
{
protected $casts = [

View File

@@ -4,6 +4,35 @@ namespace App;
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
{
protected $casts = [
@@ -30,16 +59,13 @@ class News extends Model
$news = \App\News::all();
foreach (\App\Event::future() as $event)
foreach (\App\Event::all() as $event)
{
if($event->type == 1 && $event->msg != "")
{
if (date('U',strtotime($event->date_msg)) <= time())
if($event->use_weekly_msg == 1)
{
$news->push(self::getWeeklyMsg($event));
}
}
}
return $news;
}
@@ -50,13 +76,16 @@ class News extends Model
$n->event_id = $event->id;
$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->publish = 1;
$n->created_at = $event->created_at;
$n->updated_at = $event->updated_at;
$n->tags = ['message de la semaine','Important'];
if ($event->weekly_msg_file != null)
{
$n->files = $event->weekly_msg_file;
}
return $n;
}
}

View File

@@ -4,6 +4,34 @@ namespace App;
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
{
public function courses()

View File

@@ -5,6 +5,14 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
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
{
const PERMISSIONS = [
@@ -188,6 +196,15 @@ class Permission extends Model
'valeur' => 0
],
],
'Administration' => [
'cadet_list_see' => [
'ckey' => 'cadet_list_see',
'communName' => 'Voir la liste nominative',
'desc' => 'L\'utilisateur peut-il voir la liste nominative',
'icon' => 'fa-eye',
'valeur' => 0
],
],
'Horaire' => [
'schedule_see' => [
'ckey' => 'schedule_see',

View File

@@ -4,6 +4,33 @@ namespace App;
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
{
public function pictureable()

View File

@@ -4,6 +4,28 @@ namespace App;
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
{
public function permissions()

View File

@@ -5,6 +5,38 @@ namespace App;
use Illuminate\Database\Eloquent\Model;
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
{
protected $casts = [

View File

@@ -4,6 +4,27 @@ namespace App;
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
{
public function scopeIncomplete($query)

View File

@@ -5,6 +5,62 @@ namespace App;
use Illuminate\Notifications\Notifiable;
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
{
use Notifiable;

View File

@@ -7,14 +7,16 @@
"require": {
"php": "^7.2",
"barryvdh/laravel-dompdf": "^0.8.4",
"barryvdh/laravel-ide-helper": "v2.6.6",
"davejamesmiller/laravel-breadcrumbs": "5.3.1",
"barryvdh/laravel-ide-helper": "2.7.0",
"davejamesmiller/laravel-breadcrumbs": "5.3.2",
"facade/ignition": "^2.0",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^6.0",
"laravel/framework": "^7.0",
"laravel/helpers": "^1.1",
"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",
"nexmo/client": "^2.0"
},
@@ -23,8 +25,8 @@
"fzaninotto/faker": "^1.4",
"laravel/dusk": "^5.6",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5",
"staudenmeir/dusk-updater": "^1.1"
},
"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->text('desc');
$table->text('msg');
$table->string('weekly_msg_file');
$table->text('schedule');
$table->string('calendar_color');
$table->string('calendar_icon');

View File

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

View File

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

View File

@@ -33,6 +33,6 @@ class CreateGoogleDriveFileTable extends Migration
*/
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',
'is_mandatory' => '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',
'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"}]}',
@@ -37,12 +36,11 @@ class EventTypeSeeder extends Seeder
'Location' => 'Escadron',
'is_mandatory' => '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',
'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"}]}',
'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": {
"version": "6.12.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
"integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
"version": "6.12.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
"integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
"requires": {
"fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
@@ -369,9 +369,9 @@
"dev": true
},
"aws4": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz",
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==",
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz",
"integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==",
"dev": true
},
"axios": {
@@ -1306,9 +1306,9 @@
}
},
"bootstrap": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.4.1.tgz",
"integrity": "sha512-tbx5cHubwE6e2ZG7nqM3g/FZ5PQEDMWmMGNrCUBVRPHXTJaH7CBDdsLeu3eCh3B1tzAxTnAbtmrzvWEvT2NNEA==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
"integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==",
"dev": true
},
"brace-expansion": {
@@ -2792,6 +2792,12 @@
"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": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
@@ -3043,9 +3049,9 @@
}
},
"eventemitter3": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz",
"integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==",
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.4.tgz",
"integrity": "sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ==",
"dev": true
},
"events": {
@@ -3334,9 +3340,9 @@
"dev": true
},
"fast-deep-equal": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
"integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-json-stable-stringify": {
"version": "2.0.0",
@@ -3460,13 +3466,10 @@
}
},
"follow-redirects": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.10.0.tgz",
"integrity": "sha512-4eyLK6s6lH32nOvLLwlIOnr9zrL8Sm+OvW4pVTJNoXeGzYIkHVf+pADQi+OJ0E67hiuSLezPVPyBcIZO50TmmQ==",
"dev": true,
"requires": {
"debug": "^3.0.0"
}
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.12.0.tgz",
"integrity": "sha512-JgawlbfBQKjbKegPn8vUsvJqplE7KHJuhGO4yPcb+ZOIYKSr+xobMVlfRBToZwZUUxy7lFiKBdFNloz9ui368Q==",
"dev": true
},
"for-in": {
"version": "1.0.2",
@@ -4326,13 +4329,13 @@
}
},
"globule": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.1.tgz",
"integrity": "sha512-OVyWOHgw29yosRHCHo7NncwR1hW5ew0W/UrvtwvjefVJeQ26q4/8r8FmPsSF1hJ93IgWkyv16pCTz6WblMzm/g==",
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/globule/-/globule-1.3.2.tgz",
"integrity": "sha512-7IDTQTIu2xzXkT+6mlluidnWo+BypnbSoEVVQCGfzqnl5Ik8d3e1d4wycb8Rj9tWW+Z39uPWsdlquqiqPCd/pA==",
"dev": true,
"requires": {
"glob": "~7.1.1",
"lodash": "~4.17.12",
"lodash": "~4.17.10",
"minimatch": "~3.0.2"
}
},
@@ -4603,9 +4606,9 @@
"dev": true
},
"http-proxy": {
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz",
"integrity": "sha512-84I2iJM/n1d4Hdgc6y2+qY5mDaz2PUVjlg9znE9byl+q0uC3DeByqBGReQu5tpLK0TAqTIXScRUV+dg7+bUPpQ==",
"version": "1.18.1",
"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
"dev": true,
"requires": {
"eventemitter3": "^4.0.0",
@@ -4732,9 +4735,9 @@
"dev": true
},
"in-publish": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.0.tgz",
"integrity": "sha1-4g/146KvwmkDILbcVSaCqcf631E=",
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz",
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==",
"dev": true
},
"indent-string": {
@@ -5100,9 +5103,9 @@
"dev": true
},
"jquery": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz",
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==",
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==",
"dev": true
},
"js-base64": {
@@ -5700,9 +5703,9 @@
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
"mississippi": {
@@ -5763,12 +5766,12 @@
}
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
"minimist": "0.0.8"
"minimist": "^1.2.5"
}
},
"move-concurrently": {
@@ -5967,9 +5970,9 @@
}
},
"node-sass": {
"version": "4.13.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz",
"integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==",
"version": "4.14.1",
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz",
"integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==",
"dev": true,
"requires": {
"async-foreach": "^0.1.3",
@@ -5986,7 +5989,7 @@
"node-gyp": "^3.8.0",
"npmlog": "^4.0.0",
"request": "^2.88.0",
"sass-graph": "^2.2.4",
"sass-graph": "2.2.5",
"stdout-stream": "^1.4.0",
"true-case-path": "^1.0.2"
},
@@ -6471,6 +6474,13 @@
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
"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": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
@@ -6508,9 +6518,9 @@
"dev": true
},
"portfinder": {
"version": "1.0.25",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz",
"integrity": "sha512-6ElJnHBbxVA1XSLgBp7G1FiCkQdlqGzuF7DswL5tcea+E8UpuvPU7beVAjjRwCioTS9ZluNbu+ZyRvgTsmqEBg==",
"version": "1.0.26",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.26.tgz",
"integrity": "sha512-Xi7mKxJHHMI3rIUrnm/jjUgwhbYMkp/XKEcZX3aG4BrumLpq3nmoQMX+ClYnDZnZ/New7IatC1no5RX0zo1vXQ==",
"dev": true,
"requires": {
"async": "^2.6.2",
@@ -8593,9 +8603,9 @@
"dev": true
},
"psl": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz",
"integrity": "sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==",
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==",
"dev": true
},
"public-encrypt": {
@@ -8636,8 +8646,7 @@
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"q": {
"version": "1.5.1",
@@ -9183,62 +9192,148 @@
"dev": true
},
"sass-graph": {
"version": "2.2.4",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.4.tgz",
"integrity": "sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=",
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
"integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==",
"dev": true,
"requires": {
"glob": "^7.0.0",
"lodash": "^4.0.0",
"scss-tokenizer": "^0.2.3",
"yargs": "^7.0.0"
"yargs": "^13.3.2"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
"ansi-regex": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true,
"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": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"yargs": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz",
"integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=",
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
"dev": true,
"requires": {
"camelcase": "^3.0.0",
"cliui": "^3.2.0",
"decamelize": "^1.1.1",
"get-caller-file": "^1.0.1",
"os-locale": "^1.4.0",
"read-pkg-up": "^1.0.1",
"ansi-regex": "^4.1.0"
}
},
"which-module": {
"version": "2.0.0",
"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-main-filename": "^1.0.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^1.0.2",
"which-module": "^1.0.0",
"y18n": "^3.2.1",
"yargs-parser": "^5.0.0"
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^13.1.2"
}
}
}
@@ -10578,13 +10673,6 @@
"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
"requires": {
"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": {
@@ -10796,14 +10884,136 @@
"dev": true
},
"watchpack": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz",
"integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==",
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz",
"integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==",
"dev": true,
"requires": {
"chokidar": "^2.0.2",
"chokidar": "^3.4.0",
"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": {
@@ -11255,18 +11465,19 @@
}
},
"yargs-parser": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
"integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=",
"version": "13.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
"requires": {
"camelcase": "^3.0.0"
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"dependencies": {
"camelcase": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"dev": true
}
}

View File

@@ -11,16 +11,16 @@
},
"devDependencies": {
"axios": "^0.18.1",
"bootstrap": "^4.4.1",
"bootstrap": "^4.5.0",
"cross-env": "^5.2.1",
"jquery": "^3.4.1",
"jquery": "^3.5.1",
"laravel-mix": "^2.1.14",
"lodash": "^4.17.15",
"popper.js": "^1.16.1",
"vue": "^2.6.11"
},
"dependencies": {
"ajv": "^6.12.0",
"ajv": "^6.12.2",
"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);/*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Bootstrap v4.5.0 (https://getbootstrap.com/)
* Copyright 2011-2020 The Bootstrap Authors
* Copyright 2011-2020 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@@ -201,6 +201,7 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@@ -268,6 +269,10 @@ select {
text-transform: none;
}
[role="button"] {
cursor: pointer;
}
select {
word-wrap: normal;
}
@@ -301,13 +306,6 @@ input[type="checkbox"] {
padding: 0;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
-webkit-appearance: listbox;
}
textarea {
overflow: auto;
resize: vertical;
@@ -755,6 +753,7 @@ pre code {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -1033,6 +1032,7 @@ pre code {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -1316,6 +1316,7 @@ pre code {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -1599,6 +1600,7 @@ pre code {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -1882,6 +1884,7 @@ pre code {
-webkit-box-flex: 1;
-ms-flex-positive: 1;
flex-grow: 1;
min-width: 0;
max-width: 100%;
}
@@ -2576,6 +2579,15 @@ pre code {
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 {
color: #495057;
background-color: #fff;
@@ -3059,7 +3071,6 @@ textarea.form-control.is-invalid {
color: #212529;
text-align: center;
vertical-align: middle;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
@@ -3100,6 +3111,10 @@ textarea.form-control.is-invalid {
opacity: 0.65;
}
.btn:not(:disabled):not(.disabled) {
cursor: pointer;
}
a.btn.disabled,
fieldset:disabled a.btn {
pointer-events: none;
@@ -3767,8 +3782,6 @@ fieldset:disabled a.btn {
.btn-link:focus,
.btn-link.focus {
text-decoration: underline;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link:disabled,
@@ -4259,8 +4272,9 @@ input[type="button"].btn-block {
.input-group > .custom-file {
position: relative;
-webkit-box-flex: 1;
-ms-flex: 1 1 0%;
flex: 1 1 0%;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
width: 1%;
min-width: 0;
margin-bottom: 0;
}
@@ -5483,7 +5497,7 @@ input[type="button"].btn-block {
}
.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 {
@@ -5534,7 +5548,7 @@ input[type="button"].btn-block {
}
.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 {
@@ -5572,14 +5586,21 @@ input[type="button"].btn-block {
margin-left: 0;
}
.card > .list-group:first-child .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
.card > .list-group {
border-top: inherit;
border-bottom: inherit;
}
.card > .list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
.card > .list-group:first-child {
border-top-width: 0;
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 {
@@ -5817,6 +5838,12 @@ input[type="button"].btn-block {
border-radius: 0.25rem;
}
.breadcrumb-item {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.breadcrumb-item + .breadcrumb-item {
padding-left: 0.5rem;
}
@@ -6305,6 +6332,7 @@ a.badge-dark.focus {
display: flex;
height: 1rem;
overflow: hidden;
line-height: 0;
font-size: 0.675rem;
background-color: #e9ecef;
border-radius: 0.25rem;
@@ -6379,6 +6407,7 @@ a.badge-dark.focus {
flex-direction: column;
padding-left: 0;
margin-bottom: 0;
border-radius: 0.25rem;
}
.list-group-item-action {
@@ -6409,13 +6438,13 @@ a.badge-dark.focus {
}
.list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
border-top-left-radius: inherit;
border-top-right-radius: inherit;
}
.list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
border-bottom-right-radius: inherit;
border-bottom-left-radius: inherit;
}
.list-group-item.disabled,
@@ -6448,26 +6477,26 @@ a.badge-dark.focus {
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-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-bottom-left-radius: 0;
}
.list-group-horizontal .list-group-item.active {
.list-group-horizontal > .list-group-item.active {
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-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;
border-left-width: 1px;
}
@@ -6480,26 +6509,26 @@ a.badge-dark.focus {
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-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-bottom-left-radius: 0;
}
.list-group-horizontal-sm .list-group-item.active {
.list-group-horizontal-sm > .list-group-item.active {
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-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;
border-left-width: 1px;
}
@@ -6513,26 +6542,26 @@ a.badge-dark.focus {
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-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-bottom-left-radius: 0;
}
.list-group-horizontal-md .list-group-item.active {
.list-group-horizontal-md > .list-group-item.active {
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-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;
border-left-width: 1px;
}
@@ -6546,26 +6575,26 @@ a.badge-dark.focus {
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-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-bottom-left-radius: 0;
}
.list-group-horizontal-lg .list-group-item.active {
.list-group-horizontal-lg > .list-group-item.active {
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-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;
border-left-width: 1px;
}
@@ -6579,42 +6608,40 @@ a.badge-dark.focus {
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-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-bottom-left-radius: 0;
}
.list-group-horizontal-xl .list-group-item.active {
.list-group-horizontal-xl > .list-group-item.active {
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-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;
border-left-width: 1px;
}
}
.list-group-flush .list-group-item {
border-right-width: 0;
border-left-width: 0;
.list-group-flush {
border-radius: 0;
}
.list-group-flush .list-group-item:first-child {
border-top-width: 0;
.list-group-flush > .list-group-item {
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;
}
@@ -6778,9 +6805,6 @@ button.close {
padding: 0;
background-color: transparent;
border: 0;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
a.close.disabled {
@@ -6926,6 +6950,9 @@ a.close.disabled {
.modal-dialog-centered::before {
display: block;
height: calc(100vh - 1rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
content: "";
}
@@ -7068,6 +7095,9 @@ a.close.disabled {
.modal-dialog-centered::before {
height: calc(100vh - 3.5rem);
height: -webkit-min-content;
height: -moz-min-content;
height: min-content;
}
.modal-sm {
@@ -7648,6 +7678,8 @@ a.close.disabled {
50% {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@@ -7659,6 +7691,8 @@ a.close.disabled {
50% {
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 !important;
}
@@ -9404,18 +9459,6 @@ button.bg-dark:focus {
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 {
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 {
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}
@@ -11815,8 +11870,7 @@ a.text-dark:focus {
}
.text-break {
word-break: break-word !important;
overflow-wrap: break-word !important;
word-wrap: break-word !important;
}
.text-reset {

16
public/css/custom.css vendored
View File

@@ -169,7 +169,7 @@
}
.news-tags {
height: 1.5rem;
height: 2.8rem;
}
.news-body-small {
@@ -1175,14 +1175,18 @@ a.fc-more:hover {
.fc-toolbar {
text-align: center;
margin-bottom: 1em;
flex-wrap: wrap;
}
.fc-toolbar .fc-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 {
@@ -1841,3 +1845,7 @@ h2 {
tfoot > tr {
width: 100%;
}
.iconpicker-popover {
z-index: 15 !important;
}

View File

@@ -3,7 +3,7 @@ var nbOfPeriode;
var nbOfLevel;
var emptyPeriode;
function initScheduleEditor(id, eventType)
function initScheduleEditor(id, eventType,mode = 'normal')
{
$.ajax({
type: 'GET',
@@ -12,7 +12,7 @@ function initScheduleEditor(id, eventType)
$("#"+id).html(template);
for (let pniveau = 1; pniveau <= nbOfLevel; pniveau++) {
for (let pperiode = 1; pperiode <= nbOfPeriode; pperiode++) {
loadCourse(pniveau,pperiode);
loadCourse(pniveau,pperiode,eventType,mode);
}
}
initAutoComplete("AutoCompleteUser");
@@ -21,7 +21,7 @@ function initScheduleEditor(id, eventType)
error: function () {
showNotification('error','Impossible d\'initialiser l\'éditeur d\'horaire ...','top', 'center')
}
})
});
$('.datetimepicker').datetimepicker({
icons: {
time: "fa fa-clock-o",
@@ -56,7 +56,6 @@ function initScheduleEditor(id, eventType)
]
});
$('select').selectpicker();
}
function switchUseWeeklyMsg()
@@ -85,13 +84,17 @@ function switchUseSchedule()
}
}
function loadCourse(periode,niveau)
function loadCourse(periode,niveau,id = 1,mode = 'normal')
{
$.ajax({
type: 'GET',
url: '/api/schedule/editor/course/'+niveau+'/'+periode+'?api_token='+api_token,
url: '/api/schedule/editor/course/'+niveau+'/'+periode+'/'+id+'?api_token='+api_token,
success: function (course) {
$("#container-"+niveau+"-"+periode).html(course);
if (mode == 'editor')
{
$('.no-mandatory').removeAttr('required')
}
},
error: function () {
showNotification('error','Impossible de charger les cours ...','top', 'center')
@@ -120,6 +123,21 @@ function addPeriode()
})
}
function removePeriode()
{
$('#row-'+nbOfPeriode).remove();
nbOfPeriode--;
}
function removeLevel()
{
$('#levelHeader-'+nbOfLevel).remove();
for (let i = 0; i < nbOfPeriode+1; i++) {
$('#container-'+nbOfLevel+'-'+i).remove();
}
nbOfLevel--;
}
function addLevel()
{
var levelToAdd = nbOfLevel+1;
@@ -159,7 +177,7 @@ function loadEventType(date)
editorTemplate = result;
nbOfLevel = editorTemplate.schedule_model.niveaux.length;
nbOfPeriode = editorTemplate.schedule_model.periodes.length;
initScheduleEditor("scheduleEditor",id)
initScheduleEditor("scheduleEditor",id);
$.each(result, function (i, val) {
if(i == "is_mandatory" || i == "use_schedule" || i == "use_weekly_msg")
{

593
public/js/plugins/schedule/editorv2.js vendored Normal file
View File

@@ -0,0 +1,593 @@
var nbOfLevel = 0;
var nbOfPeriode = 0;
var eventType;
var editorMode = 'schedule';
function initEditor(event_id = 1, mode = 'schedule')
{
let isLoad = $.Deferred();
let editor = $('#editor');
editorMode = mode;
eventType = null;
let eventTypePromise = $.ajax({
type: 'GET',
url: '/api/eventType/'+event_id+'?api_token='+api_token,
success: function (template) {
eventType = template;
},
error: function () {
showNotification('error','Impossible d\'initialiser l\'éditeur d\'horaire ...','top', 'center')
}
});
$.when(eventTypePromise).done(function () {
console.log(eventType);
nbOfLevel = eventType['schedule_model']['niveaux'].length;
nbOfPeriode = eventType['schedule_model']['periodes'].length;
updateWidth();
editor.html(getTemplate(eventType['schedule_model']));
$('.richeditor').trumbowyg({
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'];
if (scheduleModel['default_value'])
{
$.each(scheduleModel['niveaux'], function (level_id, level) {
$.each(scheduleModel['periodes'], function (periode_id, value) {
if (scheduleModel['default_value'][level_id,periode_id])
{
updateLevel(periode_id,level_id,scheduleModel['default_value'][periode_id][level_id]);
}
});
});
}
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");
initAutoCompleteOCOM('AutoCompleteOCOM');
isLoad.resolve();
});
return isLoad.promise();
}
function updateWidth()
{
$('#editor').css('width',(23*(nbOfLevel+1))+'rem');
}
function getTemplate(scheduleModel)
{
let headerHTML = '';
$.each(scheduleModel['niveaux'], function (index, value) {
headerHTML = headerHTML+getHeader(index,value['name']);
});
let periodesHTML = '';
$.each(scheduleModel['periodes'], function (index, value) {
periodesHTML = periodesHTML+getPeriode(index,value,scheduleModel['niveaux']);
});
return '<div class="row">\n' +
' <div class="editor-header col p-3 border-right border-bottom bg-dark text-white">\n' +
' <b>\n' +
' Niveau/Periode\n' +
' </b>\n' +
' </div>\n' +
headerHTML +
' <div class="col-1">\n' +
' <a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="addLevel()">\n' +
' <i class="material-icons">add</i>\n' +
' </a>\n' +
' <a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="removeLevel()">\n' +
' <i class="material-icons">remove</i>\n' +
' </a>\n' +
' </div>\n' +
'</div>\n'+
periodesHTML +
'<div class="row">\n' +
' <div class="col p-2">\n' +
' <a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="addPeriode()">\n' +
' <i class="material-icons">add</i>\n' +
' </a>\n' +
' <a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="removePeriode()">\n' +
' <i class="material-icons">remove</i>\n' +
' </a>\n' +
' </div>\n' +
'</div>\n';
}
function getHeader(level_id,level_name)
{
return '<div id="levelHeader-'+level_id+'" class="col border-right border-bottom bg-dark text-white">\n' +
' <div class="row">\n' +
' <div class="col-9">\n' +
' <div class="form-group label-floating">\n' +
' <input type="text" placeholder="Niveau" name="level_name_'+(level_id+1)+'" class="form-control text-white" value="'+level_name+'" />\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">clear</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-3 text-right">\n' +
' <a type="button" class="btn btn-link btn-sm dropdown-toggle dropdown-toggle-split text-white" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
' </a>\n' +
' <div class="dropdown-menu">\n' +
' <a id="modeSwitchPeriodeC'+level_id+'" class="btn-secondary dropdown-item m-1" onclick="selectCourseModeNiveau(\'course\','+level_id+')">Mode "Cours" pour toutes les périodes</a>\n' +
' <a id="modeSwitchPeriodeO'+level_id+'" class="btn-secondary dropdown-item m-1" onclick="selectCourseModeNiveau(\'other\','+level_id+')">Mode "Autre" pour toutes les période</a>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
}
function getPeriode(id,periode,niveaux) {
let temp = '';
$.each(niveaux, function (index, value) {
temp = temp+getCourse(index,id);
});
return '<div class="row" id="row-'+id+'">\n' +
' <div class="col d-inline border-right border-bottom bg-light">\n' +
' <div class="row">\n' +
' <div class="col-9">\n' +
' <div class="form-group label-floating">\n' +
' <input type="text" placeholder="Période" name="periode_name_'+(id+1)+'" class="form-control" value="'+periode['name']+'" />\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">clear</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-3 text-right">\n' +
' <a type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
' </a>\n' +
' <div class="dropdown-menu">\n' +
' <a id="modeSwitchPeriodeC'+id+'" class="btn-secondary dropdown-item m-1" onclick="selectCourseModePeriode(\'course\','+id+')">Mode "Cours" pour toute la période</a>\n' +
' <a id="modeSwitchPeriodeO'+id+'" class="btn-secondary dropdown-item m-1" onclick="selectCourseModePeriode(\'other\','+id+')">Mode "Autre" pour toute la période</a>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
' <div class="row">\n' +
' <div class="col-6">\n' +
' <div class="form-group label-floating">\n' +
' <input type="time" class="form-control" name="periode_begin_time_'+(id+1)+'" value="'+periode['begin_time']+'" />\n' +
' <span class="form-control-feedback"><i class="material-icons">clear</i></span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-6">\n' +
' <div class="form-group label-floating">\n' +
' <input type="time" class="form-control" name="periode_end_time_'+(id+1)+'" value="'+periode['end_time']+'" />\n' +
' <span class="form-control-feedback"><i class="material-icons">clear</i></span>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
temp +
' <div class="col-1">\n' +
'\n' +
' </div>\n' +
'</div>'
}
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++;
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' +
'<input class="d-none" type="checkbox" id="use_course_n'+level_id+'_p'+periode_id+'" name="use_course_n'+level_id+'_p'+periode_id+'" checked>\n' +
'<div class="row bg-light">\n' +
' <div class="col-8 pr-0 m-auto d-flex">\n' +
' </div>\n' +
' <div class="col-4 text-right">\n' +
' <a type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n' +
' <span class="sr-only">Toggle Dropdown</span>\n' +
' </a>\n' +
' <div class="dropdown-menu">\n' +
' <a id="modeSwitchC'+level_id+'-'+periode_id+'" class="btn-secondary dropdown-item active m-1" onclick="selectCourseMode(\'course\','+level_id+','+periode_id+')">Mode "Cours" pour cette période</a>\n' +
' <a id="modeSwitchO'+level_id+'-'+periode_id+'" class="btn-secondary dropdown-item m-1" onclick="selectCourseMode(\'other\','+level_id+','+periode_id+')">Mode "Autre" pour cette période</a>\n' +
' <div class="dropdown-divider"></div>\n' +
' <a class="btn-secondary dropdown-item" href="#">Réinitialiser</a>\n' +
' </div>\n' +
' </div>\n' +
'</div>\n' +
'<div class="tab-content text-center">\n' +
' <div class="tab-pane active">\n' +
' <div class="row pt-2">\n' +
' <div class="col-12 d-none" id="descContainer'+level_id+'-'+periode_id+'">\n' +
' <div class="form-group">\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' +
' </div>\n' +
' </div>\n' +
' <div class="col-6 mb-1" id="OCOMContainer'+level_id+'-'+periode_id+'">\n' +
' <div class="form-group label-floating">\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 scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+' onblur="updateCourseName(\''+level_id+'\',\''+periode_id+'\')">\n' +
' </div>\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-6" id="nameContainer'+level_id+'-'+periode_id+'">\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 scheduleInput" '+isCourse+' />\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">clear</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-6 mb-1">\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 scheduleInput" '+isCourse+'/>\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' <div class="col-6">\n' +
' <div class="form-group label-floating">\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 scheduleInput" aria-describedby="nameHelp" autocomplete="off" '+isCourse+'>\n' +
' </div>\n' +
' <span class="form-control-feedback">\n' +
' <i class="material-icons">done</i>\n' +
' </span>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
' </div>\n' +
'</div>\n'+
'</div>';
}
function updateLevel(p,l,level)
{
p++;
l++;
$('#desc_n'+l+'_p'+p).val(level['desc']);
$('#ocom_n'+l+'_p'+p).val(level['ocom']);
$('#name_n'+l+'_p'+p).val(level['name']);
$('#location_n'+l+'_p'+p).val(level['location']);
$('#instruc_n'+l+'_p'+p).val(level['instructor']);
if (level['use_course'] != 'on')
{
selectCourseMode('autre',l,p);
}
}
function removePeriode()
{
$('#row-'+(nbOfPeriode-1)).remove();
eventType['schedule_model']['periodes'].pop();
nbOfPeriode--;
}
function removeLevel()
{
$('#levelHeader-'+(nbOfLevel-1)).remove();
for (let i = 0; i < nbOfPeriode; i++) {
$('#container-'+(nbOfLevel)+'-'+(i+1)).remove();
}
eventType['schedule_model']['niveaux'].pop();
updateWidth();
nbOfLevel--;
}
function addLevel()
{
$('#levelHeader-'+(nbOfLevel-1)).after(getHeader(nbOfLevel,'Niveau '+(nbOfLevel+1)));
let scheduleModel = eventType['schedule_model'];
$.each(scheduleModel['periodes'], function (periode_id, value) {
console.log($('#container-'+(nbOfLevel)+'-'+periode_id));
$('#container-'+(nbOfLevel)+'-'+(periode_id+1)).after(getCourse(nbOfLevel,periode_id));
});
eventType['schedule_model']['niveaux'].push({name:'Niveau '+(nbOfLevel+1)});
updateWidth();
nbOfLevel++;
initAutoComplete("AutoCompleteUser");
initAutoCompleteOCOM('AutoCompleteOCOM');
if (editorMode == 'eventType')
{
$('.scheduleInput').removeAttr('required')
}
}
function addPeriode()
{
$('#row-'+(nbOfPeriode-1)).after(getPeriode(nbOfPeriode,{
"name": "Periode "+nbOfPeriode,
"begin_time": "",
"end_time": ""
},eventType['schedule_model']['niveaux']));
eventType['schedule_model']['periodes'].push({
"name": "Periode "+nbOfPeriode,
"begin_time": "",
"end_time": ""
});
nbOfPeriode++;
initAutoComplete("AutoCompleteUser");
initAutoCompleteOCOM('AutoCompleteOCOM');
if (editorMode == 'eventType')
{
$('.scheduleInput').removeAttr('required')
}
}
function selectCourseMode(mode, niveau, periode)
{
if(mode == "course")
{
$('#descContainer'+niveau+'-'+periode).addClass('d-none');
$('#isDoneContainer'+niveau+'-'+periode).removeClass('d-none');
$('#isDoneContainer'+niveau+'-'+periode).addClass('d-flex');
$('#OCOMContainer'+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');
$('#modeSwitchO'+niveau+'-'+periode).removeClass('active');
$('#use_course_n'+niveau+'_p'+periode).prop("checked", true);
}
else
{
$('#descContainer'+niveau+'-'+periode).removeClass('d-none');
$('#isDoneContainer'+niveau+'-'+periode).addClass('d-none');
$('#isDoneContainer'+niveau+'-'+periode).removeClass('d-flex');
$('#OCOMContainer'+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');
$('#modeSwitchO'+niveau+'-'+periode).addClass('active');
$('#use_course_n'+niveau+'_p'+periode).prop("checked", false);
}
}
function selectCourseModePeriode(mode,periode)
{
for (let i = 0; i < nbOfLevel; i++) {
selectCourseMode(mode,i+1,periode+1);
}
}
function selectCourseModeNiveau(mode,niveau)
{
for (let i = 0; i < nbOfPeriode; i++) {
selectCourseMode(mode,niveau+1,i+1);
}
}
function updatePlantext(toggle,id)
{
if($('#'+toggle).is(":checked"))
{
$('#'+id).removeClass('text-warning');
$('#'+id).addClass('text-success');
$('#'+id).html('Plan de cours remis')
}
else
{
$('#'+id).addClass('text-warning');
$('#'+id).removeClass('text-success');
$('#'+id).html('Plan de cours non remis')
}
}
function updateCourseName(niveau, periode) {
setTimeout(function(){
let val = $('#ocom_n'+niveau+'_p'+periode).val();
if(val != "")
{
$.ajax({
type: 'GET',
url: '/api/ocom/'+val+'/name?api_token='+api_token,
success: function (data) {
if(data != null && data != "")
{
$('#name_n'+niveau+'_p'+periode).val(data);
}
},
error: function () {
showNotification('error','Erreur impossible de charger l\'objectif de rendement ...','top', 'center')
}
})
}
}, 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');
}
}

16
resources/custom.css vendored
View File

@@ -169,7 +169,7 @@
}
.news-tags {
height: 1.5rem;
height: 2.8rem;
}
.news-body-small {
@@ -1175,14 +1175,18 @@ a.fc-more:hover {
.fc-toolbar {
text-align: center;
margin-bottom: 1em;
flex-wrap: wrap;
}
.fc-toolbar .fc-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 {
@@ -1841,3 +1845,7 @@ h2 {
tfoot > tr {
width: 100%;
}
.iconpicker-popover {
z-index: 15 !important;
}

View File

@@ -10,15 +10,107 @@
<form action="/admin/config/customisation" method="POST">
@csrf
<div class="row ml-2">
<div class="col-md-6 p-2">
<div class="col-md-12 p-2">
<div class="form-group">
<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')}}">
<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_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">
<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>
</form>

View File

@@ -82,7 +82,7 @@
<p class="my-auto ml-3">N'utilise pas un horaire</p>
@endif
</div>
<div>
<div style="height: 2.7rem;overflow: hidden">
{!! $event_type->admin_desc !!}
</div>
<div class="row">
@@ -93,7 +93,7 @@
</div>
<div class="col-md-4 text-right">
@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>
</button>
@else
@@ -107,6 +107,9 @@
</div>
</div>
@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>
@@ -146,5 +149,45 @@
},
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>
@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

@@ -12,30 +12,111 @@
@method('PATCH')
@csrf
<div class="row">
<div class="col-md-3">
<div class="col-md-5">
<div class="form-group">
<label class="label-control">Nom</label>
<input type="text" class="form-control" value="{{$event_type->name}}"/>
<input type="text" class="form-control" value="{{$event_type->name}}" name="name" />
</div>
</div>
<div class="col-md-3">
<div class="col-md-5">
<div class="form-group">
<label class="label-control">Emplacement</label>
<input type="text" class="form-control" value="{{$event_type->name}}"/>
<input type="text" class="form-control" value="{{$event_type->location}}" name="location" />
</div>
</div>
<div class="col-md-2">
<div class="togglebutton">
<label>
<input type="checkbox" name="is_mandatory" @if($event_type->is_mandatory == 1) checked @endif>
<span class="toggle"></span>
Obligatoire
</label>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="label-control">Date de début de l'année d'instruction</label>
<label class="label-control">Heure de début</label>
<input name="begin_time" type="time" class="form-control" value="{{$event_type->begin_time}}"/>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="label-control">Date de fin de l'année d'instruction</label>
<label class="label-control">Heure de fin</label>
<input name="end_time" type="time" class="form-control" value="{{$event_type->end_time}}"/>
</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" value="{{$event_type->calendar_icon}}" 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" value="{{$event_type->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>
{!! $event_type->admin_desc !!}
</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" @if($event_type->use_weekly_msg == 1) checked @endif>
<span class="toggle"></span>
</label>
</div>
</div>
<div class="collapse w-100 @if($event_type->use_weekly_msg == 1) show @endif" 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" @if($event_type->weekly_msg_publication_time == '-1days') selected @endif>-1 Jour</option>
<option value="-2days" @if($event_type->weekly_msg_publication_time == '-2days') selected @endif>-2 Jours</option>
<option value="-3days" @if($event_type->weekly_msg_publication_time == '-3days') selected @endif>-3 Jours</option>
<option value="-4days" @if($event_type->weekly_msg_publication_time == '-4days') selected @endif>-4 Jours</option>
<option value="-5days" @if($event_type->weekly_msg_publication_time == '-5days') selected @endif>-5 Jours</option>
<option value="-6days" @if($event_type->weekly_msg_publication_time == '-6days') selected @endif>-6 Jours</option>
<option value="-7days" @if($event_type->weekly_msg_publication_time == '-7days') selected @endif>-7 Jours</option>
<option value="-2weeks" @if($event_type->weekly_msg_publication_time == '-2weeks') selected @endif>-2 Semaines</option>
</select>
</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" @if($event_type->use_schedule == 1) checked @endif>
<span class="toggle"></span>
</label>
</div>
</div>
<div class="col-md-12">
<div class="collapse @if($event_type->use_schedule == 1) show @endif" 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>
@@ -48,8 +129,80 @@
@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>
let begin = moment('{{$event_type->begin_time}}');
let end = moment('{{$event_type->end_time}}');
$('.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,
default: '{{$event_type->calendar_color}}',
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({{$event_type->id}},'eventType');
</script>
@endsection

View File

@@ -36,6 +36,9 @@
@endif
@endforeach
@endif
@if($n->files != [""] && isset($n->files))
<span class="badge badge-pill badge-secondary">Fichier joint</span>
@endif
</div>
@if($n->publish == 0) <span class="badge badge-warning float-right">Brouillon</span> @endif</p>
</div>
@@ -44,6 +47,11 @@
</div>
<div class="card-footer">
<div class="btn-group">
@if(!isset($n->event_id))
<a href="/news/{{$n->id}}" type="button" class="btn btn-secondary" target="_blank"><i class="fa fa-external-link-alt"></i>&nbsp; Afficher</a>
@else
<a href="/news/{{$n->event_id}}?type=msg" type="button" class="btn btn-secondary" target="_blank"><i class="fa fa-external-link-alt"></i>&nbsp; Afficher</a>
@endif
@if(\Auth::user()->p('news_edit') == 1 && !isset($n->event_id))
<a href="/admin/news/edit/{{$n->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i>&nbsp; Modifier</a>
@else

View File

@@ -1,17 +1,6 @@
<input class="d-none" type="checkbox" id="use_course_n{{$niveau}}_p{{$periode}}" name="use_course_n{{$niveau}}_p{{$periode}}" checked>
<div class="row bg-light">
<div class="col-8 pr-0 m-auto d-flex">
<div class="pr-0 m-auto d-flex" id="isDoneContainer{{$niveau}}-{{$periode}}">
<div class="togglebutton">
<label class="m-auto">
<input type="checkbox" id="plan_n{{$niveau}}_p{{$periode}}" name="plan_n{{$niveau}}_p{{$periode}}" onchange="updatePlantext('plan_n{{$niveau}}_p{{$periode}}','planText_n{{$niveau}}_p{{$periode}}')">
<span class="toggle"></span>
</label>
</div>
<div class="text-warning p-1 justify-content-center" id="planText_n{{$niveau}}_p{{$periode}}">
Plan de cours non remis
</div>
</div>
</div>
<div class="col-4 text-right">
<a type="button" class="btn btn-sm btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@@ -31,13 +20,13 @@
<div class="col-12 d-none" id="descContainer{{$niveau}}-{{$periode}}">
<div class="form-group">
<label for="exampleFormControlTextarea1">Description de la période</label>
<textarea class="form-control" name="desc_n{{$niveau}}_p{{$periode}}" id="exampleFormControlTextarea1" rows="2"></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 class="col-6 mb-1" id="OCOMContainer{{$niveau}}-{{$periode}}">
<div class="form-group label-floating">
<div class="autocomplete">
<input type="text" placeholder="OCOM du cours" id="ocom_n{{$niveau}}_p{{$periode}}" name="ocom_n{{$niveau}}_p{{$periode}}" class="form-control AutoCompleteOCOM" aria-describedby="nameHelp" autocomplete="off" value="M103.02" required onblur="updateCourseName('{{$niveau}}','{{$periode}}')">
<input type="text" placeholder="OCOM du cours" id="ocom_n{{$niveau}}_p{{$periode}}" name="ocom_n{{$niveau}}_p{{$periode}}" class="form-control AutoCompleteOCOM no-mandatory" aria-describedby="nameHelp" autocomplete="off" value="{{$ocom}}" required onblur="updateCourseName('{{$niveau}}','{{$periode}}')">
</div>
<span class="form-control-feedback">
<i class="material-icons">done</i>
@@ -46,7 +35,7 @@
</div>
<div class="col-6" id="nameContainer{{$niveau}}-{{$periode}}">
<div class="form-group label-floating">
<input type="text" placeholder="Nom du cours" id="name_n{{$niveau}}_p{{$periode}}" name="name_n{{$niveau}}_p{{$periode}}" value="Nom du cours" class="form-control" required />
<input type="text" placeholder="Nom du cours" id="name_n{{$niveau}}_p{{$periode}}" name="name_n{{$niveau}}_p{{$periode}}" value="{{$name}}" class="form-control no-mandatory" required />
<span class="form-control-feedback">
<i class="material-icons">clear</i>
</span>
@@ -54,7 +43,7 @@
</div>
<div class="col-6 mb-1">
<div class="form-group label-floating">
<input type="text" placeholder="Lieu du cours" name="location_n{{$niveau}}_p{{$periode}}" value="Lieu du cours" class="form-control" required/>
<input type="text" placeholder="Lieu du cours" name="location_n{{$niveau}}_p{{$periode}}" value="{{$location}}" class="form-control no-mandatory" required/>
<span class="form-control-feedback">
<i class="material-icons">done</i>
</span>
@@ -63,7 +52,7 @@
<div class="col-6">
<div class="form-group label-floating">
<div class="autocomplete">
<input type="text" placeholder="Nom de l'instructeur" id="instruc_n{{$niveau}}_p{{$periode}}" name="instruc_n{{$niveau}}_p{{$periode}}" value="Mathieu" class="form-control AutoCompleteUser" aria-describedby="nameHelp" autocomplete="off" required>
<input type="text" placeholder="Nom de l'instructeur" id="instruc_n{{$niveau}}_p{{$periode}}" name="instruc_n{{$niveau}}_p{{$periode}}" value="{{$instructor}}" class="form-control AutoCompleteUser no-mandatory" aria-describedby="nameHelp" autocomplete="off" required>
</div>
<span class="form-control-feedback">
<i class="material-icons">done</i>

View File

@@ -11,6 +11,9 @@
<a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="addLevel()">
<i class="material-icons">add</i>
</a>
<a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="removeLevel()">
<i class="material-icons">remove</i>
</a>
</div>
</div>
@foreach($eventType->schedule_model['periodes'] as $periode)
@@ -27,5 +30,8 @@
<a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="addPeriode()">
<i class="material-icons">add</i>
</a>
<a class="btn btn-primary btn-fab btn-fab-mini btn-round text-white" onclick="removePeriode()">
<i class="material-icons">remove</i>
</a>
</div>
</div>

View File

@@ -1,7 +1,7 @@
@extends('layouts.admin.main')
@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">
@csrf
<div class="col-9">
@@ -69,7 +69,7 @@
<span class="input-group-text btn-file">
<span class="fileinput-new cursor">Select file</span>
<span class="fileinput-exists cursor">Change</span>
<input type="file" name="file_msg" multiple>
<input type="file" name="files[]" multiple>
</span>
</span>
</div>
@@ -97,7 +97,7 @@
</div>
<div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree" data-parent="#accordion">
<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
</div>
</div>
@@ -250,13 +250,12 @@
});
</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>
$(function () {
console.log('Document READY loading schedule editor');
loadEventType('{{$date}}');
loadEventType('{{$date}}',2);
})
</script>
@endsection

View File

@@ -151,6 +151,26 @@
</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 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">
<div class="row">
<div class="text-success" style="font-size: 1.3rem;width: 1.5rem">

View File

@@ -75,7 +75,7 @@ $sidebar = [
'Liste nominative' => [
'route' => 'admin.users',
'icon' => 'fas fa-address-book',
'perm' => 'stats_see',
'perm' => 'cadet_list_see',
'child' => null
],
'Logs' => [

View File

@@ -16,3 +16,4 @@
<!-- Plugin CSS -->
<link href='/assets/fullcalendar/core/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-kit.min.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/interaction/main.js'></script>
<script src='/assets/fullcalendar/list/main.js'></script>
<script>
function toggleEdit() {
if ($('#edit-switch').prop("checked")) {
@@ -56,14 +59,28 @@
var calendarEl = document.getElementById('public_calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['dayGrid'],
plugins: ['dayGrid','interaction','list'],
locale: 'fr',
header: {
left: 'title',
center: '',
center: 'dayGridMonth,listWeek',
right: 'prev,next'
},
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) {
console.log(info.event.id)
$.get("/api/schedule/events/modal/" + info.event.id + "/" + info.event.extendedProps.extraParams.db_type, function (data) {

View File

@@ -22,6 +22,9 @@
@endif
@endforeach
@endif
@if($new->files != [""] && isset($new->files))
<span class="badge badge-pill badge-secondary">Fichier joint</span>
@endif
</div>
<a name="news" id="news" class="btn btn-block btn-secondary mt-2"
@if(isset($new->event_id))

View File

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

View File

@@ -37,6 +37,9 @@
@endif
@endforeach
@endif
@if($new->files != [""])
<span class="badge badge-pill badge-secondary">Fichier joint</span>
@endif
</div>
<a name="news" id="news" class="btn btn-block btn-secondary mt-2" role="button"
@if(isset($new->event_id))

View File

@@ -16,11 +16,6 @@
@else
<span class="badge badge-pill badge-info">Optionnel</span>
@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 class="row mt-4">

View File

@@ -1,29 +1,27 @@
@extends('layouts.public.main')
@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="container">
<div class="row">
<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 class="profile-page sidebar-collapse">
<div class="page-header header-filter" data-parallax="true" style="background-image: url({{'"'.\App\Config::getData('public_index_img_url').'"'}}); transform: translate3d(0px, 0px, 0px);background-position: center"></div>
<div class="main main-raised">
<div class="profile-content">
<div class="container">
<div class="section">
<div class="row">
<div class="col-md-12">
<div class="col-md-6 ml-auto mr-auto">
<div class="profile">
<h2 class="text-white" style="margin-top: -8rem">{{ $new->title }}</h2>
</div>
</div>
<div class="col-md-12 mt-5">
<div class="row gtr-50 gtr-uniform">
@foreach ($new->pictures as $picture)
<div @if ($loop->first)
class="col-12"
@else
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
</div>
<p>
@@ -40,10 +38,22 @@
@endif
@endforeach
@endif
@if($new->files != [""] && isset($new->files))
<span class="badge badge-pill badge-secondary">Fichier joint</span>
@endif
</div>
<div class="col-12 mt-3">
@if($new->files != [""] && isset($new->files))
@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
@endif
</div>
</div>
</div>
<a href="{{ url()->previous() }}" class="btn button primary">Retour</a>
<a href="/" class="btn button primary">Retour</a>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -20,7 +20,7 @@ Route::middleware('auth:api')->group(function () {
Route::get('/schedule/events/modal/full/{id}/{db_type}','ScheduleController@loadModalFull')->middleware('perm:schedule_see');
Route::get('/schedule/events/add/modal/{type}/{date}','ScheduleController@loadModalDefautType')->middleware('perm:schedule_add');
Route::get('/schedule/editor/init/{id}','ScheduleEditorController@getTemplate')->middleware('perm:schedule_edit');
Route::get('/schedule/editor/course/{niveau}/{periode}','ScheduleEditorController@getCourseEmpty')->middleware('perm:schedule_edit');
Route::get('/schedule/editor/course/{niveau}/{periode}/{event_type?}','ScheduleEditorController@getCourseEmpty')->middleware('perm:schedule_edit');
Route::get('/schedule/editor/template/{id}','ScheduleEditorController@getEventTemplate')->middleware('perm:schedule_add');
Route::get('/schedule/editor/emptyperiode/{id}','ScheduleEditorController@getEmptyPeriode')->middleware('perm:schedule_add');
Route::get('/schedule/editor/emptylevel/{id}','ScheduleEditorController@getEmptyLevel')->middleware('perm:schedule_add');
@@ -34,6 +34,10 @@ Route::middleware('auth:api')->group(function () {
/** Picture */
Route::post('/picture/delete/{id}','PictureController@destroy')->middleware('perm:picture_delete');
/** Event Type */
Route::get('/eventType/{id}','EventTypeController@toJson');
Route::delete('/eventType/{id}','EventTypeController@destroy');
/** Message Route */
Route::post('/message/delete', 'MessageController@destroy')->middleware('perm:msg_delete');

View File

@@ -94,6 +94,13 @@ Breadcrumbs::for('admin.config.schedule', function ($trail) {
$trail->push('Instruction', route('admin.config.schedule'));
});
// Admin > Config > Instruction > [EventType]
Breadcrumbs::for('admin.config.schedule.event_type', function ($trail,$id) {
$eventType = \App\EventType::findOrFail($id);
$trail->parent('admin.config.schedule');
$trail->push($eventType->name, route('admin.config.schedule.event_type',$id));
});
// Admin > Config > Activite complementaire
Breadcrumbs::for('admin.config.complementary-activity', function ($trail) {
$trail->parent('admin.config.general');

View File

@@ -69,8 +69,11 @@ Route::middleware(['auth'])->name('admin.')->group(function () {
Route::post('/admin/user/edit/{id}' , 'UserController@update')->middleware('perm:user_edit');
/** Config */
Route::get('/admin/config/instruction' , 'ScheduleController@index')->middleware('perm:config_edit')->name('config.schedule');
Route::get('/admin/config/instruction/event_type/{id}' , 'EventTypeController@show')->middleware('perm:config_edit')->name('config.schedule.event_type');
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::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::get('/admin/config/activity' , 'ComplementaryActivityController@index')->middleware('perm:config_edit')->name('config.complementary-activity');
Route::get('/admin/config/activity/add' , 'ComplementaryActivityController@create')->middleware('perm:config_edit')->name('config.complementary-activity.add');

View File

@@ -19,7 +19,7 @@ class AdminTest extends TestCase
$urls = [
'admin',
'admin/calendar',
'admin/schedule',
'admin/message',
'admin/message/add',
'admin/inventory',

View File

@@ -1,54 +0,0 @@
<?php
namespace Tests\Feature;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ECCTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testUrl()
{
$appURL = "dev.c-cms.cf";
$urls = [
'ecc',
'ecc/calendar',
'ecc/messages',
'ecc/guide',
'ecc/update'
];
echo PHP_EOL;
foreach ($urls as $url) {
$response = $this->get($url);
if((int)$response->status() === 404){
echo $appURL . $url . ' (FAILED) return a 404.';
$this->assertTrue(false);
} else {
echo $appURL . $url . ' (SUCCESS)';
$this->assertTrue(true);
}
echo PHP_EOL;
}
foreach ($urls as $url) {
$response = $this->get($url);
if((int)$response->status() === 500){
echo $appURL . $url . ' (FAILED) return a 500.';
$this->assertTrue(false);
} else {
echo $appURL . $url . ' (SUCCESS)';
$this->assertTrue(true);
}
echo PHP_EOL;
}
}
}