fix: sidebar & navbar
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log(props.load)
|
||||||
|
|
||||||
defineEmits(['set-load'])
|
defineEmits(['set-load'])
|
||||||
|
|
||||||
|
|
||||||
@@ -93,6 +95,15 @@
|
|||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const makeCall = (phoneNumber) => {
|
||||||
|
// console.log(phoneNumber)
|
||||||
|
// // Formatear el número de teléfono eliminando espacios y caracteres especiales
|
||||||
|
// // const formattedPhoneNumber = phoneNumber.value.replace(/[^0-9]/g, '');
|
||||||
|
|
||||||
|
// // Abrir la aplicación de llamadas telefónicas con el número especificado
|
||||||
|
// window.open(`tel:${phoneNumber}`, '_self');
|
||||||
|
// };
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -198,12 +209,12 @@
|
|||||||
data-target="#makeProposalModal"
|
data-target="#makeProposalModal"
|
||||||
@click="event => $emit('set-load')"
|
@click="event => $emit('set-load')"
|
||||||
>Hacer oferta</button>
|
>Hacer oferta</button>
|
||||||
<button
|
<!-- <button
|
||||||
class="btn-primary-sm"
|
class="btn-primary-sm"
|
||||||
@click=""
|
@click="makeCall('+529889662382')"
|
||||||
data-toggle="modal"
|
data-toggle="modal"
|
||||||
data-target="#proposalsModal"
|
data-target="#proposalsModal"
|
||||||
><i class="fa-solid fa-phone clear-sm"></i> Llamar ahora</button>
|
><i class="fa-solid fa-phone clear-sm"></i> Llamar ahora</button> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
|||||||
const vehicleLastLocation = ref(null);
|
const vehicleLastLocation = ref(null);
|
||||||
const isLoadActive = ref(false);
|
const isLoadActive = ref(false);
|
||||||
|
|
||||||
const { getDirections } = useDirectionsRender()
|
const { getDirections, geocodeAddress } = useDirectionsRender()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
proposal: {
|
proposal: {
|
||||||
@@ -46,20 +46,31 @@ import { useNotificationsStore } from '../stores/notifications';
|
|||||||
});
|
});
|
||||||
|
|
||||||
const initData = async() => {
|
const initData = async() => {
|
||||||
console.log(props.proposal)
|
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
const code = props.proposal.load.shipment_code;
|
const code = props.proposal.load.shipment_code;
|
||||||
const filter = "?shipment_code[$in]=" + code;
|
const filter = "?shipment_code[$in]=" + code;
|
||||||
const resp = await loadStore.getLoad(filter);
|
const resp = await loadStore.getLoad(filter);
|
||||||
console.log(resp);
|
|
||||||
if(resp.total > 0) {
|
if(resp.total > 0) {
|
||||||
load.value = resp.data[0];
|
load.value = resp.data[0];
|
||||||
try {
|
try {
|
||||||
const addressOrigin = load.value?.origin;
|
const addressOrigin = load.value?.origin;
|
||||||
const addressDestination = load.value?.destination;
|
const addressDestination = load.value?.destination;
|
||||||
if(addressOrigin && addressDestination) {
|
if(addressOrigin && addressDestination) {
|
||||||
|
if(addressOrigin.lat && addressOrigin.lng) {
|
||||||
originCoords.value = {lat: Number.parseFloat(addressOrigin.lat), lng: Number.parseFloat(addressOrigin.lng)};
|
originCoords.value = {lat: Number.parseFloat(addressOrigin.lat), lng: Number.parseFloat(addressOrigin.lng)};
|
||||||
|
} else {
|
||||||
|
console.log('No hay coords origin')
|
||||||
|
let startLocation = addressOrigin.street_address1 + ', ' + addressOrigin.city + ', ' + addressOrigin.state + ', ' + addressOrigin.country + ', ' +addressOrigin.zipcode;
|
||||||
|
originCoords.value = await geocodeAddress(startLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(addressDestination.lat && addressDestination.lng) {
|
||||||
destinationCoords.value = {lat: Number.parseFloat(addressDestination.lat), lng: Number.parseFloat(addressDestination.lng)};
|
destinationCoords.value = {lat: Number.parseFloat(addressDestination.lat), lng: Number.parseFloat(addressDestination.lng)};
|
||||||
|
} else {
|
||||||
|
console.log('No hay coords destinatiom')
|
||||||
|
let endLocation = addressDestination.street_address1 + ', ' + addressDestination.city + ', ' + addressDestination.state + ', ' + addressDestination.country + ', ' +addressDestination.zipcode;
|
||||||
|
destinationCoords.value = await geocodeAddress(endLocation);
|
||||||
|
}
|
||||||
|
|
||||||
polylines.value = await getDirections(originCoords.value, destinationCoords.value);
|
polylines.value = await getDirections(originCoords.value, destinationCoords.value);
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
|||||||
|
|
||||||
.custom-navbar {
|
.custom-navbar {
|
||||||
display: block;
|
display: block;
|
||||||
width: calc(100vw - 220px);
|
width: calc(100vw - 236px);
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
padding: 16px 0px;
|
padding: 16px 0px;
|
||||||
}
|
}
|
||||||
@@ -114,6 +114,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.btn-menu {
|
.btn-menu {
|
||||||
|
margin-left: 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,14 @@
|
|||||||
.main-panel {
|
.main-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 220px;
|
margin-left: 220px;
|
||||||
width: calc(100wv - 220px) !important;
|
// width: calc(100wv - 220px) !important;
|
||||||
|
width: calc(100% - 220px); //new
|
||||||
}
|
}
|
||||||
|
|
||||||
.view {
|
.view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 24px 50px;
|
padding: 24px 50px;
|
||||||
|
background-color: #f6f3f3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1400px) {
|
@media (max-width: 1400px) {
|
||||||
@@ -52,7 +54,8 @@
|
|||||||
.main-panel {
|
.main-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
width: 100wv !important;
|
// width: 100wv !important;
|
||||||
|
width: 100%; //new
|
||||||
}
|
}
|
||||||
.view {
|
.view {
|
||||||
margin: 24px 0px;
|
margin: 24px 0px;
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ const router = createRouter({
|
|||||||
component: () => import('../views/TermsAndConditionsView.vue')
|
component: () => import('../views/TermsAndConditionsView.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'eviso-de-privacidad',
|
path: 'aviso-de-privacidad',
|
||||||
name: 'notice-privacy',
|
name: 'notice-privacy',
|
||||||
component: () => import('../views/NoticeOfPrivacyView.vue')
|
component: () => import('../views/NoticeOfPrivacyView.vue')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export const deleteUser = async(user_id) => {
|
|||||||
|
|
||||||
export const getBudgets = async(filter) => {
|
export const getBudgets = async(filter) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/budgets/${filter}`;
|
const endpoint = `v1/budgets/${filter}`;
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Reference in New Issue
Block a user