Skip to content

Commit

Permalink
frontend: user
Browse files Browse the repository at this point in the history
user profile page created, and linked from sidebar, navbar
  • Loading branch information
rkshaon committed Jul 23, 2024
1 parent 5f1a31e commit 2827ccb
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 26 deletions.
50 changes: 25 additions & 25 deletions frontend/src/components/admin/layout/AdminHeaderLayout.vue
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<template>
<header class="header" style="height: 100px;">
<div class="container d-flex justify-content-between align-items-center">
<div class="input-group me-2 mt-4">
<input type="text" class="form-control" placeholder="Search">
<button class="btn btn-outline-light" type="button">Search</button>
</div>
<div class="dropdown mt-4">
<button
class="btn btn-outline-light dropdown-toggle"
type="button"
id="dropdownProfile"
data-bs-toggle="dropdown"
aria-expanded="false"
>
<img src="@/assets/profile.jpg" height="25">
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownProfile">
<li><a class="dropdown-item" href="#">Profile</a></li>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Log out</a></li>
</ul>
</div>
</div>
</header>
<header class="header" style="height: 100px;">
<div class="container d-flex justify-content-between align-items-center">
<div class="input-group me-2 mt-4">
<input type="text" class="form-control" placeholder="Search">
<button class="btn btn-outline-light" type="button">Search</button>
</div>
<div class="dropdown mt-4">
<button class="btn btn-outline-light dropdown-toggle" type="button" id="dropdownProfile"
data-bs-toggle="dropdown" aria-expanded="false">
<img src="@/assets/profile.jpg" height="25">
</button>
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownProfile">
<!-- <li><a class="dropdown-item" href="#">Profile</a></li> -->
<router-link :to="{ name: 'admin-profile' }" class="dropdown-item">
Profile
</router-link>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Log out</a></li>
</ul>
</div>
</div>
</header>
</template>

<script>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/admin/layout/AdminSidebarLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@
<ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser2">
<li><a class="dropdown-item" href="#">New project...</a></li>
<li><a class="dropdown-item" href="#">Settings</a></li>
<li><a class="dropdown-item" href="#">Profile</a></li>
<li>
<!-- <a class="dropdown-item" href="#">Profile</a> -->
<router-link :to="{ name: 'admin-profile' }" class="dropdown-item">
Profile
</router-link>
</li>
<li>
<hr class="dropdown-divider">
</li>
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/admin/page/AdminProfilePage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div>Profile</div>
</template>

<script>
export default {
name: 'AdminProfilePage',
}
</script>
6 changes: 6 additions & 0 deletions frontend/src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import AdminInventoryPage from '@/components/admin/page/AdminInventoryPage.vue';
import AdminAccountingPage from "@/components/admin/page/AdminAccountingPage.vue";
import AdminOrderPage from "@/components/admin/page/AdminOrderPage.vue";
import AdminCustomerPage from "@/components/admin/page/AdminCustomerPage.vue";
import AdminProfilePage from "@/components/admin/page/AdminProfilePage.vue";


const routes = [
Expand Down Expand Up @@ -44,6 +45,11 @@ const routes = [
component: AdminBaseComponent,
meta: { requiresAuth: true }, // Add meta field to indicate that authentication is required for admin routes
children: [
{
path: "profile",
name: "admin-profile",
component: AdminProfilePage,
},
{
path: "",
name: "admin",
Expand Down

0 comments on commit 2827ccb

Please sign in to comment.