api inbox noti

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-09-08 13:31:48 +07:00
parent 2fdd948e8f
commit e97cb4cfa1
4 changed files with 569 additions and 315 deletions

8
src/api/api.message.ts Normal file
View file

@ -0,0 +1,8 @@
import env from "./index";
const message = `${env.API_URI}/message`;
export default {
msgNotificate: `${message}/my-notifications`,
msgInbox: `${message}/my-inboxes`,
};

View file

@ -4,12 +4,14 @@
import testtest from "./api/test/api.test" import testtest from "./api/test/api.test"
import retirementResign from "./api/leave/api.leave" import retirementResign from "./api/leave/api.leave"
import placementTransfer from "./api/transfer/api.transfer" import placementTransfer from "./api/transfer/api.transfer"
import message from "./api/api.message"
const API = { const API = {
...testtest, ...testtest,
...retirementResign, ...retirementResign,
...placementTransfer ...placementTransfer,
...message
} }
export default { export default {

View file

@ -1,182 +1,271 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, Static } from "vue" import { ref, onMounted, Static } from "vue";
const link = ref<number>(1) const link = ref<number>(1);
import { useQuasar } from "quasar" import { useQuasar } from "quasar";
import router from "@/router" import router from "@/router";
import http from "@/plugins/http";
import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
const $q = useQuasar() const $q = useQuasar();
const fullname = ref<string>("ธัญลักษณ์") const mixin = useCounterMixin();
const {
showLoader,
hideLoader,
date2Thai,
} = mixin;
const fullname = ref<string>("ธัญลักษณ์");
const inboxList = ref<any>([ const inboxList = ref<any>([
{ // {
no: 1, // no: 1,
sender: "เจ้าหน้าที่ทะเบียนประวัติ", // sender: "",
subject: "ขอแก้ไขข้อมูลทะเบียนประวัติ", // subject: "",
timereceive: "13/12/2565", // timereceive: "13/12/2565",
body: "ขอแก้ไขข้อมูลทะเบียนประวัติ เรื่อง ชื่อ-นามสกุล", // body: " -",
ratingModel: 0, // ratingModel: 0,
}, // },
{ ]);
no: 2,
sender: "เจ้าหน้าที่ทะเบียนประวัติ",
subject: "ขอแก้ไขข้อมูลทะเบียนประวัติ",
timereceive: "13/12/2565",
body: "ขอแก้ไขข้อมูลทะเบียนประวัติ เรื่อง ชื่อ-นามสกุล",
ratingModel: 1,
},
{
no: 3,
sender: "เจ้าหน้าที่ทะเบียนประวัติ",
subject: "ขอแก้ไขข้อมูลทะเบียนประวัติ",
timereceive: "13/12/2565",
body: "ขอแก้ไขข้อมูลทะเบียนประวัติ เรื่อง ชื่อ-นามสกุล",
ratingModel: 0,
},
])
const items = ref<any>([ const items = ref<any>([
{ {
icon: "mdi-account-group-outline", icon: "mdi-account-group-outline",
title: "แผนผังองค์กร", title: "แผนผังองค์กร",
sub: "ดูแผนผังองค์กร", sub: "ดูแผนผังองค์กร",
color: "blue-3", color: "blue-3",
path: "", path: "",
active: false, active: false,
}, },
{ {
icon: "mdi-clipboard-account-outline", icon: "mdi-clipboard-account-outline",
title: "ประเมินผล", title: "ประเมินผล",
sub: "ข้อมูลการประเมินผลการปฏิบัติราชการ", sub: "ข้อมูลการประเมินผลการปฏิบัติราชการ",
color: "lime-4", color: "lime-4",
path: "", path: "",
active: false, active: false,
}, },
{ {
icon: "mdi-calendar-account-outline", icon: "mdi-calendar-account-outline",
title: "การลา", title: "การลา",
sub: "ดู/ลงเวลา ทำเรื่องลา", sub: "ดู/ลงเวลา ทำเรื่องลา",
color: "cyan-3", color: "cyan-3",
path: "", path: "",
active: false, active: false,
}, },
{ {
icon: "mdi-folder-account-outline", icon: "mdi-folder-account-outline",
title: "ผลงาน", title: "ผลงาน",
sub: "ดูผลงาน", sub: "ดูผลงาน",
color: "light-green-3", color: "light-green-3",
path: "", path: "",
active: false, active: false,
}, },
{ {
icon: "mdi-account-arrow-right-outline", icon: "mdi-account-arrow-right-outline",
title: "ขอโอน", title: "ขอโอน",
sub: "ทำเรื่องขอโอนย้าย", sub: "ทำเรื่องขอโอนย้าย",
color: "deep-purple-3", color: "deep-purple-3",
path: "/transfer", path: "/transfer",
active: false, active: false,
}, },
{ {
icon: "mdi-account-remove-outline", icon: "mdi-account-remove-outline",
title: "ลาออก", title: "ลาออก",
sub: "ทำเรื่องลาออก", sub: "ทำเรื่องลาออก",
color: "orange-3", color: "orange-3",
path: "/leave", path: "/leave",
active: false, active: false,
}, },
]) ]);
onMounted(async () => {
await fetchlistInbox();
});
const fetchlistInbox = async () => {
showLoader();
await http
.get(config.API.msgInbox)
.then((res) => {
let data = res.data.result;
console.log(data);
let listItem: any = [];
data.map((e: any) => {
listItem.push({
no: e.id ?? "",
sender:
e.createdFullName == "" || e.createdFullName == null
? "เจ้าหน้าที่"
: e.createdFullName,
subject: e.subject ?? "",
timereceive: date2Thai(e.createdAt),
body: e.body ?? "",
ratingModel: 0,
});
});
inboxList.value = listItem;
})
.catch((err) => {
console.log(err);
})
.finally(() => {
hideLoader();
});
};
const transferToPage = (path?: string) => { const transferToPage = (path?: string) => {
router.push(`${path}`) router.push(`${path}`);
} };
</script> </script>
<template> <template>
<div class="col-12 row q-col-gutter-md" style="padding-top: 1.8%"> <div class="col-12 row q-col-gutter-md" style="padding-top: 1.8%">
<div class="col-12 row" v-if="!$q.screen.gt.xs"> <div class="col-12 row" v-if="!$q.screen.gt.xs">
<div class="text-white text-weight-light text-18px">สวสด, {{ fullname }}</div> <div class="text-white text-weight-light text-18px">
<div style="color: #ffffff" class="text-18px text-weight-medium col-12">ระบบทรพยากรบคคล</div> สวสด, {{ fullname }}
</div> </div>
<div class="col-xs-12 col-sm-12 col-md-9"> <div style="color: #ffffff" class="text-18px text-weight-medium col-12">
<div class="row justify-start q-col-gutter-md"> ระบบทรพยากรบคคล
<div class="col-xs-6 col-sm-4 col-md-4 col-lg-3 col-xl-2 row" v-for="(item, j) in items" :key="j"> </div>
<q-card bordered @click="transferToPage(item.path)" class="noactive col-12"> </div>
<div class="col-12"> <div class="col-xs-12 col-sm-12 col-md-9">
<q-avatar :color="item.color" text-color="white" :size="$q.screen.gt.xs ? '55px' : '40px'"> <div class="row justify-start q-col-gutter-md">
<q-icon :name="item.icon" :size="$q.screen.gt.xs ? '28px' : '20px'" color="black" /> <div
</q-avatar> class="col-xs-6 col-sm-4 col-md-4 col-lg-3 col-xl-2 row"
</div> v-for="(item, j) in items"
<div class="q-pt-md col-12 text-left text-18px">{{ item.title }}</div> :key="j"
<div class="col-12 text-left text-grey text-weight-regular gt-xs" style="font-size: 14px">{{ item.sub }}</div> >
</q-card> <q-card
</div> bordered
</div> @click="transferToPage(item.path)"
</div> class="noactive col-12"
<div class="col-xs-12 col-sm-12 col-md-3 row"> >
<q-card flat bordered :style="$q.screen.gt.xs ? 'max-height: 80vh' : 'height: auto;'" class="q-pb-md col-12"> <div class="col-12">
<div class="col-12 row q-pa-md"> <q-avatar
<div class="text-subtitle1 text-weight-bold text-dark">กลองขอความ</div> :color="item.color"
<q-space /> text-color="white"
<q-btn dense icon="mdi-dots-vertical" color="grey-6" size="11px" flat /> :size="$q.screen.gt.xs ? '55px' : '40px'"
</div> >
<q-list v-for="(contact, index) in inboxList" :key="index" class="q-px-md"> <q-icon
<q-item clickable v-ripple class="q-py-md q-mb-sm my-menu" :active="link === contact.no" @click="link = contact.no" active-class="my-menu-link"> :name="item.icon"
<q-item-section> :size="$q.screen.gt.xs ? '28px' : '20px'"
<q-item-label>{{ contact.sender }}</q-item-label> color="black"
<q-item-label caption class="text-grey-6" lines="2">{{ contact.subject }}</q-item-label> />
</q-item-section> </q-avatar>
</div>
<div class="q-pt-md col-12 text-left text-18px">
{{ item.title }}
</div>
<div
class="col-12 text-left text-grey text-weight-regular gt-xs"
style="font-size: 14px"
>
{{ item.sub }}
</div>
</q-card>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-3 row">
<q-card
flat
bordered
:style="$q.screen.gt.xs ? 'max-height: 80vh' : 'height: auto;'"
class="q-pb-md col-12"
>
<div class="col-12 row q-pa-md">
<div class="text-subtitle1 text-weight-bold text-dark">
กลองขอความ
</div>
<q-space />
<q-btn
dense
icon="mdi-dots-vertical"
color="grey-6"
size="11px"
flat
/>
</div>
<q-list
v-for="(contact, index) in inboxList"
:key="index"
class="q-px-md"
>
<q-item
clickable
v-ripple
class="q-py-md q-mb-sm my-menu"
:active="link === contact.no"
@click="link = contact.no"
active-class="my-menu-link"
>
<q-item-section>
<q-item-label>{{ contact.sender }}</q-item-label>
<q-item-label caption class="text-grey-6" lines="2">{{
contact.subject
}}</q-item-label>
</q-item-section>
<q-item-section side top> <q-item-section side top>
<q-item-label caption>{{ contact.timereceive }}</q-item-label> <q-item-label caption>{{ contact.timereceive }}</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
<q-banner rounded class="bg-amber-1 text-center q-mx-sm" v-if="inboxList.length < 1"> <q-banner
<div class="text-yellow-10"> rounded
<q-icon name="mdi-alert-box" class="q-mx-xs" size="sm" color="yellow-10" /> class="bg-amber-1 text-center q-mx-sm"
ไมพบขอความ v-if="inboxList.length < 1"
</div> >
</q-banner> <div class="text-yellow-10">
</q-card> <q-icon
</div> name="mdi-alert-box"
</div> class="q-mx-xs"
size="sm"
color="yellow-10"
/>
ไมพบขอความ
</div>
</q-banner>
</q-card>
</div>
</div>
</template> </template>
<style> <style>
.my-menu-link { .my-menu-link {
color: #1bb19b; color: #1bb19b;
background: #ebf9f7 !important; background: #ebf9f7 !important;
font-weight: 600; font-weight: 600;
border-radius: 10px; border-radius: 10px;
} }
.my-menu-link .q-hoverable { .my-menu-link .q-hoverable {
border-radius: 10px; border-radius: 10px;
} }
.my-menu { .my-menu {
background: #f1f0f04a; background: #f1f0f04a;
border-radius: 10px; border-radius: 10px;
} }
.q-card { .q-card {
border-radius: 12px; border-radius: 12px;
} }
.text-18px { .text-18px {
font-size: 1.25em; font-size: 1.25em;
} }
.noactive { .noactive {
color: #35473c; color: #35473c;
border-radius: 12px; border-radius: 12px;
padding: 10%; padding: 10%;
transition: 0.1s ease; transition: 0.1s ease;
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
} }
.noactive:hover { .noactive:hover {
background: #ebf9f7; background: #ebf9f7;
color: #1bb19b !important; color: #1bb19b !important;
font-weight: 600; font-weight: 600;
border: 1px solid #6dbdb142; border: 1px solid #6dbdb142;
} }
.disabledcard { .disabledcard {
color: rgba(209, 209, 209, 0.733) !important; color: rgba(209, 209, 209, 0.733) !important;
border-color: rgba(207, 207, 207, 0.322) !important; border-color: rgba(207, 207, 207, 0.322) !important;
box-shadow: none !important; box-shadow: none !important;
border-radius: 12px; border-radius: 12px;
cursor: no-drop !important; cursor: no-drop !important;
padding: 10%; padding: 10%;
} }
</style> </style>

View file

@ -1,213 +1,368 @@
<script setup lang="ts"> <script setup lang="ts">
import http from "@/plugins/http" import http from "@/plugins/http";
import config from "@/app.config" import config from "@/app.config";
import { onMounted, ref, watch } from "vue" import { onMounted, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router" import { useRoute, useRouter } from "vue-router";
import { useQuasar } from "quasar" import { useQuasar } from "quasar";
import keycloak from "@/plugins/keycloak" import keycloak from "@/plugins/keycloak";
import { useCounterMixin } from "@/stores/mixin";
const route = useRoute() const route = useRoute();
const router = useRouter() const router = useRouter();
const $q = useQuasar() const $q = useQuasar();
const link = ref<string>("")
const fullname = ref<string>("นางสาวธัญลักษณ์ รอดกูล") const mixin = useCounterMixin();
const notiList = [ const { date2Thai } = mixin;
{
id: 1, const fullname = ref<string>("");
sender: "นัดหมาย", const notiList = ref<any>([]);
body: "เพิ่มการนัดหมาย", const notiTrigger = ref(false);
timereceive: "13/06/2566", const currentRouteName = router.currentRoute.value.name;
}, const tab = ref(currentRouteName);
{ const link = ref<string>("");
id: 1,
sender: "นัดหมาย",
body: "เพิ่มการนัดหมาย",
timereceive: "14/06/2566",
},
]
const notiTrigger = ref(false)
const currentRouteName = router.currentRoute.value.name
const tab = ref(currentRouteName)
/** /**
* เรยกฟงกนทงหมดตอนเรยกใชไฟล * เรยกฟงกนทงหมดตอนเรยกใชไฟล
*/ */
onMounted(async () => { onMounted(async () => {
console.log(config.API.gettttt) await fetchlistNotification();
}) if (keycloak.tokenParsed != null) {
fullname.value = keycloak.tokenParsed.name;
}
});
const fetchlistNotification = async () => {
await http
.get(config.API.msgNotificate)
.then((res: any) => {
const data = res.data.result;
let list: any[] = [];
data.map((e: any) => {
list.push({
id: e.id,
sender:
e.createdFullName == "" || e.createdFullName == null
? "เจ้าหน้าที่"[0]
: e.createdFullName[0],
body: e.body ?? "",
timereceive: date2Thai(e.createdAt),
});
});
notiList.value = list;
})
.catch((err) => {
console.log(err);
});
};
/** /**
* logout keycloak * logout keycloak
* confirm อนออกจากระบบ * confirm อนออกจากระบบ
*/ */
const doLogout = () => { const doLogout = () => {
$q.dialog({ $q.dialog({
title: "ยืนยันการออกจากระบบ", title: "ยืนยันการออกจากระบบ",
message: `ต้องการออกจากระบบใช้หรือไม่?`, message: `ต้องการออกจากระบบใช้หรือไม่?`,
cancel: "ยกเลิก", cancel: "ยกเลิก",
ok: "ยืนยัน", ok: "ยืนยัน",
persistent: true, persistent: true,
}).onOk(() => { }).onOk(() => {
keycloak.logout() keycloak.logout();
}) });
} };
</script> </script>
<!-- โครงเว --> <!-- โครงเว -->
<template> <template>
<q-layout view="hHh LpR fFr"> <q-layout view="hHh LpR fFr">
<!-- header --> <!-- header -->
<q-header flat class="text-dark col-12 bg-top header-br" height-hint="7"> <q-header flat class="text-dark col-12 bg-top header-br" height-hint="7">
<q-toolbar class="q-my-xs items-center" :style="$q.screen.gt.xs ? 'padding: 1% 2%;' : 'padding: 1% 4%;'"> <q-toolbar
<div class="row items-center no-wrap" v-if="$q.screen.gt.xs"> class="q-my-xs items-center"
<q-img src="@/assets/logo.png" spinner-color="white" style="height: 35px; max-width: 35px" /> :style="$q.screen.gt.xs ? 'padding: 1% 2%;' : 'padding: 1% 4%;'"
<div class="row q-ml-md items-center q-pt-xs"> >
<div style="color: #ffffff; letter-spacing: 1px; line-height: 10px" class="text-body2 text-weight-bolder col-12">ระบบ<span class="text-primary">ทรพยากรบคคล</span></div> <div class="row items-center no-wrap" v-if="$q.screen.gt.xs">
<div class="text-caption text-white">กรงเทพมหานคร</div> <q-img
</div> src="@/assets/logo.png"
</div> spinner-color="white"
<div v-else class="row items-center"> style="height: 35px; max-width: 35px"
<img src="@/assets/logo.png" style="height: 35px; max-width: 35px" /> />
</div> <div class="row q-ml-md items-center q-pt-xs">
<div v-if="$q.screen.gt.xs"> <div
<q-tabs v-model="tab" align="justify" indicator-color="transparent" active-color="white bg-white-btn border-100" dense inline-label class="text-grey-5 tabsHome"> style="color: #ffffff; letter-spacing: 1px; line-height: 10px"
<q-tab class="border-100" name="dashboard" label="หน้าแรก" icon="mdi-view-dashboard-outline" @click="router.push(`/`)" /> class="text-body2 text-weight-bolder col-12"
<q-tab class="border-100" name="Checkin" label="ลงเวลางาน" icon="mdi-map-marker-check-outline" @click="router.push(`/check-in`)"/> >
<q-tab class="border-100" name="leave" label="การลา" icon="mdi-calendar-blank-outline" /> ระบบ<span class="text-primary">ทรพยากรบคคล</span>
</q-tabs> </div>
</div> <div class="text-caption text-white">กรงเทพมหานคร</div>
<q-space /> </div>
<!-- Notification --> </div>
<q-btn round dense flat size="13px" :class="$q.screen.gt.xs ? 'bg-white-btn q-mx-md' : 'q-mr-sm'" :color="notiList.length === 0 ? 'grey-6' : 'grey-8'" :disable="notiList.length === 0"> <div v-else class="row items-center">
<q-icon name="mdi-bell-outline" size="22px" color="white" /> <img src="@/assets/logo.png" style="height: 35px; max-width: 35px" />
<q-badge rounded v-show="notiList.length > 0" color="negative" text-color="white" floating>{{ notiList.length }}</q-badge> </div>
<q-menu v-model="notiTrigger" max-width="480px" :offset="[0, 10]"> <div v-if="$q.screen.gt.xs">
<div class="q-px-md q-py-sm row col-12 items-center"> <q-tabs
<div class="text-subtitle1 text-weight-medium">การแจงเตอน</div> v-model="tab"
<q-space /> align="justify"
<q-btn label="ล้างข้อมูล" color="pink" dense class="text-caption" flat /> indicator-color="transparent"
</div> active-color="white bg-white-btn border-100"
dense
inline-label
class="text-grey-5 tabsHome"
>
<q-tab
class="border-100"
name="dashboard"
label="หน้าแรก"
icon="mdi-view-dashboard-outline"
@click="router.push(`/`)"
/>
<q-tab
class="border-100"
name="Checkin"
label="ลงเวลางาน"
icon="mdi-map-marker-check-outline"
@click="router.push(`/check-in`)"
/>
<q-tab
class="border-100"
name="leave"
label="การลา"
icon="mdi-calendar-blank-outline"
/>
</q-tabs>
</div>
<q-space />
<!-- Notification -->
<q-btn
round
dense
flat
size="13px"
:class="$q.screen.gt.xs ? 'bg-white-btn q-mx-md' : 'q-mr-sm'"
:color="notiList.length === 0 ? 'grey-6' : 'grey-8'"
:disable="notiList.length === 0"
>
<q-icon name="mdi-bell-outline" size="22px" color="white" />
<q-badge
rounded
v-show="notiList.length > 0"
color="negative"
text-color="white"
floating
>{{ notiList.length }}</q-badge
>
<q-menu v-model="notiTrigger" max-width="480px" :offset="[0, 10]">
<div class="q-px-md q-py-sm row col-12 items-center">
<div class="text-subtitle1 text-weight-medium">การแจงเตอน</div>
<q-space />
<q-btn
label="ล้างข้อมูล"
color="pink"
dense
class="text-caption"
flat
/>
</div>
<q-list style="min-width: 300px" v-for="(n, index) in notiList" :key="index"> <q-list
<q-item v-ripple class="mytry q-py-sm" dense> style="min-width: 300px"
<q-item-section avatar top style="min-width: 40px"> v-for="(n, index) in notiList"
<q-avatar rounded color="primary" size="25px" text-color="white"> :key="index"
<span class="text-weight-medium text-uppercase">{{ n.sender[0] }}</span> >
</q-avatar> <q-item v-ripple class="mytry q-py-sm" dense>
</q-item-section> <q-item-section avatar top style="min-width: 40px">
<q-item-section> <q-avatar
<q-item-label caption class="text-black">{{ n.body }}</q-item-label> rounded
<q-item-label caption class="row items-center text-grey-7" style="font-size: 12px">{{ n.timereceive }}</q-item-label> color="primary"
</q-item-section> size="25px"
<div> text-color="white"
<q-btn size="sm" unelevated dense icon="mdi-close" class="mybtn q-mx-xs" v-close-popup></q-btn> >
</div> <span class="text-weight-medium text-uppercase">{{
</q-item> n.sender[0]
<q-separator class="q-my-xs" color="grey-2" v-if="index + 1 < notiList.length" :key="index" /> }}</span>
</q-list> </q-avatar>
</q-menu> </q-item-section>
</q-btn> <q-item-section>
<q-item-label caption class="text-black">{{
n.body
}}</q-item-label>
<q-item-label
caption
class="row items-center text-grey-7"
style="font-size: 12px"
>{{ n.timereceive }}</q-item-label
>
</q-item-section>
<div>
<q-btn
size="sm"
unelevated
dense
icon="mdi-close"
class="mybtn q-mx-xs"
v-close-popup
></q-btn>
</div>
</q-item>
<q-separator
class="q-my-xs"
color="grey-2"
v-if="index + 1 < notiList.length"
:key="index"
/>
</q-list>
</q-menu>
</q-btn>
<!-- User --> <!-- User -->
<q-btn-dropdown v-if="$q.screen.gt.xs" rounded dense flat :class="$q.screen.gt.xs ? 'bg-white-btn' : ''" color="white" class="q-pr-sm border-10" dropdown-icon="mdi-chevron-down"> <q-btn-dropdown
<template v-slot:label> v-if="$q.screen.gt.xs"
<q-item dense v-close-popup class="q-pa-none q-pl-xs"> rounded
<q-item-section avatar class="q-pa-none" style="min-width: 30px"> dense
<q-img src="@/assets/avatar_user.jpg" class="border-100" spinner-color="white" style="height: 30px; max-width: 30px" /> flat
</q-item-section> :class="$q.screen.gt.xs ? 'bg-white-btn' : ''"
<q-item-section class="text-left text-white q-pa-none q-pl-sm"> color="white"
<q-item-label class="text-caption text-weight-medium">{{ fullname }}</q-item-label> class="q-pr-sm border-10"
</q-item-section> dropdown-icon="mdi-chevron-down"
</q-item> >
</template> <template v-slot:label>
<q-list> <q-item dense v-close-popup class="q-pa-none q-pl-xs">
<q-item clickable v-close-popup> <q-item-section avatar class="q-pa-none" style="min-width: 30px">
<q-item-section avatar style="min-width: 30px"> <q-img
<q-icon color="orange-9" size="18px" name="mdi-lock-outline" /> src="@/assets/avatar_user.jpg"
</q-item-section> class="border-100"
<q-item-section><q-item-label>เปลยนรหสผาน</q-item-label></q-item-section> spinner-color="white"
</q-item> style="height: 30px; max-width: 30px"
/>
</q-item-section>
<q-item-section class="text-left text-white q-pa-none q-pl-sm">
<q-item-label class="text-caption text-weight-medium">{{
fullname
}}</q-item-label>
</q-item-section>
</q-item>
</template>
<q-list>
<q-item clickable v-close-popup>
<q-item-section avatar style="min-width: 30px">
<q-icon color="orange-9" size="18px" name="mdi-lock-outline" />
</q-item-section>
<q-item-section
><q-item-label>เปลยนรหสผาน</q-item-label></q-item-section
>
</q-item>
<q-item clickable v-close-popup> <q-item clickable v-close-popup>
<q-item-section avatar style="min-width: 30px"> <q-item-section avatar style="min-width: 30px">
<q-icon color="primary" size="18px" name="mdi-logout-variant" /> <q-icon color="primary" size="18px" name="mdi-logout-variant" />
</q-item-section> </q-item-section>
<q-item-section><q-item-label @click="doLogout">ออกจากระบบ</q-item-label></q-item-section> <q-item-section
</q-item> ><q-item-label @click="doLogout"
</q-list> >ออกจากระบบ</q-item-label
</q-btn-dropdown> ></q-item-section
<div v-else class="q-ml-sm" style="width: 30px"> >
<q-img src="@/assets/avatar_user.jpg" class="border-100" spinner-color="white" style="height: 30px; max-width: 30px" /> </q-item>
</div> </q-list>
</q-toolbar> </q-btn-dropdown>
</q-header> <div v-else class="q-ml-sm" style="width: 30px">
<div class="bg-top" :style="$q.screen.gt.xs ? 'height: 200px;' : 'height: 200px;'" /> <q-img
<!-- end header --> src="@/assets/avatar_user.jpg"
class="border-100"
spinner-color="white"
style="height: 30px; max-width: 30px"
/>
</div>
</q-toolbar>
</q-header>
<div
class="bg-top"
:style="$q.screen.gt.xs ? 'height: 200px;' : 'height: 200px;'"
/>
<!-- end header -->
<q-footer class="bg-top" v-if="!$q.screen.gt.xs"> <q-footer class="bg-top" v-if="!$q.screen.gt.xs">
<q-toolbar style="padding: 2% 2%"> <q-toolbar style="padding: 2% 2%">
<div class="row col-12 justify-around"> <div class="row col-12 justify-around">
<q-btn flat round class="bg-white-btn" color="white" icon="mdi-view-dashboard-outline" @click="router.push(`/`)"/> <q-btn
<q-btn flat round color="white" icon="mdi-map-marker-check-outline" @click="router.push(`/check-in`)"/> flat
<q-btn flat round color="white" icon="mdi-calendar-blank-outline" /> round
<q-btn flat round color="white" icon="mdi-account-outline" /> class="bg-white-btn"
</div> color="white"
</q-toolbar> icon="mdi-view-dashboard-outline"
</q-footer> @click="router.push(`/`)"
/>
<q-btn
flat
round
color="white"
icon="mdi-map-marker-check-outline"
@click="router.push(`/check-in`)"
/>
<q-btn flat round color="white" icon="mdi-calendar-blank-outline" />
<q-btn flat round color="white" icon="mdi-account-outline" />
</div>
</q-toolbar>
</q-footer>
<q-page-container class="bg-grey-2 q-pb-md"> <q-page-container class="bg-grey-2 q-pb-md">
<q-page :style="$q.screen.gt.xs ? 'padding: 1.8% 2%; margin-top: -200px;' : 'padding: 5% 4%; margin-top: -200px;'"> <q-page
<router-view :key="$route.fullPath" /> :style="
</q-page> $q.screen.gt.xs
</q-page-container> ? 'padding: 1.8% 2%; margin-top: -200px;'
</q-layout> : 'padding: 5% 4%; margin-top: -200px;'
"
>
<router-view :key="$route.fullPath" />
</q-page>
</q-page-container>
</q-layout>
</template> </template>
<style> <style>
.bg-drawer { .bg-drawer {
background: #242a3d; background: #242a3d;
} }
.menu { .menu {
padding-bottom: 5px; padding-bottom: 5px;
padding-top: 5px; padding-top: 5px;
} }
.tabsHome .q-tab__icon { .tabsHome .q-tab__icon {
font-size: 18px; font-size: 18px;
} }
.border-100 { .border-100 {
border-radius: 100px; border-radius: 100px;
} }
.bg-top { .bg-top {
background: #273238; background: #273238;
} }
.header-br { .header-br {
border-bottom: 1px solid #fdfdfd31; border-bottom: 1px solid #fdfdfd31;
} }
.menuActive { .menuActive {
background: #1e2234; background: #1e2234;
border-radius: 0 100px 100px 0; border-radius: 0 100px 100px 0;
margin-right: 4%; margin-right: 4%;
} }
.q-card { .q-card {
box-shadow: 3px 3px 20px -10px rgba(151, 150, 150, 0.261) !important; box-shadow: 3px 3px 20px -10px rgba(151, 150, 150, 0.261) !important;
border: 1px solid #eeeded; border: 1px solid #eeeded;
} }
.q-menu { .q-menu {
box-shadow: 3px 3px 10px 1px rgba(95, 95, 95, 0.15) !important; box-shadow: 3px 3px 10px 1px rgba(95, 95, 95, 0.15) !important;
} }
.toptitle { .toptitle {
font-size: 1.2rem; font-size: 1.2rem;
font-weight: bold; font-weight: bold;
margin-bottom: 1.2%; margin-bottom: 1.2%;
} }
.q-field--outlined .q-field__control { .q-field--outlined .q-field__control {
border-radius: 5px; border-radius: 5px;
} }
.q-field--outlined .q-field__control:before { .q-field--outlined .q-field__control:before {
border-color: #c8d3db; border-color: #c8d3db;
} }
.q-field--outlined .q-icon { .q-field--outlined .q-icon {
color: #7474747f; color: #7474747f;
} }
</style> </style>