fixes: directions api change
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
import { useAuthStore } from '../stores/auth';
|
||||
import { useCompanyStore } from '../stores/company';
|
||||
import { useVehiclesStore } from '../stores/vehicles';
|
||||
import { saveProposal } from '../services/vehicles'
|
||||
// import { saveProposal } from '../services/vehicles'
|
||||
import Swal from 'sweetalert2';
|
||||
|
||||
const mapKey = import.meta.env.VITE_MAP_KEY;
|
||||
@@ -57,7 +57,6 @@
|
||||
});
|
||||
|
||||
const initData = async() => {
|
||||
console.log('load: ', props.load);
|
||||
isLoading.value = true;
|
||||
let filterQuery = [];
|
||||
filterQuery.company = "company="+ authStore.user.company
|
||||
@@ -66,7 +65,7 @@
|
||||
destinationCoords.value = {lat: Number.parseFloat(props.load.destination.lat), lng: Number.parseFloat(props.load.destination.lng)};;
|
||||
polylines.value = await getDirections(originCoords.value, destinationCoords.value);
|
||||
isLoading.value = false;
|
||||
console.log(props.proposal);
|
||||
// console.log(props.proposal);
|
||||
if(props.proposal) {
|
||||
form.vehicle = props.proposal.vehicle._id;
|
||||
form.comments = props.proposal.comment;
|
||||
@@ -121,7 +120,7 @@
|
||||
}
|
||||
const index = vehiclesStore.vehicles.findIndex((prop) => prop._id === form.vehicle);
|
||||
const vehicleSelected = vehiclesStore.vehicles[index];
|
||||
console.log(vehicleSelected);
|
||||
// console.log(vehicleSelected);
|
||||
const localData = {
|
||||
vehicle: vehicleSelected,
|
||||
load: props.load,
|
||||
|
||||
Reference in New Issue
Block a user