แก้ loading

This commit is contained in:
Warunee Tamkoo 2024-01-18 16:23:27 +07:00
parent 7bc8ca5776
commit 4dbf1de05d

View file

@ -14,7 +14,7 @@ import { useCounterMixin } from '@/stores/mixin'
const $q = useQuasar()
const mixin = useCounterMixin()
const { date2Thai, success, dialogConfirm } = mixin
const { date2Thai, success, dialogConfirm, showLoader, hideLoader } = mixin
const props = defineProps({
dataById: {
@ -97,6 +97,7 @@ function onCkickSave() {
* @param data body Request
*/
async function createListTime(data: FormTimeStemp) {
showLoader()
await http
.post(config.API.createTimeStamp(), data)
.then(() => {
@ -107,6 +108,7 @@ async function createListTime(data: FormTimeStemp) {
})
.finally(() => {
props.closePopup?.()
hideLoader()
props.fetchData()
})
}