79 Commits

Author SHA1 Message Date
Mathieu Lagace cb3fdc44e2 MIse a jour Ci/Cd 2019-08-04 19:26:54 -04:00
Mathieu Lagace d57c648d7f Mise a jour CI/CD 2019-08-04 19:19:33 -04:00
Mathieu Lagace c6110b47e8 Mise a jour CI/CD 2019-08-04 19:11:00 -04:00
Mathieu Lagace fd73dc388d Ajout 736 CI/CD 2019-08-04 19:10:08 -04:00
Mathieu Lagace 818a84c3df Mise a jour Envoy 2019-08-04 18:54:03 -04:00
Mathieu Lagace 7364c3494c Mise a jour Envoy 2019-08-04 18:47:46 -04:00
Mathieu Lagace 76c60d512f Edit CI/CD 2019-08-04 17:40:34 -04:00
Mathieu Lagace 54d57c7b13 Add Docker 2019-08-04 17:19:53 -04:00
Mathieu Lagace e679cacb7d Ajout de Envoy 2019-08-04 17:06:43 -04:00
Mathieu Lagace b28b7cdab5 Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!28
2019-08-04 21:01:52 +00:00
Mathieu Lagace eee82e3b81 Release 3.1.0 2019-08-04 16:38:03 -04:00
Mathieu Lagace 97a7be702e Ajout des news & pictures & complementary activity 2019-08-04 14:26:14 -04:00
Mathieu Lagace 47128ea6fc test working tree 2019-08-04 10:07:32 -04:00
Dev Distant fdc2772ee2 workflow change 2019-08-04 09:56:40 -04:00
Mathieu Lagace c4f96fbfc4 Update .gitlab-ci.yml 2019-04-05 12:05:11 +00:00
Mathieu Lagace 75a4a0a080 Merge branch 'dev' into 'master'
v3.0.7a

See merge request TheGamecraft/c-cms!27
2019-04-05 12:00:22 +00:00
TheGamecraft f262392672 v3.0.7a 2019-01-31 11:47:01 -05:00
Mathieu Lagace 1679252930 Merge branch 'dev' into 'master'
3.0.7

See merge request TheGamecraft/c-cms!26
2018-12-03 22:22:50 +00:00
TheGamecraft 9dc4d1103f 3.0.7 2018-12-03 17:21:50 -05:00
Mathieu Lagace 07e409a922 Merge branch 'dev' into 'master'
3.0.6i

See merge request TheGamecraft/c-cms!25
2018-12-03 15:52:20 +00:00
TheGamecraft 0fddd138bf 3.0.6i 2018-12-03 10:51:24 -05:00
Mathieu Lagace 8bb9655c9f Merge branch 'dev' into 'master'
ALPHA 3.0.6h

See merge request TheGamecraft/c-cms!24
2018-11-27 22:18:38 +00:00
TheGamecraft f98cd85872 ALPHA 3.0.6h 2018-11-27 17:17:52 -05:00
Mathieu Lagace f6944d7b70 Merge branch 'dev' into 'master'
ALPHA 3.0.6g

See merge request TheGamecraft/c-cms!23
2018-11-14 16:37:54 +00:00
TheGamecraft fc9d14e735 ALPHA 3.0.6g 2018-11-14 11:37:04 -05:00
Mathieu Lagace fcf96df5e8 Merge branch 'dev' into 'master'
ALPHA 3.0.6f

See merge request TheGamecraft/c-cms!22
2018-11-13 18:40:47 +00:00
TheGamecraft 1ee9848312 ALPHA 3.0.6f 2018-11-13 13:40:15 -05:00
Mathieu Lagace 333679c510 Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!21
2018-11-13 18:27:23 +00:00
TheGamecraft f65a38ca26 Merge branch 'dev' of gitlab.com:TheGamecraft/c-cms into dev
Mise a juors
2018-11-13 13:24:25 -05:00
TheGamecraft 84e17938a7 ALPHA 3.0.6e 2018-11-13 13:23:59 -05:00
TheGamecraft 0690d36eb2 ALPHA 3.0.6d 2018-11-13 13:18:46 -05:00
Mathieu Lagace e0f3a26bc2 Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!19
2018-11-13 17:16:44 +00:00
Mathieu Lagace 96ec0fdb03 Delete .env.testing 2018-11-13 17:15:33 +00:00
TheGamecraft 01f8cf75b8 3.0.6c 2018-11-13 12:14:14 -05:00
Mathieu Lagace 72d51850c2 Merge branch 'dev' into 'master'
ALPHA 3.0.6b

