เพิ่มคอมเมนต์ code 05_Leave
This commit is contained in:
parent
82b4134afd
commit
6621dfd7f0
7 changed files with 1065 additions and 1314 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue