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

Scholar section #124

Open
wants to merge 56 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b1eef6b
Staging compile 1.0.0
simplyclc Feb 4, 2024
adf6c84
buidl update 1.0.1
simplyclc Feb 5, 2024
f43e32c
Error update
simplyclc Feb 5, 2024
1ed74b0
update
simplyclc Feb 5, 2024
aee2ff9
update 1.1
simplyclc Feb 5, 2024
8574efb
update 1.2
simplyclc Feb 5, 2024
b41c7a1
update 1.3
simplyclc Feb 5, 2024
4649475
update 1.4
simplyclc Feb 5, 2024
d83c3d3
update 1.5
simplyclc Feb 5, 2024
2be6424
update 1.6
simplyclc Feb 5, 2024
416ce2d
update 1.7
simplyclc Feb 5, 2024
7226508
update 1.8
simplyclc Feb 5, 2024
7011cec
https update for server
simplyclc Feb 5, 2024
8ee6e08
delete old build files
simplyclc Feb 8, 2024
30fefaa
Chart update
simplyclc Feb 8, 2024
5a6fd63
login page update
simplyclc Feb 9, 2024
3b9ef56
update 1.9
simplyclc Feb 11, 2024
614f8a5
update 1.9.1
simplyclc Feb 11, 2024
081e06c
update 1.9.2 import fix
simplyclc Feb 14, 2024
e54bc90
Form updates
simplyclc Mar 15, 2024
4a2a0be
form update
simplyclc Mar 15, 2024
59044c6
form update
simplyclc Mar 15, 2024
9166889
scholarship form update
simplyclc Mar 15, 2024
d52d730
scholoarship button and form edits
simplyclc Mar 16, 2024
02a7e07
application update
simplyclc Mar 24, 2024
4e8c0fe
scholarship update
simplyclc Mar 25, 2024
bbb018e
application update
simplyclc Apr 7, 2024
8ee972c
Application update
simplyclc Apr 7, 2024
790f2c9
Update
simplyclc Apr 23, 2024
dd055d7
Scholar Profile update
simplyclc Apr 25, 2024
f0d92d2
Scholars Section update
simplyclc Apr 29, 2024
680fa7f
Application addition
simplyclc Jun 30, 2024
e9a1d21
Student Scholarship list added
simplyclc Jul 5, 2024
d0c4ad5
create award winners
simplyclc Jul 6, 2024
cd372a1
update
simplyclc Jul 6, 2024
a8034e8
update
simplyclc Jul 7, 2024
7da3c8a
complete scholars section
simplyclc Jul 8, 2024
a00c4b1
update yearly totals
simplyclc Jul 8, 2024
6f8fd5a
update
simplyclc Jul 8, 2024
fe77036
Update AuthenticatedSessionController.php
simplyclc Jul 8, 2024
fdda95f
auth corrections
simplyclc Jul 8, 2024
1aa125c
award update
simplyclc Jul 8, 2024
1e3c48d
registration and login update
simplyclc Jul 13, 2024
ed4934f
Notes added
simplyclc Jul 15, 2024
b16eb87
route update
simplyclc Jul 16, 2024
b577f37
Application update
simplyclc Jul 16, 2024
8bd9b43
login update
simplyclc Jul 16, 2024
2995f21
update scholarships
simplyclc Jul 18, 2024
8e9804b
application update
simplyclc Jul 18, 2024
bb5528a
winners table update
simplyclc Jul 21, 2024
f6e9829
dashboard update
simplyclc Jul 21, 2024
05c0b63
update
simplyclc Jul 21, 2024
940a101
application login and update modifications
simplyclc Jul 30, 2024
d00c7d3
Welcome page update
simplyclc Nov 4, 2024
2da548a
Scholarship update
simplyclc Nov 5, 2024
64d89d7
update school dropdown
simplyclc Dec 2, 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
  •  
  •  
  •  
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .do/deploy.template.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spec:
name: sample-laravel
name: urban-league-admin-panel
services:
- environment_slug: php
git:
Expand Down
59 changes: 58 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1,58 @@
APP_KEY=base64:UdAH2B63rlotjrkSSsj3Hppy4gbfr+OeHvtSdF9r9q8=
APP_NAME=Admin-Panel
APP_ENV=local
APP_KEY=base64:z/7DPApG/20KDCsvw93FWF+l+OP0j4wxXu2pJLOtZcQ=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=urbanleaguedb
DB_USERNAME=admin
DB_PASSWORD=phpmyadmin

BROADCAST_DRIVER=log
CACHE_DRIVER=file
FILESYSTEM_DISK=local
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

