เพิ่ม config link manual
This commit is contained in:
parent
293471997d
commit
68cfaff77e
2 changed files with 480 additions and 421 deletions
|
|
@ -15,20 +15,48 @@ import probation from "./api/probation/api.probation";
|
||||||
import development from "./api/api.development";
|
import development from "./api/api.development";
|
||||||
|
|
||||||
const API = {
|
const API = {
|
||||||
...testtest,
|
...testtest,
|
||||||
...retirementResign,
|
...retirementResign,
|
||||||
...placementTransfer,
|
...placementTransfer,
|
||||||
...message,
|
...message,
|
||||||
...evaluate,
|
...evaluate,
|
||||||
...appeal,
|
...appeal,
|
||||||
...support,
|
...support,
|
||||||
...org,
|
...org,
|
||||||
...scholarship,
|
...scholarship,
|
||||||
...kpi,
|
...kpi,
|
||||||
...probation,
|
...probation,
|
||||||
...development,
|
...development,
|
||||||
|
};
|
||||||
|
|
||||||
|
const path = "http://localhost:3008";
|
||||||
|
|
||||||
|
const generatePopupPath = (routeName: any) => {
|
||||||
|
if (routeName.includes("metadata")) {
|
||||||
|
return `${path}/manual/chapter-2-admin-metadata`;
|
||||||
|
}
|
||||||
|
if (routeName.includes("leave")) {
|
||||||
|
return `${path}/manual/chapter-3-user-leave`;
|
||||||
|
}
|
||||||
|
// if (routeName.includes("compete")) {
|
||||||
|
// return `${path}/manual/chapter-10-admin-recruit`;
|
||||||
|
// }
|
||||||
|
// if (routeName.includes("registryNew")) {
|
||||||
|
// return `${path}/manual/chapter-7-admin-registry`;
|
||||||
|
// }
|
||||||
|
// if (routeName.includes("registry")) {
|
||||||
|
// return `${path}/manual/chapter-7-admin-registry`;
|
||||||
|
// }
|
||||||
|
else {
|
||||||
|
return manualConfig[routeName as keyof typeof manualConfig];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const manualConfig = {
|
||||||
|
dashboard: `${path}/manual/chapter-1-user-organization-chart`,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
API: API,
|
API: API,
|
||||||
|
generatePopupPath,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@ const $q = useQuasar();
|
||||||
|
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
messageError,
|
messageError,
|
||||||
success,
|
success,
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
|
|
@ -34,54 +34,54 @@ const link = ref<string>("");
|
||||||
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
* เรียกฟังก์ชันทั้งหมดตอนเรียกใช้ไฟล์นี้
|
||||||
*/
|
*/
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchTotolNotificate();
|
await fetchTotolNotificate();
|
||||||
if (keycloak.tokenParsed != null) {
|
if (keycloak.tokenParsed != null) {
|
||||||
fullname.value = keycloak.tokenParsed.name;
|
fullname.value = keycloak.tokenParsed.name;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const totalNoti = ref<number>(0);
|
const totalNoti = ref<number>(0);
|
||||||
async function fetchTotolNotificate() {
|
async function fetchTotolNotificate() {
|
||||||
await http
|
await http
|
||||||
.get(config.API.msgNotificateTotal)
|
.get(config.API.msgNotificateTotal)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
totalNoti.value = res.data.result;
|
totalNoti.value = res.data.result;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const statusLoad = ref<boolean>(false);
|
const statusLoad = ref<boolean>(false);
|
||||||
const fetchlistNotification = async (index: number, type: string) => {
|
const fetchlistNotification = async (index: number, type: string) => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`)
|
.get(config.API.msgNotificate + `?page=${index}&pageSize=${15}`)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
const data = res.data.result.data;
|
const data = res.data.result.data;
|
||||||
totalInbox.value = res.data.result.total;
|
totalInbox.value = res.data.result.total;
|
||||||
let list: any[] = [];
|
let list: any[] = [];
|
||||||
if (type === "DEL") {
|
if (type === "DEL") {
|
||||||
notiList.value = [];
|
notiList.value = [];
|
||||||
}
|
}
|
||||||
data.map((e: any) => {
|
data.map((e: any) => {
|
||||||
list.push({
|
list.push({
|
||||||
id: e.id,
|
id: e.id,
|
||||||
sender:
|
sender:
|
||||||
e.createdFullName == "" || e.createdFullName == null
|
e.createdFullName == "" || e.createdFullName == null
|
||||||
? "เจ้าหน้าที่"[0]
|
? "เจ้าหน้าที่"[0]
|
||||||
: e.createdFullName[0],
|
: e.createdFullName[0],
|
||||||
body: e.body ?? "",
|
body: e.body ?? "",
|
||||||
timereceive: date2Thai(e.createdAt),
|
timereceive: date2Thai(e.createdAt),
|
||||||
isOpen: e.isOpen,
|
isOpen: e.isOpen,
|
||||||
receiveDate: e.receiveDate,
|
receiveDate: e.receiveDate,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
notiList.value.push(...list);
|
notiList.value.push(...list);
|
||||||
statusLoad.value = totalInbox.value === 0 ? true : false;
|
statusLoad.value = totalInbox.value === 0 ? true : false;
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -89,280 +89,311 @@ const fetchlistNotification = async (index: number, type: string) => {
|
||||||
* confirm ก่อนออกจากระบบ
|
* confirm ก่อนออกจากระบบ
|
||||||
*/
|
*/
|
||||||
const doLogout = () => {
|
const doLogout = () => {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
() => {
|
||||||
keycloak.logout();
|
keycloak.logout();
|
||||||
},
|
},
|
||||||
"ยืนยันการออกจากระบบ",
|
"ยืนยันการออกจากระบบ",
|
||||||
"ต้องการออกจากระบบใช่หรือไม่"
|
"ต้องการออกจากระบบใช่หรือไม่"
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const clickDelete = async (id: string, index: number) => {
|
const clickDelete = async (id: string, index: number) => {
|
||||||
dialogRemove($q, async () => {
|
dialogRemove($q, async () => {
|
||||||
// showLoader();
|
// showLoader();
|
||||||
await http
|
await http
|
||||||
.delete(config.API.msgId(id))
|
.delete(config.API.msgId(id))
|
||||||
.then(() => {
|
.then(() => {
|
||||||
notiList.value.splice(index, 1);
|
notiList.value.splice(index, 1);
|
||||||
totalInbox.value--;
|
totalInbox.value--;
|
||||||
success($q, "ลบข้อมูลสำเร็จ");
|
success($q, "ลบข้อมูลสำเร็จ");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
notiList.value.length === 12 && fetchlistNotification(1, "DEL");
|
notiList.value.length === 12 && fetchlistNotification(1, "DEL");
|
||||||
// hideLoader();
|
// hideLoader();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const totalInbox = ref<number>(0);
|
const totalInbox = ref<number>(0);
|
||||||
const page = ref<number>(0);
|
const page = ref<number>(0);
|
||||||
async function onLoad(index: any, done: any) {
|
async function onLoad(index: any, done: any) {
|
||||||
if (
|
if (
|
||||||
notiList.value.length < totalInbox.value ||
|
notiList.value.length < totalInbox.value ||
|
||||||
(notiList.value.length === 0 && totalInbox.value === 0)
|
(notiList.value.length === 0 && totalInbox.value === 0)
|
||||||
) {
|
) {
|
||||||
page.value++;
|
page.value++;
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await fetchlistNotification(page.value, "NOMAL");
|
await fetchlistNotification(page.value, "NOMAL");
|
||||||
done();
|
done();
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => notiTrigger.value,
|
() => notiTrigger.value,
|
||||||
() => {
|
() => {
|
||||||
if (!notiTrigger.value) {
|
if (!notiTrigger.value) {
|
||||||
const updatedNotifications = notiList.value.map((item: any) => ({
|
const updatedNotifications = notiList.value.map((item: any) => ({
|
||||||
...item,
|
...item,
|
||||||
isOpen: true,
|
isOpen: true,
|
||||||
}));
|
}));
|
||||||
notiList.value = updatedNotifications;
|
notiList.value = updatedNotifications;
|
||||||
fetchTotolNotificate();
|
fetchTotolNotificate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const thaiOptions: Intl.DateTimeFormatOptions = {
|
const thaiOptions: Intl.DateTimeFormatOptions = {
|
||||||
hour: "2-digit",
|
hour: "2-digit",
|
||||||
minute: "2-digit",
|
minute: "2-digit",
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleButtonClick = () => {
|
||||||
|
const currentPath = route.name;
|
||||||
|
const queryParams = { role: "user" }; // Replace with your query parameters
|
||||||
|
const queryString = new URLSearchParams(queryParams).toString();
|
||||||
|
|
||||||
|
// Assuming config.generatePopupPath() returns a base URL
|
||||||
|
const popupBasePath = config.generatePopupPath(currentPath);
|
||||||
|
|
||||||
|
if (popupBasePath) {
|
||||||
|
const popupPath = `${popupBasePath}?${queryString}`;
|
||||||
|
window.open(popupPath, "_blank"); // Opens in a new tab/window
|
||||||
|
} else {
|
||||||
|
console.log("No manual available for this page:", currentPath);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function onInfo() {
|
function onInfo() {
|
||||||
router.push(`/retire`);
|
router.push(`/retire`);
|
||||||
}
|
}
|
||||||
</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
|
<q-toolbar
|
||||||
class="q-my-xs items-center"
|
class="q-my-xs items-center"
|
||||||
:style="$q.screen.gt.xs ? 'padding: 1% 2%;' : 'padding: 1% 4%;'"
|
:style="$q.screen.gt.xs ? 'padding: 1% 2%;' : 'padding: 1% 4%;'"
|
||||||
>
|
>
|
||||||
<div class="row items-center no-wrap" v-if="$q.screen.gt.xs">
|
<div class="row items-center no-wrap" v-if="$q.screen.gt.xs">
|
||||||
<q-img
|
<q-img
|
||||||
src="@/assets/logo.png"
|
src="@/assets/logo.png"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
style="height: 35px; max-width: 35px"
|
style="height: 35px; max-width: 35px"
|
||||||
/>
|
/>
|
||||||
<div class="row q-ml-md items-center q-pt-xs">
|
<div class="row q-ml-md items-center q-pt-xs">
|
||||||
<div
|
<div
|
||||||
style="color: #ffffff; letter-spacing: 1px; line-height: 10px"
|
style="color: #ffffff; letter-spacing: 1px; line-height: 10px"
|
||||||
class="text-body2 text-weight-bolder col-12"
|
class="text-body2 text-weight-bolder col-12"
|
||||||
>
|
>
|
||||||
ระบบ<span class="text-primary">บริหารทรัพยากรบุคคล</span>
|
ระบบ<span class="text-primary">บริหารทรัพยากรบุคคล</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-caption text-white">ของกรุงเทพมหานคร</div>
|
<div class="text-caption text-white">ของกรุงเทพมหานคร</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="row items-center">
|
<div v-else class="row items-center">
|
||||||
<img src="@/assets/logo.png" style="height: 35px; max-width: 35px" />
|
<img src="@/assets/logo.png" style="height: 35px; max-width: 35px" />
|
||||||
</div>
|
</div>
|
||||||
<div v-if="$q.screen.gt.xs">
|
<div v-if="$q.screen.gt.xs">
|
||||||
<q-tabs
|
<q-tabs
|
||||||
v-model="tab"
|
v-model="tab"
|
||||||
align="justify"
|
align="justify"
|
||||||
indicator-color="transparent"
|
indicator-color="transparent"
|
||||||
active-color="white bg-white-btn border-100"
|
active-color="white bg-white-btn border-100"
|
||||||
dense
|
dense
|
||||||
inline-label
|
inline-label
|
||||||
class="text-grey-5 tabsHome"
|
class="text-grey-5 tabsHome"
|
||||||
>
|
>
|
||||||
<q-tab
|
<q-tab
|
||||||
class="border-100 q-mr-sm"
|
class="border-100 q-mr-sm"
|
||||||
name="dashboard"
|
name="dashboard"
|
||||||
label="หน้าแรก"
|
label="หน้าแรก"
|
||||||
icon="mdi-view-dashboard-outline"
|
icon="mdi-view-dashboard-outline"
|
||||||
@click="router.push(`/`)"
|
@click="router.push(`/`)"
|
||||||
/>
|
/>
|
||||||
<!-- <q-tab class="border-100" name="Checkin" label="ลงเวลางาน" icon="mdi-map-marker-check-outline"
|
<!-- <q-tab class="border-100" name="Checkin" label="ลงเวลางาน" icon="mdi-map-marker-check-outline"
|
||||||
@click="router.push(`/check-in`)" /> -->
|
@click="router.push(`/check-in`)" /> -->
|
||||||
<q-tab
|
<q-tab
|
||||||
class="border-100 q-mr-sm"
|
class="border-100 q-mr-sm"
|
||||||
name="leave"
|
name="leave"
|
||||||
label="การลา"
|
label="การลา"
|
||||||
icon="mdi-calendar-blank-outline"
|
icon="mdi-calendar-blank-outline"
|
||||||
@click="router.push(`/leave`)"
|
@click="router.push(`/leave`)"
|
||||||
/>
|
/>
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
<q-btn
|
||||||
|
round
|
||||||
|
dense
|
||||||
|
flat
|
||||||
|
size="13px"
|
||||||
|
class="bg-white-btn"
|
||||||
|
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
||||||
|
no-caps
|
||||||
|
@click="handleButtonClick()"
|
||||||
|
style="margin-right: 10px"
|
||||||
|
>
|
||||||
|
<q-icon name="mdi-book-open-variant" size="18px" color="white" />
|
||||||
|
<q-tooltip>คู่มือ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
|
||||||
<!-- Notification -->
|
<!-- Notification -->
|
||||||
<q-btn
|
<q-btn
|
||||||
round
|
round
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
size="13px"
|
size="13px"
|
||||||
:class="$q.screen.gt.xs ? 'bg-white-btn q-mx-md' : 'q-mr-sm'"
|
class="bg-white-btn"
|
||||||
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
:color="totalNoti === 0 ? 'grey-6' : 'grey-8'"
|
||||||
no-caps
|
no-caps
|
||||||
>
|
style="margin-right: 10px"
|
||||||
<q-icon name="mdi-bell-outline" size="22px" color="white" />
|
>
|
||||||
<q-badge
|
<q-icon name="mdi-bell-outline" size="22px" color="white" />
|
||||||
rounded
|
<q-badge
|
||||||
v-show="totalNoti !== 0"
|
rounded
|
||||||
color="negative"
|
v-show="totalNoti !== 0"
|
||||||
text-color="white"
|
color="negative"
|
||||||
floating
|
text-color="white"
|
||||||
>{{ totalNoti }}</q-badge
|
floating
|
||||||
>
|
>{{ totalNoti }}</q-badge
|
||||||
<q-menu v-model="notiTrigger" :offset="[0, 8]" style="width: 480px">
|
>
|
||||||
<div class="q-px-md q-py-sm row col-12 items-center">
|
<q-menu v-model="notiTrigger" :offset="[0, 8]" style="width: 480px">
|
||||||
<div class="text-subtitle1 text-weight-medium">การแจ้งเตือน</div>
|
<div class="q-px-md q-py-sm row col-12 items-center">
|
||||||
<q-space />
|
<div class="text-subtitle1 text-weight-medium">การแจ้งเตือน</div>
|
||||||
<div class="text-grey-5" style="font-size: 12px">
|
<q-space />
|
||||||
ทั้งหมด {{ totalInbox }} ข้อความ
|
<div class="text-grey-5" style="font-size: 12px">
|
||||||
</div>
|
ทั้งหมด {{ totalInbox }} ข้อความ
|
||||||
</div>
|
</div>
|
||||||
<q-infinite-scroll
|
</div>
|
||||||
@load="onLoad"
|
<q-infinite-scroll
|
||||||
:offset="250"
|
@load="onLoad"
|
||||||
v-if="statusLoad === false"
|
:offset="250"
|
||||||
>
|
v-if="statusLoad === false"
|
||||||
<div
|
>
|
||||||
v-for="(item, index) in notiList"
|
<div
|
||||||
:key="index"
|
v-for="(item, index) in notiList"
|
||||||
class="caption"
|
:key="index"
|
||||||
>
|
class="caption"
|
||||||
<q-item v-ripple class="mytry q-py-sm" dense>
|
>
|
||||||
<q-item-section avatar top style="min-width: 10px">
|
<q-item v-ripple class="mytry q-py-sm" dense>
|
||||||
<q-avatar
|
<q-item-section avatar top style="min-width: 10px">
|
||||||
rounded
|
<q-avatar
|
||||||
color="primary"
|
rounded
|
||||||
size="25px"
|
color="primary"
|
||||||
text-color="white"
|
size="25px"
|
||||||
>
|
text-color="white"
|
||||||
<span class="text-weight-medium text-uppercase">{{
|
>
|
||||||
item.body[0]
|
<span class="text-weight-medium text-uppercase">{{
|
||||||
}}</span>
|
item.body[0]
|
||||||
</q-avatar>
|
}}</span>
|
||||||
</q-item-section>
|
</q-avatar>
|
||||||
<q-item-section>
|
</q-item-section>
|
||||||
<q-item-label caption class="text-grey-7">
|
<q-item-section>
|
||||||
{{ date2Thai(item.receiveDate) }}
|
<q-item-label caption class="text-grey-7">
|
||||||
{{
|
{{ date2Thai(item.receiveDate) }}
|
||||||
new Date(item.receiveDate).toLocaleTimeString(
|
{{
|
||||||
"th-TH",
|
new Date(item.receiveDate).toLocaleTimeString(
|
||||||
thaiOptions
|
"th-TH",
|
||||||
)
|
thaiOptions
|
||||||
}}
|
)
|
||||||
น. <q-space />
|
}}
|
||||||
</q-item-label>
|
น. <q-space />
|
||||||
<q-item-label
|
</q-item-label>
|
||||||
caption
|
<q-item-label
|
||||||
:class="
|
caption
|
||||||
item.isOpen
|
:class="
|
||||||
? 'text-grey-7'
|
item.isOpen
|
||||||
: 'text-dark text-weight-medium'
|
? 'text-grey-7'
|
||||||
"
|
: 'text-dark text-weight-medium'
|
||||||
>{{ item.body }}</q-item-label
|
"
|
||||||
>
|
>{{ item.body }}</q-item-label
|
||||||
<q-item-label
|
>
|
||||||
caption
|
<q-item-label
|
||||||
class="row items-center text-grey-7"
|
caption
|
||||||
style="font-size: 12px"
|
class="row items-center text-grey-7"
|
||||||
>{{ item.timereceive }}</q-item-label
|
style="font-size: 12px"
|
||||||
>
|
>{{ item.timereceive }}</q-item-label
|
||||||
</q-item-section>
|
>
|
||||||
<div>
|
</q-item-section>
|
||||||
<q-btn
|
<div>
|
||||||
size="sm"
|
<q-btn
|
||||||
unelevated
|
size="sm"
|
||||||
dense
|
unelevated
|
||||||
icon="mdi-close"
|
dense
|
||||||
class="mybtn q-mx-xs"
|
icon="mdi-close"
|
||||||
@click="clickDelete(item.id, index)"
|
class="mybtn q-mx-xs"
|
||||||
></q-btn>
|
@click="clickDelete(item.id, index)"
|
||||||
</div>
|
></q-btn>
|
||||||
</q-item>
|
</div>
|
||||||
</div>
|
</q-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template
|
<template
|
||||||
v-slot:loading
|
v-slot:loading
|
||||||
v-if="
|
v-if="
|
||||||
notiList.length < totalInbox ||
|
notiList.length < totalInbox ||
|
||||||
(notiList.length === 0 && totalInbox === 0)
|
(notiList.length === 0 && totalInbox === 0)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div class="text-center q-my-md">
|
<div class="text-center q-my-md">
|
||||||
<q-spinner-dots color="primary" size="40px" />
|
<q-spinner-dots color="primary" size="40px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</q-infinite-scroll>
|
</q-infinite-scroll>
|
||||||
<div class="q-pa-md" v-else>
|
<div class="q-pa-md" v-else>
|
||||||
<q-banner rounded class="bg-amber-1 text-center">
|
<q-banner rounded class="bg-amber-1 text-center">
|
||||||
<div class="text-yellow-10">
|
<div class="text-yellow-10">
|
||||||
<q-icon
|
<q-icon
|
||||||
name="mdi-alert-box"
|
name="mdi-alert-box"
|
||||||
class="q-mx-xs"
|
class="q-mx-xs"
|
||||||
size="sm"
|
size="sm"
|
||||||
color="yellow-10"
|
color="yellow-10"
|
||||||
/>
|
/>
|
||||||
ไมมีข้อมูล
|
ไมมีข้อมูล
|
||||||
</div>
|
</div>
|
||||||
</q-banner>
|
</q-banner>
|
||||||
</div>
|
</div>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<!-- User -->
|
<!-- User -->
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
v-if="$q.screen.gt.xs"
|
v-if="$q.screen.gt.xs"
|
||||||
rounded
|
rounded
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
:class="$q.screen.gt.xs ? 'bg-white-btn' : ''"
|
:class="$q.screen.gt.xs ? 'bg-white-btn' : ''"
|
||||||
color="white"
|
color="white"
|
||||||
class="q-pr-sm border-10"
|
class="q-pr-sm border-10"
|
||||||
dropdown-icon="mdi-chevron-down"
|
dropdown-icon="mdi-chevron-down"
|
||||||
>
|
>
|
||||||
<template v-slot:label>
|
<template v-slot:label>
|
||||||
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
<q-item dense v-close-popup class="q-pa-none q-pl-xs">
|
||||||
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
<q-item-section avatar class="q-pa-none" style="min-width: 30px">
|
||||||
<q-img
|
<q-img
|
||||||
src="@/assets/avatar_user.jpg"
|
src="@/assets/avatar_user.jpg"
|
||||||
class="border-100"
|
class="border-100"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
style="height: 30px; max-width: 30px"
|
style="height: 30px; max-width: 30px"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section class="text-left text-white q-pa-none q-pl-sm">
|
<q-item-section class="text-left text-white q-pa-none q-pl-sm">
|
||||||
<q-item-label class="text-caption text-weight-medium">{{
|
<q-item-label class="text-caption text-weight-medium">{{
|
||||||
fullname
|
fullname
|
||||||
}}</q-item-label>
|
}}</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
<q-list>
|
<q-list>
|
||||||
<!-- <q-item clickable v-close-popup @click="onInfo">
|
<!-- <q-item clickable v-close-popup @click="onInfo">
|
||||||
<q-item-section avatar style="min-width: 30px">
|
<q-item-section avatar style="min-width: 30px">
|
||||||
<q-icon
|
<q-icon
|
||||||
color="blue-9"
|
color="blue-9"
|
||||||
|
|
@ -376,50 +407,50 @@ function onInfo() {
|
||||||
></q-item-section
|
></q-item-section
|
||||||
>
|
>
|
||||||
</q-item> -->
|
</q-item> -->
|
||||||
<q-item clickable v-close-popup @click="onInfo">
|
<q-item clickable v-close-popup @click="onInfo">
|
||||||
<q-item-section avatar style="min-width: 30px">
|
<q-item-section avatar style="min-width: 30px">
|
||||||
<q-icon
|
<q-icon
|
||||||
color="red-9"
|
color="red-9"
|
||||||
size="18px"
|
size="18px"
|
||||||
name="mdi-account-remove-outline"
|
name="mdi-account-remove-outline"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
><q-item-label>ขอลาออก</q-item-label></q-item-section
|
><q-item-label>ขอลาออก</q-item-label></q-item-section
|
||||||
>
|
>
|
||||||
</q-item>
|
</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="orange-9" size="18px" name="mdi-lock-outline" />
|
<q-icon color="orange-9" size="18px" name="mdi-lock-outline" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section
|
<q-item-section
|
||||||
><q-item-label>เปลี่ยนรหัสผ่าน</q-item-label></q-item-section
|
><q-item-label>เปลี่ยนรหัสผ่าน</q-item-label></q-item-section
|
||||||
>
|
>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item clickable v-close-popup @click="doLogout">
|
<q-item clickable v-close-popup @click="doLogout">
|
||||||
<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-section>
|
||||||
<q-item-label>ออกจากระบบ</q-item-label>
|
<q-item-label>ออกจากระบบ</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-btn-dropdown>
|
</q-btn-dropdown>
|
||||||
|
|
||||||
<div v-else class="q-ml-sm" style="width: 30px">
|
<div v-else class="q-ml-sm" style="width: 30px">
|
||||||
<q-btn round>
|
<q-btn round>
|
||||||
<q-avatar>
|
<q-avatar>
|
||||||
<q-img
|
<q-img
|
||||||
src="@/assets/avatar_user.jpg"
|
src="@/assets/avatar_user.jpg"
|
||||||
class="border-100"
|
class="border-100"
|
||||||
spinner-color="white"
|
spinner-color="white"
|
||||||
style="height: 30px; max-width: 30px"
|
style="height: 30px; max-width: 30px"
|
||||||
/>
|
/>
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
<!-- <q-menu>
|
<!-- <q-menu>
|
||||||
<q-list dense style="min-width: 200px">
|
<q-list dense style="min-width: 200px">
|
||||||
<q-item clickable v-close-popup>
|
<q-item clickable v-close-popup>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
|
|
@ -472,119 +503,119 @@ function onInfo() {
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu> -->
|
</q-menu> -->
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-header>
|
</q-header>
|
||||||
<div
|
<div
|
||||||
class="bg-top"
|
class="bg-top"
|
||||||
:style="$q.screen.gt.xs ? 'height: 200px;' : 'height: 200px;'"
|
:style="$q.screen.gt.xs ? 'height: 200px;' : 'height: 200px;'"
|
||||||
/>
|
/>
|
||||||
<!-- end header -->
|
<!-- 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
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="white"
|
color="white"
|
||||||
icon="mdi-home"
|
icon="mdi-home"
|
||||||
@click="router.push(`/`)"
|
@click="router.push(`/`)"
|
||||||
/>
|
/>
|
||||||
<!-- <q-btn
|
<!-- <q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="white"
|
color="white"
|
||||||
icon="mdi-map-marker-check-outline"
|
icon="mdi-map-marker-check-outline"
|
||||||
@click="router.push(`/check-in`)"
|
@click="router.push(`/check-in`)"
|
||||||
/> -->
|
/> -->
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="white"
|
color="white"
|
||||||
icon="mdi-calendar-blank-outline"
|
icon="mdi-calendar-blank-outline"
|
||||||
@click="router.push(`/leave`)"
|
@click="router.push(`/leave`)"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
round
|
round
|
||||||
color="white"
|
color="white"
|
||||||
icon="mdi-account-outline"
|
icon="mdi-account-outline"
|
||||||
@click="router.push(`/registry`)"
|
@click="router.push(`/registry`)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</q-toolbar>
|
</q-toolbar>
|
||||||
</q-footer>
|
</q-footer>
|
||||||
|
|
||||||
<q-page-container class="bg-grey-2 q-pb-md">
|
<q-page-container class="bg-grey-2 q-pb-md">
|
||||||
<q-page
|
<q-page
|
||||||
:style="
|
:style="
|
||||||
$q.screen.gt.xs
|
$q.screen.gt.xs
|
||||||
? 'padding: 1.8% 2%; margin-top: -200px;'
|
? 'padding: 1.8% 2%; margin-top: -200px;'
|
||||||
: 'padding: 5% 4%; margin-top: -200px;'
|
: 'padding: 5% 4%; margin-top: -200px;'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<router-view :key="$route.fullPath" />
|
<router-view :key="$route.fullPath" />
|
||||||
</q-page>
|
</q-page>
|
||||||
</q-page-container>
|
</q-page-container>
|
||||||
</q-layout>
|
</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; */
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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 {
|
||||||
|
|
@ -592,11 +623,11 @@ function onInfo() {
|
||||||
} */
|
} */
|
||||||
|
|
||||||
.shadow-0 {
|
.shadow-0 {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnBlue {
|
.btnBlue {
|
||||||
background-color: #016987;
|
background-color: #016987;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue