Merge branch 'maint/deorgify' into 'main'

"Deorgification" MR

See merge request webvokestudio/athenahr!7
This commit is contained in:
Miguel Nogueira 2023-07-02 14:56:04 +00:00
commit 95cf4fcabb
17 changed files with 135 additions and 87 deletions

View File

@ -1,4 +1,5 @@
APP_NAME=Laravel
APP_DESCRIPTION="AthenaHR - Your one-stop-shop for your community recruitment needs"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
@ -11,9 +12,16 @@ APP_LOGO="path/to/large/logo.png"
APP_LOGO_SM="path/to/small/logo.png"
APP_AUTH_BANNER=""
APP_SITEHOMEPAGE=""
# Add your status page here. It'll appear in error pages as a button.
# If you don't have one, leave it empty and the button won't show up.
APP_STATUSPAGE="https://status.athenahr.io"
API_PREFIX="api"
# FEATURE OVERRIDES
# Feature overrides allow you to force-enable/disable features regardless of application settings and feature flags
# Turning on the override will disable its feature
@ -56,11 +64,18 @@ DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
## SERVICES
RECAPTCHA_SITE_KEY=
RECAPTCHA_PRIVATE_KEY=
RECAPTCHA_VERIFY_URL="https://www.google.com/recaptcha/api/siteverify"
# WARNING: Your contact form will be useless if you change this value. Only change this URL if Google updates it.
# AthenaHR's defaut GTM ID is pre-configured unless you supply one - if you leave this on, we'll use analytics data to improve the app.
# Off by default
GTM_ENABLED=false
GTM_ID="GTM-T47K5CG"
MOJANG_STATUS_URL="https://status.mojang.com/check"
MOJANG_API_URL="https://api.mojang.com"

View File

@ -36,7 +36,7 @@ class Ban extends Model
];
public $casts = [
'bannedUntil',
'bannedUntil' => 'datetime',
];
public function user()

View File

@ -30,7 +30,7 @@ class ApplicationApprovedEvent
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $application;
public Application $application;
/**
* Create a new event instance.

View File

@ -30,7 +30,7 @@ class ApplicationDeniedEvent
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $application;
public Application $application;
/**
* Create a new event instance.

View File

@ -31,9 +31,9 @@ class UserBannedEvent
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public $user;
public User $user;
public $ban;
public Ban $ban;
/**
* Create a new event instance.

View File

@ -22,6 +22,7 @@
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Sentry\Laravel\Integration;
use Throwable;
class Handler extends ExceptionHandler
@ -45,34 +46,24 @@ class Handler extends ExceptionHandler
'password_confirmation',
];
/**
* Report or log an exception.
*
* @param \Throwable $exception
* @return void
*
* @throws \Exception
*/
public function report(Throwable $exception)
public function register(): void
{
if (app()->bound('sentry') && $this->shouldReport($exception)) {
app('sentry')->captureException($exception);
}
parent::report($exception);
$this->reportable(function (Throwable $e) {
Integration::captureUnhandledException($e);
});
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @param \Throwable $e
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
*/
public function render($request, Throwable $exception)
public function render($request, Throwable $e)
{
return parent::render($request, $exception);
return parent::render($request, $e);
}
}

View File

@ -27,7 +27,7 @@
"mpociot/teamwork": "^8.0",
"opcodesio/log-viewer": "^1.2",
"pragmarx/google2fa-laravel": "^1.3",
"sentry/sentry-laravel": "3.2.*",
"sentry/sentry-laravel": "3.6.*",
"socialiteproviders/discord": "^4.1",
"spatie/laravel-permission": "^5.5",
"ultrono/markdown": "*"

51
composer.lock generated
View File

