Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 3m0s

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-14 10:25:20 +07:00
commit e63aef8b83
2 changed files with 23 additions and 14 deletions

View file

@ -228,8 +228,12 @@ onMounted(async () => {
<template> <template>
<div class="q-mt-sm"> <div class="q-mt-sm">
<div class="row q-gutter-sm"> <div class="row q-gutter-sm">
<div class="col-3"> <div class="col-3 scrollable-list">
<q-list bordered class="rounded-borders"> <q-list
bordered
class="rounded-borders"
style="max-height: 80vh; overflow-y: auto"
>
<q-item <q-item
v-for="(item, i) in filterLists" v-for="(item, i) in filterLists"
:key="i" :key="i"

View file

@ -248,6 +248,22 @@ function updatePagination(newPagination: any) {
pagination.value.rowsPerPage = newPagination.rowsPerPage; pagination.value.rowsPerPage = newPagination.rowsPerPage;
} }
/**
* งกนสำหรบดงช CSS Class ตามสถานะ
* @param statusText สถานะของรายการ
*/
function getStatusColor(statusText: string) {
const statusMap: Record<string, string> = {
APPROVE: "text-green-6",
REJECT: "text-red",
NEW: "text-blue",
PENDING: "text-warning",
// DELETE DELETING
};
return statusMap[statusText.toUpperCase()] ?? "";
}
/** Hook*/ /** Hook*/
onMounted(() => { onMounted(() => {
if (leaveStore.tabMenu === "1") { if (leaveStore.tabMenu === "1") {
@ -302,18 +318,7 @@ onMounted(() => {
v-for="col in props.cols" v-for="col in props.cols"
:key="col.name" :key="col.name"
:props="props" :props="props"
:class=" :class="getStatusColor(props.row.statusText)"
props.row.statusText == 'REJECT'
? 'text-red'
: props.row.statusText == 'NEW'
? 'text-blue'
: props.row.statusText == 'PENDING'
? 'text-warning'
: props.row.statusText == 'DELETE' ||
props.row.statusText == 'DELETING'
? 'text-orange'
: ''
"
> >
<div v-if="col.name == 'no'"> <div v-if="col.name == 'no'">
{{ {{