load tracking public
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
import { RouterLink, useRouter } from 'vue-router';
|
||||
import { getDateMonthDay } from '../helpers/date_formats';
|
||||
import { getStatusPublished } from '../helpers/status';
|
||||
import { getStatusLoad } from '../helpers/status';
|
||||
@@ -82,11 +82,15 @@
|
||||
}
|
||||
|
||||
const handleTracking = () => {
|
||||
let code = props.load.shipment_code;
|
||||
router.push({
|
||||
name: 'tracking-load',
|
||||
params: {code}
|
||||
});
|
||||
let code = props.load._id;
|
||||
window.open('/publico/tracking/' + code, '_blank');
|
||||
// router.push({
|
||||
// name: 'tracking-load',
|
||||
// params: {code},
|
||||
// }
|
||||
// ).then(() => {
|
||||
// window.open('/publico/tracking/' + code, '_blank');
|
||||
// })
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -136,7 +140,16 @@
|
||||
<div class="col-lg-4 col-sm-12">
|
||||
<p><span>Segmento: </span> {{ load.categories?.map((e) => e.name).join(', ') }}</p>
|
||||
<p><span>Código de carga: </span> {{ load.shipment_code }}
|
||||
<span v-if="load.load_status !== 'Draft' && !readOnly" class="tracking-icon" @click="handleTracking">
|
||||
<!-- <RouterLink
|
||||
v-if="load.load_status !== 'Draft' && !readOnly"
|
||||
class="tracking-icon"
|
||||
:to="{name: 'tracking-load', params: load.shipment_code}"
|
||||
target="_blank">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-geo-alt-fill" viewBox="0 0 16 16">
|
||||
<path d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"></path>
|
||||
</svg>
|
||||
</RouterLink> -->
|
||||
<span v-if="load.load_status !== 'Draft' && !readOnly" class="tracking-icon" @click="handleTracking" data-target="_blank">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" class="bi bi-geo-alt-fill" viewBox="0 0 16 16">
|
||||
<path d="M8 16s6-5.686 6-10A6 6 0 0 0 2 6c0 4.314 6 10 6 10zm0-7a3 3 0 1 1 0-6 3 3 0 0 1 0 6z"></path>
|
||||
</svg>
|
||||
|
||||
Reference in New Issue
Block a user