เพิ่มคอมเมนต์ code 05_Leave

This commit is contained in:
AnandaTon 2023-11-13 14:36:34 +07:00
parent 82b4134afd
commit 6621dfd7f0
7 changed files with 1065 additions and 1314 deletions

View file

@ -1,3 +1,60 @@
<script setup lang="ts">
import { ref, useAttrs, reactive, onMounted } from "vue"
import { useLeaveStore } from "@/modules/05_leave/store"
const LeaveData = useLeaveStore()
const { filterSelector, searchFilterTable } = LeaveData
const attrs = ref<any>(useAttrs())
const table = ref<any>(null)
const filterRef = ref<any>(null)
/**
* งค pagination
*/
const paginationLabel = (start: string, end: string, total: string) => {
return start + "-" + end + " ใน " + total
}
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
})
/** รับ props มาจากหน้าหลัก */
const props = defineProps({
count: Number,
pass: Number,
notpass: Number,
inputfilter: String,
name: String,
icon: String,
inputvisible: Array,
editvisible: Boolean,
grid: Boolean,
inputShow: Boolean,
})
/**
* งชนน emit าทกำหนด
*/
const emit = defineEmits(["update:inputfilter", "update:inputvisible", "update:editvisible"])
const updateInput = (value: string | number | null) => {
emit("update:inputfilter", value)
}
const updateVisible = (value: []) => {
emit("update:inputvisible", value)
}
/**
* reset าทนหา
*/
const resetFilter = () => {
// reset X
emit("update:inputfilter", "")
filterRef.value.focus()
}
</script>
<template>
<div class="q-py-sm row">
<q-card bordered flat class="q-py-sm q-pl-sm col-12 row bg-grey-1 shadow-0">
@ -100,66 +157,7 @@
</q-table>
</div>
</template>
<script setup lang="ts">
import { ref, useAttrs, reactive, onMounted } from "vue"
import { useLeaveStore } from "@/modules/05_leave/store"
import type { OptionData } from "@/modules/05_leave/interface/index/main"
import type { an } from "@fullcalendar/core/internal-common"
import { useCounterMixin } from "@/stores/mixin"
const mixin = useCounterMixin()
const { showLoader, hideLoader, date2Thai, messageError } = mixin
const DataStore = useLeaveStore()
const LeaveData = useLeaveStore()
const { filterSelector, searchFilterTable } = LeaveData
const attrs = ref<any>(useAttrs())
const table = ref<any>(null)
const filterRef = ref<any>(null)
const rows = ref<any[]>([])
const type = ref("ทั้งหมด")
const status = ref("ทั้งหมด")
const pagination = ref({
sortBy: "desc",
descending: false,
page: 1,
rowsPerPage: 10,
})
const initialPagination = ref({
rowsPerPage: 0,
})
const paginationLabel = (start: string, end: string, total: string) => {
return start + "-" + end + " ใน " + total
}
const props = defineProps({
count: Number,
pass: Number,
notpass: Number,
inputfilter: String,
name: String,
icon: String,
inputvisible: Array,
editvisible: Boolean,
grid: Boolean,
inputShow: Boolean,
})
const emit = defineEmits(["update:inputfilter", "update:inputvisible", "update:editvisible"])
const updateInput = (value: string | number | null) => {
emit("update:inputfilter", value)
}
const updateVisible = (value: []) => {
emit("update:inputvisible", value)
}
const resetFilter = () => {
// reset X
emit("update:inputfilter", "")
filterRef.value.focus()
}
</script>
<style lang="scss">
.icon-color {
color: #4154b3;