load tracking public
This commit is contained in:
@@ -44,7 +44,6 @@ export default function useDirectionsRender() {
|
||||
})
|
||||
})
|
||||
});
|
||||
console.log(polylines)
|
||||
return polylines;
|
||||
} else {
|
||||
return [];
|
||||
|
||||
26
src/composables/useTrackingLoad.js
Normal file
26
src/composables/useTrackingLoad.js
Normal 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user