add: fixes user card & removed logs
This commit is contained in:
@@ -16,7 +16,7 @@ export default function useAttachments() {
|
||||
attachments.value = data;
|
||||
} catch (error) {
|
||||
attachments.value = null;
|
||||
console.log(error);
|
||||
// console.log(error);
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ export default function useCalendar() {
|
||||
const loading = ref(false);
|
||||
|
||||
const getCalendarDate = async(startDate, endDate, filter) => {
|
||||
console.log(filter);
|
||||
loading.value = true;
|
||||
const resp = await getCalendar(startDate, endDate, filter);
|
||||
if(resp === null) {
|
||||
|
||||
@@ -16,7 +16,6 @@ export default function useCompany() {
|
||||
if(companyStore.company === null) {
|
||||
loading.value = true;
|
||||
const companyId = auth.user.company;
|
||||
console.log(companyId)
|
||||
const resp = await getCompany();
|
||||
companyStore.company = resp;
|
||||
company.value = resp;
|
||||
|
||||
@@ -8,21 +8,6 @@ export default function useDirectionsRender() {
|
||||
const originCoords = ref(null);
|
||||
const destinationCoords = ref(null);
|
||||
|
||||
// const geocodeAddress = async (address) => {
|
||||
// try {
|
||||
// const response = await fetch(
|
||||
// `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(
|
||||
// address
|
||||
// )}&key=${mapKey}`
|
||||
// );
|
||||
// const data = await response.json();
|
||||
// const location = data.results[0].geometry.location;
|
||||
// return location;
|
||||
// } catch (error) {
|
||||
// return null;
|
||||
// }
|
||||
// };
|
||||
|
||||
const geocodeAddress = async (address) => {
|
||||
try {
|
||||
const geocoder = new google.maps.Geocoder();
|
||||
@@ -32,7 +17,7 @@ export default function useDirectionsRender() {
|
||||
const longitude = data.results[0].geometry.location.lng();
|
||||
return {lng: longitude, lat: latitude};
|
||||
} catch (error) {
|
||||
console.log('Error location', error);
|
||||
// console.log('Error location', error);
|
||||
return null;
|
||||
}
|
||||
};
|
||||
@@ -65,45 +50,14 @@ export default function useDirectionsRender() {
|
||||
return [];
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// console.log(error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
// const getDirections = async (originCoords, destinationCoords) => {
|
||||
// const originLatLng = `${originCoords.lat},${originCoords.lng}`;
|
||||
// const destinationLatLng = `${destinationCoords.lat},${destinationCoords.lng}`;
|
||||
// try {
|
||||
// let url = `https://maps.googleapis.com/maps/api/directions/json?origin=${originLatLng}&destination=${destinationLatLng}&mode=driving&key=${mapKey}`;
|
||||
// // let url = `https://maps.googleapis.com/maps/api/directions/json?origin=${originLatLng}&destination=${destinationLatLng}&mode=driving&key=${mapKey}`;
|
||||
// const response = await fetch(url);
|
||||
// const data = await response.json();
|
||||
// let polylines = [];
|
||||
// if (data.routes && data.routes.length > 0) {
|
||||
// const steps = data.routes[0].legs[0].steps;
|
||||
// steps.forEach(item => {
|
||||
// const points = decode(item.polyline.points);
|
||||
// points.forEach(poly => {
|
||||
// polylines.push({
|
||||
// lat: poly[0],
|
||||
// lng: poly[1]
|
||||
// })
|
||||
// })
|
||||
// });
|
||||
// console.log({polylines})
|
||||
// return polylines;
|
||||
// } else {
|
||||
// return [];
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.log(error);
|
||||
// return [];
|
||||
// }
|
||||
// };
|
||||
|
||||
return {
|
||||
originCoords,
|
||||
geocodeAddress,
|
||||
getDirections,
|
||||
// polylines
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,6 @@ export default function useDirectory() {
|
||||
if(resp !== null) {
|
||||
companies.value = resp.data;
|
||||
companiesTotal.value = resp.total;
|
||||
console.log(companiesTotal.value)
|
||||
} else {
|
||||
companies.value = [];
|
||||
companiesTotal.value = 0;
|
||||
|
||||
@@ -17,7 +17,6 @@ export default function useSearchLoads() {
|
||||
}
|
||||
try {
|
||||
const endpoint = `/v1/loads/find${filterStr}&$sort[createdAt]=-1`;
|
||||
// console.log(endpoint);
|
||||
const {data} = await api.get(endpoint);
|
||||
total.value = data.total;
|
||||
loads.value = data.data;
|
||||
|
||||
Reference in New Issue
Block a user