fix: filters
This commit is contained in:
parent
0d29f2dd3b
commit
8160e53e93
@ -89,15 +89,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -165,15 +165,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -122,15 +122,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -90,15 +90,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -173,15 +173,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -155,15 +155,13 @@ onMounted(() => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'regional' || key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchRegional()
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -88,15 +88,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -99,15 +99,12 @@ onMounted(() => {
|
||||
keys.forEach((key: any, index: any) => {
|
||||
if (filterPresets.value[key]) {
|
||||
presetValues[index].value = filterPresets.value[key]
|
||||
|
||||
if (key !== 'uid') {
|
||||
setFunctions[index](filterPresets.value[key])
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
fetchUid()
|
||||
}
|
||||
|
||||
emit('update:filters', data.value)
|
||||
})
|
||||
|
@ -51,7 +51,7 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
if (response.status) {
|
||||
const data = response.user
|
||||
|
||||
writeData('token', 'secret-token')
|
||||
// writeData('token', 'secret-token')
|
||||
writeData('user_name', data.username)
|
||||
writeData('user_access', 'Petugas')
|
||||
writeData('user_uid', data.namaUid)
|
||||
@ -64,7 +64,9 @@ export const useAuthStore = defineStore('auth', () => {
|
||||
type: 'success'
|
||||
})
|
||||
|
||||
window.location.reload()
|
||||
console.log(filterPresets.value)
|
||||
console.log(data)
|
||||
// window.location.reload()
|
||||
} else {
|
||||
dispatchNotification({
|
||||
title: 'Login Gagal',
|
||||
|
Loading…
x
Reference in New Issue
Block a user