@ -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": "b69f99d4cab0bf1ae806c2c8e9fd8205",
"content-hash": "366b9feca7fa3c75b96dd22ce137d9f4",
"packages": [
{
"name": "almasaeed2010/adminlte",
@ -5592,29 +5592,26 @@
},
{
"name": "sentry/sentry-laravel",
"version": "3.2.0",
"version": "3.6.0",
"source": {
"type": "git",
"url": "https://github.com/getsentry/sentry-laravel.git",
"reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76"
"reference": "6aacef4d12c22046f68ab617ee1496b9655b8eb9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/55ad9bd47766cec2d8978b8487c40e81a5a87d76",
"reference": "55ad9bd47766cec2d8978b8487c40e81a5a87d76",
"url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/6aacef4d12c22046f68ab617ee1496b9655b8eb9",
"reference": "6aacef4d12c22046f68ab617ee1496b9655b8eb9",
"shasum": ""
},
"require": {
"illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0",
"nyholm/psr7": "^1.0",
"php": "^7.2 | ^8.0",
"sentry/sdk": "^3.3",
"sentry/sentry": "^3.12",
"sentry/sdk": "^3.4",
"sentry/sentry": "^3.20",
"symfony/psr-http-message-bridge": "^1.0 | ^2.0"
},
"conflict": {
"laravel/lumen-framework": "*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.11",
"laravel/framework": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0",
@ -5647,7 +5644,7 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
"MIT"
],
"authors": [
{
@ -5669,7 +5666,7 @@
],
"support": {
"issues": "https://github.com/getsentry/sentry-laravel/issues",
"source": "https://github.com/getsentry/sentry-laravel/tree/3.2.0"
"source": "https://github.com/getsentry/sentry-laravel/tree/3.6.0"
},
"funding": [
{
@ -5681,7 +5678,7 @@
"type": "custom"
}
],
"time": "2023-02-01T10:56:52+00:00"
"time": "2023-06-29T10:31:13+00:00"
},
{
"name": "socialiteproviders/discord",
@ -9088,22 +9085,22 @@
},
{
"name": "composer/class-map-generator",
"version": "1.0.0",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/composer/class-map-generator.git",
"reference": "1e1cb2b791facb2dfe32932a7718cf2571187513"
"reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/1e1cb2b791facb2dfe32932a7718cf2571187513",
"reference": "1e1cb2b791facb2dfe32932a7718cf2571187513",
"url": "https://api.github.com/repos/composer/class-map-generator/zipball/953cc4ea32e0c31f2185549c7d216d7921f03da9",
"reference": "953cc4ea32e0c31f2185549c7d216d7921f03da9",
"shasum": ""
},
"require": {
"composer/pcre": "^2 || ^3",
"composer/pcre": "^2.1 || ^3.1",
"php": "^7.2 || ^8.0",
"symfony/finder": "^4.4 || ^5.3 || ^6"
"symfony/finder": "^4.4 || ^5.3 || ^6 || ^7"
},
"require-dev": {
"phpstan/phpstan": "^1.6",
@ -9141,7 +9138,7 @@
],
"support": {
"issues": "https://github.com/composer/class-map-generator/issues",
"source": "https://github.com/composer/class-map-generator/tree/1.0.0"
"source": "https://github.com/composer/class-map-generator/tree/1.1.0"
},
"funding": [
{
@ -9157,7 +9154,7 @@
"type": "tidelift"
}
],
"time": "2022-06-19T11:31:27+00:00"
"time": "2023-06-30T13:58:57+00:00"
},
{
"name": "composer/pcre",
@ -10136,16 +10133,16 @@
},
{
"name": "phpstan/phpdoc-parser",
"version": "1.22.0",
"version": "1.22.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c"
"reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ec58baf7b3c7f1c81b3b00617c953249fb8cf30c",
"reference": "ec58baf7b3c7f1c81b3b00617c953249fb8cf30c",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/65c39594fbd8c67abfc68bb323f86447bab79cc0",
"reference": "65c39594fbd8c67abfc68bb323f86447bab79cc0",
"shasum": ""
},
"require": {
@ -10177,9 +10174,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.0"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.22.1"
},
"time": "2023-06-01T12:35:21+00:00"
"time": "2023-06-29T20:46:06+00:00"
},
{
"name": "phpunit/php-code-coverage",

11
config/analytics.php Normal file
View File

@ -0,0 +1,11 @@
<?php
return [
'google' => [
'gtm-enabled' => env('GTM_ENABLED', false),
'gtm-id' => env('GTM_ID', 'GTM-T47K5CG')
]
];

View File

@ -34,6 +34,25 @@ return [
'name' => env('APP_NAME', 'Laravel'),
/*
|--------------------------------------------------------------------------
| Application description
|--------------------------------------------------------------------------
|
| This value is a short description of the application. The default value uses
| AthenaHR's tagline, but you can set your own value to match your branding.
|
| This value is used in the description meta-tags, so it shows up in search
| results and in embeds, such as Discord link previews. As such, this is a
| highly visible value, so make it count!
|
*/
'description' => env('APP_DESCRIPTION', 'AthenaHR - Your one-stop-shop for your community recruitment needs'),
/*
|--------------------------------------------------------------------------
| Application Homepage
@ -69,7 +88,7 @@ return [
| It forces Laravel to load all assets via HTTPS, even when the environment is
| set to "local". This setting is useless in production because it's already enforced.
| If you don't enable this when using SSL locally, the pages won't load properly.
| If you're a regular user, don't touch this setting.
| If you're a regular user, you don't need to don't touch this setting.
|
*/
'force_secure' => env('NONPROD_FORCE_SECURE', false),
@ -79,7 +98,7 @@ return [
| IP address anonymity
|--------------------------------------------------------------------------
|
| RB Recruiter collects IP addresses and stores them in the database in order to
| AthenaHR collects IP addresses and stores them in the database in order to
| display them to site admins.
|
| This feature allows you to disable the display and collection of IP addresses,
@ -102,7 +121,7 @@ return [
| - Terms of Service, where you outline acceptable usage of your services;
| - Community Guidelines, where you outline acceptable behavior for users on your platforms.
|
| RBRecruiter will display these URLs at appropriate locations and force users to accept them,
| AthenaHR will display these URLs at appropriate locations and force users to accept them,
| if legally necessary, such as in the registration & application form pages.
|
| Additionally, you can also specify a support email and URL where your users/customers can send inquiries if necessary.
@ -119,6 +138,20 @@ return [
'support_email' => env('SUPPORT_EMAIL', 'support@example.com'),
'source_repo' => env('SOURCE_REPO', 'https://code.webvokestudio.pt/miguel456/rbrecruiter'),
/*
|--------------------------------------------------------------------------
| Status Page
|--------------------------------------------------------------------------
|
| AthenaHR can display a helpful status page in error pages. If you want a button
| leading to your status page, fill in this value. Otherwise, leave it blank.
|
*/
'statuspage' => env('app_statuspage', ""),
/*
|--------------------------------------------------------------------------
| Application Environment

View File

@ -1,10 +1,12 @@
@include('breadcrumbs.header')
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T47K5CG"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
@if(config('analytics.google.gtm-enabled'))
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ config('analytics.google.gtm-id') }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
@endif
<!-- This section is global -->
@if (session()->has('error'))

View File

@ -3,16 +3,18 @@
<!-- Copyright - DO NOT REMOVE WITHOUT PERMISSION -->
<div class="footer-copyright text-center py-3">
{!! __('<a href=":appUrlConfigValue"> :appNameConfigValue :appReleaseConfigValue &copy; :currentYear - All Rights Reserved. Took :pageLoadTimeMillis seconds.</a>', [
{!! __('<a href=":appUrlConfigValue"> :appNameConfigValue :appReleaseConfigValue &copy; :currentYear - Took :pageLoadTimeMillis seconds.</a>', [
'appUrlConfigValue' => config('app.url'),
'appNameConfigValue' => config('app.name'),
'appReleaseConfigValue' => config('app.release'),
'currentYear' => now()->year,
'pageLoadTimeMillis' => round(microtime(true) - LARAVEL_START, 3)
]) !!}
<br>
<a target="_blank" rel="nofollow noopener" href="https://athenahr.pt">{{ __('Powered by AthenaHR') }} &copy;</a>
</div>
<!-- Copyright -->
<!-- GNU General Public License (https://www.gnu.org/licenses/gpl-3.0.en.html) Built by Miguel N. -->
<!-- AthenaHR // GNU General Public License (https://www.gnu.org/licenses/gpl-3.0.en.html) Built by Miguel N. -->
</footer>
<!-- Footer -->

View File

@ -4,18 +4,20 @@
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-T47K5CG');</script>
<!-- End Google Tag Manager -->
@if(config('analytics.google.gtm-enabled'))
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','{{ config('analytics.google.gtm-id') }}');</script>
<!-- End Google Tag Manager -->
@endif
<meta charset="utf-8">
<meta name="author" content="GC">
<meta name="author" content="{{ __(':appName Team', ['appName' => config('app.name')]) }}">
<meta name="robots" content="index, follow">
<meta name="tags" content="gamesclub, gamescluboficial, games club oficial, games club discord, minecraft, gaming, discord">
<meta name="tags" content="{{ config('app.name') }} staff, community recruitment, discord, discord staff">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
@ -25,8 +27,8 @@
<title>{{config('app.name')}} | {{ __('Home') }}</title>
<meta name="title" content="Games Club Oficial | {{ __('Página Inicial') }}">
<meta name="description" content="{{ __('Games Club Oficial - Onde sua diversão acontece!') }}">
<meta name="title" content="{{ __(':appName | Home', [':appName' => config('app.name')]) }}">
<meta name="description" content="{{ config('app.description') }}">
<!-- Font Awesome -->
@ -110,9 +112,9 @@
<div class="container text-center white-text">
<div class="white-text text-center wow fadeInUp">
<h2>{{config('app.name')}}</h2>
<h5>{{ __('Welcome to the :appName Recruitment Portal!', ['appName' => config('app.name')]) }}</h5>
<h5>{{ __('Welcome to the :appName recruitment portal!', ['appName' => config('app.name')]) }}</h5>
<br>
<p>{{ __('We process applications for our Discord server\'s management team here. If you have any questions, don\'t hesistate to contact our support team! Take a look at the open jobs below.') }}</p>
<p>{{ __('Please feel free to take a look at any open roles below. If you see something you like, applying is easy!') }}</p>
<p>{!! __('If you\'d like to learn more about our community, make sure to visit our <a href=":mainWebsiteUrlConfigValue" target="_blank">main website</a>!', ['mainWebsiteUrlConfigValue' => config('app.sitehomepage')]) !!}</p>
</div>
</div>
@ -167,8 +169,10 @@
@endswitch
<a class="mt-3 ml-3 btn btn-primary btn-lg" href="{{route('home')}}" role="button"><i class="fas fa-home"></i> {{ __('Back to safety') }}</a>
<a target="_blank" class="mt-3 ml-3 btn btn-primary btn-lg" href="https://status.gamescluboficial.com.br" role="button"><i class="fas fa-cogs"></i> {{ __('System status') }}</a>
@if(!empty(config('app.statuspage')))
<a target="_blank" class="mt-3 ml-3 btn btn-primary btn-lg" href="{{ config('app.statuspage') }}" role="button"><i class="fas fa-cogs"></i> {{ __('System status') }}</a>
@endif
</div>
</div>

View File

@ -1,5 +1,4 @@
<div class="card" id="{{$id}}">
<!-- Let all your things have their places; let each part of your business have its time. - Benjamin Franklin -->
<div class="card-header">

View File

@ -1,5 +1,3 @@
<!-- I begin to speak only when I am certain what I will say is not better left unsaid - Cato the Younger -->
@if (session()->has('success'))
<script>

View File

@ -1,5 +1,3 @@
<!-- Smile, breathe, and go slowly. - Thich Nhat Hanh -->
<div class="modal fade" tabindex="-1" id="{{$id}}" role="dialog" aria-labelledby="{{$modalLabel}}" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">

View File

@ -61,8 +61,8 @@
<div class="row mt-5">
<div class="col text-center">
<h3>Confira os cargos disponíveis</h3>
<p>Quer colaborar com a equipe da {{ config('app.name') }} Estamos recrutando! Confira um dos nossos cargos abertos. Uma boa equipe é um pilar de uma comunidade bem-sucedida.</p>
<h3>{{ __('Check out our available roles') }}</h3>
{!! __("<p>Are you looking to work with the :appName team? We're actively recruiting! Check out one of our open roles. A good team is an important aaspect of a successful community.</p>", ['appName' => config('app.name')]) !!}
</div>
</div>
@ -138,7 +138,7 @@
<div class="card-header">
<div class="card-title"><h4>{{__('Applications Closed')}}</h4></div>
<div class="card-title"><h4>{{__('There are no open roles')}}</h4></div>
</div>
@ -148,9 +148,8 @@
<p><b>{{__('Hello There!')}}</b></p>
<p>
{{__('We are currently not hiring any new staff members at the moment. If you\'d like to apply, check out our Discord\'s
announcement channel for news when a new position opens.
Our application cycle usually lasts two weeks, so if you\'re seeing this, it\'s because it finished, and new one will begin soon.')}}
{{__('We are currently not recruiting any new staff members at the moment. If you\'d like to apply, check out our community\'s
announcement channel for news when a new role opens.')}}
</p>
</div>
@ -169,9 +168,8 @@
<div class="col text-center">
<h3>{{ __('A gestão da :appName responde a todas candidaturas dentro de 48 horas.', ['appName' => config('app.name')]) }}</h3>
<p>{!! __('Se você tiver algum dúvida sobre a sua conta de recrutamento, candidatura, ou qualquer outra questão, visite o nosso <a href=":supportURL" target="_blank">site de atendimento</a>, ou <a href="mailto::supportEmail">envie-nos um email</a>.', ['supportURL' => config('app.support_url'), 'supportEmail' => config('app.support_email')]) !!}</p>
{!! __("<h3>The :appName management team usually responds to applications within :timeTakenAppl hours.</hr>", ['appName' => config('app.name'), 'timeTakenAppl' => '48']) !!}
<p>{!! __('If you have any questions about your web portal account, application or literally anything else, please visit our <a href=":supportURL" target="_blank">support site</a>, or <a href="mailto::supportEmail">send us an email</a>.', ['supportURL' => config('app.support_url'), 'supportEmail' => config('app.support_email')]) !!}</p>
</div>
</div>