forked from miguel456/rbrecruiter
Compare commits
2 Commits
analysis-a
...
analysis-a
| Author | SHA1 | Date | |
|---|---|---|---|
| 773ec570d9 | |||
| 53c23f3698 |
14
.idea/hrm-mcserver.iml
generated
14
.idea/hrm-mcserver.iml
generated
@@ -2,16 +2,12 @@
|
|||||||
<module type="WEB_MODULE" version="4">
|
<module type="WEB_MODULE" version="4">
|
||||||
<component name="NewModuleRootManager">
|
<component name="NewModuleRootManager">
|
||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<sourceFolder url="file://$MODULE_DIR$/database/factories" isTestSource="false" packagePrefix="Database\Factories\" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Tests\" />
|
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Tests\" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/database/seeders" isTestSource="false" packagePrefix="Database\Seeders\" />
|
|
||||||
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
||||||
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
|
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/almasaeed2010/adminlte" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/almasaeed2010/adminlte" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/asm89/stack-cors" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/asm89/stack-cors" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/awssat/discord-notification-channel" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-debugbar" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/berkayk/onesignal-laravel" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/brick/math" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/brick/math" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/clue/stream-filter" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/clue/stream-filter" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/composer" />
|
||||||
@@ -31,7 +27,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/filp/whoops" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/filp/whoops" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/fruitcake/laravel-cors" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/fruitcake/laravel-cors" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/fzaninotto/faker" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/graham-campbell/result-type" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/guzzle" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/promises" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/guzzlehttp/psr7" />
|
||||||
@@ -49,7 +44,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mcamara/laravel-localization" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/mcamara/laravel-localization" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/mockery/mockery" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/mpociot/teamwork" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/myclabs/deep-copy" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/nesbot/carbon" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
|
||||||
@@ -72,7 +66,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpspec/prophecy" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-code-coverage" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-file-iterator" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-invoker" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-text-template" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-timer" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpunit/php-token-stream" />
|
||||||
@@ -89,16 +82,12 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/collection" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/collection" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/uuid" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/uuid" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/scrivo/highlight.php" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/scrivo/highlight.php" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/cli-parser" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/complexity" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/diff" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/environment" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/exporter" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/global-state" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/lines-of-code" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-enumerator" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/object-reflector" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/recursion-context" />
|
||||||
@@ -117,8 +106,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher-contracts" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/finder" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-client" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-client-contracts" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-foundation" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/http-kernel" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mime" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/mime" />
|
||||||
@@ -134,7 +121,6 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php80" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-php80" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-uuid" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/polyfill-uuid" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/process" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
|
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/routing" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" />
|
||||||
|
|||||||
14
.idea/php.xml
generated
14
.idea/php.xml
generated
@@ -141,21 +141,9 @@
|
|||||||
<path value="$PROJECT_DIR$/vendor/graham-campbell/markdown" />
|
<path value="$PROJECT_DIR$/vendor/graham-campbell/markdown" />
|
||||||
<path value="$PROJECT_DIR$/vendor/league/mime-type-detection" />
|
<path value="$PROJECT_DIR$/vendor/league/mime-type-detection" />
|
||||||
<path value="$PROJECT_DIR$/vendor/mcamara/laravel-localization" />
|
<path value="$PROJECT_DIR$/vendor/mcamara/laravel-localization" />
|
||||||
<path value="$PROJECT_DIR$/vendor/mpociot/teamwork" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/sebastian/code-unit" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/sebastian/cli-parser" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/sebastian/complexity" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/sebastian/lines-of-code" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/graham-campbell/result-type" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/http-client-contracts" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/phpunit/php-invoker" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/awssat/discord-notification-channel" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/berkayk/onesignal-laravel" />
|
|
||||||
<path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
|
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.3" />
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.2" />
|
||||||
<component name="PhpUnit">
|
<component name="PhpUnit">
|
||||||
<phpunit_settings>
|
<phpunit_settings>
|
||||||
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
|
<PhpUnitSettings configuration_file_path="$PROJECT_DIR$/phpunit.xml" custom_loader_path="$PROJECT_DIR$/vendor/autoload.php" use_configuration_file="true" />
|
||||||
|
|||||||
22
.styleci.yml
22
.styleci.yml
@@ -1,13 +1,13 @@
|
|||||||
risky: false
|
php:
|
||||||
version: 7
|
preset: laravel
|
||||||
preset: recommended
|
disabled:
|
||||||
|
- unused_use
|
||||||
finder:
|
finder:
|
||||||
exclude:
|
|
||||||
- "modules"
|
|
||||||
- "node_modules"
|
|
||||||
- "storage"
|
|
||||||
- "vendor"
|
|
||||||
name: "*.php"
|
|
||||||
not-name:
|
not-name:
|
||||||
- "*.blade.php"
|
- index.php
|
||||||
- "_ide_helper.php"
|
- server.php
|
||||||
|
js:
|
||||||
|
finder:
|
||||||
|
not-name:
|
||||||
|
- webpack.mix.js
|
||||||
|
css: true
|
||||||
|
|||||||
6
.vscode/launch.json
vendored
6
.vscode/launch.json
vendored
@@ -4,15 +4,11 @@
|
|||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "Listen for XDebug",
|
"name": "Listen for XDebug",
|
||||||
"type": "php",
|
"type": "php",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"port": 9000,
|
"port": 9000
|
||||||
"ignore": [
|
|
||||||
"**/vendor/**/*.php"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Launch currently open script",
|
"name": "Launch currently open script",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
# Raspberry Teams - The Simple Staff Application Manager v 0.6.2 [](https://crowdin.com/project/raspberry-staff-manager) [](https://bitbucket.styleci.io/repos/2513833655827911319?branch=develop)
|
# RB Recruiter v 0.6.2 [](https://crowdin.com/project/raspberry-staff-manager)
|
||||||
## The quick and pain-free staff application manager
|
## The quick and pain-free form management solution for communities
|
||||||
|
|
||||||
Have you ever gotten tired of managing your Minecraft server/network's applications through Discord (or anything else) and having to scroll through hundreds of new messages just to find that one applicant's username?
|
Have you ever gotten tired of managing your Minecraft server/network's applications through Discord (or anything else) and having to scroll through hundreds of new messages just to find that one applicant's username?
|
||||||
|
|
||||||
|
|||||||
@@ -1,140 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
|
||||||
|
|
||||||
use App\Facades\UUID;
|
|
||||||
use App\Profile;
|
|
||||||
use App\User;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
|
|
||||||
class CreateUser extends Command
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The name and signature of the console command.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $signature = 'users:create';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The console command description.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $description = 'Creates an application user. Seeding the database is for testing environments, so use this command in production for your first admin user.';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new command instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the console command.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
do {
|
|
||||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
|
||||||
system('cls');
|
|
||||||
} else {
|
|
||||||
system('clear');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->info('Welcome to the user account creation wizard. If you just installed the application, we recommend you create your first admin user here. If you don\'t, you won\'t gain admin privileges after creating an account in the web interface.');
|
|
||||||
$this->info('We\'ll ask some questions to get you started.');
|
|
||||||
|
|
||||||
$username = $this->ask('Username');
|
|
||||||
do {
|
|
||||||
$password = $this->secret('Password');
|
|
||||||
$password_confirm = $this->secret('Confirm Password');
|
|
||||||
|
|
||||||
if ($password === $password_confirm) {
|
|
||||||
$password = Hash::make($password);
|
|
||||||
$matches = true;
|
|
||||||
} else {
|
|
||||||
$this->error('Password doesn\'t match. Please try again.');
|
|
||||||
$matches = false;
|
|
||||||
}
|
|
||||||
} while (! $matches);
|
|
||||||
|
|
||||||
$email = $this->ask('E-mail address');
|
|
||||||
$name = $this->ask('First/Last Name');
|
|
||||||
|
|
||||||
do {
|
|
||||||
try {
|
|
||||||
$uuid = UUID::toUUID($this->ask('Minecraft username (Must be a valid Premium account)'));
|
|
||||||
} catch (\InvalidArgumentException $e) {
|
|
||||||
$this->error($e->getMessage());
|
|
||||||
$hasError = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($hasError)) {
|
|
||||||
$continue = true;
|
|
||||||
} else {
|
|
||||||
$continue = false;
|
|
||||||
}
|
|
||||||
unset($hasError);
|
|
||||||
} while ($continue);
|
|
||||||
|
|
||||||
$this->info('Please check if these details are correct: ');
|
|
||||||
$this->info('Username: '.$username);
|
|
||||||
$this->info('Email: '.$email);
|
|
||||||
$this->info('Name: '.$name);
|
|
||||||
} while (! $this->confirm('Create user now? You can go back to correct any details.'));
|
|
||||||
|
|
||||||
$user = User::create([
|
|
||||||
'uuid' => $uuid,
|
|
||||||
'name' => $name,
|
|
||||||
'email' => $email,
|
|
||||||
'username' => $username,
|
|
||||||
'originalIP' => '127.0.0.1',
|
|
||||||
'password' => $password,
|
|
||||||
]);
|
|
||||||
|
|
||||||
if ($user) {
|
|
||||||
$user->assignRole('admin', 'reviewer', 'user', 'hiringManager');
|
|
||||||
Profile::create([
|
|
||||||
'profileShortBio' => 'Random data '.rand(0, 1000),
|
|
||||||
'profileAboutMe' => 'Random data '.rand(0, 1000),
|
|
||||||
'socialLinks' => '[]',
|
|
||||||
'avatarPreference' => 'gravatar',
|
|
||||||
'userID' => $user->id,
|
|
||||||
]);
|
|
||||||
|
|
||||||
$this->info('Account created! You may now login at '.route('login').'. Enjoy the app!');
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
$this->error('There was an unknown problem creating the user. There might have been errors above. Please try again.');
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,82 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Console\Commands;
|
|
||||||
|
|
||||||
use Faker\Factory;
|
|
||||||
use Faker\Generator;
|
|
||||||
use Illuminate\Console\Command;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
|
|
||||||
class MakeFile extends Command
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The name and signature of the console command.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $signature = 'files:make {count : How many test files to generate}';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The console command description.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $description = 'Generates test files for the TeamFile model. Use in conjunction with it\'s factory.';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The faker instance used to obtain dummy text.
|
|
||||||
*
|
|
||||||
* @var Generator
|
|
||||||
*/
|
|
||||||
private $faker;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new command instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->faker = Factory::create();
|
|
||||||
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Execute the console command.
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function handle()
|
|
||||||
{
|
|
||||||
$count = $this->argument('count');
|
|
||||||
$this->info('Creating '.$this->argument('count').' files!');
|
|
||||||
|
|
||||||
for ($max = 1; $max < $count; $max++) {
|
|
||||||
Storage::disk('local')->put('factory_files/testfile_'.rand(0, 5000).'.txt', $this->faker->paragraphs(40, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->info('Finished creating files! They will be randomly picked by the factory.');
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -48,14 +48,6 @@ class FormController extends Controller
|
|||||||
$this->authorize('create', Form::class);
|
$this->authorize('create', Form::class);
|
||||||
$fields = $request->all();
|
$fields = $request->all();
|
||||||
|
|
||||||
if (count($fields) == 2) {
|
|
||||||
// form is probably empty, since forms with fields will alawys have more than 2 items
|
|
||||||
|
|
||||||
$request->session()->flash('error', 'Sorry, but you may not create empty forms.');
|
|
||||||
|
|
||||||
return redirect()->to(route('showForms'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$contextValidation = ContextAwareValidator::getValidator($fields, true, true);
|
$contextValidation = ContextAwareValidator::getValidator($fields, true, true);
|
||||||
|
|
||||||
if (! $contextValidation->get('validator')->fails()) {
|
if (! $contextValidation->get('validator')->fails()) {
|
||||||
|
|||||||
@@ -1,249 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use App\Http\Requests\EditTeamRequest;
|
|
||||||
use App\Http\Requests\NewTeamRequest;
|
|
||||||
use App\Http\Requests\SendInviteRequest;
|
|
||||||
use App\Mail\InviteToTeam;
|
|
||||||
use App\Team;
|
|
||||||
use App\User;
|
|
||||||
use App\Vacancy;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
use Mpociot\Teamwork\Exceptions\UserNotInTeamException;
|
|
||||||
use Mpociot\Teamwork\Facades\Teamwork;
|
|
||||||
use Mpociot\Teamwork\TeamInvite;
|
|
||||||
|
|
||||||
class TeamController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$teams = Team::with('users.roles')->get();
|
|
||||||
|
|
||||||
return view('dashboard.teams.teams')
|
|
||||||
->with('teams', $teams);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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(NewTeamRequest $request)
|
|
||||||
{
|
|
||||||
$team = Team::create([
|
|
||||||
'name' => $request->teamName,
|
|
||||||
'owner_id' => Auth::user()->id,
|
|
||||||
]);
|
|
||||||
|
|
||||||
Auth::user()->teams()->attach($team->id);
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Team successfully created.');
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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(Team $team)
|
|
||||||
{
|
|
||||||
return view('dashboard.teams.edit-team')
|
|
||||||
->with('team', $team)
|
|
||||||
->with('users', User::all())
|
|
||||||
->with('vacancies', Vacancy::with('teams')->get()->all());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function update(EditTeamRequest $request, Team $team)
|
|
||||||
{
|
|
||||||
$team->description = $request->teamDescription;
|
|
||||||
$team->openJoin = $request->joinType;
|
|
||||||
|
|
||||||
$team->save();
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Team edited successfully.');
|
|
||||||
|
|
||||||
return redirect()->to(route('teams.index'));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
public function invite(SendInviteRequest $request, Team $team)
|
|
||||||
{
|
|
||||||
$user = User::findOrFail($request->user);
|
|
||||||
|
|
||||||
if (! $team->openJoin) {
|
|
||||||
if (! Teamwork::hasPendingInvite($user->email, $team)) {
|
|
||||||
Teamwork::inviteToTeam($user, $team, function (TeamInvite $invite) use ($user) {
|
|
||||||
Mail::to($user)->send(new InviteToTeam($invite));
|
|
||||||
});
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Invite sent! They can now accept or deny it.');
|
|
||||||
} else {
|
|
||||||
$request->session()->flash('error', 'This user has already been invited.');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$request->session()->flash('error', 'You can\'t invite users to public teams.');
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function processInviteAction(Request $request, $action, $token)
|
|
||||||
{
|
|
||||||
switch ($action) {
|
|
||||||
case 'accept':
|
|
||||||
|
|
||||||
$invite = Teamwork::getInviteFromAcceptToken($token);
|
|
||||||
|
|
||||||
if ($invite && $invite->user->is(Auth::user())) {
|
|
||||||
Teamwork::acceptInvite($invite);
|
|
||||||
$request->session()->flash('success', 'Invite accepted! You have now joined '.$invite->team->name.'.');
|
|
||||||
} else {
|
|
||||||
$request->session()->flash('error', 'Invalid or expired invite URL.');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'deny':
|
|
||||||
|
|
||||||
$invite = Teamwork::getInviteFromDenyToken($token);
|
|
||||||
|
|
||||||
if ($invite && $invite->user->is(Auth::user())) {
|
|
||||||
Teamwork::denyInvite($invite);
|
|
||||||
$request->session()->flash('success', 'Invite denied! Ask for another invite if this isn\'t what you meant.');
|
|
||||||
} else {
|
|
||||||
$request->session()->flash('error', 'Invalid or expired invite URL.');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
$request->session()->flash('error', 'Sorry, but the invite URL you followed was malformed. Try asking for another invite, or submit a bug report.');
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// This page will show the user's current teams
|
|
||||||
return redirect()->to(route('teams.index'));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function switchTeam(Request $request, Team $team)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
Auth::user()->switchTeam($team);
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Switched teams! Your team dashboard will now use this context.');
|
|
||||||
} catch (UserNotInTeamException $ex) {
|
|
||||||
$request->session()->flash('error', 'You can\'t switch to a team you don\'t belong to.');
|
|
||||||
}
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Since it's a separate form, we shouldn't use the same update method
|
|
||||||
public function assignVacancies(Request $request, Team $team)
|
|
||||||
{
|
|
||||||
// P.S. To future developers
|
|
||||||
// This method gave me a lot of trouble lol. It's hard to write code when you're half asleep.
|
|
||||||
// There may be an n+1 query in the view and I don't think there's a way to avoid that without writing a lot of extra code.
|
|
||||||
|
|
||||||
$requestVacancies = $request->assocVacancies;
|
|
||||||
$currentVacancies = $team->vacancies->pluck('id')->all();
|
|
||||||
|
|
||||||
if (is_null($requestVacancies)) {
|
|
||||||
foreach ($team->vacancies as $vacancy) {
|
|
||||||
$team->vacancies()->detach($vacancy->id);
|
|
||||||
}
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Removed all vacancy associations.');
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
$vacancyDiff = array_diff($requestVacancies, $currentVacancies);
|
|
||||||
$deselectedDiff = array_diff($currentVacancies, $requestVacancies);
|
|
||||||
|
|
||||||
if (! empty($vacancyDiff) || ! empty($deselectedDiff)) {
|
|
||||||
foreach ($vacancyDiff as $selectedVacancy) {
|
|
||||||
$team->vacancies()->attach($selectedVacancy);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($deselectedDiff as $deselectedVacancy) {
|
|
||||||
$team->vacancies()->detach($deselectedVacancy);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$team->vacancies()->attach($requestVacancies);
|
|
||||||
}
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Assignments changed successfully.');
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use App\TeamFile;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
use League\Flysystem\FileNotFoundException;
|
|
||||||
|
|
||||||
class TeamFileController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function index(Request $request)
|
|
||||||
{
|
|
||||||
if (is_null(Auth::user()->currentTeam)) {
|
|
||||||
$request->session()->flash('error', 'Please choose a team before viewing it\'s files.');
|
|
||||||
|
|
||||||
return redirect()->to(route('teams.index'));
|
|
||||||
}
|
|
||||||
|
|
||||||
return view('dashboard.teams.team-files')
|
|
||||||
->with('files', TeamFile::with('team', 'uploader')->paginate(20));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
public function download(Request $request, TeamFile $teamFile)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
return Storage::download('uploads/'.$teamFile->name);
|
|
||||||
} catch (FileNotFoundException $ex) {
|
|
||||||
$request->session()->flash('error', 'Sorry, but the requested file could not be found in storage. Sometimes, files may be physically deleted by admins, but not from the app\'s database.');
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*
|
|
||||||
* @param \App\TeamFile $teamFile
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function show(TeamFile $teamFile)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*
|
|
||||||
* @param \App\TeamFile $teamFile
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function edit(TeamFile $teamFile)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param \Illuminate\Http\Request $request
|
|
||||||
* @param \App\TeamFile $teamFile
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function update(Request $request, TeamFile $teamFile)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param \App\TeamFile $teamFile
|
|
||||||
* @return \Illuminate\Http\Response
|
|
||||||
*/
|
|
||||||
public function destroy(TeamFile $teamFile)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -32,7 +32,6 @@ use App\Http\Requests\SearchPlayerRequest;
|
|||||||
use App\Http\Requests\UpdateUserRequest;
|
use App\Http\Requests\UpdateUserRequest;
|
||||||
use App\Notifications\ChangedPassword;
|
use App\Notifications\ChangedPassword;
|
||||||
use App\Notifications\EmailChanged;
|
use App\Notifications\EmailChanged;
|
||||||
use App\Traits\ReceivesAccountTokens;
|
|
||||||
use App\User;
|
use App\User;
|
||||||
use Google2FA;
|
use Google2FA;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -43,8 +42,6 @@ use Spatie\Permission\Models\Role;
|
|||||||
|
|
||||||
class UserController extends Controller
|
class UserController extends Controller
|
||||||
{
|
{
|
||||||
use ReceivesAccountTokens;
|
|
||||||
|
|
||||||
public function showStaffMembers()
|
public function showStaffMembers()
|
||||||
{
|
{
|
||||||
$this->authorize('viewStaff', User::class);
|
$this->authorize('viewStaff', User::class);
|
||||||
@@ -215,7 +212,7 @@ class UserController extends Controller
|
|||||||
$this->authorize('delete', $user);
|
$this->authorize('delete', $user);
|
||||||
|
|
||||||
if ($request->confirmPrompt == 'DELETE ACCOUNT') {
|
if ($request->confirmPrompt == 'DELETE ACCOUNT') {
|
||||||
$user->forceDelete();
|
$user->delete();
|
||||||
$request->session()->flash('success', 'User deleted successfully. PII has been erased.');
|
$request->session()->flash('success', 'User deleted successfully. PII has been erased.');
|
||||||
} else {
|
} else {
|
||||||
$request->session()->flash('error', 'Wrong confirmation text! Try again.');
|
$request->session()->flash('error', 'Wrong confirmation text! Try again.');
|
||||||
|
|||||||
@@ -1,50 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
|
|
||||||
class EditTeamRequest extends FormRequest
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'teamDescription' => 'required|string|max:200',
|
|
||||||
'joinType' => 'required|boolean',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
|
|
||||||
class NewTeamRequest extends FormRequest
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'teamName' => 'required|max:200|string',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
|
|
||||||
class SendInviteRequest extends FormRequest
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'user' => 'required|integer',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Requests;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
|
|
||||||
class UserDeleteRequest extends FormRequest
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Determine if the user is authorized to make this request.
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function authorize()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the validation rules that apply to the request.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function rules()
|
|
||||||
{
|
|
||||||
if (Auth::user()->has2FA()) {
|
|
||||||
return [
|
|
||||||
'currentPassword' => 'required|password:web',
|
|
||||||
'otp' => 'required|integer|max:6',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
return [
|
|
||||||
'currentPassword' => 'required|password:web',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Mail;
|
|
||||||
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use Illuminate\Mail\Mailable;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
use Mpociot\Teamwork\TeamInvite;
|
|
||||||
|
|
||||||
class InviteToTeam extends Mailable
|
|
||||||
{
|
|
||||||
use Queueable, SerializesModels;
|
|
||||||
|
|
||||||
public $teamName;
|
|
||||||
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
public $inviterName;
|
|
||||||
|
|
||||||
public $denyToken;
|
|
||||||
|
|
||||||
public $acceptToken;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new message instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(TeamInvite $invite)
|
|
||||||
{
|
|
||||||
$this->teamName = $invite->team->name;
|
|
||||||
$this->name = $invite->user->name;
|
|
||||||
$this->inviterName = $invite->inviter->name;
|
|
||||||
$this->acceptToken = $invite->accept_token;
|
|
||||||
$this->denyToken = $invite->deny_token;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Build the message.
|
|
||||||
*
|
|
||||||
* @return $this
|
|
||||||
*/
|
|
||||||
public function build()
|
|
||||||
{
|
|
||||||
return $this
|
|
||||||
->subject('You have just been invited to '.$this->teamName)
|
|
||||||
->view('mail.invited-to-team');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Mail;
|
|
||||||
|
|
||||||
use App\User;
|
|
||||||
use Illuminate\Bus\Queueable;
|
|
||||||
use Illuminate\Mail\Mailable;
|
|
||||||
use Illuminate\Queue\SerializesModels;
|
|
||||||
|
|
||||||
class UserAccountDeleteConfirmation extends Mailable
|
|
||||||
{
|
|
||||||
use Queueable, SerializesModels;
|
|
||||||
|
|
||||||
public $deleteToken;
|
|
||||||
|
|
||||||
public $cancelToken;
|
|
||||||
|
|
||||||
public $originalIP;
|
|
||||||
|
|
||||||
public $name;
|
|
||||||
|
|
||||||
public $userID;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new message instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(User $user, array $tokens, string $originalIP)
|
|
||||||
{
|
|
||||||
$this->deleteToken = $tokens['delete'];
|
|
||||||
$this->cancelToken = $tokens['cancel'];
|
|
||||||
|
|
||||||
$this->originalIP = $originalIP;
|
|
||||||
$this->name = $user->name;
|
|
||||||
$this->userID = $user->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Build the message.
|
|
||||||
*
|
|
||||||
* @return $this
|
|
||||||
*/
|
|
||||||
public function build()
|
|
||||||
{
|
|
||||||
return $this->view('mail.deleted-account');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -97,7 +97,7 @@ class NewApplicant extends Notification implements ShouldQueue
|
|||||||
$attachment->title('Application details')
|
$attachment->title('Application details')
|
||||||
->fields([
|
->fields([
|
||||||
'Applied for' => $vacancyDetails['name'],
|
'Applied for' => $vacancyDetails['name'],
|
||||||
'Available positions' => $vacancyDetails['slots'],
|
'Avaiable positions' => $vacancyDetails['slots'],
|
||||||
'Applicant' => $applicant,
|
'Applicant' => $applicant,
|
||||||
])
|
])
|
||||||
->action('Review application', $url);
|
->action('Review application', $url);
|
||||||
|
|||||||
@@ -27,11 +27,6 @@ use Illuminate\Support\Facades\Log;
|
|||||||
|
|
||||||
class UserObserver
|
class UserObserver
|
||||||
{
|
{
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
Log::debug('User observer has been initialised and ready for use!');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the user "created" event.
|
* Handle the user "created" event.
|
||||||
*
|
*
|
||||||
@@ -63,8 +58,7 @@ class UserObserver
|
|||||||
|
|
||||||
public function deleting(User $user)
|
public function deleting(User $user)
|
||||||
{
|
{
|
||||||
if ($user->isForceDeleting()) {
|
$user->profile()->delete();
|
||||||
$user->profile->delete();
|
|
||||||
Log::debug('Referential integrity cleanup: Deleted profile!');
|
Log::debug('Referential integrity cleanup: Deleted profile!');
|
||||||
$applications = $user->applications;
|
$applications = $user->applications;
|
||||||
|
|
||||||
@@ -76,9 +70,6 @@ class UserObserver
|
|||||||
$application->delete();
|
$application->delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Log::debug('RIC: Not cleaning up soft deleted models!');
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::debug('RIC: Cleanup done!');
|
Log::debug('RIC: Cleanup done!');
|
||||||
}
|
}
|
||||||
@@ -91,6 +82,7 @@ class UserObserver
|
|||||||
*/
|
*/
|
||||||
public function deleted(User $user)
|
public function deleted(User $user)
|
||||||
{
|
{
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -112,8 +104,6 @@ class UserObserver
|
|||||||
*/
|
*/
|
||||||
public function forceDeleted(User $user)
|
public function forceDeleted(User $user)
|
||||||
{
|
{
|
||||||
Log::info('Model has been force deleted', [
|
//
|
||||||
'modelID' => $user->id,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ use App\Application;
|
|||||||
use App\Observers\ApplicationObserver;
|
use App\Observers\ApplicationObserver;
|
||||||
use App\Observers\UserObserver;
|
use App\Observers\UserObserver;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Illuminate\Pagination\Paginator;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Sentry;
|
use Sentry;
|
||||||
@@ -55,9 +54,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
|
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
|
||||||
// Keep using Bootstrap; Laravel 8 has the paginator use Tailwind. Quite opinionated tbh
|
|
||||||
Paginator::useBootstrap();
|
|
||||||
|
|
||||||
User::observe(UserObserver::class);
|
User::observe(UserObserver::class);
|
||||||
Application::observe(ApplicationObserver::class);
|
Application::observe(ApplicationObserver::class);
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,15 @@ use Illuminate\Support\Facades\Route;
|
|||||||
|
|
||||||
class RouteServiceProvider extends ServiceProvider
|
class RouteServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* This namespace is applied to your controller routes.
|
||||||
|
*
|
||||||
|
* In addition, it is set as the URL generator's root namespace.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $namespace = 'App\Http\Controllers';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The path to the "home" route for your application.
|
* The path to the "home" route for your application.
|
||||||
*
|
*
|
||||||
@@ -69,6 +78,7 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
protected function mapWebRoutes()
|
protected function mapWebRoutes()
|
||||||
{
|
{
|
||||||
Route::middleware('web')
|
Route::middleware('web')
|
||||||
|
->namespace($this->namespace)
|
||||||
->group(base_path('routes/web.php'));
|
->group(base_path('routes/web.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Services;
|
|
||||||
|
|
||||||
use App\Application;
|
|
||||||
use App\Vacancy;
|
|
||||||
|
|
||||||
class VacancyApplicationService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Finds all applications associated with $model.
|
|
||||||
*
|
|
||||||
* @param Vacancy $model The model you want to search through.
|
|
||||||
* @return Illuminate\Support\Collection A collection of applications
|
|
||||||
*/
|
|
||||||
public function findApplications(Vacancy $model)
|
|
||||||
{
|
|
||||||
$applications = collect([]);
|
|
||||||
|
|
||||||
foreach (Application::all() as $application) {
|
|
||||||
if ($application->response->vacancy->id == $model->id) {
|
|
||||||
$applications->push($application);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $applications;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
44
app/Team.php
44
app/Team.php
@@ -1,44 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Mpociot\Teamwork\TeamworkTeam;
|
|
||||||
|
|
||||||
class Team extends TeamworkTeam
|
|
||||||
{
|
|
||||||
public $fillable = [
|
|
||||||
'owner_id',
|
|
||||||
'name',
|
|
||||||
'description',
|
|
||||||
'openJoin',
|
|
||||||
];
|
|
||||||
|
|
||||||
public function vacancies()
|
|
||||||
{
|
|
||||||
return $this->belongsToMany('App\Vacancy', 'team_has_vacancy');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function files()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\TeamFile', 'team_id');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App;
|
|
||||||
|
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
|
||||||
use Mpociot\Teamwork\Traits\UsedByTeams;
|
|
||||||
|
|
||||||
class TeamFile extends Model
|
|
||||||
{
|
|
||||||
use HasFactory, UsedByTeams;
|
|
||||||
|
|
||||||
protected $fillable = [
|
|
||||||
'uploaded_by',
|
|
||||||
'team_id',
|
|
||||||
'name',
|
|
||||||
'fs_location',
|
|
||||||
'extension',
|
|
||||||
];
|
|
||||||
|
|
||||||
public function uploader()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('App\User', 'uploaded_by', 'id');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function team()
|
|
||||||
{
|
|
||||||
return $this->belongsTo('App\Team');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Traits;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
|
|
||||||
trait HandlesAccountTokens
|
|
||||||
{
|
|
||||||
public function generateAccountTokens()
|
|
||||||
{
|
|
||||||
$deleteToken = bin2hex(openssl_random_pseudo_bytes(32));
|
|
||||||
$cancelToken = bin2hex(openssl_random_pseudo_bytes(32));
|
|
||||||
|
|
||||||
$tokens = [
|
|
||||||
|
|
||||||
'delete' => Hash::make($deleteToken),
|
|
||||||
'cancel' => Hash::make($cancelToken),
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
$this->account_tokens = json_encode($tokens);
|
|
||||||
$this->save();
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
'delete' => $deleteToken,
|
|
||||||
'cancel' => $cancelToken,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function verifyAccountToken(string $token, string $type): bool
|
|
||||||
{
|
|
||||||
$tokens = json_decode($this->account_tokens);
|
|
||||||
|
|
||||||
if ($type == 'deleteToken') {
|
|
||||||
return Hash::check($token, $tokens->delete);
|
|
||||||
} elseif ($type == 'cancelToken') {
|
|
||||||
return Hash::check($token, $tokens->cancel);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,94 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Traits;
|
|
||||||
|
|
||||||
use App\Http\Requests\UserDeleteRequest;
|
|
||||||
use App\Mail\UserAccountDeleteConfirmation;
|
|
||||||
use App\User;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Log;
|
|
||||||
use Illuminate\Support\Facades\Mail;
|
|
||||||
|
|
||||||
trait ReceivesAccountTokens
|
|
||||||
{
|
|
||||||
public function userDelete(UserDeleteRequest $request)
|
|
||||||
{
|
|
||||||
// a little verbose
|
|
||||||
$user = User::find(Auth::user()->id);
|
|
||||||
$tokens = $user->generateAccountTokens();
|
|
||||||
|
|
||||||
Mail::to($user)->send(new UserAccountDeleteConfirmation($user, $tokens, $request->ip()));
|
|
||||||
|
|
||||||
$user->delete();
|
|
||||||
Auth::logout();
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Please check your email to finish deleting your account.');
|
|
||||||
|
|
||||||
return redirect()->to('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function processDeleteConfirmation(Request $request, $ID, $action, $token)
|
|
||||||
{
|
|
||||||
// We can't rely on Laravel's route model injection, because it'll ignore soft-deleted models,
|
|
||||||
// so we have to use a special scope to find them ourselves.
|
|
||||||
$user = User::withTrashed()->findOrFail($ID);
|
|
||||||
$email = $user->email;
|
|
||||||
|
|
||||||
switch ($action) {
|
|
||||||
case 'confirm':
|
|
||||||
|
|
||||||
if ($user->verifyAccountToken($token, 'deleteToken')) {
|
|
||||||
Log::info('SECURITY: User deleted account!', [
|
|
||||||
|
|
||||||
'confirmDeleteToken' => $token,
|
|
||||||
'ipAddress' => $request->ip(),
|
|
||||||
'email' => $user->email,
|
|
||||||
|
|
||||||
]);
|
|
||||||
|
|
||||||
$user->forceDelete();
|
|
||||||
|
|
||||||
$request->session()->flash('success', 'Account permanently deleted. Thank you for using our service.');
|
|
||||||
|
|
||||||
return redirect()->to('/');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'cancel':
|
|
||||||
|
|
||||||
if ($user->verifyAccountToken($token, 'cancelToken')) {
|
|
||||||
$user->restore();
|
|
||||||
$request->session()->flash('success', 'Account deletion cancelled! You may now login.');
|
|
||||||
|
|
||||||
return redirect()->to(route('login'));
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
|
|
||||||
abort(404, 'The page you were trying to access may not exist or may be expired.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
16
app/User.php
16
app/User.php
@@ -21,17 +21,15 @@
|
|||||||
|
|
||||||
namespace App;
|
namespace App;
|
||||||
|
|
||||||
use App\Traits\HandlesAccountTokens;
|
|
||||||
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
use Illuminate\Contracts\Auth\MustVerifyEmail;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Mpociot\Teamwork\Traits\UserHasTeams;
|
|
||||||
use Spatie\Permission\Traits\HasRoles;
|
use Spatie\Permission\Traits\HasRoles;
|
||||||
|
|
||||||
class User extends Authenticatable implements MustVerifyEmail
|
class User extends Authenticatable implements MustVerifyEmail
|
||||||
{
|
{
|
||||||
use UserHasTeams, Notifiable, HasRoles, SoftDeletes, HandlesAccountTokens;
|
use Notifiable;
|
||||||
|
use HasRoles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
@@ -60,8 +58,7 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
'email_verified_at' => 'datetime',
|
'email_verified_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
// RELATIONSHIPS
|
//
|
||||||
|
|
||||||
public function applications()
|
public function applications()
|
||||||
{
|
{
|
||||||
return $this->hasMany('App\Application', 'applicantUserID', 'id');
|
return $this->hasMany('App\Application', 'applicantUserID', 'id');
|
||||||
@@ -87,13 +84,6 @@ class User extends Authenticatable implements MustVerifyEmail
|
|||||||
return $this->hasMany('App\Comment', 'authorID', 'id');
|
return $this->hasMany('App\Comment', 'authorID', 'id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function files()
|
|
||||||
{
|
|
||||||
return $this->hasMany('App\TeamFile', 'uploaded_by');
|
|
||||||
}
|
|
||||||
|
|
||||||
// UTILITY LOGIC
|
|
||||||
|
|
||||||
public function isBanned()
|
public function isBanned()
|
||||||
{
|
{
|
||||||
return ! $this->bans()->get()->isEmpty();
|
return ! $this->bans()->get()->isEmpty();
|
||||||
|
|||||||
@@ -25,12 +25,9 @@ use GrahamCampbell\Markdown\Facades\Markdown;
|
|||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use Mpociot\Teamwork\Traits\UsedByTeams;
|
|
||||||
|
|
||||||
class Vacancy extends Model
|
class Vacancy extends Model
|
||||||
{
|
{
|
||||||
//use UsedByTeams;
|
|
||||||
|
|
||||||
public $fillable = [
|
public $fillable = [
|
||||||
|
|
||||||
'permissionGroupName',
|
'permissionGroupName',
|
||||||
@@ -42,7 +39,6 @@ class Vacancy extends Model
|
|||||||
'vacancyCount',
|
'vacancyCount',
|
||||||
'vacancyStatus',
|
'vacancyStatus',
|
||||||
'vacancySlug',
|
'vacancySlug',
|
||||||
'team_id',
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -61,11 +57,6 @@ class Vacancy extends Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function teams()
|
|
||||||
{
|
|
||||||
return $this->belongsToMany('App\Team', 'team_has_vacancy');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function forms()
|
public function forms()
|
||||||
{
|
{
|
||||||
return $this->belongsTo('App\Form', 'vacancyFormID', 'id');
|
return $this->belongsTo('App\Form', 'vacancyFormID', 'id');
|
||||||
@@ -88,28 +79,4 @@ class Vacancy extends Model
|
|||||||
|
|
||||||
Log::warning('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') closed by '.Auth::user()->name);
|
Log::warning('Vacancies: Vacancy '.$this->id.' ('.$this->vacancyName.') closed by '.Auth::user()->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the Modal is attached to the $checkingTeam Model.
|
|
||||||
*
|
|
||||||
* @param Team $checkingTeam The mdoel you want to check against
|
|
||||||
* @return bool Whether the models are attached
|
|
||||||
*/
|
|
||||||
public function hasTeam(Team $checkingTeam): bool
|
|
||||||
{
|
|
||||||
$myTeams = $this->teams;
|
|
||||||
|
|
||||||
if (empty($myTeams)) {
|
|
||||||
// no associated teams
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($myTeams as $team) {
|
|
||||||
if ($team->id === $checkingTeam->id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,36 +8,33 @@
|
|||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.3.4",
|
"php": "^7.2.5",
|
||||||
"ext-imagick": "*",
|
"ext-imagick": "*",
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"arcanedev/log-viewer": "^8.0",
|
"arcanedev/log-viewer": "^7.0",
|
||||||
"awssat/discord-notification-channel": "^1.4",
|
|
||||||
"berkayk/onesignal-laravel": "^1.0",
|
|
||||||
"doctrine/dbal": "^2.10",
|
"doctrine/dbal": "^2.10",
|
||||||
"fideloper/proxy": "^4.2",
|
"fideloper/proxy": "^4.2",
|
||||||
"fruitcake/laravel-cors": "^1.0",
|
"fruitcake/laravel-cors": "^1.0",
|
||||||
"geo-sot/laravel-env-editor": "^0.9.9",
|
"geo-sot/laravel-env-editor": "^0.9.9",
|
||||||
"graham-campbell/markdown": "^13.1",
|
"graham-campbell/markdown": "^12.0",
|
||||||
"guzzlehttp/guzzle": "^7.0.1",
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
"jeroennoten/laravel-adminlte": "^3.2",
|
"jeroennoten/laravel-adminlte": "^3.2",
|
||||||
"laravel/framework": "^8.0",
|
"laravel/framework": "^7.0",
|
||||||
"laravel/slack-notification-channel": "^2.0",
|
"laravel/slack-notification-channel": "^2.0",
|
||||||
"laravel/tinker": "^2.0",
|
"laravel/tinker": "^2.0",
|
||||||
"laravel/ui": "^3.0",
|
"laravel/ui": "^2.0",
|
||||||
"mcamara/laravel-localization": "^1.5",
|
"mcamara/laravel-localization": "^1.5",
|
||||||
"mpociot/teamwork": "^6.0",
|
|
||||||
"pragmarx/google2fa-laravel": "^1.3",
|
"pragmarx/google2fa-laravel": "^1.3",
|
||||||
"sentry/sentry-laravel": "2.1.1",
|
"sentry/sentry-laravel": "1.7.1",
|
||||||
"spatie/laravel-permission": "^3.13"
|
"spatie/laravel-permission": "^3.13"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.3",
|
"barryvdh/laravel-debugbar": "^3.3",
|
||||||
"facade/ignition": "^2.3.6",
|
"facade/ignition": "^2.0",
|
||||||
"fzaninotto/faker": "^1.9.1",
|
"fzaninotto/faker": "^1.9.1",
|
||||||
"mockery/mockery": "^1.3.1",
|
"mockery/mockery": "^1.3.1",
|
||||||
"nunomaduro/collision": "^5.0",
|
"nunomaduro/collision": "^4.1",
|
||||||
"phpunit/phpunit": "^9.0"
|
"phpunit/phpunit": "^8.5"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
@@ -51,10 +48,12 @@
|
|||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/",
|
"App\\": "app/"
|
||||||
"Database\\Factories\\": "database/factories/",
|
},
|
||||||
"Database\\Seeders\\": "database/seeders/"
|
"classmap": [
|
||||||
}
|
"database/seeds",
|
||||||
|
"database/factories"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"autoload-dev": {
|
"autoload-dev": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
2544
composer.lock
generated
2544
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -318,12 +318,6 @@ return [
|
|||||||
'url' => '/hr/players',
|
'url' => '/hr/players',
|
||||||
'can' => 'admin.userlist',
|
'can' => 'admin.userlist',
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'text' => 'm_teams',
|
|
||||||
'icon' => 'fas fa-user-friends',
|
|
||||||
'url' => 'teams',
|
|
||||||
'can' => 'teams.view',
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'text' => 'sm_hiring_man',
|
'text' => 'sm_hiring_man',
|
||||||
'icon' => 'far fa-calendar-plus',
|
'icon' => 'far fa-calendar-plus',
|
||||||
@@ -554,17 +548,6 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'name' => 'CheckboxValues',
|
|
||||||
'active' => true,
|
|
||||||
'files' => [
|
|
||||||
[
|
|
||||||
'type' => 'js',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => '/js/switches.js',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
'name' => 'AuthCustomisations',
|
'name' => 'AuthCustomisations',
|
||||||
'active' => true,
|
'active' => true,
|
||||||
@@ -576,54 +559,5 @@ return [
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
|
||||||
'name' => 'BootstrapToggleButton',
|
|
||||||
'active' => true,
|
|
||||||
'files' => [
|
|
||||||
[
|
|
||||||
'type' => 'css',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => 'https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'type' => 'js',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => 'https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'BootstrapMultiselectDropdown',
|
|
||||||
'active' => true,
|
|
||||||
'files' => [
|
|
||||||
[
|
|
||||||
'type' => 'js',
|
|
||||||
'asset' => 'false',
|
|
||||||
'location' => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/js/bootstrap-multiselect.min.js',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'type' => 'css',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-multiselect/0.9.15/css/bootstrap-multiselect.css',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'name' => 'DropzoneJS',
|
|
||||||
'active' => true,
|
|
||||||
'files' => [
|
|
||||||
[
|
|
||||||
'type' => 'js',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => '/js/plugins/dropzone.min.js',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'type' => 'css',
|
|
||||||
'asset' => false,
|
|
||||||
'location' => '/css/dropzone.min.css',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,235 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Debugbar Settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Debugbar is enabled by default, when debug is set to true in app.php.
|
|
||||||
| You can override the value by setting enable to true or false instead of null.
|
|
||||||
|
|
|
||||||
| You can provide an array of URI's that must be ignored (eg. 'api/*')
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
|
||||||
'except' => [
|
|
||||||
'telescope*',
|
|
||||||
'horizon*',
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Storage settings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| DebugBar stores data for session/ajax requests.
|
|
||||||
| You can disable this, so the debugbar stores data in headers/session,
|
|
||||||
| but this can cause problems with large data collectors.
|
|
||||||
| By default, file storage (in the storage folder) is used. Redis and PDO
|
|
||||||
| can also be used. For PDO, run the package migrations first.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'storage' => [
|
|
||||||
'enabled' => true,
|
|
||||||
'driver' => 'file', // redis, file, pdo, custom
|
|
||||||
'path' => storage_path('debugbar'), // For file driver
|
|
||||||
'connection' => null, // Leave null for default connection (Redis/PDO)
|
|
||||||
'provider' => '', // Instance of StorageInterface for custom driver
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Vendors
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Vendor files are included by default, but can be set to false.
|
|
||||||
| This can also be set to 'js' or 'css', to only include javascript or css vendor files.
|
|
||||||
| Vendor files are for css: font-awesome (including fonts) and highlight.js (css files)
|
|
||||||
| and for js: jquery and and highlight.js
|
|
||||||
| So if you want syntax highlighting, set it to true.
|
|
||||||
| jQuery is set to not conflict with existing jQuery scripts.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'include_vendors' => true,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Capture Ajax Requests
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The Debugbar can capture Ajax requests and display them. If you don't want this (ie. because of errors),
|
|
||||||
| you can use this option to disable sending the data through the headers.
|
|
||||||
|
|
|
||||||
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
|
|
||||||
*/
|
|
||||||
|
|
||||||
'capture_ajax' => true,
|
|
||||||
'add_ajax_timing' => false,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Custom Error Handler for Deprecated warnings
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When enabled, the Debugbar shows deprecated warnings for Symfony components
|
|
||||||
| in the Messages tab.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'error_handler' => false,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Clockwork integration
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| The Debugbar can emulate the Clockwork headers, so you can use the Chrome
|
|
||||||
| Extension, without the server-side code. It uses Debugbar collectors instead.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'clockwork' => false,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| DataCollectors
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Enable/disable DataCollectors
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'collectors' => [
|
|
||||||
'phpinfo' => true, // Php version
|
|
||||||
'messages' => true, // Messages
|
|
||||||
'time' => true, // Time Datalogger
|
|
||||||
'memory' => true, // Memory usage
|
|
||||||
'exceptions' => true, // Exception displayer
|
|
||||||
'log' => true, // Logs from Monolog (merged in messages if enabled)
|
|
||||||
'db' => true, // Show database (PDO) queries and bindings
|
|
||||||
'views' => true, // Views with their data
|
|
||||||
'route' => true, // Current route information
|
|
||||||
'auth' => false, // Display Laravel authentication status
|
|
||||||
'gate' => true, // Display Laravel Gate checks
|
|
||||||
'session' => true, // Display session data
|
|
||||||
'symfony_request' => true, // Only one can be enabled..
|
|
||||||
'mail' => true, // Catch mail messages
|
|
||||||
'laravel' => false, // Laravel version and environment
|
|
||||||
'events' => false, // All events fired
|
|
||||||
'default_request' => false, // Regular or special Symfony request logger
|
|
||||||
'logs' => false, // Add the latest log messages
|
|
||||||
'files' => false, // Show the included files
|
|
||||||
'config' => false, // Display config settings
|
|
||||||
'cache' => false, // Display cache events
|
|
||||||
'models' => true, // Display models
|
|
||||||
'livewire' => true, // Display Livewire (when available)
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Extra options
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Configure some DataCollectors
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'options' => [
|
|
||||||
'auth' => [
|
|
||||||
'show_name' => true, // Also show the users name/email in the debugbar
|
|
||||||
],
|
|
||||||
'db' => [
|
|
||||||
'with_params' => true, // Render SQL with the parameters substituted
|
|
||||||
'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
|
|
||||||
'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
|
|
||||||
'timeline' => false, // Add the queries to the timeline
|
|
||||||
'explain' => [ // Show EXPLAIN output on queries
|
|
||||||
'enabled' => false,
|
|
||||||
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
|
|
||||||
],
|
|
||||||
'hints' => false, // Show hints for common mistakes
|
|
||||||
'show_copy' => false, // Show copy button next to the query
|
|
||||||
],
|
|
||||||
'mail' => [
|
|
||||||
'full_log' => false,
|
|
||||||
],
|
|
||||||
'views' => [
|
|
||||||
'data' => false, //Note: Can slow down the application, because the data can be quite large..
|
|
||||||
],
|
|
||||||
'route' => [
|
|
||||||
'label' => true, // show complete route on bar
|
|
||||||
],
|
|
||||||
'logs' => [
|
|
||||||
'file' => null,
|
|
||||||
],
|
|
||||||
'cache' => [
|
|
||||||
'values' => true, // collect cache values
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Inject Debugbar in Response
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Usually, the debugbar is added just before </body>, by listening to the
|
|
||||||
| Response after the App is done. If you disable this, you have to add them
|
|
||||||
| in your template yourself. See http://phpdebugbar.com/docs/rendering.html
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'inject' => true,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| DebugBar route prefix
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Sometimes you want to set route prefix to be used by DebugBar to load
|
|
||||||
| its resources from. Usually the need comes from misconfigured web server or
|
|
||||||
| from trying to overcome bugs like this: http://trac.nginx.org/nginx/ticket/97
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'route_prefix' => '_debugbar',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| DebugBar route domain
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| By default DebugBar route served from the same domain that request served.
|
|
||||||
| To override default domain, specify it as a non-empty value.
|
|
||||||
*/
|
|
||||||
'route_domain' => null,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| DebugBar theme
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Switches between light and dark theme. If set to auto it will respect system preferences
|
|
||||||
| Possible values: auto, light, dark
|
|
||||||
*/
|
|
||||||
'theme' => 'auto',
|
|
||||||
];
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return [
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Files Config
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
'paths' => [
|
|
||||||
// .env file directory
|
|
||||||
'env' => base_path(),
|
|
||||||
//backup files directory
|
|
||||||
'backupDirectory' => 'env-editor',
|
|
||||||
],
|
|
||||||
// .env file name
|
|
||||||
'envFileName' => '.env',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Routes group config
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'route' => [
|
|
||||||
// Prefix url for route Group
|
|
||||||
'prefix' => 'env-editor',
|
|
||||||
// Routes base name
|
|
||||||
'name' => 'env-editor',
|
|
||||||
// Middleware(s) applied on route Group
|
|
||||||
'middleware' => ['web'],
|
|
||||||
],
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------
|
|
||||||
| Time Format for Views and parsed backups
|
|
||||||
| ------------------------------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
'timeFormat' => 'd/m/Y H:i:s',
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------------------------------
|
|
||||||
| Set Views options
|
|
||||||
| ------------------------------------------------------------------------------------------------
|
|
||||||
| Here you can set The "extends" blade of index.blade.php
|
|
||||||
*/
|
|
||||||
'layout' => 'env-editor::layout',
|
|
||||||
|
|
||||||
];
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return [
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| One Signal App Id
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'app_id' => 'YOUR-APP-ID-HERE',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Rest API Key
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
|
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'rest_api_key' => 'YOUR-REST-API-KEY-HERE',
|
|
||||||
'user_auth_key' => 'YOUR-USER-AUTH-KEY',
|
|
||||||
];
|
|
||||||
@@ -100,7 +100,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'failed' => [
|
'failed' => [
|
||||||
'driver' => env('QUEUE_FAILED_DRIVER', 'database-uuids'),
|
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
|
||||||
'database' => env('DB_CONNECTION', 'mysql'),
|
'database' => env('DB_CONNECTION', 'mysql'),
|
||||||
'table' => 'failed_jobs',
|
'table' => 'failed_jobs',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,103 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
return [
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Auth Model
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the Auth model used by Teamwork.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'user_model' => config('auth.providers.users.model', App\User::class),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork users Table
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the users table name used by Teamwork.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'users_table' => 'users',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork Team Model
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the Team model used by Teamwork to create correct relations. Update
|
|
||||||
| the team if it is in a different namespace.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'team_model' => Mpociot\Teamwork\TeamworkTeam::class,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork teams Table
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the teams table name used by Teamwork to save teams to the database.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'teams_table' => 'teams',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork team_user Table
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the team_user table used by Teamwork to save assigned teams to the
|
|
||||||
| database.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'team_user_table' => 'team_user',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| User Foreign key on Teamwork's team_user Table (Pivot)
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
*/
|
|
||||||
'user_foreign_key' => 'id',
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork Team Invite Model
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the Team Invite model used by Teamwork to create correct relations.
|
|
||||||
| Update the team if it is in a different namespace.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'invite_model' => Mpociot\Teamwork\TeamInvite::class,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Teamwork team invites Table
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This is the team invites table name used by Teamwork to save sent/pending
|
|
||||||
| invitation into teams to the database.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
'team_invites_table' => 'team_invites',
|
|
||||||
];
|
|
||||||
@@ -1,57 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Database\Factories;
|
|
||||||
|
|
||||||
use App\TeamFile;
|
|
||||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
||||||
use Illuminate\Support\Facades\Storage;
|
|
||||||
|
|
||||||
class TeamFileFactory extends Factory
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The name of the factory's corresponding model.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $model = TeamFile::class;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Define the model's default state.
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function definition()
|
|
||||||
{
|
|
||||||
$prefix = Storage::disk('local')->getAdapter()->getPathPrefix();
|
|
||||||
|
|
||||||
return [
|
|
||||||
'uploaded_by' => rand(1, 10), // Also assuming that the user seeder has ran before
|
|
||||||
'team_id' => rand(1, 3), // Assuming you create 3 teams beforehand
|
|
||||||
'name' => $this->faker->file($prefix.'factory_files', $prefix.'uploads', false),
|
|
||||||
'caption' => $this->faker->sentence(),
|
|
||||||
'description' => $this->faker->paragraphs(3, true),
|
|
||||||
'fs_location' => $this->faker->file($prefix.'factory_files', $prefix.'uploads'),
|
|
||||||
'extension' => 'txt',
|
|
||||||
'size' => rand(1, 1000), // random fake size between 0 bytes and 1 mb
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
|
|
||||||
class TeamworkSetupTables extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table(\Config::get('teamwork.users_table'), function (Blueprint $table) {
|
|
||||||
$table->integer('current_team_id')->unsigned()->nullable();
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::create(\Config::get('teamwork.teams_table'), function (Blueprint $table) {
|
|
||||||
$table->increments('id')->unsigned();
|
|
||||||
$table->integer('owner_id')->unsigned()->nullable();
|
|
||||||
$table->string('name');
|
|
||||||
$table->timestamps();
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::create(\Config::get('teamwork.team_user_table'), function (Blueprint $table) {
|
|
||||||
$table->bigInteger('user_id')->unsigned();
|
|
||||||
$table->integer('team_id')->unsigned();
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
$table->foreign('user_id')
|
|
||||||
->references(\Config::get('teamwork.user_foreign_key'))
|
|
||||||
->on(\Config::get('teamwork.users_table'))
|
|
||||||
->onUpdate('cascade')
|
|
||||||
->onDelete('cascade');
|
|
||||||
|
|
||||||
$table->foreign('team_id')
|
|
||||||
->references('id')
|
|
||||||
->on(\Config::get('teamwork.teams_table'))
|
|
||||||
->onDelete('cascade');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::create(\Config::get('teamwork.team_invites_table'), function (Blueprint $table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->bigInteger('user_id')->unsigned();
|
|
||||||
$table->integer('team_id')->unsigned();
|
|
||||||
$table->enum('type', ['invite', 'request']);
|
|
||||||
$table->string('email');
|
|
||||||
$table->string('accept_token');
|
|
||||||
$table->string('deny_token');
|
|
||||||
$table->timestamps();
|
|
||||||
$table->foreign('team_id')
|
|
||||||
->references('id')
|
|
||||||
->on(\Config::get('teamwork.teams_table'))
|
|
||||||
->onDelete('cascade');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table(\Config::get('teamwork.users_table'), function (Blueprint $table) {
|
|
||||||
$table->dropColumn('current_team_id');
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::table(\Config::get('teamwork.team_user_table'), function (Blueprint $table) {
|
|
||||||
if (DB::getDriverName() !== 'sqlite') {
|
|
||||||
$table->dropForeign(\Config::get('teamwork.team_user_table').'_user_id_foreign');
|
|
||||||
}
|
|
||||||
if (DB::getDriverName() !== 'sqlite') {
|
|
||||||
$table->dropForeign(\Config::get('teamwork.team_user_table').'_team_id_foreign');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
Schema::drop(\Config::get('teamwork.team_user_table'));
|
|
||||||
Schema::drop(\Config::get('teamwork.team_invites_table'));
|
|
||||||
Schema::drop(\Config::get('teamwork.teams_table'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddTeamDetails extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table(config('teamwork.teams_table'), function (Blueprint $table) {
|
|
||||||
$table->text('description')->after('name')->nullable();
|
|
||||||
$table->enum('status', ['ACTIVE', 'SUSPENDED'])->after('description');
|
|
||||||
$table->boolean('openJoin')->default(false)->after('status');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table(config('teamwork.teams_table'), function (Blueprint $table) {
|
|
||||||
$table->dropColumn('description');
|
|
||||||
$table->dropColumn('status');
|
|
||||||
$table->dropColumn('openJoin');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class VacancyNullableTeamId extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('vacancies', function (Blueprint $table) {
|
|
||||||
$table->dropForeign('vacancies_ownerteamid_foreign');
|
|
||||||
$table->dropColumn('ownerTeamID');
|
|
||||||
$table->bigInteger('team_id')->nullable()->unsigned();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('vacancies', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('team_id');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class TeamHasVacancy extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('team_has_vacancy', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->integer('team_id')->unsigned();
|
|
||||||
$table->bigInteger('vacancy_id')->unsigned();
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
$table->foreign('team_id')
|
|
||||||
->references('id')
|
|
||||||
->on(config('teamwork.teams_table'));
|
|
||||||
|
|
||||||
$table->foreign('vacancy_id')
|
|
||||||
->references('id')
|
|
||||||
->on('vacancies');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddAccountTokensToUser extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->string('account_tokens')->after('password')->nullable();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('account_tokens');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddSoftDeletesToUsers extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->softDeletes()->after('account_tokens');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('users', function (Blueprint $table) {
|
|
||||||
$table->dropSoftDeletes();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddUuidToFailedJobs extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('failed_jobs', function (Blueprint $table) {
|
|
||||||
$table->string('uuid')->after('id')->nullable()->unique();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('failed_jobs', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('uuid');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class CreateTeamFilesTable extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::create('team_files', function (Blueprint $table) {
|
|
||||||
$table->id();
|
|
||||||
$table->bigInteger('uploaded_by')->unsigned()->index();
|
|
||||||
$table->integer('team_id')->unsigned()->index();
|
|
||||||
$table->string('name');
|
|
||||||
$table->string('fs_location'); // filesystem location
|
|
||||||
$table->string('extension');
|
|
||||||
$table->timestamps();
|
|
||||||
|
|
||||||
$table->foreign('uploaded_by')
|
|
||||||
->references('id')
|
|
||||||
->on('users')
|
|
||||||
->cascadeOnDelete()
|
|
||||||
->cascadeOnUpdate();
|
|
||||||
|
|
||||||
$table->foreign('team_id')
|
|
||||||
->references('id')
|
|
||||||
->on('teams')
|
|
||||||
->cascadeOnDelete()
|
|
||||||
->cascadeOnUpdate();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::dropIfExists('team_files');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
class AddDetailsToTeamFiles extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function up()
|
|
||||||
{
|
|
||||||
Schema::table('team_files', function (Blueprint $table) {
|
|
||||||
$table->integer('size')->nullable()->after('extension');
|
|
||||||
$table->string('caption')->nullable()->after('name');
|
|
||||||
$table->mediumText('description')->nullable()->after('caption');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function down()
|
|
||||||
{
|
|
||||||
Schema::table('team_files', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('size');
|
|
||||||
$table->dropColumn('caption');
|
|
||||||
$table->dropColumn('description');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use App\TeamFile;
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
|
|
||||||
class TeamFileSeeder extends Seeder
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
TeamFile::factory()->count(50)->create();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,84 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright © 2020 Miguel Nogueira
|
|
||||||
*
|
|
||||||
* This file is part of Raspberry Staff Manager.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Raspberry Staff Manager is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
|
||||||
use Spatie\Permission\Models\Permission;
|
|
||||||
|
|
||||||
class TeamSeeder extends Seeder
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the database seeds.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function run()
|
|
||||||
{
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.user.view.own',
|
|
||||||
]);
|
|
||||||
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.view.all',
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Has access to the teams feature
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.view',
|
|
||||||
]);
|
|
||||||
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.create',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.delete',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.user.join',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.user.leave',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.vacancies.assign',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.vacancies.unassign',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.admin.applications.changeteam',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.members.appointment.schedule',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.members.appointment.deleteappointment',
|
|
||||||
]);
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'teams.members.groupchat',
|
|
||||||
]);
|
|
||||||
|
|
||||||
Permission::create([
|
|
||||||
'name' => 'chat.use',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
class DatabaseSeeder extends Seeder
|
class DatabaseSeeder extends Seeder
|
||||||
@@ -35,8 +33,5 @@ class DatabaseSeeder extends Seeder
|
|||||||
$this->call(PermissionSeeder::class);
|
$this->call(PermissionSeeder::class);
|
||||||
$this->call(UserSeeder::class);
|
$this->call(UserSeeder::class);
|
||||||
$this->call(DefaultOptionsSeeder::class);
|
$this->call(DefaultOptionsSeeder::class);
|
||||||
$this->call(NewPermissions::class);
|
|
||||||
$this->call(TeamSeeder::class);
|
|
||||||
$this->call(TeamFileSeeder::class);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use App\Facades\Options;
|
use App\Facades\Options;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
|
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Spatie\Permission\Models\Permission;
|
use Spatie\Permission\Models\Permission;
|
||||||
use Spatie\Permission\Models\Role;
|
use Spatie\Permission\Models\Role;
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
use Spatie\Permission\Models\Permission;
|
use Spatie\Permission\Models\Permission;
|
||||||
use Spatie\Permission\Models\Role;
|
use Spatie\Permission\Models\Role;
|
||||||
@@ -19,8 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Database\Seeders;
|
|
||||||
|
|
||||||
use App\Profile;
|
use App\Profile;
|
||||||
use App\User;
|
use App\User;
|
||||||
use Illuminate\Database\Seeder;
|
use Illuminate\Database\Seeder;
|
||||||
3503
package-lock.json
generated
3503
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
202
public/css/app.css
vendored
202
public/css/app.css
vendored
@@ -1,9 +1,9 @@
|
|||||||
@import url(https://fonts.googleapis.com/css?family=Nunito);@charset "UTF-8";
|
@import url(https://fonts.googleapis.com/css?family=Nunito);@charset "UTF-8";
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Bootstrap v4.5.0 (https://getbootstrap.com/)
|
* Bootstrap v4.4.1 (https://getbootstrap.com/)
|
||||||
* Copyright 2011-2020 The Bootstrap Authors
|
* Copyright 2011-2019 The Bootstrap Authors
|
||||||
* Copyright 2011-2020 Twitter, Inc.
|
* Copyright 2011-2019 Twitter, Inc.
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -202,7 +202,6 @@ pre {
|
|||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
-ms-overflow-style: scrollbar;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
figure {
|
figure {
|
||||||
@@ -270,10 +269,6 @@ select {
|
|||||||
text-transform: none;
|
text-transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
[role=button] {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
select {
|
||||||
word-wrap: normal;
|
word-wrap: normal;
|
||||||
}
|
}
|
||||||
@@ -306,6 +301,13 @@ input[type=checkbox] {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type=date],
|
||||||
|
input[type=time],
|
||||||
|
input[type=datetime-local],
|
||||||
|
input[type=month] {
|
||||||
|
-webkit-appearance: listbox;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
@@ -747,7 +749,6 @@ pre code {
|
|||||||
.col {
|
.col {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-width: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -955,7 +956,6 @@ pre code {
|
|||||||
.col-sm {
|
.col-sm {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-width: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1168,7 +1168,6 @@ pre code {
|
|||||||
.col-md {
|
.col-md {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-width: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1381,7 +1380,6 @@ pre code {
|
|||||||
.col-lg {
|
.col-lg {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-width: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1594,7 +1592,6 @@ pre code {
|
|||||||
.col-xl {
|
.col-xl {
|
||||||
flex-basis: 0;
|
flex-basis: 0;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
min-width: 0;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2190,6 +2187,11 @@ pre code {
|
|||||||
box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
|
box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-control::-webkit-input-placeholder {
|
||||||
|
color: #6c757d;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.form-control::-moz-placeholder {
|
.form-control::-moz-placeholder {
|
||||||
color: #6c757d;
|
color: #6c757d;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -2216,15 +2218,6 @@ pre code {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=date].form-control,
|
|
||||||
input[type=time].form-control,
|
|
||||||
input[type=datetime-local].form-control,
|
|
||||||
input[type=month].form-control {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
-moz-appearance: none;
|
|
||||||
appearance: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
select.form-control:focus::-ms-value {
|
select.form-control:focus::-ms-value {
|
||||||
color: #495057;
|
color: #495057;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@@ -2660,6 +2653,7 @@ textarea.form-control.is-invalid {
|
|||||||
color: #212529;
|
color: #212529;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
cursor: pointer;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
@@ -2695,10 +2689,6 @@ textarea.form-control.is-invalid {
|
|||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn:not(:disabled):not(.disabled) {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.btn.disabled,
|
a.btn.disabled,
|
||||||
fieldset:disabled a.btn {
|
fieldset:disabled a.btn {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
@@ -3334,6 +3324,7 @@ fieldset:disabled a.btn {
|
|||||||
.btn-link:focus,
|
.btn-link:focus,
|
||||||
.btn-link.focus {
|
.btn-link.focus {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-link:disabled,
|
.btn-link:disabled,
|
||||||
@@ -3798,8 +3789,7 @@ input[type=button].btn-block {
|
|||||||
.input-group > .custom-select,
|
.input-group > .custom-select,
|
||||||
.input-group > .custom-file {
|
.input-group > .custom-file {
|
||||||
position: relative;
|
position: relative;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 0%;
|
||||||
width: 1%;
|
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
@@ -4899,7 +4889,7 @@ input[type=button].btn-block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-light .navbar-toggler-icon {
|
.navbar-light .navbar-toggler-icon {
|
||||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-light .navbar-text {
|
.navbar-light .navbar-text {
|
||||||
@@ -4950,7 +4940,7 @@ input[type=button].btn-block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-dark .navbar-toggler-icon {
|
.navbar-dark .navbar-toggler-icon {
|
||||||
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.5%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-dark .navbar-text {
|
.navbar-dark .navbar-text {
|
||||||
@@ -4983,21 +4973,14 @@ input[type=button].btn-block {
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card > .list-group {
|
.card > .list-group:first-child .list-group-item:first-child {
|
||||||
border-top: inherit;
|
border-top-left-radius: 0.25rem;
|
||||||
border-bottom: inherit;
|
border-top-right-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card > .list-group:first-child {
|
.card > .list-group:last-child .list-group-item:last-child {
|
||||||
border-top-width: 0;
|
border-bottom-right-radius: 0.25rem;
|
||||||
border-top-left-radius: calc(0.25rem - 1px);
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: calc(0.25rem - 1px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.card > .list-group:last-child {
|
|
||||||
border-bottom-width: 0;
|
|
||||||
border-bottom-right-radius: calc(0.25rem - 1px);
|
|
||||||
border-bottom-left-radius: calc(0.25rem - 1px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
@@ -5213,10 +5196,6 @@ input[type=button].btn-block {
|
|||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-item {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.breadcrumb-item + .breadcrumb-item {
|
.breadcrumb-item + .breadcrumb-item {
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
}
|
}
|
||||||
@@ -5688,7 +5667,6 @@ a.badge-dark.focus {
|
|||||||
display: flex;
|
display: flex;
|
||||||
height: 1rem;
|
height: 1rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
line-height: 0;
|
|
||||||
font-size: 0.675rem;
|
font-size: 0.675rem;
|
||||||
background-color: #e9ecef;
|
background-color: #e9ecef;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
@@ -5743,7 +5721,6 @@ a.badge-dark.focus {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-item-action {
|
.list-group-item-action {
|
||||||
@@ -5774,13 +5751,13 @@ a.badge-dark.focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list-group-item:first-child {
|
.list-group-item:first-child {
|
||||||
border-top-left-radius: inherit;
|
border-top-left-radius: 0.25rem;
|
||||||
border-top-right-radius: inherit;
|
border-top-right-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-item:last-child {
|
.list-group-item:last-child {
|
||||||
border-bottom-right-radius: inherit;
|
border-bottom-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: inherit;
|
border-bottom-left-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-item.disabled,
|
.list-group-item.disabled,
|
||||||
@@ -5810,26 +5787,26 @@ a.badge-dark.focus {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal > .list-group-item:first-child {
|
.list-group-horizontal .list-group-item:first-child {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal > .list-group-item:last-child {
|
.list-group-horizontal .list-group-item:last-child {
|
||||||
border-top-right-radius: 0.25rem;
|
border-top-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal > .list-group-item.active {
|
.list-group-horizontal .list-group-item.active {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal > .list-group-item + .list-group-item {
|
.list-group-horizontal .list-group-item + .list-group-item {
|
||||||
border-top-width: 1px;
|
border-top-width: 1px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal > .list-group-item + .list-group-item.active {
|
.list-group-horizontal .list-group-item + .list-group-item.active {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
}
|
}
|
||||||
@@ -5839,26 +5816,26 @@ a.badge-dark.focus {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-sm > .list-group-item:first-child {
|
.list-group-horizontal-sm .list-group-item:first-child {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-sm > .list-group-item:last-child {
|
.list-group-horizontal-sm .list-group-item:last-child {
|
||||||
border-top-right-radius: 0.25rem;
|
border-top-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-sm > .list-group-item.active {
|
.list-group-horizontal-sm .list-group-item.active {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-sm > .list-group-item + .list-group-item {
|
.list-group-horizontal-sm .list-group-item + .list-group-item {
|
||||||
border-top-width: 1px;
|
border-top-width: 1px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-sm > .list-group-item + .list-group-item.active {
|
.list-group-horizontal-sm .list-group-item + .list-group-item.active {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
}
|
}
|
||||||
@@ -5869,26 +5846,26 @@ a.badge-dark.focus {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-md > .list-group-item:first-child {
|
.list-group-horizontal-md .list-group-item:first-child {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-md > .list-group-item:last-child {
|
.list-group-horizontal-md .list-group-item:last-child {
|
||||||
border-top-right-radius: 0.25rem;
|
border-top-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-md > .list-group-item.active {
|
.list-group-horizontal-md .list-group-item.active {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-md > .list-group-item + .list-group-item {
|
.list-group-horizontal-md .list-group-item + .list-group-item {
|
||||||
border-top-width: 1px;
|
border-top-width: 1px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-md > .list-group-item + .list-group-item.active {
|
.list-group-horizontal-md .list-group-item + .list-group-item.active {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
}
|
}
|
||||||
@@ -5899,26 +5876,26 @@ a.badge-dark.focus {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-lg > .list-group-item:first-child {
|
.list-group-horizontal-lg .list-group-item:first-child {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-lg > .list-group-item:last-child {
|
.list-group-horizontal-lg .list-group-item:last-child {
|
||||||
border-top-right-radius: 0.25rem;
|
border-top-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-lg > .list-group-item.active {
|
.list-group-horizontal-lg .list-group-item.active {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-lg > .list-group-item + .list-group-item {
|
.list-group-horizontal-lg .list-group-item + .list-group-item {
|
||||||
border-top-width: 1px;
|
border-top-width: 1px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-lg > .list-group-item + .list-group-item.active {
|
.list-group-horizontal-lg .list-group-item + .list-group-item.active {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
}
|
}
|
||||||
@@ -5929,40 +5906,42 @@ a.badge-dark.focus {
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-xl > .list-group-item:first-child {
|
.list-group-horizontal-xl .list-group-item:first-child {
|
||||||
border-bottom-left-radius: 0.25rem;
|
border-bottom-left-radius: 0.25rem;
|
||||||
border-top-right-radius: 0;
|
border-top-right-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-xl > .list-group-item:last-child {
|
.list-group-horizontal-xl .list-group-item:last-child {
|
||||||
border-top-right-radius: 0.25rem;
|
border-top-right-radius: 0.25rem;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-xl > .list-group-item.active {
|
.list-group-horizontal-xl .list-group-item.active {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-xl > .list-group-item + .list-group-item {
|
.list-group-horizontal-xl .list-group-item + .list-group-item {
|
||||||
border-top-width: 1px;
|
border-top-width: 1px;
|
||||||
border-left-width: 0;
|
border-left-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-horizontal-xl > .list-group-item + .list-group-item.active {
|
.list-group-horizontal-xl .list-group-item + .list-group-item.active {
|
||||||
margin-left: -1px;
|
margin-left: -1px;
|
||||||
border-left-width: 1px;
|
border-left-width: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-flush {
|
.list-group-flush .list-group-item {
|
||||||
|
border-right-width: 0;
|
||||||
|
border-left-width: 0;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-flush > .list-group-item {
|
.list-group-flush .list-group-item:first-child {
|
||||||
border-width: 0 0 1px;
|
border-top-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.list-group-flush > .list-group-item:last-child {
|
.list-group-flush:last-child .list-group-item:last-child {
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6126,6 +6105,9 @@ button.close {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
-moz-appearance: none;
|
||||||
|
appearance: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.close.disabled {
|
a.close.disabled {
|
||||||
@@ -6252,9 +6234,6 @@ a.close.disabled {
|
|||||||
.modal-dialog-centered::before {
|
.modal-dialog-centered::before {
|
||||||
display: block;
|
display: block;
|
||||||
height: calc(100vh - 1rem);
|
height: calc(100vh - 1rem);
|
||||||
height: -webkit-min-content;
|
|
||||||
height: -moz-min-content;
|
|
||||||
height: min-content;
|
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6372,9 +6351,6 @@ a.close.disabled {
|
|||||||
|
|
||||||
.modal-dialog-centered::before {
|
.modal-dialog-centered::before {
|
||||||
height: calc(100vh - 3.5rem);
|
height: calc(100vh - 3.5rem);
|
||||||
height: -webkit-min-content;
|
|
||||||
height: -moz-min-content;
|
|
||||||
height: min-content;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-sm {
|
.modal-sm {
|
||||||
@@ -6924,7 +6900,6 @@ a.close.disabled {
|
|||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6935,7 +6910,6 @@ a.close.disabled {
|
|||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: none;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8227,27 +8201,6 @@ button.bg-dark:focus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-select-all {
|
|
||||||
-webkit-user-select: all !important;
|
|
||||||
-moz-user-select: all !important;
|
|
||||||
-ms-user-select: all !important;
|
|
||||||
user-select: all !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-select-auto {
|
|
||||||
-webkit-user-select: auto !important;
|
|
||||||
-moz-user-select: auto !important;
|
|
||||||
-ms-user-select: auto !important;
|
|
||||||
user-select: auto !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-select-none {
|
|
||||||
-webkit-user-select: none !important;
|
|
||||||
-moz-user-select: none !important;
|
|
||||||
-ms-user-select: none !important;
|
|
||||||
user-select: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.overflow-auto {
|
.overflow-auto {
|
||||||
overflow: auto !important;
|
overflow: auto !important;
|
||||||
}
|
}
|
||||||
@@ -8404,6 +8357,18 @@ button.bg-dark:focus {
|
|||||||
height: 100vh !important;
|
height: 100vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.stretched-link::after {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
pointer-events: auto;
|
||||||
|
content: "";
|
||||||
|
background-color: rgba(0, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
.m-0 {
|
.m-0 {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
}
|
}
|
||||||
@@ -10572,18 +10537,6 @@ button.bg-dark:focus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.stretched-link::after {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
z-index: 1;
|
|
||||||
pointer-events: auto;
|
|
||||||
content: "";
|
|
||||||
background-color: rgba(0, 0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-monospace {
|
.text-monospace {
|
||||||
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
|
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
|
||||||
}
|
}
|
||||||
@@ -10815,7 +10768,8 @@ a.text-dark:focus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.text-break {
|
.text-break {
|
||||||
word-wrap: break-word !important;
|
word-break: break-word !important;
|
||||||
|
overflow-wrap: break-word !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-reset {
|
.text-reset {
|
||||||
|
|||||||
1
public/css/basic.min.css
vendored
1
public/css/basic.min.css
vendored
@@ -1 +0,0 @@
|
|||||||
.dropzone,.dropzone *{box-sizing:border-box}.dropzone{position:relative}.dropzone .dz-preview{position:relative;display:inline-block;width:120px;margin:0.5em}.dropzone .dz-preview .dz-progress{display:block;height:15px;border:1px solid #aaa}.dropzone .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:green}.dropzone .dz-preview .dz-error-message{color:red;display:none}.dropzone .dz-preview.dz-error .dz-error-message,.dropzone .dz-preview.dz-error .dz-error-mark{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{display:block}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px}
|
|
||||||
1
public/css/dropzone.min.css
vendored
1
public/css/dropzone.min.css
vendored
File diff suppressed because one or more lines are too long
5
public/css/mixed.css
vendored
5
public/css/mixed.css
vendored
@@ -1050,7 +1050,6 @@ Lots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css
|
|||||||
/* don't display any button-related controls */
|
/* don't display any button-related controls */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* DayGridView
|
/* DayGridView
|
||||||
--------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------*/
|
||||||
/* day row structure */
|
/* day row structure */
|
||||||
@@ -1129,7 +1128,6 @@ Lots taken from Flatly (MIT): https://bootswatch.com/4/flatly/bootstrap.css
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 1.25em;
|
min-width: 1.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Scroller
|
/* Scroller
|
||||||
--------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------*/
|
||||||
.fc-scroller-clip {
|
.fc-scroller-clip {
|
||||||
@@ -1481,7 +1479,6 @@ TODO: figure out better styling
|
|||||||
.fc-rtl .fc-timeline-event.fc-not-start:before {
|
.fc-rtl .fc-timeline-event.fc-not-start:before {
|
||||||
border-right: 0;
|
border-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
/* TimeGridView all-day area
|
/* TimeGridView all-day area
|
||||||
--------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------*/
|
||||||
@@ -1791,7 +1788,6 @@ be a descendant of the grid when it is being dragged.
|
|||||||
border-top-color: transparent;
|
border-top-color: transparent;
|
||||||
border-bottom-color: transparent;
|
border-bottom-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* List View
|
/* List View
|
||||||
--------------------------------------------------------------------------------------------------*/
|
--------------------------------------------------------------------------------------------------*/
|
||||||
/* possibly reusable */
|
/* possibly reusable */
|
||||||
@@ -1910,7 +1906,6 @@ be a descendant of the grid when it is being dragged.
|
|||||||
/* theme will provide own background */
|
/* theme will provide own background */
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px);}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.rightMost:after{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px);}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.rightMost:after{left:auto;right:22px}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
||||||
/*rtl:begin:ignore*/left:0;/*
|
/*rtl:begin:ignore*/left:0;/*
|
||||||
/*rtl:end:ignore*/}/*
|
/*rtl:end:ignore*/}/*
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 9.4 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 12 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 11 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB |
@@ -21,21 +21,6 @@
|
|||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Check If Application Is Under Maintenance
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| If the application is maintenance / demo mode via the "down" command we
|
|
||||||
| will require this file so that any prerendered template can be shown
|
|
||||||
| instead of starting the framework, which could cause an exception.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
|
||||||
require __DIR__.'/../storage/framework/maintenance.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| Register The Auto Loader
|
||||||
|
|||||||
40548
public/js/app.js
vendored
40548
public/js/app.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,94 +0,0 @@
|
|||||||
/* flatpickr v4.6.3, @license MIT */
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Bootstrap v4.5.0 (https://getbootstrap.com/)
|
|
||||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
|
||||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Chart.js v2.9.3
|
|
||||||
* https://www.chartjs.org
|
|
||||||
* (c) 2019 Chart.js Contributors
|
|
||||||
* Released under the MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Sizzle CSS Selector Engine v2.3.5
|
|
||||||
* https://sizzlejs.com/
|
|
||||||
*
|
|
||||||
* Copyright JS Foundation and other contributors
|
|
||||||
* Released under the MIT license
|
|
||||||
* https://js.foundation/
|
|
||||||
*
|
|
||||||
* Date: 2020-03-14
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* jQuery JavaScript Library v3.5.1
|
|
||||||
* https://jquery.com/
|
|
||||||
*
|
|
||||||
* Includes Sizzle.js
|
|
||||||
* https://sizzlejs.com/
|
|
||||||
*
|
|
||||||
* Copyright JS Foundation and other contributors
|
|
||||||
* Released under the MIT license
|
|
||||||
* https://jquery.org/license
|
|
||||||
*
|
|
||||||
* Date: 2020-05-04T22:49Z
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*! *****************************************************************************
|
|
||||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
||||||
this file except in compliance with the License. You may obtain a copy of the
|
|
||||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
||||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
||||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
||||||
|
|
||||||
See the Apache Version 2.0 License for specific language governing permissions
|
|
||||||
and limitations under the License.
|
|
||||||
***************************************************************************** */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @license
|
|
||||||
* Lodash <https://lodash.com/>
|
|
||||||
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
||||||
* Released under MIT license <https://lodash.com/license>
|
|
||||||
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
||||||
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**!
|
|
||||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
||||||
* @version 1.16.1
|
|
||||||
* @license
|
|
||||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
|
||||||
* copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
* SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//! moment.js
|
|
||||||
|
|
||||||
//! moment.js language configuration
|
|
||||||
|
|
||||||
//! moment.js locale configuration
|
|
||||||
2
public/js/globaltooltip.js
vendored
2
public/js/globaltooltip.js
vendored
@@ -1,5 +1,3 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('input[rel="txtTooltip"]').tooltip();
|
$('input[rel="txtTooltip"]').tooltip();
|
||||||
$('span[rel="spanTxtTooltip"]').tooltip(); // Also allow span tooltips
|
|
||||||
$('button[rel="buttonTxtTooltip"]').tooltip(); // button tooltip
|
|
||||||
});
|
});
|
||||||
|
|||||||
1
public/js/plugins/dropzone-amd-module.min.js
vendored
1
public/js/plugins/dropzone-amd-module.min.js
vendored
File diff suppressed because one or more lines are too long
1
public/js/plugins/dropzone.min.js
vendored
1
public/js/plugins/dropzone.min.js
vendored
File diff suppressed because one or more lines are too long
7
public/js/switches.js
vendored
7
public/js/switches.js
vendored
@@ -1,7 +0,0 @@
|
|||||||
$("#jointype").on('change', function() {
|
|
||||||
if ($(this).is(':checked')) {
|
|
||||||
$(this).attr('value', '1');
|
|
||||||
} else {
|
|
||||||
$(this).attr('value', '0');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
6
public/js/team-editor.js
vendored
6
public/js/team-editor.js
vendored
@@ -1,6 +0,0 @@
|
|||||||
$(function() {
|
|
||||||
$('#assocVacancies').multiselect({
|
|
||||||
disableIfEmpty: true,
|
|
||||||
nonSelectedText: 'Choose vacancies...'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
3
resources/js/app.js
vendored
3
resources/js/app.js
vendored
@@ -43,6 +43,3 @@ $("#comment").keyup(function(){
|
|||||||
$("#submitComment").on('click', function(){
|
$("#submitComment").on('click', function(){
|
||||||
$("#newComment").submit();
|
$("#newComment").submit();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#jointype").bootstrapToggle();
|
|
||||||
|
|
||||||
|
|||||||
@@ -602,12 +602,6 @@ return [
|
|||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'teams' => [
|
|
||||||
|
|
||||||
'm_teams_page' => 'Teams',
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
// ==================== END OF MAIN I18N FILE ======================
|
// ==================== END OF MAIN I18N FILE ======================
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,213 +0,0 @@
|
|||||||
@extends('adminlte::page')
|
|
||||||
|
|
||||||
@section('title', config('app.name') . ' | ' . __('messages.teams.m_teams_page'))
|
|
||||||
|
|
||||||
@section('content_header')
|
|
||||||
<h1>{{config('app.name')}} / {{__('messages.teams.m_teams_page')}}</h1>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('js')
|
|
||||||
|
|
||||||
<x-global-errors></x-global-errors>
|
|
||||||
<script src="/js/team-editor.js"></script>
|
|
||||||
|
|
||||||
@stop
|
|
||||||
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
@if($team->openJoin == false)
|
|
||||||
<x-modal id="addUserModal" modal-label="addUserModalLabel" modal-title="Invite User" include-close-button="true">
|
|
||||||
|
|
||||||
<form id="inviteToTeam" method="POST" action="{{ route('sendInvite', ['team' => $team->id]) }}">
|
|
||||||
@csrf
|
|
||||||
<div class="form-group">
|
|
||||||
<select class="custom-select" name="user">
|
|
||||||
<option disabled selected>Choose a user to invite</option>
|
|
||||||
@foreach ($users as $user)
|
|
||||||
<option value="{{ $user->id }}" {{ ($user->id == Auth::user()->id) ? 'disabled' : '' }}>{{ $user->name }}</option>
|
|
||||||
@endforeach
|
|
||||||
</select>
|
|
||||||
<span class="text-sm text-muted"><i class="fas fa-info-circle"></i> This user will receive an email notification asking them to join your team.</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<x-slot name="modalFooter">
|
|
||||||
<button type="button" class="btn btn-success" onclick="$('#inviteToTeam').submit()"><i class="fas fa-paper-plane"></i> Send invite</button>
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
</x-modal>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<x-modal id="userlist_modal" modal-label="UserListModalLabel" modal-title="Team Members and Invites" include-close-button="true">
|
|
||||||
|
|
||||||
<p><i class="fas fa-info-circle"></i> Team members and pending invites will appear here.</p>
|
|
||||||
|
|
||||||
@if (!$team->users->isEmpty())
|
|
||||||
<table class="table table-borderless">
|
|
||||||
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Roles</th>
|
|
||||||
<th>Status</th>
|
|
||||||
<th>Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
@foreach ($team->users as $teammate)
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{{ $teammate->id }}</td>
|
|
||||||
<td><a target="_blank" href="{{ route('showSingleProfile', ['user' => $teammate->id]) }}">{{ $teammate->name }}</a></td>
|
|
||||||
<td>
|
|
||||||
@foreach ($teammate->roles as $teammate_role)
|
|
||||||
|
|
||||||
<span class="badge badge-secondary">{{ $teammate_role->name }}</span>
|
|
||||||
|
|
||||||
@endforeach
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
@if ($teammate->isOwnerOfTeam($team))
|
|
||||||
<span class="badge badge-success">Team Owner</span>
|
|
||||||
@else
|
|
||||||
<span class="badge badge-primary">Team Member</span>
|
|
||||||
@endif
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<button rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="Kick User" type="button" class="btn btn-danger btn-sm"><i class="fas fa-bolt"></i></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
@else
|
|
||||||
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
|
|
||||||
<span><i class="fas fa-exclamation-triangle"></i> <b>There don't seem to be any teammates here!</b></span>
|
|
||||||
<p>Start inviting some people and grow your team.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<x-slot name="modalFooter"></x-slot>
|
|
||||||
|
|
||||||
</x-modal>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col text-center">
|
|
||||||
<img src="/img/editable.svg" alt="Edit illustration" height="220px" width="220px">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
|
|
||||||
<div class="card-header">
|
|
||||||
<h4 class="card-title">Edit Team</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
<form id="editTeam" method="POST" action="{{ route('teams.update', ['team' => $team->id]) }}">
|
|
||||||
|
|
||||||
@csrf
|
|
||||||
@method('PATCH')
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
|
|
||||||
<label for="teamName">Team name</label>
|
|
||||||
<input type="text" class="form-control" id="teamName" value="{{ $team->name }}" disabled>
|
|
||||||
|
|
||||||
<label for="teamDescription">Team description</label>
|
|
||||||
<textarea class="form-control" rows="4" name="teamDescription" id="teamDescription">{{ $team->description }}</textarea>
|
|
||||||
<span class="text-left text-muted text-sm"><a href="https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet"><i class="fab fa-markdown"></i></a> Markdown supported</span>
|
|
||||||
|
|
||||||
<div class="controlbuttons mt-3">
|
|
||||||
|
|
||||||
<span rel="spanTxtTooltip" data-toggle="tooltip" title="This setting controls whether people can join the team freely." data-placement="top">
|
|
||||||
<input type="hidden" name="joinType" value="0"> <!-- unchecked checkbox hack (no js) -->
|
|
||||||
<input value="0" type="checkbox" {{ ($team->openJoin == 1) ? 'checked' : '' }} name="joinType" id="jointype" data-toggle="toggle" data-on="Public Team" data-off="Private" data-onstyle="success" data-offstyle="danger" data-width="100">
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<button onclick="$('#addUserModal').modal('show')" type="button" id="inviteUser" name="inviteUser" class="btn btn-success" {{ ($team->openJoin) ? 'disabled' : '' }}><i class="fas fa-user-plus"></i> Invite user</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
<button type="button" class="btn btn-success ml-2" onclick="$('#editTeam').submit()"><i class="fas fa-save"></i> Save and Close</button>
|
|
||||||
<button type="button" class="btn btn-warning ml-2" onclick="$('#userlist_modal').modal('show')"><i class="fas fa-users"></i> Team Members</button>
|
|
||||||
<button type="button" class="btn btn-danger ml-2" onclick="location.href='{{ route('teams.index') }}'"><i class="far fa-trash-alt"></i> Cancel</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<div class="card">
|
|
||||||
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="card-title"><h4>Team Vacancies</h4></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
<span class="text-muted"><i class="fas fa-info-circle"></i> The vacancies you select determine what applications your team members see. All applications under the vacancies you choose will be displayed.</span>
|
|
||||||
|
|
||||||
<form method="POST" id="vacancyChangeForm" action="{{ route('assignVacancies', ['team' => $team->id]) }}">
|
|
||||||
|
|
||||||
@csrf
|
|
||||||
@method('PATCH')
|
|
||||||
|
|
||||||
<select id="assocVacancies" name="assocVacancies[]" multiple="multiple">
|
|
||||||
|
|
||||||
@foreach($vacancies as $vacancy)
|
|
||||||
|
|
||||||
<!-- fixme: n+1 query here -->
|
|
||||||
<option {{ ($vacancy->hasTeam($team)) ? 'selected' : '' }} value="{{ $vacancy->id }}">{{ $vacancy->vacancyName }}</option>
|
|
||||||
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</select>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
|
|
||||||
<button onclick="$('#vacancyChangeForm').submit()" type="button" class="btn btn-success"><i class="far fa-save"></i> Update Assignments</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@stop
|
|
||||||
@@ -1,113 +0,0 @@
|
|||||||
@extends('adminlte::page')
|
|
||||||
|
|
||||||
@section('title', config('app.name') . ' | Team Files')
|
|
||||||
|
|
||||||
@section('content_header')
|
|
||||||
<h1>{{config('app.name')}} / Teams / Files</h1>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('js')
|
|
||||||
|
|
||||||
<x-global-errors></x-global-errors>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
<x-modal id="upload-dropzone" modal-label="upload-dropzone-modal" modal-title="Upload Files" include-close-button="true">
|
|
||||||
|
|
||||||
<form class="dropzone" id="teamFile" action="{{route('uploadTeamFile')}}"></form>
|
|
||||||
|
|
||||||
<x-slot name="modalFooter">
|
|
||||||
|
|
||||||
</x-slot>
|
|
||||||
</x-modal>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-3 offset-3">
|
|
||||||
<img src="/img/files.svg" width="230px" height="230px" alt="Team files illustration">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<div class="card bg-gray-dark">
|
|
||||||
|
|
||||||
<div class="card-header bg-indigo">
|
|
||||||
<div class="card-title"><h4 class="text-bold">Team Files <span class="badge badge-warning"><i class="fas fa-check-circle"></i> {{ (Auth::user()->currentTeam) ? Auth::user()->currentTeam->name : '(No team)' }}</span></h4></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
@if(!$files->isEmpty())
|
|
||||||
|
|
||||||
<table class="table table-active table-borderless" style="white-space: nowrap">
|
|
||||||
|
|
||||||
<thead>
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>File name</th>
|
|
||||||
<th>Caption</th>
|
|
||||||
<th>Size</th>
|
|
||||||
<th>Last updated</th>
|
|
||||||
<th>Actions</th>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
@foreach($files as $file)
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{{$file->id}}</td>
|
|
||||||
<td>{{ Str::of($file->name)->limit(10, '(..).' . $file->extension) }}</td>
|
|
||||||
<td>{{ Str::of($file->caption)->limit(10) }}</td>
|
|
||||||
<td>{{ $file->size }} bytes</td>
|
|
||||||
<td>{{ $file->updated_at }}</td>
|
|
||||||
<td>
|
|
||||||
<button rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="Download" type="button" class="btn btn-success btn-sm ml-3" onclick="window.location='{{route('downloadTeamFile', ['teamFile' => $file->id])}}'"><i class="fas fa-download"></i></button>
|
|
||||||
<button rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="View" type="button" class="btn btn-success btn-sm ml-3"><i class="fas fa-eye"></i></button>
|
|
||||||
<button rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="Delete File" type="button" class="btn btn-danger btn-sm ml-3"><i class="fas fa-trash"></i></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
@else
|
|
||||||
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
|
|
||||||
<span class="text-bold"><i class="fas fa-exclamation-triangle"></i> There are currently no team files. Try uploading some to get started.</span>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer text-center">
|
|
||||||
<button type="button" class="btn btn-warning" onclick="$('#upload-dropzone').modal('show')"><i class="fas fa-upload"></i> Upload Files</button>
|
|
||||||
{{ $files->links() }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('footer')
|
|
||||||
@include('breadcrumbs.dashboard.footer')
|
|
||||||
@stop
|
|
||||||
@@ -1,147 +0,0 @@
|
|||||||
@extends('adminlte::page')
|
|
||||||
|
|
||||||
@section('title', config('app.name') . ' | ' . __('messages.teams.m_teams_page'))
|
|
||||||
|
|
||||||
@section('content_header')
|
|
||||||
<h1>{{config('app.name')}} / {{__('messages.teams.m_teams_page')}}</h1>
|
|
||||||
@stop
|
|
||||||
|
|
||||||
@section('js')
|
|
||||||
|
|
||||||
<x-global-errors></x-global-errors>
|
|
||||||
|
|
||||||
@endsection
|
|
||||||
|
|
||||||
@section('content')
|
|
||||||
|
|
||||||
|
|
||||||
<x-modal id="newTeamModal" modal-label="newTeamModalLabel" modal-title="New team" include-close-button="true">
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col offset-3">
|
|
||||||
<img src="/img/new_team.svg" height="220px" width="220px" alt="New Team illustration">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form action="{{ route('teams.store') }}" method="POST" id="newTeamForm">
|
|
||||||
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<div class="text-center">
|
|
||||||
<input type="text" id="teamName" class="form-control" required name="teamName">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p class="text-muted text-sm">This is the name team members will see.</p>
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<x-slot name="modalFooter">
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-success" onclick="$('#newTeamForm').submit()"><i class="fas fa-check"></i> Create</button>
|
|
||||||
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
</x-modal>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-4 offset-4 text-center">
|
|
||||||
|
|
||||||
<img src="/img/team.svg" height="230px" width="230px" alt="Team illustration">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card bg-gray-dark">
|
|
||||||
|
|
||||||
<div class="card-header bg-indigo">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
|
|
||||||
<div class="card-title"><h4>{{ __('messages.teams.m_teams_page') }} <span class="badge badge-warning"><i class="fas fa-check-circle"></i> {{ (Auth::user()->currentTeam) ? Auth::user()->currentTeam->name : 'Select a team' }}</span></h4></div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-body">
|
|
||||||
|
|
||||||
@if (!$teams->isEmpty())
|
|
||||||
|
|
||||||
<table class="table-borderless table-active table">
|
|
||||||
|
|
||||||
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>Team Owner</th>
|
|
||||||
<th>Team Name</th>
|
|
||||||
<th>Actions</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
@foreach ($teams as $team)
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td>{{ $team->id }}</td>
|
|
||||||
<td>{{ $team->owner_id }}</td>
|
|
||||||
<td>{{ $team->name }}</td>
|
|
||||||
<td>
|
|
||||||
<button type="button" class="btn btn-success btn-sm ml-2" onclick="location.href='{{ route('teams.edit', ['team' => $team->id]) }}'"><i class="fas fa-cogs"></i> Settings</button>
|
|
||||||
<button onclick="location.href='{{ route('switchTeam', ['team' => $team]) }}'" rel="buttonTxtTooltip" data-placement="top" data-toggle="tooltip" title="Select your active team (for dasboard context, etc)" type="button" class="btn btn-warning btn-sm ml-2"><i class="fas fa-random"></i> Switch To</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
@endforeach
|
|
||||||
|
|
||||||
</tbody>
|
|
||||||
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
@else
|
|
||||||
|
|
||||||
<div class="alert alert-warning">
|
|
||||||
<i class="fas fa-exclamation-triangle"></i> <b> There don't seem to be any teams here</b>
|
|
||||||
<p>Have you tried creating or joining a team? You may also click an invite link if you've been invited.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@endif
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="card-footer">
|
|
||||||
|
|
||||||
<button type="button" class="btn btn-success btn-sm ml-3" onclick="$('#newTeamModal').modal('show')"><i class="fas fa-plus-circle"></i> New team</button>
|
|
||||||
<button type="button" class="btn btn-warning btn-sm ml-3"><i class="fas fas fa-long-arrow-alt-right"></i> Team Dashboard</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
@stop
|
|
||||||
@@ -20,62 +20,9 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
|
|
||||||
<x-modal id="deleteAccountModal" modal-label="deleteAccountModalLabel" modal-title="Close account" include-close-button="true">
|
|
||||||
|
|
||||||
<p>Deleting your account is an irreversible process. The following data will be deleted (including personally identifiable data):</p>
|
|
||||||
<ul>
|
|
||||||
<li>Last IP address</li>
|
|
||||||
<li>Name, Email and MC Username</li>
|
|
||||||
<li>Your previous applications</li>
|
|
||||||
<li>Your profile data and preferences</li>
|
|
||||||
<li>If you were a staff member:</li>
|
|
||||||
<ul>
|
|
||||||
<li>Your comments</li>
|
|
||||||
<li>Any votes</li>
|
|
||||||
<li>Your roles</li>
|
|
||||||
</ul>
|
|
||||||
</ul>
|
|
||||||
<p>What is not deleted:</p>
|
|
||||||
<ul>
|
|
||||||
<li>Server logs of your visits, including IP addresses</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
|
|
||||||
<form id="deleteAccountForm" method="POST" action="{{ route('userDelete') }}">
|
|
||||||
|
|
||||||
@csrf
|
|
||||||
@method('PATCH')
|
|
||||||
|
|
||||||
<div class="form-group">
|
|
||||||
<label for="currentPassword">Re-enter your password</label>
|
|
||||||
<input class="form-control" autocomplete="current-password" type="password" name="currentPassword" id="currentPassword" required>
|
|
||||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> For your security, your password is always required for sensitive operations. <a href="{{ route('password.request') }}">Forgot your password?</a></p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@if (Auth::user()->has2FA())
|
|
||||||
<div class="form-group mt-5">
|
|
||||||
|
|
||||||
<label for="otp">Two-factor authentication code</label>
|
|
||||||
<input type="text" id="otp" name="otp" class="form-control">
|
|
||||||
<p class="text-muted text-sm"><i class="fas fa-info-circle"></i> You cannot recover lost 2FA secrets.</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<x-slot name="modalFooter">
|
|
||||||
|
|
||||||
<button onclick="$('#deleteAccountForm').submit()" type="button" class="btn btn-warning"><i class="fas fa-exclamation-triangle"></i> Continue</button>
|
|
||||||
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
</x-modal>
|
|
||||||
|
|
||||||
@if (!Auth::user()->has2FA())
|
@if (!Auth::user()->has2FA())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<x-modal id="twoFactorAuthModal" modal-label="2faLabel" modal-title="{{__('messages.2fa_txt')}}" include-close-button="true">
|
<x-modal id="twoFactorAuthModal" modal-label="2faLabel" modal-title="{{__('messages.2fa_txt')}}" include-close-button="true">
|
||||||
|
|
||||||
<h3><i class="fas fa-user-shield"></i> {{__('messages.profile.2fa_welcome')}}</h3>
|
<h3><i class="fas fa-user-shield"></i> {{__('messages.profile.2fa_welcome')}}</h3>
|
||||||
@@ -223,9 +170,6 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="contactSettingsTab" data-toggle="tab" href="#contactSettings" role="tab" aria-controls="ContactSettings" aria-selected="false">{{__('messages.profile.contact_settings')}}</a>
|
<a class="nav-link" id="contactSettingsTab" data-toggle="tab" href="#contactSettings" role="tab" aria-controls="ContactSettings" aria-selected="false">{{__('messages.profile.contact_settings')}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" id="dangerZoneTab" data-toggle="tab" href="#dangerZone" role="tab" aria-controls="DangerZone" aria-selected="false">Danger Zone</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -306,15 +250,6 @@
|
|||||||
<button class="btn btn-success" type="button" onclick="document.getElementById('changeEmail').submit()">{{__('messages.profile.change_email')}}</button>
|
<button class="btn btn-success" type="button" onclick="document.getElementById('changeEmail').submit()">{{__('messages.profile.change_email')}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="tab-pane fade p-3" id="dangerZone" role="tabpanel" aria-labelledby="dangerZoneTab">
|
|
||||||
<h5 class="card-title">Danger Zone</h5>
|
|
||||||
<p class="card-text text-bold"><i class="fas fa-radiation"></i> Careful! Actions in these tab might result in irreversible loss of data.</p>
|
|
||||||
|
|
||||||
<button onclick="$('#deleteAccountModal').modal('show')" rel="buttonTxtTooltip" data-toggle="tooltip" data-placement="top" title="This action will delete your account permanently." class="btn btn-danger" type="button"><i class="fas fa-user-slash"></i> Close Account</button>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,167 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<title>Your account has been deleted</title>
|
|
||||||
<style>
|
|
||||||
/* -------------------------------------
|
|
||||||
INLINED WITH htmlemail.io/inline
|
|
||||||
------------------------------------- */
|
|
||||||
/* -------------------------------------
|
|
||||||
RESPONSIVE AND MOBILE FRIENDLY STYLES
|
|
||||||
------------------------------------- */
|
|
||||||
@media only screen and (max-width: 620px) {
|
|
||||||
table[class=body] h1 {
|
|
||||||
font-size: 28px !important;
|
|
||||||
margin-bottom: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] p,
|
|
||||||
table[class=body] ul,
|
|
||||||
table[class=body] ol,
|
|
||||||
table[class=body] td,
|
|
||||||
table[class=body] span,
|
|
||||||
table[class=body] a {
|
|
||||||
font-size: 16px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .wrapper,
|
|
||||||
table[class=body] .article {
|
|
||||||
padding: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .content {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .container {
|
|
||||||
padding: 0 !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .main {
|
|
||||||
border-left-width: 0 !important;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
border-right-width: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn table {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn a {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .img-responsive {
|
|
||||||
height: auto !important;
|
|
||||||
max-width: 100% !important;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------
|
|
||||||
PRESERVE THESE STYLES IN THE HEAD
|
|
||||||
------------------------------------- */
|
|
||||||
@media all {
|
|
||||||
.ExternalClass {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ExternalClass,
|
|
||||||
.ExternalClass p,
|
|
||||||
.ExternalClass span,
|
|
||||||
.ExternalClass font,
|
|
||||||
.ExternalClass td,
|
|
||||||
.ExternalClass div {
|
|
||||||
line-height: 100%;
|
|
||||||
}
|
|
||||||
.apple-link a {
|
|
||||||
color: inherit !important;
|
|
||||||
font-family: inherit !important;
|
|
||||||
font-size: inherit !important;
|
|
||||||
font-weight: inherit !important;
|
|
||||||
line-height: inherit !important;
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
#MessageViewBody a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
.btn-primary table td:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
}
|
|
||||||
.btn-primary a:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
border-color: #34495e !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
|
|
||||||
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">Your account has just been deleted!</span>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;"> </td>
|
|
||||||
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;">
|
|
||||||
<div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;">
|
|
||||||
|
|
||||||
<!-- START CENTERED WHITE CONTAINER -->
|
|
||||||
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
|
|
||||||
|
|
||||||
<!-- START MAIN CONTENT AREA -->
|
|
||||||
<tr>
|
|
||||||
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Hi {{ $name }},</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Someone (hopefully you) has requested that your account at {{ config('app.name') }} be deleted.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">As a security measure, an email is always sent out to make sure you really want to delete your account.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">This is the IP address the request was made from: {{ $originalIP }}.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">If you don't do anything, your account will automatically be permanently deleted in 30 days, and will remain unaccessible for that time period.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Click one of the buttons below to make a decision.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 5px; text-align: center; margin-left: 5px;"> <a href="{{ route('processDeleteConfirmation', ['ID' => $userID, 'action' => 'confirm', 'token' => $deleteToken]) }}" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">Delete Account</a> </td>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 5px; text-align: center; margin-left: 5px;"> <a href="{{ route('processDeleteConfirmation', ['ID' => $userID, 'action' => 'cancel', 'token' => $cancelToken]) }}" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">Cancel Deletion</a> </td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Thank you!</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- END MAIN CONTENT AREA -->
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- START FOOTER -->
|
|
||||||
<div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
|
|
||||||
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;">Staff Manager</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- END FOOTER -->
|
|
||||||
|
|
||||||
<!-- END CENTERED WHITE CONTAINER -->
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
<!doctype html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta name="viewport" content="width=device-width">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
||||||
<title>You have just been invited to a team </title>
|
|
||||||
<style>
|
|
||||||
/* -------------------------------------
|
|
||||||
INLINED WITH htmlemail.io/inline
|
|
||||||
------------------------------------- */
|
|
||||||
/* -------------------------------------
|
|
||||||
RESPONSIVE AND MOBILE FRIENDLY STYLES
|
|
||||||
------------------------------------- */
|
|
||||||
@media only screen and (max-width: 620px) {
|
|
||||||
table[class=body] h1 {
|
|
||||||
font-size: 28px !important;
|
|
||||||
margin-bottom: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] p,
|
|
||||||
table[class=body] ul,
|
|
||||||
table[class=body] ol,
|
|
||||||
table[class=body] td,
|
|
||||||
table[class=body] span,
|
|
||||||
table[class=body] a {
|
|
||||||
font-size: 16px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .wrapper,
|
|
||||||
table[class=body] .article {
|
|
||||||
padding: 10px !important;
|
|
||||||
}
|
|
||||||
table[class=body] .content {
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .container {
|
|
||||||
padding: 0 !important;
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .main {
|
|
||||||
border-left-width: 0 !important;
|
|
||||||
border-radius: 0 !important;
|
|
||||||
border-right-width: 0 !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn table {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .btn a {
|
|
||||||
width: 100% !important;
|
|
||||||
}
|
|
||||||
table[class=body] .img-responsive {
|
|
||||||
height: auto !important;
|
|
||||||
max-width: 100% !important;
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------------
|
|
||||||
PRESERVE THESE STYLES IN THE HEAD
|
|
||||||
------------------------------------- */
|
|
||||||
@media all {
|
|
||||||
.ExternalClass {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ExternalClass,
|
|
||||||
.ExternalClass p,
|
|
||||||
.ExternalClass span,
|
|
||||||
.ExternalClass font,
|
|
||||||
.ExternalClass td,
|
|
||||||
.ExternalClass div {
|
|
||||||
line-height: 100%;
|
|
||||||
}
|
|
||||||
.apple-link a {
|
|
||||||
color: inherit !important;
|
|
||||||
font-family: inherit !important;
|
|
||||||
font-size: inherit !important;
|
|
||||||
font-weight: inherit !important;
|
|
||||||
line-height: inherit !important;
|
|
||||||
text-decoration: none !important;
|
|
||||||
}
|
|
||||||
#MessageViewBody a {
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
font-size: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
font-weight: inherit;
|
|
||||||
line-height: inherit;
|
|
||||||
}
|
|
||||||
.btn-primary table td:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
}
|
|
||||||
.btn-primary a:hover {
|
|
||||||
background-color: #34495e !important;
|
|
||||||
border-color: #34495e !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body class="" style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
|
|
||||||
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">You have just been invited to {{ $teamName }}</span>
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;">
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;"> </td>
|
|
||||||
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto; max-width: 580px; padding: 10px; width: 580px;">
|
|
||||||
<div class="content" style="box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;">
|
|
||||||
|
|
||||||
<!-- START CENTERED WHITE CONTAINER -->
|
|
||||||
<table class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #ffffff; border-radius: 3px;">
|
|
||||||
|
|
||||||
<!-- START MAIN CONTENT AREA -->
|
|
||||||
<tr>
|
|
||||||
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;">
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Hi {{ $name }},</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">{{ $inviterName }} has just invited you to join {{ $teamName }} (team).</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Joining a team confers many benefits, such as access to the team calendar, shared files, assigned applications and much more.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">If you accept this invite, you'll be added to the team immediately. Conversely, if you refuse it, {{ $inviterName }} won't be notified and you'll need to be invited again to join it.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Click one of the buttons below to make a decision.</p>
|
|
||||||
|
|
||||||
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; box-sizing: border-box;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
|
|
||||||
<tbody>
|
|
||||||
<tr>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 5px; text-align: center; margin-left: 5px;"> <a href="{{ route('processInvite', ['action' => 'accept', 'token' => $acceptToken]) }}" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">Accept Invite</a> </td>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; background-color: #3498db; border-radius: 5px; text-align: center; margin-left: 5px;"> <a href="{{ route('processInvite', ['action' => 'deny', 'token' => $denyToken]) }}" target="_blank" style="display: inline-block; color: #ffffff; background-color: #3498db; border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; text-decoration: none; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-transform: capitalize; border-color: #3498db;">Deny Invite</a> </td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">The accept and deny buttons do not expire (unless your invite is cancelled), so you can take your time to make a decision.</p>
|
|
||||||
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Thank you!</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!-- END MAIN CONTENT AREA -->
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<!-- START FOOTER -->
|
|
||||||
<div class="footer" style="clear: both; Margin-top: 10px; text-align: center; width: 100%;">
|
|
||||||
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;">
|
|
||||||
<tr>
|
|
||||||
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; font-size: 12px; color: #999999; text-align: center;">
|
|
||||||
<span class="apple-link" style="color: #999999; font-size: 12px; text-align: center;">Staff Manager</span>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- END FOOTER -->
|
|
||||||
|
|
||||||
<!-- END CENTERED WHITE CONTAINER -->
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;"> </td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
153
routes/web.php
153
routes/web.php
@@ -19,22 +19,6 @@
|
|||||||
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
* along with Raspberry Staff Manager. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use App\Http\Controllers\ApplicationController;
|
|
||||||
use App\Http\Controllers\AppointmentController;
|
|
||||||
use App\Http\Controllers\Auth\TwofaController;
|
|
||||||
use App\Http\Controllers\BanController;
|
|
||||||
use App\Http\Controllers\CommentController;
|
|
||||||
use App\Http\Controllers\ContactController;
|
|
||||||
use App\Http\Controllers\DashboardController;
|
|
||||||
use App\Http\Controllers\DevToolsController;
|
|
||||||
use App\Http\Controllers\FormController;
|
|
||||||
use App\Http\Controllers\HomeController;
|
|
||||||
use App\Http\Controllers\ProfileController;
|
|
||||||
use App\Http\Controllers\TeamController;
|
|
||||||
use App\Http\Controllers\TeamFileController;
|
|
||||||
use App\Http\Controllers\UserController;
|
|
||||||
use App\Http\Controllers\VacancyController;
|
|
||||||
use App\Http\Controllers\VoteController;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
|
||||||
|
|
||||||
@@ -52,211 +36,182 @@ Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['lo
|
|||||||
Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function () {
|
Route::group(['prefix' => 'auth', 'middleware' => ['usernameUUID']], function () {
|
||||||
Auth::routes(['verify' => true]);
|
Auth::routes(['verify' => true]);
|
||||||
|
|
||||||
Route::post('/twofa/authenticate', [TwofaController::class, 'verify2FA'])
|
Route::post('/twofa/authenticate', 'Auth\TwofaController@verify2FA')
|
||||||
->name('verify2FA');
|
->name('verify2FA');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/', [HomeController::class, 'index'])
|
Route::get('/', 'HomeController@index')
|
||||||
->middleware('eligibility');
|
->middleware('eligibility');
|
||||||
|
|
||||||
Route::post('/form/contact', [ContactController::class, 'create'])
|
Route::post('/form/contact', 'ContactController@create')
|
||||||
->name('sendSubmission');
|
->name('sendSubmission');
|
||||||
|
|
||||||
Route::get('/accounts/danger-zone/{ID}/{action}/{token}', [UserController::class, 'processDeleteConfirmation'])
|
|
||||||
->name('processDeleteConfirmation');
|
|
||||||
|
|
||||||
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () {
|
Route::group(['middleware' => ['auth', 'forcelogout', '2fa', 'verified']], function () {
|
||||||
Route::get('/dashboard', [DashboardController::class, 'index'])
|
Route::get('/dashboard', 'DashboardController@index')
|
||||||
->name('dashboard')
|
->name('dashboard')
|
||||||
->middleware('eligibility');
|
->middleware('eligibility');
|
||||||
|
|
||||||
Route::get('users/directory', [ProfileController::class, 'index'])
|
Route::get('users/directory', 'ProfileController@index')
|
||||||
->name('directory');
|
->name('directory');
|
||||||
|
|
||||||
Route::resource('teams', TeamController::class);
|
|
||||||
|
|
||||||
Route::post('teams/{team}/invites/send', [TeamController::class, 'invite'])
|
|
||||||
->name('sendInvite');
|
|
||||||
|
|
||||||
Route::get('teams/{team}/switch', [TeamController::class, 'switchTeam'])
|
|
||||||
->name('switchTeam');
|
|
||||||
|
|
||||||
Route::patch('teams/{team}/vacancies/update', [TeamController::class, 'assignVacancies'])
|
|
||||||
->name('assignVacancies');
|
|
||||||
|
|
||||||
Route::get('teams/invites/{action}/{token}', [TeamController::class, 'processInviteAction'])
|
|
||||||
->name('processInvite');
|
|
||||||
|
|
||||||
Route::get('team/files', [TeamFileController::class, 'index'])
|
|
||||||
->name('showTeamFiles');
|
|
||||||
|
|
||||||
Route::post('team/files/upload', [TeamFileController::class, 'store'])
|
|
||||||
->name('uploadTeamFile');
|
|
||||||
|
|
||||||
Route::get('team/files/{teamFile}/download', [TeamFileController::class, 'download'])
|
|
||||||
->name('downloadTeamFile');
|
|
||||||
|
|
||||||
Route::group(['prefix' => '/applications'], function () {
|
Route::group(['prefix' => '/applications'], function () {
|
||||||
Route::get('/my-applications', [ApplicationController::class, 'showUserApps'])
|
Route::get('/my-applications', 'ApplicationController@showUserApps')
|
||||||
->name('showUserApps')
|
->name('showUserApps')
|
||||||
->middleware('eligibility');
|
->middleware('eligibility');
|
||||||
|
|
||||||
Route::get('/view/{application}', [ApplicationController::class, 'showUserApp'])
|
Route::get('/view/{application}', 'ApplicationController@showUserApp')
|
||||||
->name('showUserApp');
|
->name('showUserApp');
|
||||||
|
|
||||||
Route::post('/{application}/comments', [CommentController::class, 'insert'])
|
Route::post('/{application}/comments', 'CommentController@insert')
|
||||||
->name('addApplicationComment');
|
->name('addApplicationComment');
|
||||||
|
|
||||||
Route::delete('/comments/{comment}/delete', [CommentController::class, 'delete'])
|
Route::delete('/comments/{comment}/delete', 'CommentController@delete')
|
||||||
->name('deleteApplicationComment');
|
->name('deleteApplicationComment');
|
||||||
|
|
||||||
Route::patch('/notes/save/{application}', [AppointmentController::class, 'saveNotes'])
|
Route::patch('/notes/save/{application}', 'AppointmentController@saveNotes')
|
||||||
->name('saveNotes');
|
->name('saveNotes');
|
||||||
|
|
||||||
Route::patch('/update/{application}/{newStatus}', [ApplicationController::class, 'updateApplicationStatus'])
|
Route::patch('/update/{application}/{newStatus}', 'ApplicationController@updateApplicationStatus')
|
||||||
->name('updateApplicationStatus');
|
->name('updateApplicationStatus');
|
||||||
|
|
||||||
Route::delete('{application}/delete', [ApplicationController::class, 'delete'])
|
Route::delete('{application}/delete', 'ApplicationController@delete')
|
||||||
->name('deleteApplication');
|
->name('deleteApplication');
|
||||||
|
|
||||||
Route::get('/staff/all', [ApplicationController::class, 'showAllApps'])
|
Route::get('/staff/all', 'ApplicationController@showAllApps')
|
||||||
->name('allApplications');
|
->name('allApplications');
|
||||||
|
|
||||||
Route::get('/staff/outstanding', [ApplicationController::class, 'showAllPendingApps'])
|
Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps')
|
||||||
->name('staffPendingApps');
|
->name('staffPendingApps');
|
||||||
|
|
||||||
Route::get('/staff/peer-review', [ApplicationController::class, 'showPeerReview'])
|
Route::get('/staff/peer-review', 'ApplicationController@showPeerReview')
|
||||||
->name('peerReview');
|
->name('peerReview');
|
||||||
|
|
||||||
Route::get('/staff/pending-interview', [ApplicationController::class, 'showPendingInterview'])
|
Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview')
|
||||||
->name('pendingInterview');
|
->name('pendingInterview');
|
||||||
|
|
||||||
Route::post('{application}/staff/vote', [VoteController::class, 'vote'])
|
Route::post('{application}/staff/vote', 'VoteController@vote')
|
||||||
->name('voteApplication');
|
->name('voteApplication');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'appointments'], function () {
|
Route::group(['prefix' => 'appointments'], function () {
|
||||||
Route::post('schedule/appointments/{application}', [AppointmentController::class, 'saveAppointment'])
|
Route::post('schedule/appointments/{application}', 'AppointmentController@saveAppointment')
|
||||||
->name('scheduleAppointment');
|
->name('scheduleAppointment');
|
||||||
|
|
||||||
Route::patch('update/appointments/{application}/{status}', [AppointmentController::class, 'updateAppointment'])
|
Route::patch('update/appointments/{application}/{status}', 'AppointmentController@updateAppointment')
|
||||||
->name('updateAppointment');
|
->name('updateAppointment');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () {
|
Route::group(['prefix' => 'apply', 'middleware' => ['eligibility']], function () {
|
||||||
Route::get('positions/{vacancySlug}', [ApplicationController::class, 'renderApplicationForm'])
|
Route::get('positions/{vacancySlug}', 'ApplicationController@renderApplicationForm')
|
||||||
->name('renderApplicationForm');
|
->name('renderApplicationForm');
|
||||||
|
|
||||||
Route::post('positions/{vacancySlug}/submit', [ApplicationController::class, 'saveApplicationAnswers'])
|
Route::post('positions/{vacancySlug}/submit', 'ApplicationController@saveApplicationAnswers')
|
||||||
->name('saveApplicationForm');
|
->name('saveApplicationForm');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => '/profile'], function () {
|
Route::group(['prefix' => '/profile'], function () {
|
||||||
Route::get('/settings', [ProfileController::class, 'showProfile'])
|
Route::get('/settings', 'ProfileController@showProfile')
|
||||||
->name('showProfileSettings');
|
->name('showProfileSettings');
|
||||||
|
|
||||||
Route::patch('/settings/save', [ProfileController::class, 'saveProfile'])
|
Route::patch('/settings/save', 'ProfileController@saveProfile')
|
||||||
->name('saveProfileSettings');
|
->name('saveProfileSettings');
|
||||||
|
|
||||||
Route::get('user/{user}', [ProfileController::class, 'showSingleProfile'])
|
Route::get('user/{user}', 'ProfileController@showSingleProfile')
|
||||||
->name('showSingleProfile');
|
->name('showSingleProfile');
|
||||||
|
|
||||||
Route::get('/settings/account', [UserController::class, 'showAccount'])
|
Route::get('/settings/account', 'UserController@showAccount')
|
||||||
->name('showAccountSettings');
|
->name('showAccountSettings');
|
||||||
|
|
||||||
Route::patch('/settings/account/change-password', [UserController::class, 'changePassword'])
|
Route::patch('/settings/account/change-password', 'UserController@changePassword')
|
||||||
->name('changePassword');
|
->name('changePassword');
|
||||||
|
|
||||||
Route::patch('/settings/account/change-email', [UserController::class, 'changeEmail'])
|
Route::patch('/settings/account/change-email', 'UserController@changeEmail')
|
||||||
->name('changeEmail');
|
->name('changeEmail');
|
||||||
|
|
||||||
Route::post('/settings/account/flush-sessions', [UserController::class, 'flushSessions'])
|
Route::post('/settings/account/flush-sessions', 'UserController@flushSessions')
|
||||||
->name('flushSessions');
|
->name('flushSessions');
|
||||||
|
|
||||||
Route::patch('/settings/account/twofa/enable', [UserController::class, 'add2FASecret'])
|
Route::patch('/settings/account/twofa/enable', 'UserController@add2FASecret')
|
||||||
->name('enable2FA');
|
->name('enable2FA');
|
||||||
|
|
||||||
Route::patch('/settings/account/twofa/disable', [UserController::class, 'remove2FASecret'])
|
Route::patch('/settings/account/twofa/disable', 'UserController@remove2FASecret')
|
||||||
->name('disable2FA');
|
->name('disable2FA');
|
||||||
|
|
||||||
Route::patch('/settings/account/dg/delete', [UserController::class, 'userDelete'])
|
|
||||||
->name('userDelete');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => '/hr'], function () {
|
Route::group(['prefix' => '/hr'], function () {
|
||||||
Route::get('staff-members', [UserController::class, 'showStaffMembers'])
|
Route::get('staff-members', 'UserController@showStaffMembers')
|
||||||
->name('staffMemberList');
|
->name('staffMemberList');
|
||||||
|
|
||||||
Route::get('players', [UserController::class, 'showPlayers'])
|
Route::get('players', 'UserController@showPlayers')
|
||||||
->name('registeredPlayerList');
|
->name('registeredPlayerList');
|
||||||
|
|
||||||
Route::post('players/search', [UserController::class, 'showPlayersLike'])
|
Route::post('players/search', 'UserController@showPlayersLike')
|
||||||
->name('searchRegisteredPLayerList');
|
->name('searchRegisteredPLayerList');
|
||||||
|
|
||||||
Route::patch('staff-members/terminate/{user}', [UserController::class, 'terminate'])
|
Route::patch('staff-members/terminate/{user}', 'UserController@terminate')
|
||||||
->name('terminateStaffMember');
|
->name('terminateStaffMember');
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::group(['prefix' => 'admin'], function () {
|
Route::group(['prefix' => 'admin'], function () {
|
||||||
Route::get('settings', [OptionsController::class, 'index'])
|
Route::get('settings', 'OptionsController@index')
|
||||||
->name('showSettings');
|
->name('showSettings');
|
||||||
|
|
||||||
Route::post('settings/save', [OptionsController::class, 'saveSettings'])
|
Route::post('settings/save', 'OptionsController@saveSettings')
|
||||||
->name('saveSettings');
|
->name('saveSettings');
|
||||||
|
|
||||||
Route::post('players/ban/{user}', [BanController::class, 'insert'])
|
Route::post('players/ban/{user}', 'BanController@insert')
|
||||||
->name('banUser');
|
->name('banUser');
|
||||||
|
|
||||||
Route::delete('players/unban/{user}', [BanController::class, 'delete'])
|
Route::delete('players/unban/{user}', 'BanController@delete')
|
||||||
->name('unbanUser');
|
->name('unbanUser');
|
||||||
|
|
||||||
Route::delete('players/delete/{user}', [UserController::class, 'delete'])
|
Route::delete('players/delete/{user}', 'UserController@delete')
|
||||||
->name('deleteUser');
|
->name('deleteUser');
|
||||||
|
|
||||||
Route::patch('players/update/{user}', [UserController::class, 'update'])
|
Route::patch('players/update/{user}', 'UserController@update')
|
||||||
->name('updateUser');
|
->name('updateUser');
|
||||||
|
|
||||||
Route::get('positions', [VacancyController::class, 'index'])
|
Route::get('positions', 'VacancyController@index')
|
||||||
->name('showPositions');
|
->name('showPositions');
|
||||||
|
|
||||||
Route::post('positions/save', [VacancyController::class, 'store'])
|
Route::post('positions/save', 'VacancyController@store')
|
||||||
->name('savePosition');
|
->name('savePosition');
|
||||||
|
|
||||||
Route::get('positions/edit/{vacancy}', [VacancyController::class, 'edit'])
|
Route::get('positions/edit/{vacancy}', 'VacancyController@edit')
|
||||||
->name('editPosition');
|
->name('editPosition');
|
||||||
|
|
||||||
Route::patch('positions/update/{vacancy}', [VacancyController::class, 'update'])
|
Route::patch('positions/update/{vacancy}', 'VacancyController@update')
|
||||||
->name('updatePosition');
|
->name('updatePosition');
|
||||||
|
|
||||||
Route::patch('positions/availability/{status}/{vacancy}', [VacancyController::class, 'updatePositionAvailability'])
|
Route::patch('positions/availability/{status}/{vacancy}', 'VacancyController@updatePositionAvailability')
|
||||||
->name('updatePositionAvailability');
|
->name('updatePositionAvailability');
|
||||||
|
|
||||||
Route::get('forms/builder', [FormController::class, 'showFormBuilder'])
|
Route::get('forms/builder', 'FormController@showFormBuilder')
|
||||||
->name('showFormBuilder');
|
->name('showFormBuilder');
|
||||||
|
|
||||||
Route::post('forms/save', [FormController::class, 'saveForm'])
|
Route::post('forms/save', 'FormController@saveForm')
|
||||||
->name('saveForm');
|
->name('saveForm');
|
||||||
|
|
||||||
Route::delete('forms/destroy/{form}', [FormController::class, 'destroy'])
|
Route::delete('forms/destroy/{form}', 'FormController@destroy')
|
||||||
->name('destroyForm');
|
->name('destroyForm');
|
||||||
|
|
||||||
Route::get('forms', [FormController::class, 'index'])
|
Route::get('forms', 'FormController@index')
|
||||||
->name('showForms');
|
->name('showForms');
|
||||||
|
|
||||||
Route::get('forms/preview/{form}', [FormController::class, 'preview'])
|
Route::get('forms/preview/{form}', 'FormController@preview')
|
||||||
->name('previewForm');
|
->name('previewForm');
|
||||||
|
|
||||||
Route::get('forms/edit/{form}', [FormController::class, 'edit'])
|
Route::get('forms/edit/{form}', 'FormController@edit')
|
||||||
->name('editForm');
|
->name('editForm');
|
||||||
|
|
||||||
Route::patch('forms/update/{form}', [FormController::class, 'update'])
|
Route::patch('forms/update/{form}', 'FormController@update')
|
||||||
->name('updateForm');
|
->name('updateForm');
|
||||||
|
|
||||||
Route::get('devtools', [DevToolsController::class, 'index'])
|
Route::get('devtools', 'DevToolsController@index')
|
||||||
->name('devTools');
|
->name('devTools');
|
||||||
|
|
||||||
// we could use route model binding
|
// we could use route model binding
|
||||||
Route::post('devtools/vote-evaluation/force', [DevToolsController::class, 'forceVoteCount'])
|
Route::post('devtools/vote-evaluation/force', 'DevToolsController@forceVoteCount')
|
||||||
->name('devToolsForceVoteCount');
|
->name('devToolsForceVoteCount');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user