MEMCACHED_HOST=127.0.0.1

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_HOST=
PUSHER_PORT=443
PUSHER_SCHEME=https
PUSHER_APP_CLUSTER=mt1

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_HOST="${PUSHER_HOST}"
VITE_PUSHER_PORT="${PUSHER_PORT}"
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
.env
Binary file added app/.DS_Store
Binary file not shown.
18 changes: 2 additions & 16 deletions app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,18 @@

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
protected function schedule(Schedule $schedule): void
{
// $schedule->command('inspire')->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
protected function commands(): void
{
$this->load(__DIR__.'/Commands');

Expand Down
41 changes: 8 additions & 33 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,23 @@
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
* The list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];

/**
* Report or log an exception.
*
* @param \Throwable $exception
* @return void
*
* @throws \Exception
*/
public function report(Throwable $exception)
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
* Register the exception handling callbacks for the application.
*/
public function render($request, Throwable $exception)
public function register(): void
{
return parent::render($request, $exception);
$this->reportable(function (Throwable $e) {
//
});
}
}
42 changes: 42 additions & 0 deletions app/Http/Controllers/ApplicationController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Http\Controllers;

use App\Http\Resources\ApplicationCollection;
use App\Models\Application;
use App\Models\Scholarship;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Illuminate\Support\Facades\DB;


class ApplicationController extends Controller {
// this is admin list so we see all applicants
public function index() {
$applications = Application::all();
//dd($applications);
return Inertia::render('Applications/index',[
'applications' => new ApplicationCollection($applications),
]);
}

public function show($id) {
$appID = $id;
$applicationdetail = Application::where('id', $appID)->get(); //dd($applicationdetail);
return Inertia::render('Applications/show', [
'applicationdetail' => $applicationdetail,
]);
}

// application list by scholarshipId
public function scholarshipapplications($id) {
$a = $id; //dd($a);
$selected = Scholarship::find($a)->applications()->orderBy('name')->get();
//dd($update);
return Inertia::render('Applications/scholarshiplist', [
'applications' => new ApplicationCollection($selected),
]);
}

}

69 changes: 69 additions & 0 deletions app/Http/Controllers/Auth/AuthenticatedSessionController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\LoginRequest;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use Inertia\Response;
use App\Models\Partner;

use function PHPUnit\Framework\isEmpty;

class AuthenticatedSessionController extends Controller
{
/**
* Display the login view.
*/
public function create(): Response
{
return Inertia::render('Auth/Login', [
'canResetPassword' => Route::has('password.request'),
'status' => session('status'),
]);
}

/**
* Handle an incoming authentication request.
*/
public function store(LoginRequest $request): RedirectResponse {

$request->authenticate();

$request->session()->regenerate();

$user = Auth::user();
$role = $user->roles;
session(['role' => $role[0]['name']]);

$a = $user->partner_id;

$partnerId = Partner::where('id', $a)->get();

if ($partnerId->isNotEmpty()) {
return to_route('partner.show',$partnerId[0]['id']);
}

return redirect('scholars/dashboard');


}

/**
* Destroy an authenticated session.
*/
public function destroy(Request $request): RedirectResponse {
Auth::guard('web')->logout();

$request->session()->invalidate();

$request->session()->regenerateToken();

return redirect('/');
}
}
42 changes: 42 additions & 0 deletions app/Http/Controllers/Auth/ConfirmablePasswordController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\ValidationException;
use Inertia\Inertia;
use Inertia\Response;

class ConfirmablePasswordController extends Controller
{
/**
* Show the confirm password view.
*/
public function show(): Response
{
return Inertia::render('Auth/ConfirmPassword');
}

/**
* Confirm the user's password.
*/
public function store(Request $request): RedirectResponse
{
if (! Auth::guard('web')->validate([
'email' => $request->user()->email,
'password' => $request->password,
])) {
throw ValidationException::withMessages([
'password' => __('auth.password'),
]);
}

$request->session()->put('auth.password_confirmed_at', time());

return redirect()->intended(RouteServiceProvider::HOME);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;

class EmailVerificationNotificationController extends Controller
{
/**
* Send a new email verification notification.
*/
public function store(Request $request): RedirectResponse
{
if ($request->user()->hasVerifiedEmail()) {
return redirect()->intended(RouteServiceProvider::HOME);
}

$request->user()->sendEmailVerificationNotification();

return back()->with('status', 'verification-link-sent');
}
}
23 changes: 23 additions & 0 deletions app/Http/Controllers/Auth/EmailVerificationPromptController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;

class EmailVerificationPromptController extends Controller
{
/**
* Display the email verification prompt.
*/
public function __invoke(Request $request): RedirectResponse|Response
{
return $request->user()->hasVerifiedEmail()
? redirect()->intended(RouteServiceProvider::HOME)
: Inertia::render('Auth/VerifyEmail', ['status' => session('status')]);
}
}
Loading