Refactor code in reference.ts
This commit is contained in:
parent
ceccc31e95
commit
725c8ad561
@ -1,7 +1,5 @@
|
|||||||
import { usePostsStore } from '@/stores/posts'
|
import { usePostsStore } from '@/stores/posts'
|
||||||
import { useRegionStore } from '@/stores/region'
|
|
||||||
import { useUlpStore } from '@/stores/ulp'
|
import { useUlpStore } from '@/stores/ulp'
|
||||||
import { useUp3Store } from '@/stores/up3'
|
|
||||||
import { getUid, getUp3, getPosko, getUlp, getRegional, getUidRegional } from '@/utils/network'
|
import { getUid, getUp3, getPosko, getUlp, getRegional, getUidRegional } from '@/utils/network'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
interface Item {
|
interface Item {
|
||||||
@ -132,7 +130,7 @@ const fetchRegional = async () => {
|
|||||||
const res = await getRegional()
|
const res = await getRegional()
|
||||||
itemsRegional.value = res.data.map((item: any) => ({
|
itemsRegional.value = res.data.map((item: any) => ({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
name: item.nama.toUpperCase()
|
name: String(item.nama).toUpperCase()
|
||||||
}))
|
}))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching data:', error)
|
console.error('Error fetching data:', error)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user