Skip to content

Commit

Permalink
1.0.0-RC2 (#68)
Browse files Browse the repository at this point in the history
* Fix #64 | Error in activiteiten weergave.
* Fix #31 | Support organisatie -> activiteiten logger delete
* Fix #71 | Implementatie package attribute
* Fix #67 | Paginatie instantie translaties.
* Fix #65 | Implementatie changelog
* Fix #75 | Button attribute moet vervangen worden door een submit.
* Fix #72 | Implementatie class docblocks -> seeders
* Fix #69 | Support organisatie -> activiteiten logger store
* Fix #70 | Systeem on een ondersteunende organisatie te wijzigen.
* Fix #74 | Implementatie class docs -> requests
* Fix #77 | Methode voor het zoeken van een ondersteunende organisatie.
* Fix #80 | Implementatie PurgeCSS
* Fix #82 | Bug in zoek formulier v/d activiteiten logger.
* Fix #76 | Implementatie tooltips backend support organisaties
  • Loading branch information
Tjoosten authored Jan 29, 2018
1 parent f49b524 commit fcb3531
Show file tree
Hide file tree
Showing 44 changed files with 74,257 additions and 135 deletions.
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

All notable changes to `Misfits-BE/Kernwapen-Referendum` will be documented in this file

## 1.0.0-RC2 - 29-01-2018

- Fix key length bug in oudere MySQL versies.
- Fix missende queue runner
- Fix #64 | Error in activiteiten weergave.
- Fix #31 | Support organisatie -> activiteiten logger delete
- Fix #71 | Implementatie package attribute
- Fix #67 | Paginatie instantie translaties.
- Fix #65 | Implementatie changelog
- Fix #69 | Support organisatie -> activiteiten logger store
- Fix #70 | Systeem on een ondersteunende organisatie te wijzigen.
- Fix #75 | Button attribute moet vervangen worden door een submit.
- Fix #74 | Implementatie class docs -> requests
- Fix #72 | Implementatie class docblocks -> seeders
- Fix #76 | Implementatie tooltips backend support organisaties
- Fix #77 | Methode voor het zoeken van een ondersteunende organisatie.
- Fix #80 | Implementatie PurgeCSS
- Fix #82 | Bug in zoek formulier v/d activiteiten logger.

## 1.0.0-RC1 - 26-01-2018

- First BETA release
3 changes: 3 additions & 0 deletions app/Http/Controllers/Backend/ActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public function index(): View
*
* @todo Implement phpunit (auth, no auth)
*
* @todo Refactor ActivitySearchValidator to the Search validator.
* Because multiple system have a search and te term is always called 'term'.
*
* @param ActivitySearchValidator $input De gegeven gebruiker invoer. (Gevalideerd)
* @return \Illuminate\View\View
*/
Expand Down
64 changes: 62 additions & 2 deletions app/Http/Controllers/Backend/SupportController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

use App\Http\Controllers\Controller;
use App\Http\Requests\Backend\OrganizationValidator;
use App\Http\Requests\Backend\OrganizationUpdateValidator;
use App\Http\Requests\Backend\SearchValidator;
use App\Repositories\SupportRepository;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
Expand Down Expand Up @@ -49,6 +51,22 @@ public function index(): View
]);
}

/**
* Zoek voor een speicifieke ondersteunende organisatie.
*
* @todo Implementatie IF/ELSE wanneer er meer dan 12 organisaties zijn. (view)
* @todo Implement phpunit test (auth, no auth, forbid-banned-user)
*
* @param SearchValidator $input De gegeven gebruikersinvoer (Gevalideerd)
* @return \Illuminate\View\View
*/
public function search(SearchValidator $input): View
{
return view('backend.support.index', [
'organizations' => $this->supportRepository->searchOrganization($input->term, 15)
]);
}

