forked from miguel456/rbrecruiter
Compare commits
41 Commits
Author | SHA1 | Date | |
---|---|---|---|
035c9399a6 | |||
bbe3001157 | |||
d1f4be124c | |||
0f126886f5 | |||
4deb882d23 | |||
635f8593d3 | |||
c3a6b16a13 | |||
fb4d832489 | |||
4456d19c1f | |||
c7fd8989f9 | |||
fb422c1ef7 | |||
a42df354c7 | |||
173dc57aa7 | |||
cb2b45b55f | |||
a3e727f1f1 | |||
669c3c87e6 | |||
96298cd38c | |||
00f37d3f7e | |||
653641f4e8 | |||
d121119706 | |||
1c08cd9057 | |||
1bc63725c9 | |||
c7caf3a67c | |||
7c7d4a306c | |||
016ce1fbf6 | |||
f673ef8222 | |||
2bf8c8e90c | |||
d111864bea | |||
4dbf86a328 | |||
291c98cd0e | |||
119ea1d8ec | |||
0282a6a7c9 | |||
8ed2eb5027 | |||
|
61034ccae9 | ||
ed95f02e00 | |||
c58c46eda8 | |||
91c408fb4f | |||
599d742e96 | |||
50692a8abf | |||
664bdcf45e | |||
9ec2f9edce |
12
.env.example
12
.env.example
@@ -21,6 +21,18 @@ RECAPTCHA_VERIFY_URL="https://www.google.com/recaptcha/api/siteverify"
|
||||
IPGEO_API_KEY=""
|
||||
IPGEO_API_URL=""
|
||||
|
||||
MOJANG_STATUS_URL="https://status.mojang.com/check"
|
||||
MOJANG_API_URL="https://api.mojang.com"
|
||||
|
||||
IPGEO_API_KEY=""
|
||||
IPGEO_API_URL="https://api.ipgeolocation.io/ipgeo"
|
||||
|
||||
ARCANEDEV_LOGVIEWER_MIDDLEWARE=web,auth,can:admin.maintenance.logs.view
|
||||
|
||||
RELEASE=staffmanagement@0.2.0
|
||||
|
||||
SLACK_INTEGRATION_WEBHOOK=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
QUEUE_CONNECTION=sync
|
||||
|
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
42
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: "[BUG] - Short description of what went wrong"
|
||||
labels: bug, help wanted
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Steps to reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**PHP Version: **
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
|
||||
**Log files: attach any log files from the storage/logs directory**.
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
116
README.md
116
README.md
@@ -1,79 +1,75 @@
|
||||
<p align="center"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></p>
|
||||
# Raspberry Teams - The Simple Staff Application Manager v 0.1.0
|
||||
## The quick and pain-free staff application manager (for Minecraft)
|
||||
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a>
|
||||
</p>
|
||||
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?
|
||||
|
||||
## About Laravel
|
||||
|
||||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
|
||||
Wish you had a better application managemet strategy? Well, then Raspberry Teams is for you! It was originally designed and developed for internal use, but sharing is caring! After noticing a worrying lack of "human resources" management systems on SpigotMC's resources section (There was only one outdated/unsupported project), I've decided to take it up into my own terms and start working on it.
|
||||
|
||||
- [Simple, fast routing engine](https://laravel.com/docs/routing).
|
||||
- [Powerful dependency injection container](https://laravel.com/docs/container).
|
||||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
|
||||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
|
||||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
|
||||
- [Robust background job processing](https://laravel.com/docs/queues).
|
||||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
|
||||
|
||||
Laravel is accessible, powerful, and provides tools required for large, robust applications.
|
||||
# Features (not exhaustive)
|
||||
- Beautiful (customizable in future releases) landing page for your application management center; It displays all available staff ranks
|
||||
- Contact form on landing page for those un-registerd users
|
||||
- User registration/authentication system; Users will be sent to the authentication flow to complete their application, if not logged in
|
||||
- Candidate tracking system - Applicants will be tracked from start to finish.
|
||||
- Peer approval system - Have all your staff members vote on applications and decide whether they should be accepted (this is overridable)
|
||||
- Interview scheduling (simple) - Schedule interviews with your candidates and automatically notify them!
|
||||
- Interview notes: Every staff member is able to add and edit interview notes (how the interview went, etc)
|
||||
- Application comments: Finally no more having to go to a private Discord channel just to comment on a single application. Comments are organised neatly for every application! This should help in the decision process of voting for an application.
|
||||
- User profiles - Fill out your profile for others to better find you
|
||||
- User directory - Public profile directory for everyone
|
||||
- Staff rank management - Add/remove ranks on demand, that users will be able to apply to
|
||||
- Simple form builder - Create your application forms easily!
|
||||
- Termination - Has a staff member met their untimely demise? Terminate them. This will strip their permissions and roles.
|
||||
- Controllable permissions - Every user has permissions! Control who has access to what (You can skip the application process and add staff members directly here).
|
||||
- Ban system - Having trouble with pesky spammers? Ban them! This will publicly shame their profile and keep them from signing up or logging in.
|
||||
- Notifications: Notifies slack and email primarily
|
||||
|
||||
## Learning Laravel
|
||||
And many more features!
|
||||
|
||||
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
|
||||
# Roadmap
|
||||
|
||||
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
|
||||
Many other features are currently planned for this app, such as:
|
||||
- Discord role management (approved applicants)
|
||||
- Luckperms/PEX integration - For now, you'll have to promote users manually in-game
|
||||
- Flexibility - This app is built on a flexible concept! It will be able to be used for other purposes other than MC staff members.
|
||||
- Customisable front page (**priority**)
|
||||
- Auto provisioning - Sign up on a website and get your instance of Raspberry Teams up and running in no time
|
||||
- Suggestions accepted!
|
||||
|
||||
## Laravel Sponsors
|
||||
|
||||
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
|
||||
# Technical overview
|
||||
|
||||
- **[Vehikl](https://vehikl.com/)**
|
||||
- **[Tighten Co.](https://tighten.co)**
|
||||
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
|
||||
- **[64 Robots](https://64robots.com)**
|
||||
- **[Cubet Techno Labs](https://cubettech.com)**
|
||||
- **[Cyber-Duck](https://cyber-duck.co.uk)**
|
||||
- **[British Software Development](https://www.britishsoftware.co)**
|
||||
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
|
||||
- **[DevSquad](https://devsquad.com)**
|
||||
- [UserInsights](https://userinsights.com)
|
||||
- [Fragrantica](https://www.fragrantica.com)
|
||||
- [SOFTonSOFA](https://softonsofa.com/)
|
||||
- [User10](https://user10.com)
|
||||
- [Soumettre.fr](https://soumettre.fr/)
|
||||
- [CodeBrisk](https://codebrisk.com)
|
||||
- [1Forge](https://1forge.com)
|
||||
- [TECPRESSO](https://tecpresso.co.jp/)
|
||||
- [Runtime Converter](http://runtimeconverter.com/)
|
||||
- [WebL'Agence](https://weblagence.com/)
|
||||
- [Invoice Ninja](https://www.invoiceninja.com)
|
||||
- [iMi digital](https://www.imi-digital.de/)
|
||||
- [Earthlink](https://www.earthlink.ro/)
|
||||
- [Steadfast Collective](https://steadfastcollective.com/)
|
||||
- [We Are The Robots Inc.](https://watr.mx/)
|
||||
- [Understand.io](https://www.understand.io/)
|
||||
- [Abdel Elrafa](https://abdelelrafa.com)
|
||||
- [Hyper Host](https://hyper.host)
|
||||
- [Appoly](https://www.appoly.co.uk)
|
||||
- [OP.GG](https://op.gg)
|
||||
- [云软科技](http://www.yunruan.ltd/)
|
||||
Tech stack:
|
||||
- [Laravel 7](https://laravel.com/)
|
||||
- Eloquent ORM
|
||||
- AdminLTE / Bootstrap 4
|
||||
- jQuery / Plain Javascript
|
||||
- vueJS (in the future)
|
||||
|
||||
## Contributing
|
||||
# Operating System Requirements
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
Currently, this application is only supported on Linux environments (Ubuntu 20.04 or derivatives are recommended).
|
||||
|
||||
## Code of Conduct
|
||||
# Software Requirements
|
||||
- ``composer`` (min version: 1.8.4)
|
||||
- ``npm`` (tested w/ v 5.8.0)
|
||||
- ``php`` (required PHP 7 or newer - lower versions unsupported!)
|
||||
|
||||
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
|
||||
# PHP Extension Requirements
|
||||
|
||||
## Security Vulnerabilities
|
||||
- JSON
|
||||
- Curl (highly recommended)
|
||||
|
||||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.
|
||||
|
||||
## License
|
||||
# Installation
|
||||
|
||||
The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
Make sure all prerequisites are installed. Afterwards, clone this repository, make ``install.sh``executable and run it.
|
||||
|
||||
# Configuration
|
||||
Configuration is currently done via the installer. Alternatively, you may also edit the ``.env`` file directly.
|
||||
This process will be moved to the browser later.
|
||||
|
||||
# Bug reports
|
||||
|
||||
Please report any bugs you find to the issues section here! It'd be immensely helpful. PRs are also accepted.
|
||||
|
137
app/Console/Commands/Install.php
Normal file
137
app/Console/Commands/Install.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class Install extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'application:install {-u|--unattended: Install non-interactively (currently unused: WIP)}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Installs the application and prepares for production use.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$basePath = base_path();
|
||||
if (Storage::disk('local')->missing('INSTALLED'))
|
||||
{
|
||||
|
||||
|
||||
$this->info('[!! Welcome to Rasberry Teams !!]');
|
||||
$this->info('>> Installing...');
|
||||
$this->call('down', [
|
||||
'--message' => 'Down for maintenance. We\'ll be right back!'
|
||||
]);
|
||||
|
||||
copy($basePath . '/.env.example', $basePath . '/.env');
|
||||
$this->call('key:generate');
|
||||
|
||||
$this->info('>> Installing and preparing dependencies. This may take a while, depending on your computer.');
|
||||
|
||||
$npmOut = 0;
|
||||
$npmMessages = [];
|
||||
|
||||
$npmBuildOut = 0;
|
||||
$npmBuildMessages = [];
|
||||
|
||||
exec('cd ' . $basePath . ' && npm install --silent', $npmBuildOut, $npmOut);
|
||||
exec('cd ' . $basePath . '&& npm run dev --silent', $npmBuildMessages, $npmBuildOut);
|
||||
|
||||
|
||||
if($npmOut !== 0 && $npmBuildOut !== 0)
|
||||
{
|
||||
$this->error('[!] One or more errors have ocurred whilst attempting to install dependencies.');
|
||||
$this->error('[!] It is recommended to run this command again, and report a bug if it keeps happening.');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$settings = [];
|
||||
|
||||
$this->info('>> Configuring application - We\'re going to ask a few questions here!');
|
||||
do
|
||||
{
|
||||
$this->info('== Database Settings (1/6) ==');
|
||||
|
||||
$settings['DB_USERNAME'] = $this->ask('Database username');
|
||||
$settings['DB_PASSWORD'] = $this->secret('Database password (Input won\'t be seen)');
|
||||
$settings['DB_DATABASE'] = $this->ask('Database name');
|
||||
$settings['DB_PORT'] = $this->ask('Database port');
|
||||
$settings['DB_HOST'] = $this->ask('Database hostname');
|
||||
|
||||
$this->info('== Antispam Settings (2/6) (Recaptcha v2) ==');
|
||||
$settings['RECAPTCHA_SITE_KEY'] = $this->ask('Site key');
|
||||
$settings['RECAPTCHA_PRIVATE_KEY'] = $this->ask('Private site key');
|
||||
|
||||
$this->info('== IP Geolocation Settings (3/6) (refer to README.md) ==');
|
||||
$settings['IPGEO_API_KEY'] = $this->ask('API Key');
|
||||
|
||||
$this->info('== Notification Settings (4/6) (Email) ==');
|
||||
$settings['MAIL_USERNAME'] = $this->ask('SMTP Username');
|
||||
$settings['MAIL_PASSWORD'] = $this->secret('SMTP Password (Input won\'t be seen)');
|
||||
$settings['MAIL_PORT'] = $this->ask('SMTP Server Port');
|
||||
$settings['MAIL_HOST'] = $this->ask('SMTP Server Hostname');
|
||||
|
||||
$this->info('== Notification Settings (5/6) (Slack) ==');
|
||||
$settings['SLACK_INTEGRATION_WEBHOOK'] = $this->ask('Integration webhook URL');
|
||||
|
||||
$this->info('== Web Settings (6/6) ==');
|
||||
$settings['APP_URL'] = $this->ask('Application\'s URL');
|
||||
|
||||
} while(!$this->confirm('Are you sure you want to save these settings? You can always go back and try again.'));
|
||||
|
||||
foreach($settings as $keyname => $value)
|
||||
{
|
||||
$this->call('environment:modify', [
|
||||
'key' => $keyname,
|
||||
'value' => $value
|
||||
]);
|
||||
}
|
||||
|
||||
$this->info('>> Saved configuration settings!');
|
||||
$this->info('>> Preparing database...');
|
||||
|
||||
$this->callSilent('config:cache');
|
||||
$this->call('migrate');
|
||||
$this->call('db:seed');
|
||||
|
||||
touch($basePath . '/INSTALLED');
|
||||
|
||||
$this->call('up');
|
||||
$this->info('>> All done! Visit ' . $basePath . ' to start using your brand new installation of Raspberry Teams!');
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error('[!] The application is already installed!');
|
||||
}
|
||||
}
|
||||
}
|
56
app/Console/Commands/SetEnv.php
Normal file
56
app/Console/Commands/SetEnv.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use GeoSot\EnvEditor\Facades\EnvEditor;
|
||||
|
||||
class SetEnv extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'environment:modify {key : Key name} {value : New value}';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Permanently modifies an environment variable on the .env file for later use.';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$path = base_path('/.env');
|
||||
$key = $this->argument('key');
|
||||
$value = $this->argument('value');
|
||||
|
||||
|
||||
|
||||
if (file_exists($path))
|
||||
{
|
||||
EnvEditor::editKey($key, $value);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error('Cannot update a file that doesn\'t exist! Please create .env first.');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
@@ -45,10 +45,9 @@ class ApplicationController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function showUserApp(Request $request, $applicationID)
|
||||
{
|
||||
// TODO: Inject it instead (do this where there is no injection, not just here)
|
||||
$application = Application::find($applicationID);
|
||||
|
||||
$this->authorize('view', $application);
|
||||
@@ -77,6 +76,12 @@ class ApplicationController extends Controller
|
||||
|
||||
|
||||
|
||||
public function showAllApps()
|
||||
{
|
||||
return view('dashboard.appmanagement.all')
|
||||
->with('applications', Application::paginate(6));
|
||||
}
|
||||
|
||||
|
||||
public function showAllPendingApps()
|
||||
{
|
||||
@@ -87,9 +92,6 @@ class ApplicationController extends Controller
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public function showPendingInterview()
|
||||
{
|
||||
$this->authorize('viewAny', Application::class);
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use App\Facades\UUID;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
|
||||
class UsernameUUID
|
||||
@@ -19,13 +20,18 @@ class UsernameUUID
|
||||
$input = $request->all();
|
||||
if (isset($input['uuid']))
|
||||
{
|
||||
// TODO: Switch to custom Facade
|
||||
$username = $input['uuid'];
|
||||
try
|
||||
{
|
||||
$username = $input['uuid'];
|
||||
$input['uuid'] = UUID::toUUID($username);
|
||||
}
|
||||
catch(\InvalidArgumentException $iae)
|
||||
{
|
||||
report($iae);
|
||||
|
||||
$conversionRequest = Http::get(config('general.urls.mojang.api') . '/users/profiles/minecraft/' . $username)->body();
|
||||
$decodedConversionRequest = json_decode($conversionRequest, true);
|
||||
|
||||
$input['uuid'] = $decodedConversionRequest['id'];
|
||||
$request->session()->flash('error', $iae->getMessage());
|
||||
return redirect(route('register'));
|
||||
}
|
||||
|
||||
$request->replace($input);
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ class FormPolicy
|
||||
*/
|
||||
public function create(User $user)
|
||||
{
|
||||
return $this->user->can('admin.hiring.forms');
|
||||
return $user->can('admin.hiring.forms');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ class FormPolicy
|
||||
*/
|
||||
public function delete(User $user, Form $form)
|
||||
{
|
||||
return $this->user->can('admin.hiring.forms');
|
||||
return $user->can('admin.hiring.forms');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -6,6 +6,7 @@ use App\Observers\UserObserver;
|
||||
use App\User;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Sentry;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
@@ -26,6 +27,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
Sentry\init([
|
||||
'release' => env('RELEASE')
|
||||
]);
|
||||
|
||||
Schema::defaultStringLength(191);
|
||||
User::observe(UserObserver::class);
|
||||
}
|
||||
|
@@ -19,11 +19,17 @@ class UUID
|
||||
throw new \LogicException('Argument username for ' . __METHOD__ . ' cannot be null!');
|
||||
}
|
||||
|
||||
$response = json_decode(Http::post(config('general.urls.mojang.api') . '/profiles/minecraft', [
|
||||
$response = json_decode(Http::post(trim(config('general.urls.mojang.api')) . '/profiles/minecraft', [
|
||||
$username
|
||||
])->body(), true);
|
||||
|
||||
return $response[0]['id'];
|
||||
if (isset($response[0]))
|
||||
{
|
||||
return $response[0]['id'];
|
||||
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException("You must supply a valid, premium Minecraft account to sign up.");
|
||||
}
|
||||
|
||||
// Note: Caching could simply be assigning the username to it's UUID, however, to make this work, we'd need to loop over all cache items, which would be slighly ineffective
|
||||
@@ -38,7 +44,7 @@ class UUID
|
||||
$shortUUID = substr($uuid, 0, 8);
|
||||
$username = Cache::remember('uuid_' . $shortUUID, now()->addDays(30), function() use ($shortUUID, $uuid) {
|
||||
|
||||
$response = json_decode(Http::get(config('general.urls.mojang.session') . '/session/minecraft/profile/' . $uuid)->body(), true);
|
||||
$response = json_decode(Http::get(trim(config('general.urls.mojang.session')) . '/session/minecraft/profile/' . $uuid)->body(), true);
|
||||
|
||||
Log::debug('Caching ' . $shortUUID . 'for thirty days');
|
||||
return $response['name'];
|
||||
|
@@ -14,6 +14,7 @@
|
||||
"doctrine/dbal": "^2.10",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"fruitcake/laravel-cors": "^1.0",
|
||||
"geo-sot/laravel-env-editor": "^0.9.9",
|
||||
"guzzlehttp/guzzle": "^6.5",
|
||||
"jeroennoten/laravel-adminlte": "^3.2",
|
||||
"laravel/framework": "^7.0",
|
||||
|
61
composer.lock
generated
61
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "fd14fa762c6ac8136b171abd8437e7d7",
|
||||
"content-hash": "16e8efbacd91ef3417b21bd2648e1629",
|
||||
"packages": [
|
||||
{
|
||||
"name": "almasaeed2010/adminlte",
|
||||
@@ -1032,6 +1032,65 @@
|
||||
],
|
||||
"time": "2020-04-28T08:47:37+00:00"
|
||||
},
|
||||
{
|
||||
"name": "geo-sot/laravel-env-editor",
|
||||
"version": "v0.9.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/GeoSot/Laravel-EnvEditor.git",
|
||||
"reference": "e828d3d3310890286d0b53045de9381187258605"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/GeoSot/Laravel-EnvEditor/zipball/e828d3d3310890286d0b53045de9381187258605",
|
||||
"reference": "e828d3d3310890286d0b53045de9381187258605",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"laravel/framework": "~5.5.0|~5.6.0|~5.7.0|~5.8.0|~6.0|~7.0",
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "^3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.9.*-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"GeoSot\\EnvEditor\\ServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"EnvEditor": "GeoSot\\EnvEditor\\Facades\\EnvEditor"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"GeoSot\\EnvEditor\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Geo Sot",
|
||||
"email": "geo.sotis@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A laravel Package that Supports .Env File editing and backup ",
|
||||
"keywords": [
|
||||
"EnvEditor",
|
||||
"geo-sot",
|
||||
"laravel",
|
||||
"laravel-env-editor"
|
||||
],
|
||||
"time": "2020-04-17T23:33:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
"version": "6.5.4",
|
||||
|
@@ -251,6 +251,12 @@ return [
|
||||
'header' => 'Application Management',
|
||||
'can' => ['applications.view.all', 'applications.vote']
|
||||
],
|
||||
[
|
||||
'text' => 'All applications',
|
||||
'url' => 'applications/staff/all',
|
||||
'icon' => 'fas fa-list-ol',
|
||||
'can' => 'applications.view.all'
|
||||
],
|
||||
[
|
||||
'text' => 'Outstanding Applications',
|
||||
'url' => '/applications/staff/outstanding',
|
||||
@@ -521,6 +527,7 @@ return [
|
||||
'location' => 'https://cdn.jsdelivr.net/npm/fullcalendar@5.0.1/main.min.css'
|
||||
]
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
],
|
||||
];
|
||||
|
9
install.sh
Executable file
9
install.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
echo "Preliminary installation starting!"
|
||||
sleep 3
|
||||
composer install
|
||||
|
||||
echo "Full installation starting!"
|
||||
sleep 3
|
||||
php artisan application:install
|
1
public/css/home.css
vendored
Normal file
1
public/css/home.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.full-img-bg
|
1
public/img/applications_all.svg
Normal file
1
public/img/applications_all.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 8.1 KiB |
1
public/img/placeholders.svg
Normal file
1
public/img/placeholders.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 7.1 KiB |
@@ -1,9 +1,22 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
|
||||
<x-global-errors></x-global-errors>
|
||||
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-md-8">
|
||||
|
||||
@if (session()->has('error'))
|
||||
<div class="alert alert-danger">
|
||||
<i class="fas fa-exclamation"></i><b> Please verify your submission</b>
|
||||
<p>
|
||||
{{ session('error') }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">{{ __('Register') }}</div>
|
||||
|
||||
|
217
resources/views/dashboard/appmanagement/all.blade.php
Normal file
217
resources/views/dashboard/appmanagement/all.blade.php
Normal file
@@ -0,0 +1,217 @@
|
||||
@extends('adminlte::page')
|
||||
|
||||
@section('title', 'Raspberry Network | Profile')
|
||||
|
||||
@section('content_header')
|
||||
|
||||
<h4>Application Management / All Applications</h4>
|
||||
|
||||
@stop
|
||||
|
||||
@section('js')
|
||||
|
||||
<script type="text/javascript" src="/js/app.js"></script>
|
||||
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col">
|
||||
|
||||
|
||||
<div class="callout callout-info">
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
|
||||
<img src="/img/applications_all.svg" alt="Applications illustration" class="img-responsive" width="200px"/>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
|
||||
<h3><i class="fas fa-info-circle"></i> You're looking at all applications ever received</h3>
|
||||
<p>
|
||||
Here, you have quick and easy access to all applications ever received by the system.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="row mt-5">
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
<!-- MAIN CONTENT - APPS AND PICS -->
|
||||
|
||||
<div class="card-header">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3">
|
||||
<h3>All applications</h3>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="navbtn right" style="whitespace: nowrap">
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('staffPendingApps') }}'"><i class="far fa-folder-open"></i> Outstanding Applications</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('pendingInterview') }}'"><i class="fas fa-microphone-alt"></i> Interview Queue</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='{{ route('peerReview') }}'"><i class="fas fa-search"></i> Peer Review</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-3 center">
|
||||
|
||||
<img src="/img/placeholders.svg" alt="Placeholder illustration" class="img-responsive" width="200px"/>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col">
|
||||
|
||||
@if (!$applications->isEmpty())
|
||||
|
||||
<table class="table table-borderless" style="whitespace: nowrap">
|
||||
|
||||
<thead>
|
||||
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Applicant</th>
|
||||
<th>Status</th>
|
||||
<th>Date</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
@foreach($applications as $application)
|
||||
|
||||
<tr>
|
||||
<td>{{ $application->id }}</td>
|
||||
<td><a href="{{ route('showSingleProfile', ['user' => $application->user->id]) }}">{{ $application->user->name }}</a></td>
|
||||
<td>
|
||||
@switch($application->applicationStatus)
|
||||
|
||||
@case('STAGE_SUBMITTED')
|
||||
|
||||
<span class="badge badge-primary"><i class="far fa-clock"></i> Outstanding (Submitted)</span>
|
||||
@break
|
||||
|
||||
@case('STAGE_PEERAPPROVAL')
|
||||
|
||||
<span class="badge badge-warning"><i class="fas fa-vote-yea"></i> Peer Approval</span>
|
||||
@break
|
||||
|
||||
@case('STAGE_INTERVIEW')
|
||||
|
||||
<span class="badge badge-warning"><i class="fas fa-microphone-alt"></i> Interview</span>
|
||||
|
||||
@break
|
||||
|
||||
@case('STAGE_INTERVIEW_SCHEDULED')
|
||||
|
||||
<span class="badge badge-warning"><i class="far fa-clock"></i>Interview Scheduled</span>
|
||||
|
||||
@break
|
||||
|
||||
@case('APPROVED')
|
||||
|
||||
<span class="badge badge-success"><i class="fas fa-check"></i> Approved</span>
|
||||
|
||||
@break
|
||||
|
||||
@case('DENIED')
|
||||
|
||||
<span class="badge badge-danger"><i class="fas fa-times"></i> Denied</span>
|
||||
|
||||
@break;
|
||||
|
||||
@default
|
||||
<span class="badge badge-secondary"><i class="fas fa-question-circle"></i> Unknown</span>
|
||||
|
||||
|
||||
@endswitch
|
||||
</td>
|
||||
<td>{{ $application->created_at }}</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-success btn-sm" onclick="window.location.href='{{ route('showUserApp', ['id' => $application->id]) }}'"><i class="fas fa-eye"></i> View</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
@else
|
||||
|
||||
<div class="alert alert-warning">
|
||||
|
||||
<h3><i class="fas fa-question-circle"></i> There are no applications here</h3>
|
||||
<p>
|
||||
We couldn't find any applications. Maybe no one has applied yet?
|
||||
Please try again later.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- end main content card -->
|
||||
</div>
|
||||
|
||||
@if (!$applications->isEmpty() && isset($applications->links))
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
{{ $applications->links }}
|
||||
|
||||
</div>
|
||||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@stop
|
@@ -163,72 +163,11 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col text-center">
|
||||
<p>
|
||||
Join the team today and help out network grow and prosper!
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
|
||||
<!-- Card content -->
|
||||
<div class="card-body text-center">
|
||||
|
||||
<!-- Title -->
|
||||
<img src="https://crafatar.com/avatars/6102256a-bd28-4dd7-b68e-4c96ef313734" class="img-fluid mb-3" alt="miguel456's avatar">
|
||||
|
||||
<h4 class="card-title text-center"><a>miguel456</a></h4>
|
||||
<!-- Text -->
|
||||
<p class="card-text">Network Owner / Web Developer</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="button" class="btn btn-info">More Info</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col text-center">
|
||||
|
||||
<div class="card">
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Moderator</h4>
|
||||
<p class="card-text">Open Position!</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="button" class="btn btn-success">Apply</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col text-center">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Helper</h4>
|
||||
|
||||
<p class="card-text">Open Position!</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer">
|
||||
|
||||
<button type="button" class="btn btn-success">Apply</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -12,6 +12,7 @@
|
||||
<!-- Scripts -->
|
||||
<script src="{{ asset('js/app.js') }}" defer></script>
|
||||
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
@@ -79,5 +80,7 @@
|
||||
@yield('content')
|
||||
</main>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@@ -40,7 +40,6 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){
|
||||
->name('showUserApps')
|
||||
->middleware('eligibility');
|
||||
|
||||
|
||||
Route::get('/view/{id}', 'ApplicationController@showUserApp')
|
||||
->name('showUserApp');
|
||||
|
||||
@@ -58,16 +57,24 @@ Route::group(['middleware' => ['auth', 'forcelogout']], function(){
|
||||
Route::patch('/update/{id}/{newStatus}', 'ApplicationController@updateApplicationStatus')
|
||||
->name('updateApplicationStatus');
|
||||
|
||||
|
||||
Route::get('/staff/all', 'ApplicationController@showAllApps')
|
||||
->name('allApplications');
|
||||
|
||||
|
||||
Route::get('/staff/outstanding', 'ApplicationController@showAllPendingApps')
|
||||
->name('staffPendingApps');
|
||||
|
||||
|
||||
Route::get('/staff/peer-review', 'ApplicationController@showPeerReview')
|
||||
->name('peerReview');
|
||||
|
||||
|
||||
Route::get('/staff/pending-interview', 'ApplicationController@showPendingInterview')
|
||||
->name('pendingInterview');
|
||||
|
||||
|
||||
|
||||
Route::post('{id}/staff/vote', 'VoteController@vote')
|
||||
->name('voteApplication');
|
||||
|
||||
|
Reference in New Issue
Block a user