Commit Graph

32 Commits

Author SHA1 Message Date
Miguel Nogueira 8942623bde
Added services
This commit moves most controller logic onto Services. Services are part of the Service-Repository pattern. The models act as repositories.

Services are easily testable and are needed for the upcoming API, in order to avoid duplicated code and to maintain a single source of "truth".

 The User, Vacancy and Vote controllers still need their logic moved onto services.
2021-07-25 22:54:15 +01:00
Miguel Nogueira 6cda1fe183
More refactoring
Refactored some old code and added missing translation calls.
2021-07-20 10:32:43 +01:00
Miguel Nogueira f62ea9669b
Finished applications API endpoint group 2021-03-31 19:39:42 +01:00
Miguel Nogueira 6940b1816e
Merge remote-tracking branch 'origin/develop' into develop 2021-03-31 15:50:55 +01:00
Miguel Nogueira ddd79d38fe
API Resources and first endpoints 2021-03-31 03:55:09 +01:00
Miguel N 5f6f6f693d Remove linebreak processing
This approach would allow users to directly use HTML in their responses. We'd need to purify HTML on the way out to only allow <br>, otherwise, there'd be XSS concerns.

Rendering as Markdown and letting users know they can use it is a better approach in the long run.
2021-01-29 17:20:28 +00:00
Miguel N f83b3a6860 Updated linebreak processing 2021-01-29 17:12:36 +00:00
Miguel N f17bb0e3cc Update 'app/Http/Controllers/ApplicationController.php' 2021-01-29 17:00:35 +00:00
Miguel N f941980602 % to $ 2021-01-29 16:57:57 +00:00
Miguel N 0f5e812e03 Usability: Turn CRLF/CR/LF into BR 2021-01-29 16:56:29 +00:00
Miguel Nogueira 0bdb6cf2fb
Minor fixes 2020-12-07 17:48:15 +00:00
Miguel Nogueira 32c01f6e0b Removed useless feature 2020-11-03 03:00:03 +00:00
Miguel Nogueira 96aa01b9c6 Recent changes 2020-11-02 21:44:05 +00:00
Miguel Nogueira 6541e25a39 Apply fixes from StyleCI 2020-10-10 16:30:26 +00:00
Miguel Nogueira 9b5e35b241 Missing typehint 2020-09-02 20:52:56 +01:00
Miguel Nogueira 5f1f92a9ce Code review
This commit fixes some superficial instances of Broken Access Control 
(https://owasp.org/www-project-top-ten/OWASP_Top_Ten_2017/Top_10-2017_A5-Broken_Access_Control).
There may be some more instances of this, as authorization was only done 
after most of the controllers were done (big mistake).

Some refactoring was also performed, where Route Model Binding with DI 
(dependency injection) was used whenever possible, to increase 
testability of the codebase.
Some reused code was also moved to Helper classes as to enforce DRY; 
There may be some lines of code that are still copy-pasted from other 
parts of the codebase for reuse.

Non-breaking refactoring changes were made, but the app as a whole still 
needs full manual testing, and customised responses to HTTP 500 
responses. Some errors are also not handled gracefully and this wasn't 
checked in this commit.
2020-07-16 21:21:28 +01:00
Miguel Nogueira e978a5417b Added ability to delete single application
Also moved User observer code to Application observer
2020-07-12 17:01:33 +01:00
Miguel Nogueira 035c9399a6 Add "All Applications" page 2020-07-11 02:43:59 +01:00
Miguel Nogueira 33c16fcf46 Add user directory & isolate authorisation 2020-06-27 19:15:33 +01:00
Miguel Nogueira 5a8c080a31 Beta version
This commit is too large to list all changes.
2020-06-27 00:32:33 +01:00
Miguel Nogueira d15c0cb12f Major changes - Vote system now finished 2020-05-30 00:20:39 +01:00
Miguel Nogueira cc8c293cc6 Significant changes
Added several components and features too long to list here
2020-05-22 03:49:16 +01:00
Miguel Nogueira 7635f8e2f4 Add application list for users 2020-05-11 16:44:47 +01:00
Miguel Nogueira cf7cc142a7 Add Dynamic Form Processing for Custom Forms 2020-05-08 08:10:25 +01:00
Miguel Nogueira 4c6a435e34 Entrypoint: Add Application Page
This commit finally adds the dynamically rendered form that changes according to how the user builds their form.
It also fragments the header and footer for the main page into their own separate files for ease of access later.
Vacancy status has also been added to the Vacancies in DB.
All staff application endpoints have also been moved to under the user application endpoints group, for ease of use (duplicated route group).
2020-05-08 06:06:24 +01:00
Miguel Nogueira 623200914d Add interview page (incomplete commit) 2020-05-02 06:54:14 +01:00
Miguel Nogueira e0e417e631 Add peer review tab 2020-05-01 06:21:44 +01:00
Miguel Nogueira b5e6a4a94b Added Outstanding applications page
This commit also includes Chart.js for the whole project using Webpack. It also updates NPM packages to support ChartJS, and suppresses locale.js warnings from Webpack builds.
Gitignore removes the webpack bundle file since that file should be built each time dependencies/js code are modified.
2020-05-01 05:42:19 +01:00
Miguel Nogueira c802908bf3 Add "My Profile" Page
This commit adds the layout for the profile page, for users and staff members.
2020-04-30 22:53:57 +01:00
Miguel Nogueira 76d6ea6704 Added denied applications page
This commit adds a modified version of the previous page, meant for displaying denied apps.
Also modified method names and adds dates.
2020-04-30 16:55:14 +01:00
Miguel Nogueira 045b0c42f6 Added Under Review page
The user applications page has been added into the app.
2020-04-30 16:38:54 +01:00
Miguel Nogueira 7c22894e94 Added models, migrations and controllers
This commit adds the logical structure for the app.
2020-04-29 18:15:54 +01:00