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