Skip to content

Commit 1ada2f9

Browse files
committed
feat: added placeholder profile pages #prod
1 parent f0e78f7 commit 1ada2f9

File tree

9 files changed

+75
-3
lines changed

9 files changed

+75
-3
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Actions\Admin\Profile;
4+
5+
use App\Traits\CustomControllerResponsesTrait;
6+
use App\Traits\ThemesTrait;
7+
use Illuminate\Http\Request;
8+
use Lorisleiva\Actions\Concerns\AsAction;
9+
10+
class MainProfile
11+
{
12+
use AsAction;
13+
use ThemesTrait;
14+
use CustomControllerResponsesTrait;
15+
16+
public function asController(Request $request)
17+
{
18+
return $this->generateBackendPage('Profile/MainProfile', [
19+
'title' => doe()->full_name . ' Profile',
20+
]);
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
namespace App\Actions\User\Profile;
4+
5+
use App\Traits\CustomControllerResponsesTrait;
6+
use App\Traits\ThemesTrait;
7+
use Illuminate\Http\Request;
8+
use Lorisleiva\Actions\Concerns\AsAction;
9+
10+
class MainProfile
11+
{
12+
use AsAction;
13+
use ThemesTrait;
14+
use CustomControllerResponsesTrait;
15+
16+
public function asController(Request $request)
17+
{
18+
return $this->generateBackendPage('Profile/MainProfile', [
19+
'title' => doe()->full_name . ' Profile',
20+
]);
21+
}
22+
}

resources/ts/Components/UserSidebar.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
title: ' My Profile',
17-
route: route('user.dashboard'),
17+
route: route('user.profile'),
1818
},
1919
{
2020
title: 'Go Home',

resources/ts/Layouts/AdminDashboardLayout.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
</form>
5353

5454
<span class="hidden lg:block">
55-
<a class="btn btn-sm variant-ghost-surface" href="/dashboard" use:inertia> Profile </a>
55+
<a class="btn btn-sm variant-ghost-surface" href={route('admin.profile')} use:inertia>
56+
Profile
57+
</a>
5658
</span>
5759
</svelte:fragment>
5860
</AppBar>

resources/ts/Layouts/DashboardLayout.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252
</form>
5353

5454
<span class="hidden lg:block">
55-
<a class="btn btn-sm variant-ghost-surface" href="/dashboard" use:inertia> Profile </a>
55+
<a class="btn btn-sm variant-ghost-surface" href={route('user.profile')} use:inertia>
56+
Profile
57+
</a>
5658
</span>
5759
</svelte:fragment>
5860
</AppBar>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script lang="ts">
2+
import Title from '@/Components/Title.svelte'
3+
</script>
4+
5+
<div class="container mt-5">
6+
<Title>Profile</Title>
7+
</div>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script lang="ts">
2+
import Title from '@/Components/Title.svelte'
3+
</script>
4+
5+
<div class="container mt-5">
6+
<Title>Profile</Title>
7+
</div>

routes/modules/admin.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use App\Actions\Admin\Cms\ContactMessages;
44
use App\Actions\Admin\CMS\ContactMessagesDelete;
55
use App\Actions\Admin\Dashboard;
6+
use App\Actions\Admin\Profile\MainProfile;
67
use App\Actions\Admin\Settings\Configurations;
78
use App\Actions\Admin\Settings\ResetSystem;
89
use App\Models\User;
@@ -18,6 +19,10 @@
1819

1920
Route::get('/', Dashboard::class)->name('dashboard');
2021

22+
Route::group(['prefix' => 'profile'], function() {
23+
Route::get('/', MainProfile::class)->name('profile');
24+
});
25+
2126
Route::group(['prefix'=> 'settings', 'as' => 'settings.'], function() {
2227
Route::match(['GET', 'POST'], '/configurations', Configurations::class)->name('configurations');
2328
Route::match(['GET', 'POST'], '/reset-system', ResetSystem::class)->name('reset-system');

routes/modules/user.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
use App\Actions\User\Dashboard;
4+
use App\Actions\User\Profile\MainProfile;
45
use App\Models\User;
56

67
Route::group([
@@ -15,4 +16,8 @@
1516

1617
Route::get('/', Dashboard::class)->name('dashboard');
1718

19+
Route::group(['prefix' => 'profile'], function() {
20+
Route::get('/', MainProfile::class)->name('profile');
21+
});
22+
1823
});

0 commit comments

Comments
 (0)