-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix video feedback front feedback (#276)
* Fix registration ngo, add ro lang for validation * Fix load dashboard on front user * fix project view * Fix article on home page
- Loading branch information
1 parent
7bb618b
commit ddc555f
Showing
27 changed files
with
1,411 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Http\Resources\PageResource; | ||
use Illuminate\Http\RedirectResponse; | ||
use Inertia\Inertia; | ||
use Inertia\Response; | ||
|
||
class DashboardController extends Controller | ||
{ | ||
public function __invoke(): Response|RedirectResponse | ||
{ | ||
if (auth()->user()->isNgoAdmin()) { | ||
return redirect()->route('admin.ong.edit'); | ||
} | ||
if (auth()->user()->isDonor()) { | ||
$profile = [ | ||
'description' => '<p>Mulțumim că ești alături de noi. Prin participarea ta activă la această inițiativă, ne arăți că ești preocupat de problemele sociale și că vrei să faci o diferență pozitivă în lumea în care trăim, iar contribuția ta este extrem de valoroasă.</p> | ||
<p>Prin distribuirea informațiilor despre proiectele de pe Bursa Binelui și încurajând prietenii și familia să se alăture, devii un promotor important al inițiativei noastre.</p> | ||
<p>Fiecare pas pe care îl facem împreună contează și, împreună, putem face o diferență semnificativă.</p>', | ||
'donations_place' => '5%', | ||
'donations_status' => [ | ||
'Ai donat către mai mult de 5 organizații', | ||
'Volunariezi la 3 organizații', | ||
'Ești abonat la newsletterul de bine', | ||
'Ai distribuit de multiple ori informații utile', | ||
], | ||
]; | ||
|
||
return Inertia::render('Donor/Dashboard', [ | ||
'profile' => $profile, | ||
'badges' => auth()->user()->badges | ||
->map(fn ($badge) => $badge->only('image', 'title', 'description')), | ||
]); | ||
} | ||
abort(403, 'You are not authorized to access this page.'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.