add: finish translation feature
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
import useDirectionsRender from '../composables/useDirectionRender';
|
||||
import Cardload from './CardLoad.vue';
|
||||
import { useLoadsStore } from '../stores/loads';
|
||||
import { useNotificationsStore } from '../stores/notifications';
|
||||
import { useNotificationsStore } from '../stores/notifications';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
const mapKey = import.meta.env.VITE_MAP_KEY;
|
||||
|
||||
@@ -22,6 +23,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
const isLoadActive = ref(false);
|
||||
|
||||
const { getDirections, geocodeAddress } = useDirectionsRender()
|
||||
const { t } = useI18n();
|
||||
|
||||
const props = defineProps({
|
||||
proposal: {
|
||||
@@ -59,7 +61,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
if(addressOrigin.lat && addressOrigin.lng) {
|
||||
originCoords.value = {lat: Number.parseFloat(addressOrigin.lat), lng: Number.parseFloat(addressOrigin.lng)};
|
||||
} else {
|
||||
console.log('No hay coords origin')
|
||||
// console.log('No hay coords origin')
|
||||
let startLocation = addressOrigin.street_address1 + ', ' + addressOrigin.city + ', ' + addressOrigin.state + ', ' + addressOrigin.country + ', ' +addressOrigin.zipcode;
|
||||
originCoords.value = await geocodeAddress(startLocation);
|
||||
}
|
||||
@@ -67,7 +69,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
if(addressDestination.lat && addressDestination.lng) {
|
||||
destinationCoords.value = {lat: Number.parseFloat(addressDestination.lat), lng: Number.parseFloat(addressDestination.lng)};
|
||||
} else {
|
||||
console.log('No hay coords destinatiom')
|
||||
// console.log('No hay coords destinatiom')
|
||||
let endLocation = addressDestination.street_address1 + ', ' + addressDestination.city + ', ' + addressDestination.state + ', ' + addressDestination.country + ', ' +addressDestination.zipcode;
|
||||
destinationCoords.value = await geocodeAddress(endLocation);
|
||||
}
|
||||
@@ -100,7 +102,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
}
|
||||
} catch (error) {
|
||||
notyStore.$patch({
|
||||
text : 'No se pudo cargar mapa',
|
||||
text : t('errors.map'),
|
||||
show : true,
|
||||
error: true
|
||||
});
|
||||
@@ -128,7 +130,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2 class="title mt-2 mb-3">Detalles de carga</h2>
|
||||
<h2 class="title mt-2 mb-3">{{ t('loads.loadDetails') }}</h2>
|
||||
<button
|
||||
id="btnCloseloadDetailModal"
|
||||
type="button"
|
||||
@@ -186,7 +188,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
/>
|
||||
</GoogleMap>
|
||||
</div>
|
||||
<CardEmpty v-else text="No hay información disponible"/>
|
||||
<CardEmpty v-else :text="t('loads.noInfo')"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -195,7 +197,7 @@ import { useNotificationsStore } from '../stores/notifications';
|
||||
class="btn btn-dark"
|
||||
data-dismiss="modal"
|
||||
@click="$emit('reset-proposal')"
|
||||
>Cerrar</button>
|
||||
>{{ t('buttons.close') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user