See merge request TheGamecraft/c-cms!18
2018-11-12 16:11:55 +00:00
TheGamecraft e76a6e9f40 ALPHA 3.0.6b 2018-11-12 11:10:47 -05:00
Mathieu Lagace c58cf9ee8d Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!17
2018-11-08 17:20:02 +00:00
TheGamecraft 2b6bd17b8d ALPHA 3.0.6 2018-11-08 12:16:01 -05:00
TheGamecraft 87264660bc ALPHA 3.0.5e 2018-10-10 17:52:21 -04:00
Mathieu Lagace 932de1b154 Update readme.md 2018-09-26 21:20:42 +00:00
Mathieu Lagace 6353208b20 Merge branch 'dev' into 'master'
ALPHA 3.0.5d

See merge request TheGamecraft/c-cms!15
2018-09-26 14:48:49 +00:00
TheGamecraft d3dbd21da5 ALPHA 3.0.5d 2018-09-26 10:46:57 -04:00
Mathieu Lagace c5f9890ace Merge branch 'dev' into 'master'
ALPHA 3.0.5c

See merge request TheGamecraft/c-cms!14
2018-09-24 18:44:43 +00:00
TheGamecraft e554f011b4 ALPHA 3.0.5c 2018-09-24 14:43:32 -04:00
Mathieu Lagace 7b2d16642c Merge branch 'dev' into 'master'
ALPHA 3.0.5b

See merge request TheGamecraft/c-cms!13
2018-09-24 18:39:02 +00:00
TheGamecraft 64f5d54d3d ALPHA 3.0.5b 2018-09-24 14:37:47 -04:00
Mathieu Lagace 016e65b495 Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!12
2018-09-24 18:23:45 +00:00
TheGamecraft 23e4abc5c4 Merge branch 'dev' of gitlab.com:TheGamecraft/c-cms into dev
Voila
2018-09-24 14:21:00 -04:00
TheGamecraft ac829d58b9 ALPHA 3.0.5a 2018-09-24 14:19:28 -04:00
Mathieu Lagace c162184035 Update .gitlab-ci.yml 2018-09-24 18:14:24 +00:00
Mathieu Lagace 1a321d1021 Update .gitlab-ci.yml 2018-09-24 17:42:11 +00:00
Mathieu Lagace 0d8117c96d Update .gitlab-ci.yml 2018-09-24 17:37:46 +00:00
Mathieu Lagace 535048b687 Update .gitlab-ci.yml 2018-09-24 17:36:19 +00:00
Mathieu Lagace fc6255363e Merge branch 'dev' into 'master'
Dev

See merge request TheGamecraft/c-cms!11
2018-09-24 16:10:22 +00:00
Mathieu Lagace 7732bbe85e Merge branch 'TheGamecraft-dev-patch-96226' into 'dev'
The gamecraft dev patch 96226

See merge request TheGamecraft/c-cms!10
2018-09-24 16:09:07 +00:00
Mathieu Lagace 027e6e6b28 Update resources/views/public.blade.php
Deleted resources/views/default.blade.php
2018-09-24 16:08:08 +00:00
Mathieu Lagace ffe8032cc8 Deleted resources/views/public.blade.php 2018-09-24 16:07:49 +00:00
Mathieu Lagace 2ffa5d1ba3 Update .gitlab-ci.yml 2018-09-24 16:07:19 +00:00
Mathieu Lagace 839340acc2 Merge branch 'master' into 'dev'
Master

