WIP: acct mgmt search bar
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
<template>
|
||||
<div id="account_menu" v-show="isAcctMenuOpen" class="absolute top-0 w-[232px] bg-white right-[0px] rounded shadow-lg bg-[#ffffff]">
|
||||
<span id="greeting" class="m-4 h-[48px]">{{ i18next.t("AcctMgmt.hi") }}</span>
|
||||
<div id="greeting" class="w-full border-b border-[#CBD5E1]">
|
||||
<span class="m-4 h-[48px]">
|
||||
{{ i18next.t("AcctMgmt.hi") }}{{ userData.name }}
|
||||
</span>
|
||||
</div>
|
||||
<ul class="w-full min-h-10">
|
||||
<!-- 這裡不使用迴圈是因為src值用變數的話會沒辦法顯示svg -->
|
||||
<li class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
items-center">
|
||||
<li id="btn_acct_mgmt"
|
||||
class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
items-center" @click="onBtnAcctMgmtClick">
|
||||
<span class="w-[24px] h-[24px] flex"><img src="@/assets/icon-crown.svg"></span>
|
||||
<span class="flex ml-[8px]">{{i18next.t("AcctMgmt.acctMgmt")}}</span>
|
||||
</li>
|
||||
<li class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
<li id="btn_mang_ur_acct"
|
||||
class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
items-center">
|
||||
<span class="w-[24px] h-[24px] flex"><img src="@/assets/icon-head-black.svg"></span>
|
||||
<span class="flex ml-[8px]">{{i18next.t("AcctMgmt.mangUrAcct")}}</span>
|
||||
</li>
|
||||
<li class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
<li id="btn_logout_in_menu"
|
||||
class="w-full h-[40px] flex py-2 px-4 hover:text-[#000000] hover:bg-[#F1F5F9] cursor-pointer
|
||||
items-center">
|
||||
<span class="w-[24px] h-[24px] flex"><img src="@/assets/icon-logout.svg"></span>
|
||||
<span class="flex ml-[8px]">{{i18next.t("AcctMgmt.Logout")}}</span>
|
||||
@@ -25,6 +32,7 @@
|
||||
<script>
|
||||
import { mapActions, mapState } from 'pinia';
|
||||
import i18next from '@/i18n/i18n';
|
||||
import loginStore from '@/stores/login.js';
|
||||
import AcctMgmtStore from '@/stores/acctMgmt';
|
||||
|
||||
export default {
|
||||
@@ -34,6 +42,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(loginStore, ['userData']),
|
||||
...mapState(AcctMgmtStore, ['isAcctMenuOpen']),
|
||||
},
|
||||
methods: {
|
||||
@@ -47,7 +56,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
...mapActions(AcctMgmtStore, ['openAcctMenu', 'closeAcctMenu']),
|
||||
onBtnAcctMgmtClick(){
|
||||
this.$router.push({name: 'AcctAdmin'});
|
||||
},
|
||||
...mapActions(loginStore, ['getUserData']),
|
||||
...mapActions(AcctMgmtStore, ['closeAcctMenu']),
|
||||
},
|
||||
created() {
|
||||
this.getUserData();
|
||||
},
|
||||
mounted(){
|
||||
this.clickOtherPlacesThenCloseMenu();
|
||||
|
||||
16
src/components/AccountMenu/SearchBar.vue
Normal file
16
src/components/AccountMenu/SearchBar.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<div id="search_bar_container" class="w-[280px] h-8 px-4 border-[#64748B] border-[1px] rounded-full ">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
setup() {
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -109,7 +109,8 @@ export default {
|
||||
// 舉例:DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE', 'DATA']
|
||||
DISCOVER: ['MAP', 'CONFORMANCE', 'PERFORMANCE'],
|
||||
// 舉例:COMPARE: ['PROCESS MAP', 'DASHBOARD']
|
||||
COMPARE: ['PERFORMANCE']
|
||||
COMPARE: ['PERFORMANCE'],
|
||||
'ACCOUNT MANAGEMENT': ['ALL', 'CREATE',],
|
||||
},
|
||||
navViewName: 'FILES',
|
||||
uploadModal: false,
|
||||
|
||||
@@ -8,6 +8,7 @@ import Map from '@/views/Discover/Map/index.vue';
|
||||
import Conformance from '@/views/Discover/Conformance/index.vue';
|
||||
import Performance from '@/views/Discover/Performance/index.vue';
|
||||
import CompareDashboard from '@/views/Compare/Dashboard/index.vue';
|
||||
import AccountAdmin from '@/views/AccountManagement/AccountAdmin/index.vue';
|
||||
import MemberArea from '@/views/MemberArea/index.vue';
|
||||
import NotFound404 from '@/views/NotFound404.vue';
|
||||
|
||||
@@ -47,6 +48,17 @@ const routes = [
|
||||
name: "Files",
|
||||
component: Files,
|
||||
},
|
||||
{
|
||||
path: "/account",
|
||||
name: "Account Management",
|
||||
children: [
|
||||
{
|
||||
path: "/account/account-admin",
|
||||
name: "AcctAdmin",
|
||||
component: AccountAdmin,
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/upload", // router.push({ replace: true }) 路徑不添進歷史紀錄
|
||||
name: "Upload",
|
||||
|
||||
41
src/views/AccountManagement/AccountAdmin/index.vue
Normal file
41
src/views/AccountManagement/AccountAdmin/index.vue
Normal file
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="flex w-[1216px] items-center pt-2 flex-col">
|
||||
<div class="flex">Account Admin SSO/General cases</div>
|
||||
<div class="flex justify-end">
|
||||
<div class="flex">
|
||||
<SearchBar/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { storeToRefs, mapState, } from 'pinia';
|
||||
import LoadingStore from '@/stores/loading.js';
|
||||
import SearchBar from '../../../components/AccountMenu/SearchBar.vue';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const loadingStore = LoadingStore();
|
||||
const { isLoading } = storeToRefs(loadingStore);
|
||||
|
||||
return {
|
||||
isLoading,
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
components: {
|
||||
SearchBar,
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.isLoading = false; //TODO:
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -67,7 +67,6 @@ export default {
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
// 重新整理畫面以及第一次進入網頁時,beforeRouteEnter這個hook會被執行,然而beforeRouteUpdate不會被執行
|
||||
const loginStore = LoginStore();
|
||||
if (!getCookie("isLuciaLoggedIn")) {
|
||||
next({
|
||||
path: '/login',
|
||||
|
||||
Reference in New Issue
Block a user