Merge branch 'master' of https://gitlab.com/m3f_usm/admin_transporte/frontend into develop/Ronald
commit
7671735f40
|
@ -68,7 +68,7 @@
|
||||||
async function cargar_regiones_comunas() {
|
async function cargar_regiones_comunas() {
|
||||||
try {
|
try {
|
||||||
regiones = await getRegiones()
|
regiones = await getRegiones()
|
||||||
comunas = await getComunas()
|
comunas = await getComunas({ ordering: 'nombre_comuna' })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
globalThis.toast.error(error)
|
globalThis.toast.error(error)
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,11 @@
|
||||||
function crear_marcadores_por_criterio() {
|
function crear_marcadores_por_criterio() {
|
||||||
if (form.id_region) {
|
if (form.id_region) {
|
||||||
comunas_x_region = comunas.filter(comuna => comuna.id_region === form.id_region)
|
comunas_x_region = comunas.filter(comuna => comuna.id_region === form.id_region)
|
||||||
|
} else {
|
||||||
|
form.id_comuna = null
|
||||||
|
comunas_x_region = []
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$storeParaderos?.marks) {
|
if (!$storeParaderos?.marks) {
|
||||||
setTimeout(crear_marcadores_por_criterio, 1000)
|
setTimeout(crear_marcadores_por_criterio, 1000)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue