load tracking public

This commit is contained in:
Alexandro Uc Santos
2024-03-28 19:31:43 -06:00
parent 9b8fb0aac0
commit 479d7fbdc4
7 changed files with 88 additions and 31 deletions

View File

@@ -44,7 +44,6 @@ export default function useDirectionsRender() {
})
})
});
console.log(polylines)
return polylines;
} else {
return [];

View File

@@ -0,0 +1,26 @@
import { ref } from "vue";
import { getLoadPublic } from "../services/public"
export default function useTrackingLoad() {
const load = ref(null);
const loading = ref(false);
const getLoadTracking = async(id) => {
loading.value = true
const resp = await getLoadPublic(id);
if(resp !== null) {
load.value = resp;
} else {
load.value = null;
}
loading.value = false;
}
return {
getLoadTracking,
load,
loading
}
}