issue: add menu issue
This commit is contained in:
parent
7daf29d974
commit
af54914bbb
5 changed files with 391 additions and 186 deletions
|
|
@ -58,7 +58,6 @@ const resize = ref<number>(0);
|
|||
const drawerL = ref<boolean>(false);
|
||||
const fullname = ref<string>("");
|
||||
const notiTrigger = ref<boolean>(false);
|
||||
const text = ref<string>("");
|
||||
|
||||
const notiList = ref<notiType[]>([]);
|
||||
const modalLoginLinkage = ref<boolean>(false); //เข้าสู่ระบบ Linkage Center
|
||||
|
|
@ -216,6 +215,7 @@ const activeBtn = () => {
|
|||
};
|
||||
|
||||
const isSsoToken = ref<boolean>(false);
|
||||
const isIssueRole = ref<boolean>(false);
|
||||
// const interval = ref<any>(null);
|
||||
/**
|
||||
* เมื่อเริ่มต้นโปรแกรมให้ฟัง event resize และ function myEventHandler
|
||||
|
|
@ -225,12 +225,17 @@ const isSsoToken = ref<boolean>(false);
|
|||
*/
|
||||
onMounted(async () => {
|
||||
miniState.value = localStorage.getItem("miniState") === "true";
|
||||
const user = await tokenParsed();
|
||||
if (user.role.includes("ISSUE")) {
|
||||
isIssueRole.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// if (user && user.role) return;
|
||||
await fetchSys();
|
||||
await fetchPermissionsSys();
|
||||
fetchKeycloakPosition();
|
||||
|
||||
const user = await tokenParsed();
|
||||
const SSO_TOKEN = await getCookie("SSO");
|
||||
isSsoToken.value = SSO_TOKEN === "y" ? true : false;
|
||||
if (user) {
|
||||
|
|
@ -1015,6 +1020,28 @@ function onViewDetailNoti(url: string) {
|
|||
</q-item>
|
||||
</div>
|
||||
</div>
|
||||
<!-- add menu issue for role ISSUE -->
|
||||
<q-item
|
||||
v-if="isIssueRole"
|
||||
class="text-weight-medium menu"
|
||||
:active="activeMenu('issuesMain')"
|
||||
active-class="text-primary active-item text-weight-bold menuActive"
|
||||
:to="{ name: 'issuesMain' }"
|
||||
clickable
|
||||
v-ripple
|
||||
dense
|
||||
exact
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar size="md" font-size="20px">
|
||||
<q-icon name="mdi-bug-check" />
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>จัดการปัญหาการใช้งานระบบ</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<!-- end add menu issue for role ISSUE -->
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
</template>
|
||||
|
|
@ -1147,6 +1174,28 @@ function onViewDetailNoti(url: string) {
|
|||
</q-item>
|
||||
</div>
|
||||
</div>
|
||||
<!-- add menu issue for role ISSUE -->
|
||||
<q-item
|
||||
v-if="isIssueRole"
|
||||
class="text-weight-medium menu"
|
||||
:active="activeMenu('issuesMain')"
|
||||
active-class="text-primary active-item text-weight-bold menuActive"
|
||||
:to="{ name: 'issuesMain' }"
|
||||
clickable
|
||||
v-ripple
|
||||
dense
|
||||
exact
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar size="md" font-size="20px">
|
||||
<q-icon name="mdi-bug-check" />
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>จัดการปัญหาการใช้งานระบบ</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<!-- end add menu issue for role ISSUE -->
|
||||
</q-list>
|
||||
</q-scroll-area>
|
||||
</q-drawer>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue