Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.9.0 #341

Merged
merged 51 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
997891b
Added Vue full calendar
NuwanJ Nov 13, 2022
000e979
Full Calendar updates
NuwanJ Nov 13, 2022
abef7c1
Merge pull request #47 from cepdnaclk/milestone_3b
NuwanJ Nov 13, 2022
a9c92e8
Merge branch 'milestone_3b' of https://github.com/NuwanJ/smart-invent…
NuwanJ Nov 13, 2022
d88354d
Merge fixes
NuwanJ Nov 13, 2022
10f1c7b
A few merge issues were fixed
NuwanJ Nov 13, 2022
3a00ffc
Merge pull request #49 from NuwanJ/vue-full-calendar
NuwanJ Nov 13, 2022
6666fcc
Location checkbox updates
NuwanJ Nov 19, 2022
a167db1
Merge branch 'dev' of https://github.com/NuwanJ/smart-inventory-manag…
NuwanJ Nov 19, 2022
fdf541e
Announcements Basic Setup
NuwanJ Dec 6, 2022
e2dfa47
Discord Log Channel implementation
NuwanJ Dec 7, 2022
53f68a3
Merge pull request #52 from NuwanJ/331-discord-logs
NuwanJ Dec 7, 2022
5f398fa
Calendar Updates
NuwanJ Apr 8, 2023
bf8f3f5
Milestone 3B Merge fixes
NuwanJ Apr 8, 2023
3ffb0a8
Merge fix updates
NuwanJ Apr 8, 2023
60f4b48
Merge pull request #53 from NuwanJ/milestone_3b
NuwanJ Apr 8, 2023
07607b7
Merge pull request #314 from NuwanJ/dev
NuwanJ Apr 8, 2023
49819a1
Frontend view updates
NuwanJ Apr 29, 2023
8185cf9
Fix
NuwanJ Apr 29, 2023
330e2f4
Added Git pre-push unit testing
NuwanJ Apr 29, 2023
97190fc
Readme update
NuwanJ Apr 29, 2023
985ecde
Git CI pipeline updates
NuwanJ Apr 29, 2023
1e00e7a
Removed unused GUI test
NuwanJ Apr 29, 2023
23ab4eb
Dummy image
NuwanJ May 1, 2023
5259297
Backend UI updates
NuwanJ May 1, 2023
f17cd70
Merge pull request #54 from NuwanJ/308-frontend-UI-updates
NuwanJ May 1, 2023
7883923
Bug fix
NuwanJ May 1, 2023
6acd3cd
item_thumbnail.jpg update
NuwanJ May 1, 2023
3af2dcb
Merge pull request #315 from NuwanJ/dev
NuwanJ May 1, 2023
f22fbbc
Merge pull request #316 from cepdnaclk/308-frontend-UI-updates
NuwanJ May 1, 2023
cf0353d
Basic changes
NuwanJ May 1, 2023
1bd6cb0
Updating unit tests
NuwanJ May 1, 2023
883091b
Merge pull request #318 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 2, 2023
157790e
Merge branch 'cepdnaclk:main' into annoucements
NuwanJ May 3, 2023
7b84187
Merge pull request #57 from NuwanJ/dev
NuwanJ May 3, 2023
b505d06
Basic implementations
NuwanJ-RhinoPartners May 3, 2023
23fa866
Merge pull request #55 from NuwanJ/317-migrate-admin-to-dashboard
NuwanJ May 3, 2023
ee61291
Merge pull request #58 from NuwanJ/dev
NuwanJ May 3, 2023
7af1c43
Updated unit testings
NuwanJ-RhinoPartners May 3, 2023
baef827
Announcement display order updated
NuwanJ-RhinoPartners May 3, 2023
00ac2cf
Merge pull request #56 from NuwanJ/annoucements
NuwanJ May 3, 2023
e12202f
Merge pull request #320 from NuwanJ/dev
NuwanJ May 3, 2023
b0b87d5
Remove thumbURL delete logic
NuwanJ-RhinoPartners May 5, 2023
74ae3ea
Submit only the thumb parameter to deleteThumb()
NuwanJ-RhinoPartners May 5, 2023
e103742
Avaoid deleting the parent thumbnail when updating
NuwanJ May 5, 2023
ba1ba45
Fix
NuwanJ Jun 24, 2023
b310f92
Merge pull request #335 from cepdnaclk/334-bug-remove-location-from-t…
NuwanJ Jun 24, 2023
cde93ed
336 limit self registration only for the department students (#338)
NuwanJ Jun 29, 2023
677bb17
UI updates for alerts (#340)
NuwanJ Jun 29, 2023
954d2fe
Server changes
NuwanJ Apr 17, 2024
a41d8bd
Typo correction on Announcements
NuwanJ Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Empty file modified .env.example
100644 → 100755
Empty file.
Empty file modified .env.sqlite
100644 → 100755
Empty file.
Empty file modified .gitattributes
100644 → 100755
Empty file.
5 changes: 5 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#! /bin/bash

echo "Git hook executing: pre-commit actions"

php artisan test -p
61 changes: 33 additions & 28 deletions .github/workflows/laravel.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
name: Laravel

on: [push, pull_request]
on: [pull_request]

jobs:
laravel-tests:

runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test --colors --debug
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2

- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"

- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: Generate key
run: php artisan key:generate

- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache

- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite

- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test --colors --debug
31 changes: 31 additions & 0 deletions .github/workflows/laravel_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Laravel Push Test

on: [push]

jobs:
laravel-tests:
runs-on: ubuntu-latest

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.0'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sqlite
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
run: |
php artisan test -p --colors --debug
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .php_cs
100644 → 100755
Empty file.
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": false,
"singleQuote": true
}
Empty file modified .run/Migrate.run.xml
100644 → 100755
Empty file.
Empty file modified .run/Serve.run.xml
100644 → 100755
Empty file.
5 changes: 0 additions & 5 deletions .run/Test.run.xml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Test" type="PhpLocalRunConfigurationType" factoryName="PHP Console" path="$PROJECT_DIR$/artisan" scriptParameters="test">
<CommandLine>
<PhpTestInterpreterSettings>
<option name="interpreterName" value="PHP 7.4.9" />
</PhpTestInterpreterSettings>
</CommandLine>
<method v="2" />
</configuration>
</component>
Empty file modified .styleci.yml
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions .tsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "system"
},
"include": [
"resources/js/frontend/components/*"
],
"exclude": [
"node_modules"
],
"vueCompilerOptions": {
"target": "2.7"
}
}
Empty file removed Notepad.txt
Empty file.
59 changes: 35 additions & 24 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -22,40 +22,45 @@ Laravel Boilerplate provides you with a massive head start on any size web appli
[Click here for the official documentation](http://laravel-boilerplate.com)

## Team of Developers
- [Nuwan Jaliyagoda](http://github.com/NuwanJ)

- [Nuwan Jaliyagoda](http://github.com/NuwanJ)

### Sprint 2A
- [Tharmapalan Thanujan](http://github.com/thanujan96)
- [Madhushan Ramalingam](https://github.com/DrMadhushan)
- [Thilini Madushani](http://github.com/Thilini98)

- [Tharmapalan Thanujan](http://github.com/thanujan96)
- [Madhushan Ramalingam](https://github.com/DrMadhushan)
- [Thilini Madushani](http://github.com/Thilini98)

### Sprint 3A
- [Ishan Fernando](https://github.com/ishanfdo18098)
- [Adeepa Fernando](https://github.com/NipunFernando)
- [Ridma Jayasundara ](https://github.com/ridmajayasundara)

- [Ishan Fernando](https://github.com/ishanfdo18098)
- [Adeepa Fernando](https://github.com/NipunFernando)
- [Ridma Jayasundara ](https://github.com/ridmajayasundara)

### Sprint 3B
- [Sadia Jameel](https://github.com/SaadiaJameel)
- [Sakuni Nimnadi](https://github.com/SakuniJayasinghe)
- [Thamish Wanduragala](https://github.com/Thamish99)

- [Sadia Jameel](https://github.com/SaadiaJameel)
- [Sakuni Nimnadi](https://github.com/SakuniJayasinghe)
- [Thamish Wanduragala](https://github.com/Thamish99)

### Sprint 3C
- [Karan R.](https://github.com/rasathuraikaran)
- [Gowsigan A.](https://github.com/AnnalingamGowsigan)
- [Muthuni De Alwis](https://github.com/muthuni-dealwis)

- [Karan R.](https://github.com/rasathuraikaran)
- [Gowsigan A.](https://github.com/AnnalingamGowsigan)
- [Muthuni De Alwis](https://github.com/muthuni-dealwis)

## Useful Commands and Instructions

You need to install Wamp server and run it before following commands.
Please make sure you already created database user account.

#### Install Dependencies

```
// Install PHP dependencies
composer install

// If you received mmap() error, use this command
// If you received mmap() error, use this command
// php -d memory_limit=-1 /usr/local/bin/composer install

// Update PHP dependencies
Expand All @@ -78,6 +83,9 @@ php artisan migrate
// Reset the database and seed the data
php artisan migrate:fresh --seed

// Prepare webhook for unit testing
git config --local core.hooksPath .githooks

```

#### Serve in the local environment
Expand All @@ -92,6 +100,7 @@ php artisan serve --host=0.0.0.0 --port=8000
// To work with Vue components
npm run watch
```

#### Run all above commands from bash script

```
Expand All @@ -103,6 +112,7 @@ chmod +x Start.sh
```

#### Cache and optimization

```
// Remove dev dependencies
composer install --optimize-autoloader --no-dev
Expand All @@ -116,7 +126,8 @@ php artisan route:clear
php artisan view:clear
```

#### Maintenance related commands
#### Maintenance related commands

```
php artisan down --message="{Message}" --retry=60
php artisan up
Expand Down Expand Up @@ -144,12 +155,12 @@ php artisan test -p

#### Resource Routes

| Verb | URI | Action | Route Name |
|:-----------|:---------------------------------|:---------|:-----------------------|
| GET | /photos/{photo}/comments | index | photos.comments.index |
| GET | /photos/{photo}/comments/create | create | photos.comments.create |
| POST | /photos/{photo}/comments | store | photos.comments.store |
| GET | /comments/{comment} | show | comments.show |
| GET | /comments/{comment}/edit | edit | comments.edit |
| PUT/PATCH | /comments/{comment} | update | comments.update |
| DELETE | /comments/{comment} | destroy | comments.destroy |
| Verb | URI | Action | Route Name |
| :-------- | :------------------------------ | :------ | :--------------------- |
| GET | /photos/{photo}/comments | index | photos.comments.index |
| GET | /photos/{photo}/comments/create | create | photos.comments.create |
| POST | /photos/{photo}/comments | store | photos.comments.store |
| GET | /comments/{comment} | show | comments.show |
| GET | /comments/{comment}/edit | edit | comments.edit |
| PUT/PATCH | /comments/{comment} | update | comments.update |
| DELETE | /comments/{comment} | destroy | comments.destroy |
Empty file modified Start.sh
100644 → 100755
Empty file.
Empty file modified app/Console/Kernel.php
100644 → 100755
Empty file.
18 changes: 18 additions & 0 deletions app/Domains/Announcement/Models/Announcement.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,24 @@ class Announcement extends Model
'enabled' => 'boolean',
];

public static function areas()
{
return [
'frontend' => 'Frontend',
'backend' => 'Backend'
];
}

public static function types()
{
return [
'info' => 'Info',
'danger' => 'Danger',
'warning' => 'Warning',
'success' => 'Success'
];
}

/**
* Create a new factory instance for the model.
*
Expand Down
Empty file.
Empty file modified app/Domains/Announcement/Services/AnnouncementService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleCreated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleDeleted.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/Role/RoleUpdated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserCreated.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserDeleted.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserDestroyed.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserLoggedIn.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserRestored.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserStatusChanged.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Events/User/UserUpdated.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
3 changes: 2 additions & 1 deletion app/Domains/Auth/Http/Controllers/Frontend/Auth/RegisterController.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use LangleyFoxall\LaravelNISTPasswordRules\PasswordRules;
use App\Rules\ValidateAsInternalEmail;

/**
* Class RegisterController.
Expand Down Expand Up @@ -74,7 +75,7 @@ protected function validator(array $data)
{
return Validator::make($data, [
'name' => ['required', 'string', 'max:100'],
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users')],
'email' => ['required', 'string', 'email', 'max:255', Rule::unique('users'), new ValidateAsInternalEmail()],
'password' => array_merge(['max:100'], PasswordRules::register($data['email'] ?? null)),
'terms' => ['required', 'in:1'],
'g-recaptcha-response' => ['required_if:captcha_status,true', new Captcha],
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/AdminCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/EditabilityCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/PasswordExpires.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/SuperAdminCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/ToBeLoggedOut.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/UserCheck.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Http/Middleware/UserTypeCheck.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Requests/Backend/Role/EditRoleRequest.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Http/Requests/Backend/User/EditUserRequest.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Listeners/RoleEventListener.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Listeners/UserEventListener.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/PasswordHistory.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Permission.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Role.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Attribute/RoleAttribute.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Attribute/UserAttribute.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Method/RoleMethod.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Method/UserMethod.php
100644 → 100755
Empty file.
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/PermissionScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/RoleScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/Traits/Scope/UserScope.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Models/User.php
100644 → 100755
Empty file.
Empty file.
Empty file modified app/Domains/Auth/Notifications/Frontend/VerifyEmail.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Observers/UserObserver.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Rules/UnusedPassword.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/PermissionService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/RoleService.php
100644 → 100755
Empty file.
Empty file modified app/Domains/Auth/Services/UserService.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/GeneralException.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/Handler.php
100644 → 100755
Empty file.
Empty file modified app/Exceptions/ReportableException.php
100644 → 100755
Empty file.
8 changes: 4 additions & 4 deletions app/Helpers/Global/GeneralHelper.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Carbon\Carbon;

if (! function_exists('appName')) {
if (!function_exists('appName')) {
/**
* Helper to grab the application name.
*
Expand All @@ -14,7 +14,7 @@ function appName()
}
}

if (! function_exists('carbon')) {
if (!function_exists('carbon')) {
/**
* Create a new Carbon instance from a time.
*
Expand All @@ -29,7 +29,7 @@ function carbon($time)
}
}

if (! function_exists('homeRoute')) {
if (!function_exists('homeRoute')) {
/**
* Return the route to the "home" page depending on authentication/authorization status.
*
Expand All @@ -43,7 +43,7 @@ function homeRoute()
}

if (auth()->user()->isUser()) {
return 'frontend.user.dashboard';
return 'frontend.user.overview';
}
}

Expand Down
Empty file modified app/Helpers/Global/HtmlHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/LocaleHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/SystemHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/TimezoneHelper.php
100644 → 100755
Empty file.
Empty file modified app/Helpers/Global/_readme.txt
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Api/Auth/AuthController.php
100644 → 100755
Empty file.
Empty file modified app/Http/Controllers/Api/Auth/OrderController.php
100644 → 100755
Empty file.
Loading
Loading