/**
* Creatie weergave voor een nieuwe organisatie.
*
Expand All @@ -70,13 +88,52 @@ public function create(): View
*/
public function store(OrganizationValidator $input): RedirectResponse
{
if ($this->supportRepository->createOrganization($input->all())) {
$organisation = $this->supportRepository->createOrganization($input->all());

if ($organisation) {
$this->addActivity($organisation, 'Heeft een ondersteunende organisatie toegevoegd.');
flash('De ondersteunende organisatie is toegevoegd aan het systeem.')->success();
}

return redirect()->route('admin.support.index');
}

/**
* Weergave voor het wijzigen van een ondersteundende organisatie in het systeem.
*
* @todo implementatie phpunit test
*
* @param int $organisation The unieke identificatie van de organisatie in het systeem.
* @return \Illuminate\View\View
*/
public function edit(int $organisation): View
{
return view('backend.support.edit', [
'organisation' => $this->supportRepository->findOrFail($organisation)
]);
}

/**
* Update de ondersteunende organisatie in de databank.
*
* @todo Implementatie phpunit test
*
* @param OrganizationUpdateValidator $input De gegeven gebruikers invoer (gevalideerd).
* @param int $organisation De unieke identificatie van de organisatie
* @return \Illuminate\Http\RedirectResponse
*/
public function update(OrganizationUpdateValidator $input, int $organisation): RedirectResponse
{
$organisation = $this->supportRepository->findOrFail($organisation);

if ($organisation->update($input->except('_token', '_method'))) {
$this->addActivity($organisation, 'Heeft een ondersteunende organisatie gewijzigd.');
flash('De ondersteunende organisatie is gewijzigd in het systeem.')->success();
}

return redirect()->route('admin.support.index');
}

/**
* Verwijder een ondersteunende organisatie uit het systeem.
*
Expand All @@ -85,7 +142,10 @@ public function store(OrganizationValidator $input): RedirectResponse
*/
public function destroy(int $organisation): RedirectResponse
{
if ($this->supportRepository->deleteOrganisation($organisation)) {
$organisation = $this->supportRepository->findOrFail($organisation);

if ($organisation->delete()) {
$this->addActivity($organisation, 'Heeft een ondersteunende organisatie verwijderd');
flash('De ondersteunende organisatie is verwijder.')->success();
}

Expand Down
11 changes: 9 additions & 2 deletions app/Http/Requests/Auth/AccountInfoValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* AccountInfoValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package App\Http\Requests\Auth
*/
class AccountInfoValidator extends FormRequest
{
/**
Expand All @@ -16,7 +23,7 @@ class AccountInfoValidator extends FormRequest
*
* @return bool
*/
public function authorize()
public function authorize(): bool
{
return auth()->check();
}
Expand All @@ -26,7 +33,7 @@ public function authorize()
*
* @return array
*/
public function rules()
public function rules(): array
{
return [
'name' => 'required|string|max:255',
Expand Down
11 changes: 9 additions & 2 deletions app/Http/Requests/Auth/AccountSecurityValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* AccountSecurityValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package App\Http\Requests\Auth
*/
class AccountSecurityValidator extends FormRequest
{
/**
Expand All @@ -16,7 +23,7 @@ class AccountSecurityValidator extends FormRequest
*
* @return bool
*/
public function authorize()
public function authorize(): bool
{
return auth()->check();
}
Expand All @@ -26,7 +33,7 @@ public function authorize()
*
* @return array
*/
public function rules()
public function rules(): array
{
return ['password' => 'required|string|min:6|confirmed'];
}
Expand Down
7 changes: 7 additions & 0 deletions app/Http/Requests/Backend/ActivitySearchValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* ActivitySearchValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class ActivitySearchValidator extends FormRequest
{
/**
Expand Down
7 changes: 7 additions & 0 deletions app/Http/Requests/Backend/BugValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* BugValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class BugValidator extends FormRequest
{
/**
Expand Down
7 changes: 7 additions & 0 deletions app/Http/Requests/Backend/NotitionValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* NotitionValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class NotitionValidator extends FormRequest
{
/**
Expand Down
41 changes: 41 additions & 0 deletions app/Http/Requests/Backend/OrganizationUpdateValidator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace App\Http\Requests\Backend;

use Illuminate\Foundation\Http\FormRequest;

/**
* Backend validator class voor het updaten van een ondersteunende organisatie.
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class OrganizationUpdateValidator extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
return auth()->check();
}

/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return [
'link' => 'required|max:255',
'name' => 'required|max:255',
'verantwoordelijke_naam' => 'required|max:255',
'verantwoordelijke_email' => 'required|email',
'telefoon_nr' => 'required|max:255',
];
}
}
7 changes: 7 additions & 0 deletions app/Http/Requests/Backend/OrganizationValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* OrganizationValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class OrganizationValidator extends FormRequest
{
/**
Expand Down
35 changes: 35 additions & 0 deletions app/Http/Requests/Backend/SearchValidator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

namespace App\Http\Requests\Backend;

use Illuminate\Foundation\Http\FormRequest;

/**
* Validatie voor de zoek opdrachten in de databank.
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 TIm Joosten
* @package \App\Http\Requests\Backend
*/
class SearchValidator extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize(): bool
{
return auth()->check();
}

/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules(): array
{
return ['term' => 'max:120|required'];
}
}
7 changes: 7 additions & 0 deletions app/Http/Requests/Backend/UserValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* UserValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Backend
*/
class UserValidator extends FormRequest
{
/**
Expand Down
7 changes: 7 additions & 0 deletions app/Http/Requests/Frontend/ContactValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* ContactValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Frontend
*/
class ContactValidator extends FormRequest
{
/**
Expand Down
7 changes: 7 additions & 0 deletions app/Http/Requests/Shared/SignatureValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@

use Illuminate\Foundation\Http\FormRequest;

/**
* SignatureValidator
*
* @author Tim Joosten <tim@activisme.be>
* @copyright 2018 Tim Joosten
* @package \App\Http\Requests\Shared
*/
class SignatureValidator extends FormRequest
{
/**
Expand Down
2 changes: 1 addition & 1 deletion app/Notifications/CredentialsNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function toMail($notifiable): MailMessage
->subject('Er is een login op activisme.be voor u aangemaakt.')
->greeting('Geachte,')
->line('Een adminstrator heeft voor jouw een login aangemaakt op ' . config('app.name'))
->line("U kunt zich aanmelden met uw email adres en het volgende wachtwoord: `{$this->password}`.")
->line("U kunt zich aanmelden met uw email adres en het volgende wachtwoord: `{$this->password}`")
->action('Aanmelden', route('login'));
}
}
Loading

0 comments on commit fcb3531

Please sign in to comment.