refactor code ลาออก ขอโอน

This commit is contained in:
AnandaTon 2023-09-21 14:53:14 +07:00
parent 4e7432bc50
commit bf5b67ee36
5 changed files with 318 additions and 339 deletions

View file

@ -14,7 +14,7 @@ const { statusText } = RestData
const router = useRouter()
const $q = useQuasar()
const mixin = useCounterMixin()
const { date2Thai, dateToISO, success, messageError, showLoader, hideLoader } = mixin
const { date2Thai, messageError, showLoader, hideLoader } = mixin
const filter = ref<string>("")
const visibleColumns = ref<String[]>(["no", "placeLeave", "dateStartLeave", "dateLeave", "statustext"])
@ -74,14 +74,13 @@ onMounted(() => {
fectListleave()
})
//
const fectListleave = async () => {
showLoader()
await http
.get(config.API.listUser())
.then((res: any) => {
// console.log(res);
let data = res.data.result
console.log(data)
rows.value = data.map((e: any) => ({
id: e.id,
placeLeave: e.location,
@ -92,7 +91,6 @@ const fectListleave = async () => {
}))
})
.catch((e: any) => {
console.log(e)
messageError($q, e)
})
.finally(() => {