See merge request TheGamecraft/c-cms!9
2018-09-24 16:05:12 +00:00
Mathieu Lagace b44a8b94fb Update .gitlab-ci.yml 2018-09-24 15:34:43 +00:00
Mathieu Lagace 70bb173eb0 Update .gitlab-ci.yml 2018-09-24 15:22:38 +00:00
Mathieu Lagace 712246e6cb Update .gitlab-ci.yml 2018-09-24 15:19:14 +00:00
Mathieu Lagace c036745988 Update .gitlab-ci.yml 2018-09-24 15:15:21 +00:00
Mathieu Lagace d5151920d8 Update .gitlab-ci.yml 2018-09-24 15:08:32 +00:00
Mathieu Lagace bcc293a5d4 Update .gitlab-ci.yml 2018-09-24 15:05:19 +00:00
Mathieu Lagace 5922024c70 Update .gitlab-ci.yml 2018-09-24 15:03:54 +00:00
Mathieu Lagace f600c5cbb4 Update .gitlab-ci.yml 2018-09-24 15:00:05 +00:00
Mathieu Lagace 871877ca37 Update .gitlab-ci.yml 2018-09-24 14:54:13 +00:00
Mathieu Lagace 5597ded1ea Update .gitlab-ci.yml 2018-09-24 14:46:40 +00:00
Mathieu Lagace 34a4ebb2a8 Update .gitlab-ci.yml 2018-09-24 14:35:01 +00:00
Mathieu Lagace 1d13c8c8a9 Update .gitlab-ci.yml 2018-09-24 14:13:01 +00:00
Mathieu Lagace e3aa153cf8 Update .gitlab-ci.yml 2018-09-24 13:45:37 +00:00
Mathieu Lagace afa7e47ef3 Update .gitlab-ci.yml 2018-09-24 13:20:32 +00:00
Mathieu Lagace 033a2d65d8 Update .gitlab-ci.yml 2018-09-24 13:18:07 +00:00
Mathieu Lagace 863a701e08 Add .gitlab-ci.yml 2018-09-24 13:12:47 +00:00
Mathieu Lagace d5c6a534b5 Update CHANGELOG 2018-09-21 18:34:01 +00:00
Mathieu Lagace 0ddf99318d Merge branch 'dev' into 'master'
ALPHA 3.0.5

