Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb3fdc44e2 | |||
| d57c648d7f | |||
| c6110b47e8 | |||
| fd73dc388d | |||
| 818a84c3df | |||
| 7364c3494c | |||
| 76c60d512f | |||
| 54d57c7b13 | |||
| e679cacb7d | |||
| b28b7cdab5 | |||
| eee82e3b81 | |||
| 97a7be702e | |||
| 47128ea6fc | |||
| fdc2772ee2 | |||
| c4f96fbfc4 | |||
| 75a4a0a080 | |||
| f262392672 | |||
| 1679252930 | |||
| 9dc4d1103f | |||
| 07e409a922 | |||
| 0fddd138bf | |||
| 8bb9655c9f | |||
| f98cd85872 | |||
| f6944d7b70 | |||
| fc9d14e735 | |||
| fcf96df5e8 | |||
| 1ee9848312 | |||
| 333679c510 | |||
| f65a38ca26 | |||
| 84e17938a7 | |||
| 0690d36eb2 | |||
| e0f3a26bc2 | |||
| 96ec0fdb03 | |||
| 01f8cf75b8 | |||
| 72d51850c2 | |||
| e76a6e9f40 | |||
| c58cf9ee8d | |||
| 2b6bd17b8d | |||
| 87264660bc | |||
| 932de1b154 | |||
| 6353208b20 | |||
| d3dbd21da5 | |||
| c5f9890ace | |||
| e554f011b4 | |||
| 7b2d16642c | |||
| 64f5d54d3d | |||
| 016e65b495 | |||
| 23e4abc5c4 | |||
| ac829d58b9 | |||
| c162184035 | |||
| 1a321d1021 | |||
| 0d8117c96d | |||
| 535048b687 | |||
| fc6255363e | |||
| 7732bbe85e | |||
| 027e6e6b28 | |||
| ffe8032cc8 | |||
| 2ffa5d1ba3 | |||
| 839340acc2 | |||
| b44a8b94fb | |||
| 70bb173eb0 | |||
| 712246e6cb | |||
| c036745988 | |||
| d5151920d8 | |||
| bcc293a5d4 | |||
| 5922024c70 | |||
| f600c5cbb4 | |||
| 871877ca37 | |||
| 5597ded1ea | |||
| 34a4ebb2a8 | |||
| 1d13c8c8a9 | |||
| e3aa153cf8 | |||
| afa7e47ef3 | |||
| 033a2d65d8 | |||
| 863a701e08 | |||
| d5c6a534b5 | |||
| 0ddf99318d | |||
| 3b593297cd | |||
| d41147346c |
@@ -1,20 +1,20 @@
|
|||||||
APP_NAME=C-CMS
|
APP_NAME=C-CMS
|
||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
APP_KEY=base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc=
|
APP_KEY=
|
||||||
APP_DEBUG=true
|
APP_DEBUG=false
|
||||||
APP_URL=https://dev.c-cms.cf/
|
APP_URL=https://dev.c-cms.cf/ # Adresse de votre site web
|
||||||
|
|
||||||
SQN_NUMBER=000
|
SQN_NUMBER=000 # Numéro de votre escadron
|
||||||
SQN_FULLNAME="Escadron 000 Exemple"
|
SQN_FULLNAME="Escadron 000 Exemple" # Nom complet de votre escadron
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
DB_CONNECTION=mysql
|
DB_CONNECTION=mysql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_DATABASE=ddb_dev
|
DB_DATABASE=ddb # Nom de la base de donnée
|
||||||
DB_USERNAME=root
|
DB_USERNAME=user # Nom d'utilisateur pour ce connecter a la base de donnée
|
||||||
DB_PASSWORD=nHpz39lp
|
DB_PASSWORD=password # Mot de passe de la base de donnée
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
@@ -33,8 +33,8 @@ MAIL_USERNAME=null
|
|||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
NEXMO_KEY=f52074e0
|
NEXMO_KEY=4587feffd # Votre Clé Nexmo API
|
||||||
NEXMO_SECRET=lXK9GasDUdotWqL3
|
NEXMO_SECRET=54dasf4e8fa4s4fd4f5s # Votre Mot de passe Nexmo API
|
||||||
|
|
||||||
PUSHER_APP_ID=
|
PUSHER_APP_ID=
|
||||||
PUSHER_APP_KEY=
|
PUSHER_APP_KEY=
|
||||||
@@ -43,3 +43,4 @@ PUSHER_APP_CLUSTER=mt1
|
|||||||
|
|
||||||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
/node_modules
|
node_modules
|
||||||
/public/hot
|
public/hot
|
||||||
/public/storage
|
public/storage
|
||||||
/storage/*.key
|
storage/*.key
|
||||||
/vendor
|
vendor
|
||||||
/.idea
|
.idea
|
||||||
/.vscode
|
.vscode
|
||||||
/.vagrant
|
.vagrant
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
npm-debug.log
|
npm-debug.log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
.env
|
.env
|
||||||
/public/assets/public
|
.env.testing
|
||||||
/resources/views/public.blade.php
|
public/theme
|
||||||
|
resources/views/public.blade.php
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
image: registry.gitlab.com/thegamecraft/c-cms:latest
|
||||||
|
|
||||||
|
services:
|
||||||
|
- mysql:5.7
|
||||||
|
|
||||||
|
variables:
|
||||||
|
MYSQL_DATABASE: homestead
|
||||||
|
MYSQL_ROOT_PASSWORD: secret
|
||||||
|
DB_HOST: mysql
|
||||||
|
DB_USERNAME: root
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- deploy
|
||||||
|
- deploy
|
||||||
|
|
||||||
|
build:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- cp .env.example .env
|
||||||
|
- composer install
|
||||||
|
- php artisan key:generate
|
||||||
|
|
||||||
|
deploy_697:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
|
|
||||||
|
- ~/.composer/vendor/bin/envoy run deploy_697 --commit="$CI_COMMIT_SHA"
|
||||||
|
environment:
|
||||||
|
name: escadron697
|
||||||
|
url: http://escadron697.ca
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
|
deploy_736:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- ssh-add <(echo "$SSH_PRIVATE_KEY")
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
|
||||||
|
|
||||||
|
- ~/.composer/vendor/bin/envoy run deploy_736 --commit="$CI_COMMIT_SHA"
|
||||||
|
environment:
|
||||||
|
name: escadron736
|
||||||
|
url: http://736.exvps.ca
|
||||||
|
only:
|
||||||
|
- master
|
||||||
@@ -1,3 +1,42 @@
|
|||||||
|
/** ALPHA 3.0.5 **/
|
||||||
|
Front-End
|
||||||
|
|
||||||
|
Ajout d'un quantité d'item dans l'inventaire.
|
||||||
|
Modification de l'interface de la gestion d'inventaire pour accomoder l'ajout de quantité.
|
||||||
|
Ajout d'un indicateur de status sur la page de connexion..
|
||||||
|
Le rapport de bug est maintenant publique.
|
||||||
|
Ajout du dashboard administrateur.
|
||||||
|
Ajout d'option de configuration générale.'
|
||||||
|
|
||||||
|
Back End & API
|
||||||
|
|
||||||
|
Modification du model de réservation pour accomoder l'ajout de quantité.
|
||||||
|
Ajout d'une quantité d'item a l'inventaire.
|
||||||
|
Ajout d'un « Helper » pour connaitre le status des services.
|
||||||
|
Ajout d'une section « Alerte » dans le modele de page Admin.
|
||||||
|
|
||||||
|
Correction de bug
|
||||||
|
|
||||||
|
Correction de - Bug avec les heures quand il s'agit d'une activité "Autre" - #22
|
||||||
|
Correction de - Bug ECC" - #21
|
||||||
|
Correction de multiple bug
|
||||||
|
|
||||||
|
/** ALPHA 3.0.4 **/
|
||||||
|
Nouveauté
|
||||||
|
|
||||||
|
Création de l'espace cadet cadre.
|
||||||
|
Ajout de nouveau type d'icones.
|
||||||
|
|
||||||
|
Back End & API
|
||||||
|
|
||||||
|
Ajout de CSS spécifique au calendrier
|
||||||
|
Ajout d'un controller pour l'ECC
|
||||||
|
|
||||||
|
Correction de bug
|
||||||
|
|
||||||
|
Correction de multiple bug
|
||||||
|
|
||||||
|
|
||||||
/** ALPHA 3.0.3 **/
|
/** ALPHA 3.0.3 **/
|
||||||
Nouveauté
|
Nouveauté
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Set the base image for subsequent instructions
|
||||||
|
FROM php:7.2
|
||||||
|
|
||||||
|
# Update packages
|
||||||
|
RUN apt-get update
|
||||||
|
|
||||||
|
# Install PHP and composer dependencies
|
||||||
|
RUN apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev autoconf libc-dev pkg-config
|
||||||
|
|
||||||
|
# Clear out the local repository of retrieved package files
|
||||||
|
RUN apt-get clean
|
||||||
|
|
||||||
|
# Install needed extensions
|
||||||
|
# Here you can install any other extension that you need during the test and deployment process
|
||||||
|
RUN docker-php-ext-install pdo_mysql zip
|
||||||
|
|
||||||
|
RUN pecl install mcrypt-1.0.1
|
||||||
|
|
||||||
|
# Install Composer
|
||||||
|
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
|
|
||||||
|
# Install Laravel Envoy
|
||||||
|
RUN composer global require "laravel/envoy"
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
@servers(['web' => 'deployer@vps188754.vps.ovh.ca'])
|
||||||
|
|
||||||
|
@setup
|
||||||
|
$repository = 'git@gitlab.com:TheGamecraft/c-cms.git';
|
||||||
|
$release = date('YmdHis');
|
||||||
|
|
||||||
|
$releases_dir_697 = '/var/www/c-cms/escadron697/releases';
|
||||||
|
$app_dir_697 = '/var/www/c-cms/escadron697';
|
||||||
|
$new_release_dir_697 = $releases_dir_697 .'/'. $release;
|
||||||
|
|
||||||
|
$releases_dir_736 = '/var/www/c-cms/escadron736/releases';
|
||||||
|
$app_dir_736 = '/var/www/c-cms/escadron736';
|
||||||
|
$new_release_dir_736 = $releases_dir_736 .'/'. $release;
|
||||||
|
@endsetup
|
||||||
|
|
||||||
|
@story('deploy_697')
|
||||||
|
clone_repository_697
|
||||||
|
run_composer_697
|
||||||
|
update_symlinks_697
|
||||||
|
@endstory
|
||||||
|
|
||||||
|
@story('deploy_736')
|
||||||
|
clone_repository_736
|
||||||
|
run_composer_736
|
||||||
|
update_symlinks_736
|
||||||
|
@endstory
|
||||||
|
|
||||||
|
@task('clone_repository_697')
|
||||||
|
echo 'Cloning repository'
|
||||||
|
[ -d {{ $releases_dir_697 }} ] || mkdir {{ $releases_dir_697 }}
|
||||||
|
git clone --depth 1 {{ $repository }} {{ $new_release_dir_697 }}
|
||||||
|
cd {{ $new_release_dir_697 }}
|
||||||
|
git reset --hard {{ $commit }}
|
||||||
|
@endtask
|
||||||
|
|
||||||
|
@task('run_composer_697')
|
||||||
|
echo "Starting deployment ({{ $release }})"
|
||||||
|
cd {{ $new_release_dir_697 }}
|
||||||
|
composer install --prefer-dist --no-scripts -q -o
|
||||||
|
@endtask
|
||||||
|
|
||||||
|
@task('update_symlinks_697')
|
||||||
|
echo "Linking storage directory"
|
||||||
|
rm -rf {{ $new_release_dir_697 }}/storage
|
||||||
|
ln -nfs {{ $app_dir_697 }}/storage {{ $new_release_dir_697 }}/storage
|
||||||
|
|
||||||
|
echo 'Linking .env file'
|
||||||
|
ln -nfs {{ $app_dir_697 }}/.env {{ $new_release_dir_697 }}/.env
|
||||||
|
|
||||||
|
echo 'Linking current release'
|
||||||
|
ln -nfs {{ $new_release_dir_697 }} {{ $app_dir_697 }}/current
|
||||||
|
|
||||||
|
echo 'Setting permission'
|
||||||
|
chmod -R 777 {{ $app_dir_697 }}/current/bootstrap/
|
||||||
|
|
||||||
|
echo 'Migrate DB'
|
||||||
|
cd {{ $app_dir_697 }}/current/
|
||||||
|
php artisan migrate
|
||||||
|
@endtask
|
||||||
|
|
||||||
|
@task('clone_repository_736')
|
||||||
|
echo 'Cloning repository'
|
||||||
|
[ -d {{ $releases_dir_736 }} ] || mkdir {{ $releases_dir_736 }}
|
||||||
|
git clone --depth 1 {{ $repository }} {{ $new_release_dir_736 }}
|
||||||
|
cd {{ $new_release_dir_736 }}
|
||||||
|
git reset --hard {{ $commit }}
|
||||||
|
@endtask
|
||||||
|
|
||||||
|
@task('run_composer_736')
|
||||||
|
echo "Starting deployment ({{ $release }})"
|
||||||
|
cd {{ $new_release_dir_736 }}
|
||||||
|
composer install --prefer-dist --no-scripts -q -o
|
||||||
|
@endtask
|
||||||
|
|
||||||
|
@task('update_symlinks_736')
|
||||||
|
echo "Linking storage directory"
|
||||||
|
rm -rf {{ $new_release_dir_736 }}/storage
|
||||||
|
ln -nfs {{ $app_dir_736 }}/storage {{ $new_release_dir_736 }}/storage
|
||||||
|
|
||||||
|
echo 'Linking .env file'
|
||||||
|
ln -nfs {{ $app_dir_736 }}/.env {{ $new_release_dir_736 }}/.env
|
||||||
|
|
||||||
|
echo 'Linking current release'
|
||||||
|
ln -nfs {{ $new_release_dir_736 }} {{ $app_dir_736 }}/current
|
||||||
|
|
||||||
|
echo 'Setting permission'
|
||||||
|
chmod -R 777 {{ $app_dir_736 }}/current/bootstrap/
|
||||||
|
|
||||||
|
echo 'Migrate DB'
|
||||||
|
cd {{ $app_dir_736 }}/current/
|
||||||
|
php artisan migrate
|
||||||
|
@endtask
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class ComplementaryActivity extends Model
|
||||||
|
{
|
||||||
|
public function pictures()
|
||||||
|
{
|
||||||
|
return $this->morphMany('App\Picture', 'pictureable');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,5 +6,17 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
|
|
||||||
class Config extends Model
|
class Config extends Model
|
||||||
{
|
{
|
||||||
//
|
protected $casts = [
|
||||||
|
'data' => 'array',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function data()
|
||||||
|
{
|
||||||
|
return $this->data[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getData($configName)
|
||||||
|
{
|
||||||
|
return Config::where('name',$configName)->first()->data();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,23 @@ class AdminController extends Controller
|
|||||||
{
|
{
|
||||||
Log::saveLog('Affichage du tableau de bord');
|
Log::saveLog('Affichage du tableau de bord');
|
||||||
|
|
||||||
return view('admin.dashboard');
|
$futureEvent_to_filtered = \App\Schedule::all()->sortBy('date');
|
||||||
|
$futureEvent_to_filtered_pass_1 = collect();
|
||||||
|
$futureEvent = collect();
|
||||||
|
|
||||||
|
foreach ($futureEvent_to_filtered as $day) {
|
||||||
|
if ($day->date >= date('Y-m-d')) {
|
||||||
|
$futureEvent_to_filtered_pass_1->push($day);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($futureEvent_to_filtered_pass_1 as $day) {
|
||||||
|
if ($day->date <= date('Y-m-d',strtotime("+2 week"))) {
|
||||||
|
$futureEvent->push($day);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('admin.dashboard',['futureEvent' => $futureEvent,'userClasse' => \Auth::User()->getClasse()->forPage(1,6)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update()
|
public function update()
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ class CalendarController extends Controller
|
|||||||
{
|
{
|
||||||
Log::saveLog("Affichage de l'horaire");
|
Log::saveLog("Affichage de l'horaire");
|
||||||
|
|
||||||
|
$this->listClass();
|
||||||
|
|
||||||
return view('admin.calendar.calendar_display');
|
return view('admin.calendar.calendar_display');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +97,10 @@ class CalendarController extends Controller
|
|||||||
if ($activityToday->isEmpty()) {
|
if ($activityToday->isEmpty()) {
|
||||||
echo '<a class="calendar-container calendar-empty" name="'.$today.'" type="button" data-toggle="modal" data-target="#scrollmodal" id="calendar_'.$calendar[(($i*7) + $a)].'" class="btn btn-block btn-calendar" onclick="openCalendar(this.name)"><div class="calendar-date">'.date("j", strtotime($today)).'</div></a>';
|
echo '<a class="calendar-container calendar-empty" name="'.$today.'" type="button" data-toggle="modal" data-target="#scrollmodal" id="calendar_'.$calendar[(($i*7) + $a)].'" class="btn btn-block btn-calendar" onclick="openCalendar(this.name)"><div class="calendar-date">'.date("j", strtotime($today)).'</div></a>';
|
||||||
} else {
|
} else {
|
||||||
echo '<a class="calendar-container" name="'.$today.'" type="button" data-toggle="modal" data-target="#scrollmodal" id="calendar_'.$calendar[(($i*7) + $a)].'" class="btn btn-block btn-calendar" onclick="openCalendar(this.name)">';
|
echo '<a class="calendar-container" name="'.$today.'" type="button" data-toggle="modal" data-target="#scrollmodal" id="calendar_'.$calendar[(($i*7) + $a)].'" class="btn btn-block btn-calendar" onclick="openCalendar(this.name)"><div class="calendar-date">'.date("j", strtotime($today)).'</div>';
|
||||||
$text = "";
|
$text = "";
|
||||||
foreach ($activityToday as $activity) {
|
foreach ($activityToday as $activity) {
|
||||||
echo '<div class="calendar-date">'.date("j", strtotime($today)).'</div>
|
echo '<div class="calendar-text" style="width:90%;height:3rem;">';
|
||||||
<div class="calendar-text" style="width:90%;">';
|
|
||||||
switch ($activity->type) {
|
switch ($activity->type) {
|
||||||
case 'regular':
|
case 'regular':
|
||||||
echo '<div class="row" style="color:orange;"><span class="fa-stack fa-lg col-md-2"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-book fa-stack-1x fa-inverse"></i></span><div class="col-md-10 calendar_event_name">'.ucfirst($activity->data['event_name'])."</div></div>";
|
echo '<div class="row" style="color:orange;"><span class="fa-stack fa-lg col-md-2"><i class="fa fa-circle fa-stack-2x"></i><i class="fa fa-book fa-stack-1x fa-inverse"></i></span><div class="col-md-10 calendar_event_name">'.ucfirst($activity->data['event_name'])."</div></div>";
|
||||||
@@ -191,9 +192,6 @@ class CalendarController extends Controller
|
|||||||
'<a type="button" class="btn btn-danger" onclick="deleteEvent('.$date->id.');"><i class="fa fa-times-circle" style="color:white;"></i></a>'.
|
'<a type="button" class="btn btn-danger" onclick="deleteEvent('.$date->id.');"><i class="fa fa-times-circle" style="color:white;"></i></a>'.
|
||||||
'</div>'.
|
'</div>'.
|
||||||
'</div>'.
|
'</div>'.
|
||||||
'<p>'.
|
|
||||||
"L'activité auras lieux a l'escadron entre 18h30 et 21h30".
|
|
||||||
'</p>'.
|
|
||||||
'<p>'.$date->data['event_desc'].
|
'<p>'.$date->data['event_desc'].
|
||||||
'</p>'
|
'</p>'
|
||||||
);
|
);
|
||||||
@@ -445,14 +443,14 @@ class CalendarController extends Controller
|
|||||||
$schedule->save();
|
$schedule->save();
|
||||||
|
|
||||||
/** Logs and Notification */
|
/** Logs and Notification */
|
||||||
Log::saveLog("Ajout de l'activité, ".$schedule->name." à l'horaire le ".$schedule->date);
|
Log::saveLog("Ajout de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date);
|
||||||
|
|
||||||
$userToNotify = $schedule->getUserToNotify();
|
$userToNotify = $schedule->getUserToNotify();
|
||||||
\Notification::send($userToNotify, new Alert(\Auth::User()->id,"Ajout de l'activité, ".$schedule->name." à l'horaire le ".$schedule->date,"/admin/calendar"));
|
\Notification::send($userToNotify, new Alert(\Auth::User()->id,"Ajout de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
|
||||||
|
|
||||||
if(\App\Config::where('name','is_schedule_build')->first()->state == 1)
|
if(\App\Config::where('name','is_schedule_build')->first()->state == 1)
|
||||||
{
|
{
|
||||||
\Notification::send($userToNotify, new mail(\Auth::User(),"Ajout d'une activité a l'horaire",\Auth::User()->fullname()." à ajouté l'activité, ".$schedule->name." à l'horaire le ".$schedule->date));
|
\Notification::send($userToNotify, new mail(\Auth::User(),"Ajout d'une activité a l'horaire",\Auth::User()->fullname()." à ajouté l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date));
|
||||||
}
|
}
|
||||||
return redirect('/admin/calendar');
|
return redirect('/admin/calendar');
|
||||||
|
|
||||||
@@ -461,6 +459,7 @@ class CalendarController extends Controller
|
|||||||
public function patch($id)
|
public function patch($id)
|
||||||
{
|
{
|
||||||
$schedule = Schedule::find($id);
|
$schedule = Schedule::find($id);
|
||||||
|
$original = clone($schedule);
|
||||||
|
|
||||||
$schedule->date = request('event_date');
|
$schedule->date = request('event_date');
|
||||||
$schedule->type = request('event_type');
|
$schedule->type = request('event_type');
|
||||||
@@ -522,6 +521,171 @@ class CalendarController extends Controller
|
|||||||
|
|
||||||
$schedule->save();
|
$schedule->save();
|
||||||
|
|
||||||
|
/** Notification */
|
||||||
|
$asChange = false;
|
||||||
|
$userToNotify = $schedule->getUserToNotify();
|
||||||
|
$changes = [];
|
||||||
|
$found = false;
|
||||||
|
|
||||||
|
if ($schedule->type == "regular") {
|
||||||
|
for ($p=1; $p < 3; $p++) {
|
||||||
|
for ($n=1; $n < 4; $n++) {
|
||||||
|
$pUser = \App\User::find($schedule->data['n'.$n.'_p'.$p.'_instructor']);
|
||||||
|
foreach ($userToNotify as $user) {
|
||||||
|
if ($user->id == $pUser->id) {
|
||||||
|
$found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$found) {
|
||||||
|
$userToNotify->push($pUser);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($schedule->data['event_begin_time'] != $original->data['event_begin_time']) {
|
||||||
|
array_push($changes,"L'heure de début a été modifié de ".$original->data['event_begin_time']." à ".$schedule->data['event_begin_time']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['event_end_time'] != $original->data['event_end_time']) {
|
||||||
|
array_push($changes,"L'heure de fin a été modifié de ".$original->data['event_end_time']." à ".$schedule->data['event_end_time']);
|
||||||
|
}
|
||||||
|
if ($schedule->type != $original->type) {
|
||||||
|
array_push($changes,"Le type d'évenement a été modifié de ".$original->type." à ".$schedule->type);
|
||||||
|
}
|
||||||
|
if ($schedule->data['event_name'] != $original->data['event_name']) {
|
||||||
|
array_push($changes,"Le nom de l'évenement a été modifié de ".$original->data['event_name']." à ".$schedule->data['event_name']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['is_event_mandatory'] != $original->data['is_event_mandatory']) {
|
||||||
|
if ($schedule->data['is_event_mandatory'] == "on") {
|
||||||
|
array_push($changes,"L'évenement est maintenant obligatoire");
|
||||||
|
} else {
|
||||||
|
array_push($changes,"L'évenement n'est plus obligatoire");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($schedule->data['event_location'] != $original->data['event_location']) {
|
||||||
|
array_push($changes,"Le lieu de l'évenement a été modifié de ".$original->data['event_location']." à ".$schedule->data['event_location']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['event_desc'] != $original->data['event_desc']) {
|
||||||
|
array_push($changes,"La description de l'évenement a été modifié de ".$original->data['event_desc']." à ".$schedule->data['event_desc']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($schedule->type == "regular") {
|
||||||
|
/** Check Instructor */
|
||||||
|
if ($schedule->data['n1_p1_instructor'] != $original->data['n1_p1_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 1 pour la première période a été changé de ".\App\User::find($original->data['n1_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n1_p1_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n1_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n1_p1_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n1_p1_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n1_p2_instructor'] != $original->data['n1_p2_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 1 pour la deuxième période a été changé de ".\App\User::find($original->data['n1_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n1_p2_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n1_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n1_p2_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n1_p2_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p1_instructor'] != $original->data['n2_p1_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 2 pour la première période a été changé de ".\App\User::find($original->data['n2_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n2_p1_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n2_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n2_p1_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n2_p1_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p2_instructor'] != $original->data['n2_p2_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 2 pour la deuxième période a été changé de ".\App\User::find($original->data['n2_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n2_p2_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n2_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n2_p2_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n2_p2_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p1_instructor'] != $original->data['n3_p1_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 3 pour la première période a été changé de ".\App\User::find($original->data['n3_p1_instructor'])->fullname()." à ".\App\User::find($schedule->data['n3_p1_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n3_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n3_p1_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n3_p1_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p2_instructor'] != $original->data['n3_p2_instructor']) {
|
||||||
|
array_push($changes,"L'instructeur du niveau 3 pour la deuxième période a été changé de ".\App\User::find($original->data['n3_p2_instructor'])->fullname()." à ".\App\User::find($schedule->data['n3_p2_instructor'])->fullname());
|
||||||
|
\Notification::send(\App\User::find($original->data['n3_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$original->data['n3_p2_name']." du ".$original->date." vous a été retiré."));
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le cours ".$schedule->data['n3_p2_name']." du ".$schedule->date." vous a été ajouté."));
|
||||||
|
}
|
||||||
|
/** Check OCOM */
|
||||||
|
if ($schedule->data['n1_p1_ocom'] != $original->data['n1_p1_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 1 pour la première période a été changé de ".$original->data['n1_p1_ocom']." à ".$schedule->data['n1_p1_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n1_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p1_ocom']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n1_p2_ocom'] != $original->data['n1_p2_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_ocom']." à ".$schedule->data['n1_p2_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n1_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p2_ocom']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p1_ocom'] != $original->data['n2_p1_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 2 pour la première période a été changé de ".$original->data['n2_p1_ocom']." à ".$schedule->data['n2_p1_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n2_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p1_ocom']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p2_ocom'] != $original->data['n2_p2_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_ocom']." à ".$schedule->data['n2_p2_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n2_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p2_ocom']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p1_ocom'] != $original->data['n3_p1_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 3 pour la première période a été changé de ".$original->data['n3_p1_ocom']." à ".$schedule->data['n3_p1_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n3_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p1_ocom']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p2_ocom'] != $original->data['n3_p2_ocom']) {
|
||||||
|
array_push($changes,"L'OCOM du niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_ocom']." à ".$schedule->data['n3_p2_ocom']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","L'ocom du cours ".$schedule->data['n3_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p2_ocom']));
|
||||||
|
}
|
||||||
|
/** Check Local */
|
||||||
|
if ($schedule->data['n1_p1_local'] != $original->data['n1_p1_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 1 pour la première période a été changé de ".$original->data['n1_p1_local']." à ".$schedule->data['n1_p1_local']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['n1_p2_local'] != $original->data['n1_p2_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_local']." à ".$schedule->data['n1_p2_local']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p1_local'] != $original->data['n2_p1_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 2 pour la première période a été changé de ".$original->data['n2_p1_local']." à ".$schedule->data['n2_p1_local']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p2_local'] != $original->data['n2_p2_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_local']." à ".$schedule->data['n2_p2_local']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p1_local'] != $original->data['n3_p1_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 3 pour la première période a été changé de ".$original->data['n3_p1_local']." à ".$schedule->data['n3_p1_local']);
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p2_local'] != $original->data['n3_p2_local']) {
|
||||||
|
array_push($changes,"Le local du niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_local']." à ".$schedule->data['n3_p2_local']);
|
||||||
|
}
|
||||||
|
/** Check Name */
|
||||||
|
if ($schedule->data['n1_p1_name'] != $original->data['n1_p1_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 1 pour la première période a été changé de ".$original->data['n1_p1_name']." à ".$schedule->data['n1_p1_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n1_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p1_name']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n1_p2_name'] != $original->data['n1_p2_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 1 pour la deuxième période a été changé de ".$original->data['n1_p2_name']." à ".$schedule->data['n1_p2_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n1_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n1_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n1_p2_name']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p1_name'] != $original->data['n2_p1_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 2 pour la première période a été changé de ".$original->data['n2_p1_name']." à ".$schedule->data['n2_p1_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n2_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p1_name']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n2_p2_name'] != $original->data['n2_p2_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 2 pour la deuxième période a été changé de ".$original->data['n2_p2_name']." à ".$schedule->data['n2_p2_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n2_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n2_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n2_p2_name']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p1_name'] != $original->data['n3_p1_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 3 pour la première période a été changé de ".$original->data['n3_p1_name']." à ".$schedule->data['n3_p1_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p1_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n3_p1_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p1_name']));
|
||||||
|
}
|
||||||
|
if ($schedule->data['n3_p2_name'] != $original->data['n3_p2_name']) {
|
||||||
|
array_push($changes,"Le nom du cours niveau 3 pour la deuxième période a été changé de ".$original->data['n3_p2_name']." à ".$schedule->data['n3_p2_name']);
|
||||||
|
\Notification::send(\App\User::find($schedule->data['n3_p2_instructor']), new mail(\Auth::User(),"Modification d'un de vos cours","Le nom du cours ".$original->data['n3_p2_name']." du ".$schedule->date." a été changé pour ".$schedule->data['n3_p2_name']));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
\Notification::send($userToNotify, new Alert(\Auth::User()->id,"Modification de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
|
||||||
|
|
||||||
|
$string_Change = "<ul>";
|
||||||
|
foreach ($changes as $value) {
|
||||||
|
$string_Change = $string_Change."<li>".$value."</li>";
|
||||||
|
}
|
||||||
|
$string_Change = $string_Change."</ul>";
|
||||||
|
if(\App\Config::where('name','is_schedule_build')->first()->state == 1)
|
||||||
|
{
|
||||||
|
\Notification::send($userToNotify, new mail(\Auth::User(),"Modification d'une activité a l'horaire",\Auth::User()->fullname()." à modifié l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date."<br>".$string_Change));
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::saveLog("Modification de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date);
|
||||||
|
|
||||||
return redirect('/admin/calendar');
|
return redirect('/admin/calendar');
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -533,5 +697,44 @@ class CalendarController extends Controller
|
|||||||
$schedule = Schedule::find($id);
|
$schedule = Schedule::find($id);
|
||||||
|
|
||||||
$schedule->delete();
|
$schedule->delete();
|
||||||
|
|
||||||
|
\Notification::send($userToNotify, new Alert(\Auth::User()->id,"Suppresion de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date,"/admin/calendar"));
|
||||||
|
|
||||||
|
if(\App\Config::where('name','is_schedule_build')->first()->state == 1)
|
||||||
|
{
|
||||||
|
\Notification::send($userToNotify, new mail(\Auth::User(),"Suppression d'une activité a l'horaire",\Auth::User()->fullname()." à supprimé l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date));
|
||||||
|
}
|
||||||
|
|
||||||
|
Log::saveLog("Suppression de l'activité, ".$schedule->data['event_name']." à l'horaire le ".$schedule->date);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private function listClass()
|
||||||
|
{
|
||||||
|
$schedules = \App\Schedule::all();
|
||||||
|
$filtered_schedules = collect();
|
||||||
|
$classes = [];
|
||||||
|
|
||||||
|
foreach($schedules as $schedule)
|
||||||
|
{
|
||||||
|
if($schedule->type == "regular")
|
||||||
|
{
|
||||||
|
$filtered_schedules->push($schedule);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($filtered_schedules as $schedule)
|
||||||
|
{
|
||||||
|
array_push($classes,$schedule->data['n1_p1_ocom']);
|
||||||
|
array_push($classes,$schedule->data['n1_p2_ocom']);
|
||||||
|
array_push($classes,$schedule->data['n2_p1_ocom']);
|
||||||
|
array_push($classes,$schedule->data['n2_p2_ocom']);
|
||||||
|
array_push($classes,$schedule->data['n3_p1_ocom']);
|
||||||
|
array_push($classes,$schedule->data['n3_p2_ocom']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$filtered_classes = array_unique($classes);
|
||||||
|
|
||||||
|
return $filtered_classes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\ComplementaryActivity;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ComplementaryActivityController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('public.activity');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param \App\ComplementaryActivity $complementaryActivity
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show(ComplementaryActivity $complementaryActivity)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param \App\ComplementaryActivity $complementaryActivity
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit(ComplementaryActivity $complementaryActivity)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param \App\ComplementaryActivity $complementaryActivity
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, ComplementaryActivity $complementaryActivity)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param \App\ComplementaryActivity $complementaryActivity
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy(ComplementaryActivity $complementaryActivity)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ class ConfigController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//
|
return view ('admin.configs.general',['configs' => Config::all()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,9 +67,19 @@ class ConfigController extends Controller
|
|||||||
* @param \App\Config $config
|
* @param \App\Config $config
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, Config $config)
|
public function update()
|
||||||
{
|
{
|
||||||
//
|
$config = Config::all()->where('name',request('perm'))->first();
|
||||||
|
|
||||||
|
if (request('value') == "true") {
|
||||||
|
$config->state = 1;
|
||||||
|
} else {
|
||||||
|
$config->state = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$config->save();
|
||||||
|
|
||||||
|
\App\Log::saveLog('Modification de la configuration du site');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -247,25 +247,43 @@ class ECCController extends Controller
|
|||||||
|
|
||||||
foreach ($items_array as $item_array) {
|
foreach ($items_array as $item_array) {
|
||||||
if ($item_array != "") {
|
if ($item_array != "") {
|
||||||
$items->push(\App\Item::find($item_array));
|
$item_array_ex = explode(":",$item_array);
|
||||||
|
$this_item = \App\Item::find($item_array_ex[0]);
|
||||||
|
$this_item->quantity = $item_array_ex[1];
|
||||||
|
$items->push($this_item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('ecc.booking',['schedule' => $schedule, 'periode' => $periode, 'niveau' => $niveau, 'items' => $items, 'dispo_item' => $schedule->getInventory($periode)]);
|
return view('ecc.booking',['schedule' => $schedule, 'periode' => $periode, 'niveau' => $niveau, 'items' => $items, 'dispo_item' => $schedule->getInventory($periode)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function booking_add($id,$periode,$niveau)
|
public function booking_add($id,$periode,$niveau)
|
||||||
{
|
{
|
||||||
$schedule = Schedule::find($id);
|
$schedule = Schedule::find($id);
|
||||||
|
$id_to_modify = "passet";
|
||||||
|
$qt_to_add = 0;
|
||||||
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
|
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
|
||||||
|
|
||||||
if (isset($schedule->$periode_item)) {
|
if (isset($schedule->$periode_item)) {
|
||||||
$array_items = explode("-",$schedule->$periode_item);
|
$array_items = explode("-",$schedule->$periode_item);
|
||||||
array_push($array_items,request('add'));
|
for ($i=0; $i < count($array_items); $i++) {
|
||||||
|
$array_item_id = explode(":",$array_items[$i]);
|
||||||
|
|
||||||
|
if ($array_item_id[0] == request('add')) {
|
||||||
|
$id_to_modify = $i;
|
||||||
|
$qt_to_add = $array_item_id[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($id_to_modify === "passet") {
|
||||||
|
array_push($array_items,request('add').":".request('qt'));
|
||||||
|
} else {
|
||||||
|
$toadd = $qt_to_add+request('qt');
|
||||||
|
$array_items[$id_to_modify] = request('add').":".$toadd;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$array_items = [];
|
$array_items = [];
|
||||||
array_push($array_items,request('add'));
|
array_push($array_items,request('add').":".request('qt'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$final_items = implode("-",$array_items);
|
$final_items = implode("-",$array_items);
|
||||||
@@ -297,4 +315,34 @@ class ECCController extends Controller
|
|||||||
|
|
||||||
return redirect('/ecc/inventory/'.$id.'/'.$niveau.'/'.$periode);
|
return redirect('/ecc/inventory/'.$id.'/'.$niveau.'/'.$periode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function list()
|
||||||
|
{
|
||||||
|
return view('ecc.list');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function files()
|
||||||
|
{
|
||||||
|
return view('ecc.files');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function settings()
|
||||||
|
{
|
||||||
|
return view('ecc.settings');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserPassword()
|
||||||
|
{
|
||||||
|
return view('ecc.settings.password');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserAvatar()
|
||||||
|
{
|
||||||
|
return view('ecc.settings.avatar');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserAdress()
|
||||||
|
{
|
||||||
|
return view('ecc.settings.adress');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DummyNamespace;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use DummyRootNamespaceHttp\Controllers\Controller;
|
|
||||||
|
|
||||||
class DummyClass extends Controller
|
class FilesController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
@@ -14,7 +13,7 @@ class DummyClass extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//
|
return view('admin.files.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -82,4 +81,9 @@ class DummyClass extends Controller
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function guide()
|
||||||
|
{
|
||||||
|
return view('admin.files.guide');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -54,15 +54,29 @@ class InventoryController extends Controller
|
|||||||
public function store($id,$periode,$niveau)
|
public function store($id,$periode,$niveau)
|
||||||
{
|
{
|
||||||
$schedule = Schedule::find($id);
|
$schedule = Schedule::find($id);
|
||||||
|
$id_to_modify = "passet";
|
||||||
|
$qt_to_add = 0;
|
||||||
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
|
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
|
||||||
|
|
||||||
if (isset($schedule->$periode_item)) {
|
if (isset($schedule->$periode_item)) {
|
||||||
$array_items = explode("-",$schedule->$periode_item);
|
$array_items = explode("-",$schedule->$periode_item);
|
||||||
array_push($array_items,request('add'));
|
for ($i=0; $i < count($array_items); $i++) {
|
||||||
|
$array_item_id = explode(":",$array_items[$i]);
|
||||||
|
|
||||||
|
if ($array_item_id[0] == request('add')) {
|
||||||
|
$id_to_modify = $i;
|
||||||
|
$qt_to_add = $array_item_id[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($id_to_modify === "passet") {
|
||||||
|
array_push($array_items,request('add').":".request('qt'));
|
||||||
|
} else {
|
||||||
|
$toadd = $qt_to_add+request('qt');
|
||||||
|
$array_items[$id_to_modify] = request('add').":".$toadd;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$array_items = [];
|
$array_items = [];
|
||||||
array_push($array_items,request('add'));
|
array_push($array_items,request('add').":".request('qt'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$final_items = implode("-",$array_items);
|
$final_items = implode("-",$array_items);
|
||||||
@@ -91,10 +105,14 @@ class InventoryController extends Controller
|
|||||||
|
|
||||||
foreach ($items_array as $item_array) {
|
foreach ($items_array as $item_array) {
|
||||||
if ($item_array != "") {
|
if ($item_array != "") {
|
||||||
$items->push(Item::find($item_array));
|
$item_array_ex = explode(":",$item_array);
|
||||||
|
$this_item = Item::find($item_array_ex[0]);
|
||||||
|
$this_item->quantity = $item_array_ex[1];
|
||||||
|
$items->push($this_item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view('admin.inventory.show',['schedule' => $schedule, 'periode' => $periode, 'niveau' => $niveau, 'items' => $items, 'dispo_item' => $schedule->getInventory($periode)]);
|
return view('admin.inventory.show',['schedule' => $schedule, 'periode' => $periode, 'niveau' => $niveau, 'items' => $items, 'dispo_item' => $schedule->getInventory($periode)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class ItemController extends Controller
|
|||||||
|
|
||||||
$item->name = request('name');
|
$item->name = request('name');
|
||||||
$item->desc = request('desc');
|
$item->desc = request('desc');
|
||||||
|
$item->quantiy = request('qt');
|
||||||
|
|
||||||
$item->save();
|
$item->save();
|
||||||
|
|
||||||
@@ -82,6 +83,7 @@ class ItemController extends Controller
|
|||||||
|
|
||||||
$item->name = request('name');
|
$item->name = request('name');
|
||||||
$item->desc = request('desc');
|
$item->desc = request('desc');
|
||||||
|
$item->quantity = request('qt');
|
||||||
|
|
||||||
$item->save();
|
$item->save();
|
||||||
|
|
||||||
|
|||||||
@@ -78,22 +78,8 @@ class MessageController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
$this_msg = Message::find($id);
|
\Auth::User()->seenMessage($id);
|
||||||
|
return view('admin.message.show', ['message' => Message::find($id)]);
|
||||||
if(isset($this_msg->data['as_seen']))
|
|
||||||
{
|
|
||||||
if (!strpos($this_msg->data['as_seen'],"-".\Auth::user()->id."-")) {
|
|
||||||
$data = [
|
|
||||||
'as_seen' => $this_msg->data['as_seen']."-".\Auth::user()->id."-",
|
|
||||||
'parameter' => $this_msg->data['parameter']
|
|
||||||
];
|
|
||||||
|
|
||||||
$this_msg->data = $data;
|
|
||||||
|
|
||||||
$this_msg->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return view('admin.message.show', ['message' => $this_msg]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DummyNamespace;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\News;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use DummyRootNamespaceHttp\Controllers\Controller;
|
|
||||||
|
|
||||||
class DummyClass extends Controller
|
class NewsController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
@@ -13,6 +13,16 @@ class DummyClass extends Controller
|
|||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
|
{
|
||||||
|
return view('public.allnews',['news' => \App\News::paginate(9)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -31,10 +41,21 @@ class DummyClass extends Controller
|
|||||||
/**
|
/**
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param \App\News $news
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function show($id)
|
public function show($id)
|
||||||
|
{
|
||||||
|
return view('public.news', ['new' => \App\News::find($id)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param \App\News $news
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit(News $news)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -43,10 +64,10 @@ class DummyClass extends Controller
|
|||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param int $id
|
* @param \App\News $news
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $id)
|
public function update(Request $request, News $news)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -54,10 +75,10 @@ class DummyClass extends Controller
|
|||||||
/**
|
/**
|
||||||
* Remove the specified resource from storage.
|
* Remove the specified resource from storage.
|
||||||
*
|
*
|
||||||
* @param int $id
|
* @param \App\News $news
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy(News $news)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace DummyNamespace;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use DummyFullModelClass;
|
use App\Picture;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use DummyRootNamespaceHttp\Controllers\Controller;
|
|
||||||
|
|
||||||
class DummyClass extends Controller
|
class PictureController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Display a listing of the resource.
|
||||||
@@ -15,7 +14,7 @@ class DummyClass extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
//
|
return view('public.allpicture',['pictures' => \App\Picture::paginate(\App\Config::getData('text_public_picture_nb'))]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,21 +41,21 @@ class DummyClass extends Controller
|
|||||||
/**
|
/**
|
||||||
* Display the specified resource.
|
* Display the specified resource.
|
||||||
*
|
*
|
||||||
* @param \DummyFullModelClass $DummyModelVariable
|
* @param \App\Picture $picture
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function show(DummyModelClass $DummyModelVariable)
|
public function show($id)
|
||||||
{
|
{
|
||||||
//
|
return view('public.picture',['picture' => \App\Picture::find($id)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show the form for editing the specified resource.
|
* Show the form for editing the specified resource.
|
||||||
*
|
*
|
||||||
* @param \DummyFullModelClass $DummyModelVariable
|
* @param \App\Picture $picture
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function edit(DummyModelClass $DummyModelVariable)
|
public function edit(Picture $picture)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -65,10 +64,10 @@ class DummyClass extends Controller
|
|||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*
|
*
|
||||||
* @param \Illuminate\Http\Request $request
|
* @param \Illuminate\Http\Request $request
|
||||||
* @param \DummyFullModelClass $DummyModelVariable
|
* @param \App\Picture $picture
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, DummyModelClass $DummyModelVariable)
|
public function update(Request $request, Picture $picture)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -76,10 +75,10 @@ class DummyClass extends Controller
|
|||||||
/**
|
/**
|
||||||
* Remove the specified resource from storage.
|
* Remove the specified resource from storage.
|
||||||
*
|
*
|
||||||
* @param \DummyFullModelClass $DummyModelVariable
|
* @param \App\Picture $picture
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function destroy(DummyModelClass $DummyModelVariable)
|
public function destroy(Picture $picture)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,94 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PublicController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Display a listing of the resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
return view('public.index',[
|
||||||
|
'news' => \App\News::all()->sortByDesc('created_at')->take(3),
|
||||||
|
'activities' => \App\ComplementaryActivity::all(),
|
||||||
|
'pictures' => \App\Picture::all()->sortByDesc('created_at')->take(\App\Config::getData('nb_activity_public'))
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for creating a new resource.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function create()
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Store a newly created resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function store(Request $request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function show($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Show the form for editing the specified resource.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function edit($config)
|
||||||
|
{
|
||||||
|
return view('admin.public.edit',['config' => \App\Config::where('name',$config)->first()]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the specified resource in storage.
|
||||||
|
*
|
||||||
|
* @param \Illuminate\Http\Request $request
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function update(Request $request, $config)
|
||||||
|
{
|
||||||
|
$config = \App\Config::where('name',$config)->first();
|
||||||
|
|
||||||
|
$config->data = [request('data')];
|
||||||
|
|
||||||
|
$config->save();
|
||||||
|
|
||||||
|
return redirect('/');;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the specified resource from storage.
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*/
|
||||||
|
public function destroy($id)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,8 +3,9 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use \App\Schedule;
|
||||||
|
|
||||||
class ScheduleController extends Controller
|
class ScheduleController extends Controller
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -173,4 +173,78 @@ class UserController extends Controller
|
|||||||
$notification->delete();
|
$notification->delete();
|
||||||
return redirect(request('url'));
|
return redirect(request('url'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function notificationmarkALL()
|
||||||
|
{
|
||||||
|
$notifications = \Auth::User()->unreadNotifications;
|
||||||
|
foreach($notifications as $notification)
|
||||||
|
{
|
||||||
|
$notification->delete();
|
||||||
|
}
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function notificationmarkECC($id)
|
||||||
|
{
|
||||||
|
$notification = \Auth::User()->unreadNotifications->where('id',$id)->first();
|
||||||
|
|
||||||
|
$notification->delete();
|
||||||
|
return redirect('/ecc');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function showUserProfil($id = 0)
|
||||||
|
{
|
||||||
|
if ($id == 0) {
|
||||||
|
$id = \Auth::User()->id;
|
||||||
|
}
|
||||||
|
return view('admin.user.profil',['user' => \App\User::find($id)]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function editUserAvatar($id)
|
||||||
|
{
|
||||||
|
$user = \Auth::User();
|
||||||
|
|
||||||
|
$user->avatar = $id;
|
||||||
|
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
return back()->with('status', 'Votre avatar a été mis à jour !');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserAvatar()
|
||||||
|
{
|
||||||
|
return view('admin.user.profil.avatar');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserPassword()
|
||||||
|
{
|
||||||
|
return view('admin.user.profil.password');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function editUserPassword()
|
||||||
|
{
|
||||||
|
$user = \Auth::User();
|
||||||
|
|
||||||
|
$user->password = bcrypt(request('psw'));
|
||||||
|
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
return back()->with('status', 'Modification enregistré');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function UserAdress()
|
||||||
|
{
|
||||||
|
return view('admin.user.profil.adress');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function editUserAdress()
|
||||||
|
{
|
||||||
|
$user = \Auth::user();
|
||||||
|
|
||||||
|
$user->adress = request('adress');
|
||||||
|
|
||||||
|
$user->save();
|
||||||
|
|
||||||
|
return back()->with('status', 'Modification enregistré');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function getStatus()
|
||||||
|
{
|
||||||
|
$client = new GuzzleHttp\Client();
|
||||||
|
$incidents = $client->get('https://status.exvps.ca/api/v1/incidents');
|
||||||
|
|
||||||
|
$isBroken = false;
|
||||||
|
|
||||||
|
$incidents_decode = json_decode($incidents->getBody(),true);
|
||||||
|
|
||||||
|
foreach ($incidents_decode['data'] as $incident) {
|
||||||
|
if (!$incident['is_resolved']) {
|
||||||
|
$isBroken = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $isBroken;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class News extends Model
|
||||||
|
{
|
||||||
|
public function user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo('App\User');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pictures()
|
||||||
|
{
|
||||||
|
return $this->morphMany('App\Picture', 'pictureable');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class Picture extends Model
|
||||||
|
{
|
||||||
|
public function pictureable()
|
||||||
|
{
|
||||||
|
return $this->morphTo();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,8 +13,10 @@ class Schedule extends Model
|
|||||||
|
|
||||||
public function getInventory($periode)
|
public function getInventory($periode)
|
||||||
{
|
{
|
||||||
$dispo = [];
|
$dispo_id = [];
|
||||||
$used = [];
|
$dispo_qt = [];
|
||||||
|
$used_id = [];
|
||||||
|
$used_qt = [];
|
||||||
$dispo_item = collect();
|
$dispo_item = collect();
|
||||||
|
|
||||||
$string_periode = 'p'.$periode;
|
$string_periode = 'p'.$periode;
|
||||||
@@ -22,34 +24,72 @@ class Schedule extends Model
|
|||||||
$inventory = Item::all();
|
$inventory = Item::all();
|
||||||
|
|
||||||
foreach ($inventory as $item) {
|
foreach ($inventory as $item) {
|
||||||
array_push($dispo, $item->id);
|
array_push($dispo_id, $item->id);
|
||||||
|
array_push($dispo_qt, $item->quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
$n1 = 'n1_'.$string_periode.'_item';
|
$n1 = 'n1_'.$string_periode.'_item';
|
||||||
$items_array = explode("-",$this->$n1);
|
$items_array = explode("-",$this->$n1);
|
||||||
|
if ($items_array[0] == "") {
|
||||||
foreach ($items_array as $item_array) {
|
unset($items_array[0]);
|
||||||
array_push($used,$item_array);
|
}
|
||||||
|
$items_array = array_values($items_array);
|
||||||
|
if ($items_array != "") {
|
||||||
|
foreach ($items_array as $item_array) {
|
||||||
|
$items_for = explode(":",$item_array);
|
||||||
|
array_push($used_id,$items_for[0]);
|
||||||
|
array_push($used_qt,$items_for[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$n2 = 'n2_'.$string_periode.'_item';
|
$n2 = 'n2_'.$string_periode.'_item';
|
||||||
$items_array = explode("-",$this->$n2);
|
$items_array = explode("-",$this->$n2);
|
||||||
|
if ($items_array[0] == "") {
|
||||||
|
unset($items_array[0]);
|
||||||
|
}
|
||||||
|
$items_array = array_values($items_array);
|
||||||
|
|
||||||
foreach ($items_array as $item_array) {
|
if ($items_array != "") {
|
||||||
array_push($used,$item_array);
|
foreach ($items_array as $item_array) {
|
||||||
|
$items_for = explode(":",$item_array);
|
||||||
|
array_push($used_id,$items_for[0]);
|
||||||
|
array_push($used_qt,$items_for[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$n3 = 'n3_'.$string_periode.'_item';
|
$n3 = 'n3_'.$string_periode.'_item';
|
||||||
$items_array = explode("-",$this->$n3);
|
$items_array = explode("-",$this->$n3);
|
||||||
|
if ($items_array[0] == "") {
|
||||||
foreach ($items_array as $item_array) {
|
unset($items_array[0]);
|
||||||
array_push($used,$item_array);
|
}
|
||||||
|
$items_array = array_values($items_array);
|
||||||
|
if ($items_array != "") {
|
||||||
|
foreach ($items_array as $item_array) {
|
||||||
|
$items_for = explode(":",$item_array);
|
||||||
|
array_push($used_id,$items_for[0]);
|
||||||
|
array_push($used_qt,$items_for[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$dispo = array_diff($dispo,$used);
|
for ($i=0; $i < count($used_id); $i++) {
|
||||||
|
for ($e=0; $e < count($dispo_id); $e++) {
|
||||||
foreach ($dispo as $key) {
|
if (isset($dispo_id[0])) {
|
||||||
$dispo_item->push(Item::find($key));
|
if ($used_id[$i] == $dispo_id[$e]) {
|
||||||
|
$dispo_qt[$e] = $dispo_qt[$e] - $used_qt[$i];
|
||||||
|
if ($dispo_qt[$e] < 1) {
|
||||||
|
unset($dispo_id[$e]);
|
||||||
|
unset($dispo_qt[$e]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$dispo_id = array_values($dispo_id);
|
||||||
|
$dispo_qt = array_values($dispo_qt);
|
||||||
|
for ($i=0; $i < count($dispo_id); $i++) {
|
||||||
|
$this_item = Item::find($dispo_id[$i]);
|
||||||
|
$this_item->quantity = $dispo_qt[$i];
|
||||||
|
$dispo_item->push($this_item);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $dispo_item;
|
return $dispo_item;
|
||||||
@@ -74,4 +114,52 @@ class Schedule extends Model
|
|||||||
return $users;
|
return $users;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function checkForWarning()
|
||||||
|
{
|
||||||
|
$schedule = Schedule::all();
|
||||||
|
$warning = collect();
|
||||||
|
$today = date('U');
|
||||||
|
|
||||||
|
foreach ($schedule as $activity) {
|
||||||
|
|
||||||
|
if ($activity->type == "regular") {
|
||||||
|
|
||||||
|
$time = date('U',strtotime($activity->date));
|
||||||
|
if ($time >= $today) {
|
||||||
|
for ($niv=1; $niv <= 3; $niv++) {
|
||||||
|
for ($pe=1; $pe <= 2; $pe++) {
|
||||||
|
|
||||||
|
/** Check name */
|
||||||
|
if ($activity->data['n'.$niv."_p".$pe."_name"] == "") {
|
||||||
|
$warning->push(['warning' => 'Il doit y avoir un nom pour le cours', 'niveau' => $niv, 'periode' => $pe,'date' => $activity->date]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Check OCOM */
|
||||||
|
if ($activity->data['n'.$niv."_p".$pe."_ocom"] == "") {
|
||||||
|
$warning->push(['warning' => "Il doit y avoir un OCOM pour le cours", 'niveau' => $niv, 'periode' => $pe,'date' => $activity->date]);
|
||||||
|
} else {
|
||||||
|
$regex = '/[MC]['.$niv.']\d\d.\d\d/';
|
||||||
|
if (preg_match($regex,trim($activity->data['n'.$niv."_p".$pe."_ocom"])) == 0 && $activity->data['n'.$niv."_p".$pe."_ocom"] != "S.O") {
|
||||||
|
$warning->push(['warning' => "L'OCOM du cours de semble pas être valide", 'niveau' => $niv, 'periode' => $activity->data['n'.$niv."_p".$pe."_ocom"],'date' => $activity->date]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Check Instructor */
|
||||||
|
if ($activity->data['n'.$niv."_p".$pe."_instructor"] == "") {
|
||||||
|
$warning->push(['warning' => "Il doit y avoir un instructeur pour le cours", 'niveau' => $niv, 'periode' => $pe,'date' => $activity->date]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Check local */
|
||||||
|
if ($activity->data['n'.$niv."_p".$pe."_local"] == "") {
|
||||||
|
$warning->push(['warning' => "Il doit y avoir un local pour le cours", 'niveau' => $niv, 'periode' => $pe,'date' => $activity->date]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $warning;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class User extends Authenticatable
|
|||||||
|
|
||||||
$filtered_schedule = collect();
|
$filtered_schedule = collect();
|
||||||
|
|
||||||
foreach (\App\Schedule::all() as $day) {
|
foreach ($schedules as $day) {
|
||||||
if ($day->date >= date('Y-m-d')) {
|
if ($day->date >= date('Y-m-d')) {
|
||||||
$filtered_schedule->push($day);
|
$filtered_schedule->push($day);
|
||||||
}
|
}
|
||||||
@@ -236,4 +236,32 @@ class User extends Authenticatable
|
|||||||
}
|
}
|
||||||
return $nbClasse;
|
return $nbClasse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function seenMessage($id)
|
||||||
|
{
|
||||||
|
$this_msg = Message::find($id);
|
||||||
|
|
||||||
|
if(isset($this_msg->data['as_seen']))
|
||||||
|
{
|
||||||
|
$as_seen = explode("-",$this_msg->data['as_seen']);
|
||||||
|
if (array_search(strval($this->id),$as_seen) === false) {
|
||||||
|
array_push($as_seen,$this->id);
|
||||||
|
}
|
||||||
|
$as_seen = array_filter($as_seen);
|
||||||
|
$as_seen_str = implode('-',$as_seen);
|
||||||
|
$data = [
|
||||||
|
'as_seen' => $as_seen_str,
|
||||||
|
'parameter' => $this_msg->data['parameter']
|
||||||
|
];
|
||||||
|
|
||||||
|
$this_msg->data = $data;
|
||||||
|
|
||||||
|
$this_msg->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function news()
|
||||||
|
{
|
||||||
|
return $this->hasMany('App\News');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,8 @@
|
|||||||
],
|
],
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/"
|
"App\\": "app/"
|
||||||
}
|
},
|
||||||
|
"files": ["app/Http/helpers.php"]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class CreateItemsTable extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('items', function (Blueprint $table) {
|
Schema::create('items', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
$table->integer('quantity');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('desc');
|
$table->string('desc');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
class DummyClass extends Migration
|
class CreateNewsTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -13,8 +13,12 @@ class DummyClass extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('DummyTable', function (Blueprint $table) {
|
Schema::create('news', function (Blueprint $table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
|
$table->string('title');
|
||||||
|
$table->text('body');
|
||||||
|
$table->integer('user_id');
|
||||||
|
$table->boolean('publish');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -26,6 +30,6 @@ class DummyClass extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('DummyTable');
|
Schema::dropIfExists('news');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateComplementaryActivitiesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('complementary_activities', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->text('public_body');
|
||||||
|
$table->text('admin_desc');
|
||||||
|
$table->string('begin_time')->default('12:00');
|
||||||
|
$table->string('end_time')->default('13:00');
|
||||||
|
$table->string('location')->default('Escadron');
|
||||||
|
$table->boolean('is_mandatory')->default(false);
|
||||||
|
$table->boolean('is_promoted')->default(false);
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('complementary_activities');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
|
|||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
class CreateNotificationsTable extends Migration
|
class CreatePicturesTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
@@ -13,12 +13,13 @@ class CreateNotificationsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('notifications', function (Blueprint $table) {
|
Schema::create('pictures', function (Blueprint $table) {
|
||||||
$table->uuid('id')->primary();
|
$table->increments('id');
|
||||||
$table->string('type');
|
$table->string('url');
|
||||||
$table->morphs('notifiable');
|
$table->string('title');
|
||||||
$table->text('data');
|
$table->text('desc');
|
||||||
$table->timestamp('read_at')->nullable();
|
$table->integer('pictureable_id');
|
||||||
|
$table->string('pictureable_type');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -30,6 +31,6 @@ class CreateNotificationsTable extends Migration
|
|||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('notifications');
|
Schema::dropIfExists('pictures');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
|
class ComplementaryActivitiesSeeder extends Seeder
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
DB::table('complementary_activities')->insert([
|
||||||
|
[
|
||||||
|
'name' => 'Précidrill',
|
||||||
|
'public_body' => 'Veuillez modifier le text de description publique par défaut',
|
||||||
|
'admin_desc' => 'Veuillez modifier la description admin par défaut',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Musique',
|
||||||
|
'public_body' => 'Veuillez modifier le text de description publique par défaut',
|
||||||
|
'admin_desc' => 'Veuillez modifier la description admin par défaut',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'Tir de précision',
|
||||||
|
'public_body' => 'Veuillez modifier le text de description publique par défaut',
|
||||||
|
'admin_desc' => 'Veuillez modifier la description admin par défaut',
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,172 @@ class ConfigsTableSeeder extends Seeder
|
|||||||
'name' => 'is_schedule_build',
|
'name' => 'is_schedule_build',
|
||||||
'state' => 0,
|
'state' => 0,
|
||||||
'data' => 'null'
|
'data' => 'null'
|
||||||
]
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_banner_cadet_desc',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Les cadets de l\'air s\'adressent aux jeunes de 12 à 18 ans qui désirent vivre des expériences enrichissantes et relever de nouveaux défis, en participant à des activités stimulantes dans un cadre dynamique et chaleureux."]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_banner_apprendre_plus',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["En apprendre plus!"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_intro_title',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["L\'escadron c\'est ..."]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_intro_desc',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["De nombreuses activités hebdomadaires dont : les soirées du vendredi, les soirées de musique (fanfare), l\'entrainement au tir, une équipe de biathlon, des cours de pilotage et plus encore !"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_picture_title',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Photos"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_picture_desc',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Voici quelques photos de nos activités, même s\'il est mieux d\'y participer réellement!"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_news_title',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Nouvelles"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_news_desc',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Retrouver ici les dernieres nouvelles de l\'escadron"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_news_button',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Voir toutes les nouvelles!"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_picture_nb',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["6"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'text_public_cta',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Êtes-vous prêt à en faire partie ?"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'media_facebook',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://www.facebook.com/"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'media_twitter',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://twitter.com"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'media_instagram',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://www.instagram.com"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'media_email',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["exemple@email.com"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_address',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["000 Rue Exemple, Québec, Canada"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_name_full',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Escadron 000 Exemple"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_name_short',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Escadron 000"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_number',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["000"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_element',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Aviation"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'element_title',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["Cadet de l\'aviation royale du Canada"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_direct_googlemap_link',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://goo.gl/maps/iLwGZLwWXujwoAg59"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'escadron_phone',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["(418) 722-7712"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'nb_activity_public',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["3"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GP_Niv_1',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1tZhDqCvMor9p6lXxYek7Q0Xc8c2o5pG7"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GQ_Niv_1',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1MK6Lgr_qgP8vwBIiTyIveQu9p2rh1mXj"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GP_Niv_2',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1oLTavI1AQsXMdhZ4QqEkbecfV4j1LKDx"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GQ_Niv_2',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1YzIqyVEfCiGVEI_hKB-ZHt0pAgh-QRxe"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GP_Niv_3',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1FrczHmiGCeONlHCuuxHNx-BZ-qEfEBK8"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GQ_Niv_3',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1S-NFjqlixzC9GNZSqZ1_PqBDFcm-LS1t"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GP_Niv_4',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1EeibjlytdzEpRdzs-eg0pGL8TBv_ZCsu]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_GQ_Niv_4',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1VmVL4wb6llIc09HkWfzL8YOQYo3ygx86"]'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => 'file_empty_lesson_plan',
|
||||||
|
'state' => 0,
|
||||||
|
'data' => '["https://drive.google.com/uc?export=download&id=1i1a0sjI8I3nzt4mlcLvznjqYF-12JgfQ"]'
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,9 @@ class DatabaseSeeder extends Seeder
|
|||||||
$this->call([
|
$this->call([
|
||||||
JobsTableSeeder::class,
|
JobsTableSeeder::class,
|
||||||
RanksTableSeeder::class,
|
RanksTableSeeder::class,
|
||||||
ConfigsTableSeeder::class
|
ConfigsTableSeeder::class,
|
||||||
|
UsersTableSeeder::class,
|
||||||
|
ComplementaryActivitiesSeeder::class,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,17 @@ class UsersTableSeeder extends Seeder
|
|||||||
*/
|
*/
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
//
|
DB::table('users')->insert([
|
||||||
|
'firstname' => 'Administrateur',
|
||||||
|
'lastname' => 'Administrateur',
|
||||||
|
'email' => 'admin@exvps.ca',
|
||||||
|
'password' => bcrypt('SuperAdmin'),
|
||||||
|
'rank' => '1',
|
||||||
|
'adress' => 'Inconnu',
|
||||||
|
'age' => '99',
|
||||||
|
'avatar' => '3',
|
||||||
|
'sexe' => 'm',
|
||||||
|
'job' => '1',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
|
<env name="APP_KEY" value="base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc="/>
|
||||||
<env name="BCRYPT_ROUNDS" value="4"/>
|
<env name="BCRYPT_ROUNDS" value="4"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
|
|||||||
@@ -2253,7 +2253,7 @@ header .form-inline {
|
|||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
border: solid 1px #d9d9d9 !important;
|
border: solid 1px #d9d9d9 !important;
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
display: flex;
|
background-color: white;
|
||||||
}
|
}
|
||||||
.calendar-date{
|
.calendar-date{
|
||||||
float: left;
|
float: left;
|
||||||
@@ -2261,11 +2261,14 @@ header .form-inline {
|
|||||||
}
|
}
|
||||||
.calendar-text{
|
.calendar-text{
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 1.5rem;
|
|
||||||
}
|
}
|
||||||
.calendar-text > div {
|
.calendar-text > div {
|
||||||
text-align:start;
|
text-align:start;
|
||||||
}
|
}
|
||||||
|
.calendar_event_name {
|
||||||
|
height: 3rem;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
@media only screen and (max-width: 800px) {
|
@media only screen and (max-width: 800px) {
|
||||||
.calendar-container{
|
.calendar-container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ function switchType()
|
|||||||
eventBeginTime.value = "18:30";
|
eventBeginTime.value = "18:30";
|
||||||
eventEndTime.value = "21:45";
|
eventEndTime.value = "21:45";
|
||||||
eventLocation.value = "Escadron";
|
eventLocation.value = "Escadron";
|
||||||
tinymce.get('event_desc').setContent("Lors des soirées d'instruction, les cadets auronts la possibilité de participer par niveau a des activitées en lien avec le programme des cadets, que ce soit des activitées de tir, marche militaire, musique, pilotage, leadership et plus, a tous les coups le plaisir est au rendez-vous.");
|
tinymce.get('event_desc').setContent("Lors des soirées d'instruction, les cadets auront la possibilité de participer par niveau à des activités en lien avec le programme des cadets, qu'il s'agisse d'activités de tir, de marche militaire, de musique, de pilotage, de leadership et plus, dans une ambiance plaisante.");
|
||||||
|
|
||||||
var n1_p1_plandone = document.getElementById('n1_p1_plandone');
|
var n1_p1_plandone = document.getElementById('n1_p1_plandone');
|
||||||
var n1_p2_plandone = document.getElementById('n1_p2_plandone');
|
var n1_p2_plandone = document.getElementById('n1_p2_plandone');
|
||||||
@@ -180,7 +180,7 @@ function switchType()
|
|||||||
eventBeginTime.value = "";
|
eventBeginTime.value = "";
|
||||||
eventEndTime.value = "";
|
eventEndTime.value = "";
|
||||||
eventLocation.value = "";
|
eventLocation.value = "";
|
||||||
eventDesc.value = "";
|
eventDesc.value = "Financement";
|
||||||
divSpecialSection.style.display = "none";
|
divSpecialSection.style.display = "none";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ function switchType()
|
|||||||
eventBeginTime.value = "";
|
eventBeginTime.value = "";
|
||||||
eventEndTime.value = "";
|
eventEndTime.value = "";
|
||||||
eventLocation.value = "";
|
eventLocation.value = "";
|
||||||
eventDesc.value = "";
|
eventDesc.value = "Bénévolat";
|
||||||
divSpecialSection.style.display = "none";
|
divSpecialSection.style.display = "none";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ function switchType()
|
|||||||
eventBeginTime.value = "";
|
eventBeginTime.value = "";
|
||||||
eventEndTime.value = "";
|
eventEndTime.value = "";
|
||||||
eventLocation.value = "";
|
eventLocation.value = "";
|
||||||
eventDesc.value = "";
|
eventDesc.value = "Autre";
|
||||||
divSpecialSection.style.display = "none";
|
divSpecialSection.style.display = "none";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 396 B After Width: | Height: | Size: 396 B |
|
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
@@ -2796,7 +2796,7 @@ input, select, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrapper.style1 {
|
.wrapper.style1 {
|
||||||
background-color: #21b2a6;
|
background-color: #071828;
|
||||||
color: #c8ece9;
|
color: #c8ece9;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2955,11 +2955,11 @@ input, select, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrapper.style2 {
|
.wrapper.style2 {
|
||||||
background-color: #2e3842;
|
background-color: #17273a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper.style3 {
|
.wrapper.style3 {
|
||||||
background-color: #505393;
|
background-color: #0a2444;
|
||||||
color: #d3d4e4;
|
color: #d3d4e4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3118,7 +3118,7 @@ input, select, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.wrapper.style4 {
|
.wrapper.style4 {
|
||||||
background-color: transparent;
|
background-color: #17273a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper.style5 {
|
.wrapper.style5 {
|
||||||
@@ -3330,7 +3330,7 @@ input, select, textarea {
|
|||||||
-ms-transition: -ms-transform 0.5s ease;
|
-ms-transition: -ms-transform 0.5s ease;
|
||||||
transition: transform 0.5s ease;
|
transition: transform 0.5s ease;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
background: #21b2a6;
|
background: #17273a;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
@@ -3424,7 +3424,7 @@ input, select, textarea {
|
|||||||
-webkit-transition: background-color 0.2s ease;
|
-webkit-transition: background-color 0.2s ease;
|
||||||
-ms-transition: background-color 0.2s ease;
|
-ms-transition: background-color 0.2s ease;
|
||||||
transition: background-color 0.2s ease;
|
transition: background-color 0.2s ease;
|
||||||
background: #2e3842;
|
background: #071828;
|
||||||
height: 3em;
|
height: 3em;
|
||||||
left: 0;
|
left: 0;
|
||||||
line-height: 3em;
|
line-height: 3em;
|
||||||
@@ -3955,7 +3955,7 @@ input, select, textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.landing #footer {
|
body.landing #footer {
|
||||||
background-color: rgba(29, 36, 42, 0.9);
|
background-color: #071828fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.is-mobile.landing #page-wrapper {
|
body.is-mobile.landing #page-wrapper {
|
||||||
@@ -3976,3 +3976,44 @@ input, select, textarea {
|
|||||||
body.is-mobile.landing #footer {
|
body.is-mobile.landing #footer {
|
||||||
background-color: #1d242a;
|
background-color: #1d242a;
|
||||||
}
|
}
|
||||||
|
.edit-btn {
|
||||||
|
position: relative;
|
||||||
|
bottom: 5px;
|
||||||
|
right: -13px;
|
||||||
|
z-index: 12;
|
||||||
|
font-size: 13px;
|
||||||
|
padding: 4px;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: none;
|
||||||
|
border: none;
|
||||||
|
letter-spacing: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-small {
|
||||||
|
font-size: 10px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.style6 {
|
||||||
|
background-color: #17273a !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-body-full {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.news-body-small {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 18rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.a-without-effect:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.activity-body-small {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 15rem;
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 434 KiB After Width: | Height: | Size: 434 KiB |
|
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 165 KiB |
|
Before Width: | Height: | Size: 440 KiB After Width: | Height: | Size: 440 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
@@ -1,4 +1,4 @@
|
|||||||
<p align="center"><img src="https://escadron697.cf/assets/admin/images/CCMSLOGO.png" width="400px"></p>
|
<p align="center"><img src="https://escadron697.ca/assets/admin/images/CCMSLOGO.png" width="400px"></p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
Version 2.5.3
|
Version 2.5.3
|
||||||
|
|||||||
@@ -16,11 +16,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (!\App\Config::find(1)->state)
|
|
||||||
<div class="alert alert-danger" role="alert">
|
|
||||||
Attention ! L'horaire n'est présentement pas visible par le publique ! <a href="/admin/config#schedule_public">Cliquer ici pour accéder aux options</a>
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
<div class="calendar"></div>
|
<div class="calendar"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
@extends('layouts.admin.main')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
Configuration Générale
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row form-group">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="col col-md-8"><label for="text-input" class=" form-control-label">Horaire publique</label><small class="form-text text-muted">L'horaire est t-il disponible publique sur la page d'accueil du site</small></div>
|
||||||
|
<div class="col col-md-4" style="margin: auto;">
|
||||||
|
<label for="disabled-input" class=" form-control-label"></label>
|
||||||
|
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_schedule_public" name="is_schedule_public" class="switch-input" @if($configs->where('name','is_schedule_public')->first()->state == 1) checked="true" @endif type="checkbox" onchange="saveChange('is_schedule_public')"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="col col-md-8"><label for="text-input" class=" form-control-label">Horaire complet</label><small class="form-text text-muted">L'horaire est t-il complet ? Si cette option est désactivé les utilisateurs ne reseverons pas de notification concernant l'horaire</small></div>
|
||||||
|
<div class="col col-md-4" style="margin: auto;">
|
||||||
|
<label for="disabled-input" class=" form-control-label"></label>
|
||||||
|
<label class="switch switch-3d switch-primary mr-3" style="margin-left: 3rem;"><input id="is_schedule_build" name="is_schedule_build" class="switch-input" @if($configs->where('name','is_schedule_build')->first()->state == 1) checked="true" @endif type="checkbox" onchange="saveChange('is_schedule_build')"><span class="switch-label"></span><span class="switch-handle"></span></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="page-header float-left">
|
||||||
|
<div class="page-title">
|
||||||
|
<h1>Configuration Générale</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="page-header float-right">
|
||||||
|
<div class="page-title">
|
||||||
|
<ol class="breadcrumb text-right">
|
||||||
|
<li class="active">Configuration/Générale</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('custom_scripts')
|
||||||
|
<script>
|
||||||
|
function saveChange(pPerm) {
|
||||||
|
(function($) {
|
||||||
|
var myswitch = document.getElementById(pPerm);
|
||||||
|
$.post('/api/config/general/save?api_token='+api_token, { value: myswitch.checked,perm: pPerm } , function(data) {
|
||||||
|
swal({
|
||||||
|
title: 'Modification enregistré !',
|
||||||
|
type: 'success',
|
||||||
|
}).then((result) => {
|
||||||
|
if (result.value) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
})(jQuery);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
@@ -1,33 +1,142 @@
|
|||||||
@extends('layouts.admin.main')
|
@extends('layouts.admin.main')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<!--<div class="col-sm-6 col-lg-6">
|
<div class="col-md-12">
|
||||||
<div class="card text-white bg-flat-color-3">
|
<div class="card">
|
||||||
<div class="card-body pb-0">
|
<div class="card-header">
|
||||||
<div class="dropdown float-right">
|
Cours a venir
|
||||||
<button class="btn bg-transparent dropdown-toggle theme-toggle text-light" type="button" id="dropdownMenuButton" data-toggle="dropdown">
|
</div>
|
||||||
<i class="fa fa-cog"></i>
|
<div class="card-body">
|
||||||
</button>
|
@if(count($userClasse) == 0)
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="col-sm-12">
|
||||||
<div class="dropdown-menu-content">
|
<div class="alert alert-info alert-with-icon">
|
||||||
<a class="dropdown-item" href="#">Action</a>
|
<span data-notify="icon" class="ti-alert"></span>
|
||||||
<a class="dropdown-item" href="#">Another action</a>
|
<span data-notify="message">Aucun cours a venir</span>
|
||||||
<a class="dropdown-item" href="#">Something else here</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
@foreach ($userClasse as $classe)
|
||||||
|
<div class="col-sm-6">
|
||||||
|
@if ($classe['plan_done'] == "on")
|
||||||
|
<div class="alert alert-success alert-with-icon">
|
||||||
|
<span data-notify="icon" class="ti-crown"></span>
|
||||||
|
<span data-notify="message">Le cours {{$classe['ocom']}} - {{$classe['name']}} du {{$classe['date']}} est remis.<br>
|
||||||
|
@if ($classe['material'] != "")
|
||||||
|
- Vous avez réservé
|
||||||
|
@foreach (\App\Item::explodeItems($classe['material']) as $item)
|
||||||
|
@if (\App\Item::explodeItems($classe['material'])->last() == $item && \App\Item::explodeItems($classe['material'])->first() != $item)
|
||||||
|
et
|
||||||
|
@endif
|
||||||
|
{{$item->name}}
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
- Aucun matériel réservé
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="alert alert-warning alert-with-icon">
|
||||||
|
<span data-notify="icon" class="ti-alert"></span>
|
||||||
|
<span data-notify="message">Le cours {{$classe['ocom']}} - {{$classe['name']}} du {{$classe['date']}} n'est pas remis.<br>
|
||||||
|
@if ($classe['material'] != "")
|
||||||
|
- Vous avez réservé
|
||||||
|
@foreach (\App\Item::explodeItems($classe['material']) as $item)
|
||||||
|
@if (\App\Item::explodeItems($classe['material'])->last() == $item && \App\Item::explodeItems($classe['material'])->first() != $item)
|
||||||
|
et
|
||||||
|
@endif
|
||||||
|
{{$item->name}}
|
||||||
|
@endforeach
|
||||||
|
@else
|
||||||
|
- Aucun matériel réservé
|
||||||
|
@endif
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<h4 class="mb-0">
|
@endforeach
|
||||||
<span class="count">10468</span>
|
|
||||||
</h4>
|
|
||||||
<p class="text-light">Members online</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="chart-wrapper px-0" style="height:70px;" height="70">
|
|
||||||
<canvas id="widgetChart3"></canvas>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>-->
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="float-right">Activité a venir</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
@if(count($futureEvent) == 0)
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="alert alert-infi alert-with-icon">
|
||||||
|
<span data-notify="icon" class="ti-alert"></span>
|
||||||
|
<span data-notify="message">Aucune activité a venir</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
@foreach ($futureEvent as $event)
|
||||||
|
<div class="col-md-6 col-sm-12"><i class="fa fa-star" aria-hidden="true" style="color:gold"></i> {{$event->data['event_name']}}<div class="float-right">{{$event->data['event_begin_time']}}</div></div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<a href="/admin/calendar" type="button" class="btn btn-primary btn-lg btn-block">Afficher plus</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6 col-lg-6">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<span class="count">{{count(\App\Log::all())}}</span>
|
||||||
|
<div class="float-right">Activité sur le site</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@foreach (\App\Log::all()->forPage(1,3); as $event)
|
||||||
|
<i class="fa fa-arrow-right" aria-hidden="true"></i> {{$event->action}}<br>
|
||||||
|
@endforeach
|
||||||
|
<br>
|
||||||
|
<a href="/admin/stats/log" type="button" class="btn btn-primary btn-lg btn-block text-white">Afficher plus</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-8 col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<span class="count">{{count(\App\Message::all())}}</span>
|
||||||
|
<div class="float-right">Message publié</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="row">
|
||||||
|
@foreach (\App\Message::all()->forPage(1,4); as $msg)
|
||||||
|
<div class="col-lg-6 text-center">
|
||||||
|
<a href="/admin/message/{{$msg->id}}">
|
||||||
|
<div style="height:2rem;">{{$msg->title}}</div>
|
||||||
|
<br>
|
||||||
|
<div class="msg-body" style="height:12rem;overflow:hidden">
|
||||||
|
{!!$msg->body!!}
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<a href="/admin/message" type="button" class="btn btn-primary btn-lg btn-block text-white">Afficher plus</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4 col-lg-4">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="mx-auto d-block">
|
||||||
|
<img class="rounded-circle mx-auto d-block" src="/assets/admin/images/avatar/user-{{\Auth::User()->avatar}}.jpg" alt="Card image cap" style="height:12rem">
|
||||||
|
<h5 class="text-sm-center mt-2 mb-1">{{\Auth::User()->fullname()}}</h5>
|
||||||
|
<div class="location text-sm-center"><i class="fa fa-id-card-o" aria-hidden="true"></i> {{\App\Rank::find(\Auth::User()->rank)->name}}</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="card-text text-sm-center">
|
||||||
|
<a href="/admin/profil">Profil</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section('breadcrumb')
|
@section('breadcrumb')
|
||||||
|
|||||||
@@ -0,0 +1,103 @@
|
|||||||
|
@extends('layouts.admin.main')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<strong class="card-title">Fichiers <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||||
|
</a></strong>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="content table-responsive table-full-width">
|
||||||
|
<p>Les fichiers si dessous sont disponible autant dans l'espace administration que dans l'espace cadet cadre.
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr><th style="width:85%;">Nom</th>
|
||||||
|
<th></th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Niveau 1</strong><hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide Pédagogique</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GP_Niv_1')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide de Qualification</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GQ_Niv_1')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Niveau 2</strong><hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide Pédagogique</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GP_Niv_2')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide de Qualification</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GQ_Niv_2')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Niveau 3</strong><hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide Pédagogique</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GP_Niv_3')}}">Télécharger</a></td> </tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide de Qualification</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GQ_Niv_3')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Niveau 4</strong><hr></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide Pédagogique</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GP_Niv_4')}}">Télécharger</a></td> </tr>
|
||||||
|
<tr>
|
||||||
|
<td>Guide de Qualification</td>
|
||||||
|
<td><a class="btn btn-primary" href="{{ \App\Config::getData('file_GQ_Niv_4')}}">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="page-header float-left">
|
||||||
|
<div class="page-title">
|
||||||
|
<h1>Fichiers</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="page-header float-right">
|
||||||
|
<div class="page-title">
|
||||||
|
<ol class="breadcrumb text-right">
|
||||||
|
<li class="active">Fichiers/Guide Pédagogique</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('custom_scripts')
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
@extends('layouts.admin.main')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<strong class="card-title">Fichiers <a href="#"><i class="fa fa-question-circle" aria-hidden="true"></i>
|
||||||
|
</a></strong>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="content table-responsive table-full-width">
|
||||||
|
<p>Les fichiers si dessous sont disponible autant dans l'espace administration que dans l'espace cadet cadre.
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr><th style="width:85%;">Nom</th>
|
||||||
|
<th></th>
|
||||||
|
</tr></thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Ordre d'opération</strong><hr></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mini Ordre Operation Projet Soirée Journée Vierge</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1sqkeUp-djZDjltitGvjR0efMQgyB_sos">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Mini Ordre Operation Vierge</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1RjSSwK9NIVUFbHKlu0hbkK5IeTnAFWq9">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Tenues</strong><hr></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Liste des tenues</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1JUXaPQhHGJffE7CTnB1BAkqwM8g9t8ef">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Énoncé de fonction</strong><hr></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cadet commandant</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1DdI9eOptKarpApsUdO-6gkDFYtD6DHi8">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cadet commandant adjoint</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1jDuKQzY3Dam0J9mSGDWiv2I1agDYacRm">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Chef entrainement</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=12p8rGhSZloPFurD--RZO9KQVoRmXAEnE">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Instructeur sénior</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=13fNufhR2hYhKgeiHUo0W_V-vF_W8SPkC">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Instructeur</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1Y1gEsNP7mz2SmJPwxi7YUfpxgioJKvR0">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Assistant Instructeur</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1BxKj0J20QZ5hVQ1womwS8GUWvuq-VsJy">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Commandant de section</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1jOmyNFZ2rSOwCFjcoABx6VFcvEMKCf73">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Commandant de la garde</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=18T3rQQ-RN551meOGGPD8Ni2wbpvKNfYz">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Commandant adjoint de section</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1A5NkPhSJ5E-bIPiLRwa7VAOXQrrHIzn6">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Commandant adjoint de garde</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1ncphhTpBm9uhq0isGFNzDs_-TRPrxfKw">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cadet cadre de la logistique</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1PcmlegtAqmdX2ufGQMubkNxfkrCcSIge">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Cadet cadre de l'administration</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1haEG9jSabp10VtI7EV2OyLctn9-63T8G">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Commandant adjoint de section</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1A5NkPhSJ5E-bIPiLRwa7VAOXQrrHIzn6">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><strong>Divers</strong><hr></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Information NECPC</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1KG0IoPxpqctqqVwCfM0WyKq4y6RDBtUJ">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Évaluation pratique sur la coordination d’un ordre d’opération sur le terrain</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=1AAPB7IdpIw8UGJwIoTNQZ3cg9ODfWrAp">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>RENCONTRE PRÉILIMINAIRE D’INSTRUCTION</td>
|
||||||
|
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&id=16lT4YzNjGWd2SFmgSbmj1LcPG9cDkkyo">Télécharger</a></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('breadcrumb')
|
||||||
|
<div class="breadcrumbs">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<div class="page-header float-left">
|
||||||
|
<div class="page-title">
|
||||||
|
<h1>Fichiers</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<div class="page-header float-right">
|
||||||
|
<div class="page-title">
|
||||||
|
<ol class="breadcrumb text-right">
|
||||||
|
<li class="active">Fichiers</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('custom_scripts')
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/datatables.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/dataTables.bootstrap.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/dataTables.buttons.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.bootstrap.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/jszip.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/pdfmake.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/vfs_fonts.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.html5.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.print.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/buttons.colVis.min.js"></script>
|
||||||
|
<script src="/assets/admin/assets/js/lib/data-table/datatables-init.js"></script>
|
||||||
|
|
||||||
|
@endsection
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n1_p1_items as $item)
|
@foreach ($n1_p1_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n1_p2_items as $item)
|
@foreach ($n1_p2_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n2_p1_items as $item)
|
@foreach ($n2_p1_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -155,7 +155,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n2_p2_items as $item)
|
@foreach ($n2_p2_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -184,7 +184,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -192,7 +192,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n3_p1_items as $item)
|
@foreach ($n3_p1_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -218,7 +218,7 @@
|
|||||||
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<th style="border:none;">ID</th>
|
<th style="border:none;">Quantité</th>
|
||||||
<th style="border:none;">Item</th>
|
<th style="border:none;">Item</th>
|
||||||
<th style="border:none;">Description</th>
|
<th style="border:none;">Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($n3_p2_items as $item)
|
@foreach ($n3_p2_items as $item)
|
||||||
<tr style="border:none;">
|
<tr style="border:none;">
|
||||||
<td style="border:none; width:10%">{{$item}}</td>
|
<td style="border:none; width:10%">@php $quantity = explode(":",$item); @endphp {{$quantity[1]}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->name}}</td>
|
||||||
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
<td style="border:none;">{{\App\Item::find($item)->desc}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<table id="log-data" class="table table-striped table-bordered">
|
<table id="log-data" class="table table-striped table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID </th>
|
<th>Quantité</th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($items as $item)
|
@foreach ($items as $item)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width:5%;">{{$item->id}}</td>
|
<td style="width:5%;">{{$item->quantity}}</td>
|
||||||
<td>{{$item->name}}</td>
|
<td>{{$item->name}}</td>
|
||||||
<td>{{$item->desc}}</td>
|
<td>{{$item->desc}}</td>
|
||||||
<td style="width: 12%;"><a href="/admin/item/edit/{{$item->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i> Modifier</a><a type="button" class="btn btn-danger" onclick="deleteEvent({{$item->id}});"><i class="fa fa-times-circle" style="color:white;"></i></a></td>
|
<td style="width: 12%;"><a href="/admin/item/edit/{{$item->id}}" type="button" class="btn btn-secondary"><i class="fa fa-cog"></i> Modifier</a><a type="button" class="btn btn-danger" onclick="deleteEvent({{$item->id}});"><i class="fa fa-times-circle" style="color:white;"></i></a></td>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Quantité</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -28,7 +29,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{{$item->name}}</td>
|
<td>{{$item->name}}</td>
|
||||||
<td>{{$item->desc}}</td>
|
<td>{{$item->desc}}</td>
|
||||||
<td style="width: 12%;"><form action="/admin/inventory/remove/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="remove" value="{{$item->id}}" class="btn btn-danger"><i class="fa fa-arrow-right" style="color:white;"></i></button></form></td>
|
<td>{{$item->quantity}}</td>
|
||||||
|
<td style="width: 12%;"><form action="/admin/inventory/remove/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="remove" value="{{$item->id}}:{{$item->quantity}}" class="btn btn-danger"><i class="fa fa-arrow-right" style="color:white;"></i></button></form></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@@ -47,15 +49,17 @@
|
|||||||
<th></th>
|
<th></th>
|
||||||
<th>Nom</th>
|
<th>Nom</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
|
<th>Quantité</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($dispo_item as $item)
|
@foreach ($dispo_item as $item)
|
||||||
@if ($item !== null)
|
@if ($item !== null)
|
||||||
<tr>
|
<tr>
|
||||||
<td style="width: 12%;"><form action="/admin/inventory/add/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="add" class="btn btn-success" value="{{$item->id}}"><i class="fa fa-arrow-left" style="color:white;"></i></button></form></td>
|
<td style="width: 12%;"><form action="/admin/inventory/add/{{$schedule->id}}/{{$periode}}/{{$niveau}}" method="post">{{ csrf_field() }}<button type="submit" name="add" class="btn btn-success" value="{{$item->id}}"><i class="fa fa-arrow-left" style="color:white;"></i></button></td>
|
||||||
<td>{{$item->name}}</td>
|
<td>{{$item->name}}</td>
|
||||||
<td>{{$item->desc}}</td>
|
<td>{{$item->desc}}</td>
|
||||||
|
<td><input type="number" class="form-control" name="qt" id="qt" min="1" max="{{$item->quantity}}" value="{{$item->quantity}}"></div></form></td>
|
||||||
</tr>
|
</tr>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
@@ -18,6 +18,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="qt">Quantité</label>
|
||||||
|
<input type="number" class="form-control" name="qt" id="qt" aria-describedby="qthelp" placeholder="" required>
|
||||||
|
<small id="qthelp" class="form-text text-muted">Quantité disponible</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||
@@ -18,6 +18,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="qt">Quantité</label>
|
||||||
|
<input type="number" class="form-control" name="qt" id="qt" aria-describedby="qthelp" placeholder="" required value="{{$item->quantity}}">
|
||||||
|
<small id="qthelp" class="form-text text-muted">Quantité disponible</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|||||||