ui การลา

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-10-09 09:31:01 +07:00
parent acbec63df7
commit 333515f570
7 changed files with 79 additions and 56 deletions

View file

@ -11,7 +11,7 @@ const props = defineProps({
type: Function,
},
});
//
//
const titlename = ref<string>("");
const timeIn = ref<string>("");
const timeOut = ref<string>("");
@ -32,6 +32,7 @@ watch(props, () => {
}
}
});
// popup
function colsePopup() {
props.colse ? props.colse() : false;
}

View file

@ -1,4 +1,3 @@
<script setup lang="ts">
import { ref, onMounted } from "vue";
import type { QTableProps } from "quasar";
@ -13,10 +12,8 @@ const mixin = useCounterMixin();
const workStore = useWorklistDataStore();
const { date2Thai } = mixin;
const { optionStatus, searchDataFn } = workStore;
onMounted(() => {
optionStatusfn.value = optionStatus;
});
const { searchDataFn, filterFn } = workStore;
onMounted(() => {});
// Table
const columns = ref<QTableProps["columns"]>([
@ -96,28 +93,15 @@ const visibleColumns = ref<string[]>([
//DialogDetail
const modal = ref<boolean>(false);
const dataDetail = ref<any>([]);
// popup
function clickDetail(data: any) {
modal.value = true;
dataDetail.value = data;
}
} // popup
function colseDeyail() {
modal.value = false;
}
//filter Option
const optionStatusfn = ref<any>([]);
function filterFn(val: string, update: any) {
if (val == "") {
update(() => {
optionStatusfn.value = optionStatus;
});
} else {
update(() => {
optionStatusfn.value = optionStatus.filter(
(e: any) => e.name.search(val) !== -1
);
});
}
}
//pagination
const pagination = ref({
@ -178,7 +162,7 @@ const paginationLabel = (start: string, end: string, total: string) => {
outlined
dense
v-model="workStore.selectStatus"
:options="optionStatusfn"
:options="workStore.optionStatus"
option-value="id"
option-label="name"
label="สถานะ"

View file

@ -3,18 +3,19 @@ q
import { ref } from "vue";
import type { QTableProps } from "quasar";
import { useRouter } from "vue-router";
//import Stores
import { useCounterMixin } from "@/stores/mixin";
import { useLeavelistDataStore } from "@/modules/09_leave/stores/LeaveStore";
const mixin = useCounterMixin();
const leaveStore = useLeavelistDataStore();
const router = useRouter();
const { date2Thai } = mixin;
const { optionYear, searchDataFn, filterOption } = leaveStore;
const { optionYear, searchDataFn, filterOption } = leaveStore; // funtion stores
// TABLE
const columns = ref<QTableProps["columns"]>([
{
name: "no",