See merge request TheGamecraft/c-cms!8
2018-09-21 18:33:03 +00:00
TheGamecraft 3b593297cd ALPHA 3.0.5 2018-09-21 14:31:00 -04:00
Mathieu Lagace d41147346c Update CHANGELOG 2018-09-20 15:21:08 +00:00
6396 changed files with 4612 additions and 707413 deletions
+11 -10
View File
@@ -1,20 +1,20 @@
APP_NAME=C-CMS
APP_ENV=local
APP_KEY=base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc=
APP_DEBUG=true
APP_URL=https://dev.c-cms.cf/
APP_KEY=
APP_DEBUG=false
APP_URL=https://dev.c-cms.cf/ # Adresse de votre site web
SQN_NUMBER=000
SQN_FULLNAME="Escadron 000 Exemple"
SQN_NUMBER=000 # Numéro de votre escadron
SQN_FULLNAME="Escadron 000 Exemple" # Nom complet de votre escadron
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=ddb_dev
DB_USERNAME=root
DB_PASSWORD=nHpz39lp
DB_DATABASE=ddb # Nom de la base de donnée
DB_USERNAME=user # Nom d'utilisateur pour ce connecter a la base de donnée
DB_PASSWORD=password # Mot de passe de la base de donnée
BROADCAST_DRIVER=log
CACHE_DRIVER=file
@@ -33,8 +33,8 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
NEXMO_KEY=f52074e0
NEXMO_SECRET=lXK9GasDUdotWqL3
NEXMO_KEY=4587feffd # Votre Clé Nexmo API
NEXMO_SECRET=54dasf4e8fa4s4fd4f5s # Votre Mot de passe Nexmo API
PUSHER_APP_ID=
PUSHER_APP_KEY=
@@ -43,3 +43,4 @@ PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
+11 -10
View File
@@ -1,15 +1,16 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vscode
/.vagrant
node_modules
public/hot
public/storage
storage/*.key
vendor
.idea
.vscode
.vagrant
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
/public/assets/public
/resources/views/public.blade.php
.env.testing
public/theme
resources/views/public.blade.php
+54
View File
@@ -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
+39
View File
@@ -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 **/
Nouveauté
+23
View File
@@ -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"
+92
View File
@@ -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
+13
View File
@@ -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');
}
}
+13 -1
View File
@@ -6,5 +6,17 @@ use Illuminate\Database\Eloquent\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();
}
}
+17 -1
View File
@@ -26,7 +26,23 @@ class AdminController extends Controller
{
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()
+212 -9
View File
@@ -34,6 +34,8 @@ class CalendarController extends Controller
{
Log::saveLog("Affichage de l'horaire");
$this->listClass();
return view('admin.calendar.calendar_display');
}
@@ -95,11 +97,10 @@ class CalendarController extends Controller
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>';
} 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 = "";
foreach ($activityToday as $activity) {
echo '<div class="calendar-date">'.date("j", strtotime($today)).'</div>
<div class="calendar-text" style="width:90%;">';
echo '<div class="calendar-text" style="width:90%;height:3rem;">';
switch ($activity->type) {
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>";
@@ -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>'.
'</div>'.
'</div>'.
'<p>'.
"L'activité auras lieux a l'escadron entre 18h30 et 21h30".
'</p>'.
'<p>'.$date->data['event_desc'].
'</p>'
);
@@ -445,14 +443,14 @@ class CalendarController extends Controller
$schedule->save();
/** 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();
\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)
{
\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');
@@ -461,6 +459,7 @@ class CalendarController extends Controller
public function patch($id)
{
$schedule = Schedule::find($id);
$original = clone($schedule);
$schedule->date = request('event_date');
$schedule->type = request('event_type');
@@ -522,6 +521,171 @@ class CalendarController extends Controller
$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');
}
@@ -533,5 +697,44 @@ class CalendarController extends Controller
$schedule = Schedule::find($id);
$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)
{
//
}
}
+13 -3
View File
@@ -14,7 +14,7 @@ class ConfigController extends Controller
*/
public function index()
{
//
return view ('admin.configs.general',['configs' => Config::all()]);
}
/**
@@ -67,9 +67,19 @@ class ConfigController extends Controller
* @param \App\Config $config
* @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');
}
/**
+53 -5
View File
@@ -247,25 +247,43 @@ class ECCController extends Controller
foreach ($items_array as $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)]);
}
public function booking_add($id,$periode,$niveau)
{
$schedule = Schedule::find($id);
$id_to_modify = "passet";
$qt_to_add = 0;
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
if (isset($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 {
$array_items = [];
array_push($array_items,request('add'));
array_push($array_items,request('add').":".request('qt'));
}
$final_items = implode("-",$array_items);
@@ -273,7 +291,7 @@ class ECCController extends Controller
$schedule->$periode_item = $final_items;
$schedule->save();
return redirect('/ecc/inventory/'.$id.'/'.$niveau.'/'.$periode);
}
@@ -297,4 +315,34 @@ class ECCController extends Controller
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
namespace DummyNamespace;
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DummyRootNamespaceHttp\Controllers\Controller;
class DummyClass extends Controller
class FilesController extends Controller
{
/**
* Display a listing of the resource.
@@ -14,7 +13,7 @@ class DummyClass extends Controller
*/
public function index()
{
//
return view('admin.files.index');
}
/**
@@ -82,4 +81,9 @@ class DummyClass extends Controller
{
//
}
public function guide()
{
return view('admin.files.guide');
}
}
+23 -5
View File
@@ -54,15 +54,29 @@ class InventoryController extends Controller
public function store($id,$periode,$niveau)
{
$schedule = Schedule::find($id);
$id_to_modify = "passet";
$qt_to_add = 0;
$periode_item = 'n'.$niveau.'_p'.$periode.'_item';
if (isset($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 {
$array_items = [];
array_push($array_items,request('add'));
array_push($array_items,request('add').":".request('qt'));
}
$final_items = implode("-",$array_items);
@@ -70,7 +84,7 @@ class InventoryController extends Controller
$schedule->$periode_item = $final_items;
$schedule->save();
return redirect('/admin/inventory/'.$id.'/'.$periode.'/'.$niveau);
}
@@ -91,10 +105,14 @@ class InventoryController extends Controller
foreach ($items_array as $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)]);
}
+2
View File
@@ -39,6 +39,7 @@ class ItemController extends Controller
$item->name = request('name');
$item->desc = request('desc');
$item->quantiy = request('qt');
$item->save();
@@ -82,6 +83,7 @@ class ItemController extends Controller
$item->name = request('name');
$item->desc = request('desc');
$item->quantity = request('qt');
$item->save();
+2 -16
View File
@@ -78,22 +78,8 @@ class MessageController extends Controller
*/
public function show($id)
{
$this_msg = 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]);
\Auth::User()->seenMessage($id);
return view('admin.message.show', ['message' => Message::find($id)]);
}
/**
@@ -1,11 +1,11 @@
<?php
namespace DummyNamespace;
namespace App\Http\Controllers;
use App\News;
use Illuminate\Http\Request;
use DummyRootNamespaceHttp\Controllers\Controller;
class DummyClass extends Controller
class NewsController extends Controller
{
/**
* Display a listing of the resource.
@@ -13,6 +13,16 @@ class DummyClass extends Controller
* @return \Illuminate\Http\Response
*/
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.
*
* @param int $id
* @param \App\News $news
* @return \Illuminate\Http\Response
*/
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.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @param \App\News $news
* @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.
*
* @param int $id
* @param \App\News $news
* @return \Illuminate\Http\Response
*/
public function destroy($id)
public function destroy(News $news)
{
//
}
@@ -1,12 +1,11 @@
<?php
namespace DummyNamespace;
namespace App\Http\Controllers;
use DummyFullModelClass;
use App\Picture;
use Illuminate\Http\Request;
use DummyRootNamespaceHttp\Controllers\Controller;
class DummyClass extends Controller
class PictureController extends Controller
{
/**
* Display a listing of the resource.
@@ -15,7 +14,7 @@ class DummyClass extends Controller
*/
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.
*
* @param \DummyFullModelClass $DummyModelVariable
* @param \App\Picture $picture
* @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.
*
* @param \DummyFullModelClass $DummyModelVariable
* @param \App\Picture $picture
* @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.
*
* @param \Illuminate\Http\Request $request
* @param \DummyFullModelClass $DummyModelVariable
* @param \App\Picture $picture
* @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.
*
* @param \DummyFullModelClass $DummyModelVariable
* @param \App\Picture $picture
* @return \Illuminate\Http\Response
*/
public function destroy(DummyModelClass $DummyModelVariable)
public function destroy(Picture $picture)
{
//
}
+94
View File
@@ -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)
{
//
}
}
+2 -1
View File
@@ -3,8 +3,9 @@
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use \App\Schedule;
class ScheduleController extends Controller
{
//
//
}
+74
View File
@@ -173,4 +173,78 @@ class UserController extends Controller
$notification->delete();
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é');
}
}
+19
View File
@@ -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;
}
+18
View File
@@ -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');
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Picture extends Model
{
public function pictureable()
{
return $this->morphTo();
}
}
+103 -15
View File
@@ -13,8 +13,10 @@ class Schedule extends Model
public function getInventory($periode)
{
$dispo = [];
$used = [];
$dispo_id = [];
$dispo_qt = [];
$used_id = [];
$used_qt = [];
$dispo_item = collect();
$string_periode = 'p'.$periode;
@@ -22,34 +24,72 @@ class Schedule extends Model
$inventory = Item::all();
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';
$items_array = explode("-",$this->$n1);
foreach ($items_array as $item_array) {
array_push($used,$item_array);
if ($items_array[0] == "") {
unset($items_array[0]);
}
$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';
$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) {
array_push($used,$item_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]);
}
}
$n3 = 'n3_'.$string_periode.'_item';
$items_array = explode("-",$this->$n3);
foreach ($items_array as $item_array) {
array_push($used,$item_array);
if ($items_array[0] == "") {
unset($items_array[0]);
}
$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);
foreach ($dispo as $key) {
$dispo_item->push(Item::find($key));
for ($i=0; $i < count($used_id); $i++) {
for ($e=0; $e < count($dispo_id); $e++) {
if (isset($dispo_id[0])) {
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;
@@ -74,4 +114,52 @@ class Schedule extends Model
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;
}
}
+29 -1
View File
@@ -208,7 +208,7 @@ class User extends Authenticatable
$filtered_schedule = collect();
foreach (\App\Schedule::all() as $day) {
foreach ($schedules as $day) {
if ($day->date >= date('Y-m-d')) {
$filtered_schedule->push($day);
}
@@ -236,4 +236,32 @@ class User extends Authenticatable
}
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');
}
}
+2 -1
View File
@@ -26,7 +26,8 @@
],
"psr-4": {
"App\\": "app/"
}
},
"files": ["app/Http/helpers.php"]
},
"autoload-dev": {
"psr-4": {
Generated
+1031 -420
View File
File diff suppressed because it is too large Load Diff
@@ -15,6 +15,7 @@ class CreateItemsTable extends Migration
{
Schema::create('items', function (Blueprint $table) {
$table->increments('id');
$table->integer('quantity');
$table->string('name');
$table->string('desc');
$table->timestamps();
@@ -4,7 +4,7 @@ use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class DummyClass extends Migration
class CreateNewsTable extends Migration
{
/**
* Run the migrations.
@@ -13,8 +13,12 @@ class DummyClass extends Migration
*/
public function up()
{
Schema::create('DummyTable', function (Blueprint $table) {
Schema::create('news', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');
$table->integer('user_id');
$table->boolean('publish');
$table->timestamps();
});
}
@@ -26,6 +30,6 @@ class DummyClass extends Migration
*/
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\Migrations\Migration;
class CreateNotificationsTable extends Migration
class CreatePicturesTable extends Migration
{
/**
* Run the migrations.
@@ -13,12 +13,13 @@ class CreateNotificationsTable extends Migration
*/
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
Schema::create('pictures', function (Blueprint $table) {
$table->increments('id');
$table->string('url');
$table->string('title');
$table->text('desc');
$table->integer('pictureable_id');
$table->string('pictureable_type');
$table->timestamps();
});
}
@@ -30,6 +31,6 @@ class CreateNotificationsTable extends Migration
*/
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',
]
]);
}
}
+166 -1
View File
@@ -21,7 +21,172 @@ class ConfigsTableSeeder extends Seeder
'name' => 'is_schedule_build',
'state' => 0,
'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"]'
],
]);
}
}
+3 -1
View File
@@ -14,7 +14,9 @@ class DatabaseSeeder extends Seeder
$this->call([
JobsTableSeeder::class,
RanksTableSeeder::class,
ConfigsTableSeeder::class
ConfigsTableSeeder::class,
UsersTableSeeder::class,
ComplementaryActivitiesSeeder::class,
]);
}
}
+12 -1
View File
@@ -11,6 +11,17 @@ class UsersTableSeeder extends Seeder
*/
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',
]);
}
}
+1
View File
@@ -24,6 +24,7 @@
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_KEY" value="base64:FQH+yWnhFyB+2gpByIg2Rybmqn5EXkL7VeFawzSJ/Lc="/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -2253,7 +2253,7 @@ header .form-inline {
vertical-align: middle !important;
border: solid 1px #d9d9d9 !important;
padding: 0px !important;
display: flex;
background-color: white;
}
.calendar-date{
float: left;
@@ -2261,11 +2261,14 @@ header .form-inline {
}
.calendar-text{
float: right;
margin-top: 1.5rem;
}
.calendar-text > div {
text-align:start;
}
.calendar_event_name {
height: 3rem;
overflow: hidden;
}
@media only screen and (max-width: 800px) {
.calendar-container{
width: 100%;
+4 -4
View File
@@ -98,7 +98,7 @@ function switchType()
eventBeginTime.value = "18:30";
eventEndTime.value = "21:45";
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_p2_plandone = document.getElementById('n1_p2_plandone');
@@ -180,7 +180,7 @@ function switchType()
eventBeginTime.value = "";
eventEndTime.value = "";
eventLocation.value = "";
eventDesc.value = "";
eventDesc.value = "Financement";
divSpecialSection.style.display = "none";
break;
@@ -190,7 +190,7 @@ function switchType()
eventBeginTime.value = "";
eventEndTime.value = "";
eventLocation.value = "";
eventDesc.value = "";
eventDesc.value = "Bénévolat";
divSpecialSection.style.display = "none";
break;
@@ -200,7 +200,7 @@ function switchType()
eventBeginTime.value = "";
eventEndTime.value = "";
eventLocation.value = "";
eventDesc.value = "";
eventDesc.value = "Autre";
divSpecialSection.style.display = "none";
break;
}
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
View File
View File

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 401 B

View File

Before

Width:  |  Height:  |  Size: 396 B

After

Width:  |  Height:  |  Size: 396 B

View File

Before

Width:  |  Height:  |  Size: 357 B

After

Width:  |  Height:  |  Size: 357 B

Vendored Regular → Executable
+49 -8
View File
@@ -2796,7 +2796,7 @@ input, select, textarea {
}
.wrapper.style1 {
background-color: #21b2a6;
background-color: #071828;
color: #c8ece9;
}
@@ -2955,11 +2955,11 @@ input, select, textarea {
}
.wrapper.style2 {
background-color: #2e3842;
background-color: #17273a;
}
.wrapper.style3 {
background-color: #505393;
background-color: #0a2444;
color: #d3d4e4;
}
@@ -3118,7 +3118,7 @@ input, select, textarea {
}
.wrapper.style4 {
background-color: transparent;
background-color: #17273a;
}
.wrapper.style5 {
@@ -3330,7 +3330,7 @@ input, select, textarea {
-ms-transition: -ms-transform 0.5s ease;
transition: transform 0.5s ease;
-webkit-overflow-scrolling: touch;
background: #21b2a6;
background: #17273a;
color: #ffffff;
height: 100%;
max-width: 80%;
@@ -3424,7 +3424,7 @@ input, select, textarea {
-webkit-transition: background-color 0.2s ease;
-ms-transition: background-color 0.2s ease;
transition: background-color 0.2s ease;
background: #2e3842;
background: #071828;
height: 3em;
left: 0;
line-height: 3em;
@@ -3955,7 +3955,7 @@ input, select, textarea {
}
body.landing #footer {
background-color: rgba(29, 36, 42, 0.9);
background-color: #071828fd;
}
body.is-mobile.landing #page-wrapper {
@@ -3975,4 +3975,45 @@ input, select, textarea {
body.is-mobile.landing #footer {
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;
}
Vendored Regular → Executable
View File
View File
View File
View File

Before

Width:  |  Height:  |  Size: 434 KiB

After

Width:  |  Height:  |  Size: 434 KiB

View File
View File
View File
View File
Vendored Regular → Executable
View File
Vendored Regular → Executable
View File
View File
View File
Vendored Regular → Executable
View File
Vendored Regular → Executable
View File
View File
View File
View File
View File
View File
View File
Vendored Regular → Executable
View File
Vendored Regular → Executable
View File
View File

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

Before

Width:  |  Height:  |  Size: 440 KiB

After

Width:  |  Height:  |  Size: 440 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 180 KiB

View File

Before

Width:  |  Height:  |  Size: 139 KiB

After

Width:  |  Height:  |  Size: 139 KiB

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

+1 -1
View File
@@ -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">
Version 2.5.3
@@ -16,11 +16,6 @@
</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>
</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
+132 -23
View File
@@ -1,33 +1,142 @@
@extends('layouts.admin.main')
@section('content')
<!--<div class="col-sm-6 col-lg-6">
<div class="card text-white bg-flat-color-3">
<div class="card-body pb-0">
<div class="dropdown float-right">
<button class="btn bg-transparent dropdown-toggle theme-toggle text-light" type="button" id="dropdownMenuButton" data-toggle="dropdown">
<i class="fa fa-cog"></i>
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<div class="dropdown-menu-content">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="col-md-12">
<div class="card">
<div class="card-header">
Cours a venir
</div>
<div class="card-body">
@if(count($userClasse) == 0)
<div class="col-sm-12">
<div class="alert alert-info alert-with-icon">
<span data-notify="icon" class="ti-alert"></span>
<span data-notify="message">Aucun cours a venir</span>
</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>
<h4 class="mb-0">
<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>
@endforeach
</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
@section('breadcrumb')
+103
View File
@@ -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
+153
View File
@@ -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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;id=1KG0IoPxpqctqqVwCfM0WyKq4y6RDBtUJ">Télécharger</a></td>
</tr>
<tr>
<td>Évaluation pratique sur la coordination dun ordre dopération sur le terrain</td>
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&amp;id=1AAPB7IdpIw8UGJwIoTNQZ3cg9ODfWrAp">Télécharger</a></td>
</tr>
<tr>
<td>RENCONTRE PRÉILIMINAIRE DINSTRUCTION</td>
<td><a class="btn btn-primary" href="https://drive.google.com/uc?export=download&amp;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;">
<thead>
<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;">Description</th>
</tr>
@@ -50,7 +50,7 @@
<tbody>
@foreach ($n1_p1_items as $item)
<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)->desc}}</td>
</tr>
@@ -76,7 +76,7 @@
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<thead>
<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;">Description</th>
</tr>
@@ -84,7 +84,7 @@
<tbody>
@foreach ($n1_p2_items as $item)
<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)->desc}}</td>
</tr>
@@ -113,7 +113,7 @@
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<thead>
<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;">Description</th>
</tr>
@@ -121,7 +121,7 @@
<tbody>
@foreach ($n2_p1_items as $item)
<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)->desc}}</td>
</tr>
@@ -147,7 +147,7 @@
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<thead>
<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;">Description</th>
</tr>
@@ -155,7 +155,7 @@
<tbody>
@foreach ($n2_p2_items as $item)
<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)->desc}}</td>
</tr>
@@ -184,7 +184,7 @@
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<thead>
<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;">Description</th>
</tr>
@@ -192,7 +192,7 @@
<tbody>
@foreach ($n3_p1_items as $item)
<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)->desc}}</td>
</tr>
@@ -218,7 +218,7 @@
<table class="table float center" style="border:none; max-width:80%; margin:auto;">
<thead>
<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;">Description</th>
</tr>
@@ -226,7 +226,7 @@
<tbody>
@foreach ($n3_p2_items as $item)
<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)->desc}}</td>
</tr>
@@ -13,7 +13,7 @@
<table id="log-data" class="table table-striped table-bordered">
<thead>
<tr>
<th>ID </th>
<th>Quantité</th>
<th>Nom</th>
<th>Description</th>
<th></th>
@@ -22,7 +22,7 @@
<tbody>
@foreach ($items as $item)
<tr>
<td style="width:5%;">{{$item->id}}</td>
<td style="width:5%;">{{$item->quantity}}</td>
<td>{{$item->name}}</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>&nbsp; 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>
<th>Nom</th>
<th>Description</th>
<th>Quantité</th>
<th></th>
</tr>
</thead>
@@ -28,7 +29,8 @@
<tr>
<td>{{$item->name}}</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>
@endif
@endforeach
@@ -47,15 +49,17 @@
<th></th>
<th>Nom</th>
<th>Description</th>
<th>Quantité</th>
</tr>
</thead>
<tbody>
@foreach ($dispo_item as $item)
@if ($item !== null)
<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->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>
@endif
@endforeach
+9
View File
@@ -18,6 +18,15 @@
</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="col-12">
<div class="form-group">
@@ -18,6 +18,15 @@
</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="col-12">
<div class="form-group">

Some files were not shown because too many files have changed in this diff Show More