add: fixes user card & removed logs
This commit is contained in:
@@ -15,9 +15,7 @@
|
|||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
<script type="module" src="/src/main.js"></script>
|
<script type="module" src="/src/main.js"></script>
|
||||||
</body>
|
</body>
|
||||||
<!-- <script src="https://apis.google.com/js/api.js" type="text/javascript"></script> -->
|
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBm3n6I_uMzKkMS0eVXnLdoa1S_hPcsx0A"></script>
|
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBm3n6I_uMzKkMS0eVXnLdoa1S_hPcsx0A"></script>
|
||||||
<!-- <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> -->
|
|
||||||
<script src="https://kit.fontawesome.com/3675730ed5.js" crossorigin="anonymous"></script>
|
<script src="https://kit.fontawesome.com/3675730ed5.js" crossorigin="anonymous"></script>
|
||||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
|
||||||
|
|||||||
@@ -68,7 +68,6 @@
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.attachment {
|
.attachment {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* border: 1px #e9e9e9 solid; */
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
@@ -102,5 +101,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -83,7 +83,6 @@
|
|||||||
<p><span>{{ t('calculator.totalBeforeIva') }}:</span> {{ formatCurrency(budget.total_before_tax) }}</p>
|
<p><span>{{ t('calculator.totalBeforeIva') }}:</span> {{ formatCurrency(budget.total_before_tax) }}</p>
|
||||||
<p><span>{{ t('calculator.totalUtityByKm') }}:</span> {{ formatCurrency( budget.total_utility_per_km) }}</p>
|
<p><span>{{ t('calculator.totalUtityByKm') }}:</span> {{ formatCurrency( budget.total_utility_per_km) }}</p>
|
||||||
<p><span>{{ t('calculator.totalUtity') }}:</span> {{ formatCurrency( budget.total_profit ) }}</p>
|
<p><span>{{ t('calculator.totalUtity') }}:</span> {{ formatCurrency( budget.total_profit ) }}</p>
|
||||||
<!-- <p>{{ $t('CALCULATOR.PROFIT_PERCENTAGE') }}: {{budget.profit_percentage}}%</p> -->
|
|
||||||
<p><span>{{ t('calculator.percentUtility') }}:</span> {{ totalPercentage }}</p>
|
<p><span>{{ t('calculator.percentUtility') }}:</span> {{ totalPercentage }}</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,12 +19,9 @@
|
|||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col-lg-6 col-sm-12">
|
<div class="col-lg-6 col-sm-12">
|
||||||
<!-- <p><span>RFC:</span> {{ company.rfc }}</p> -->
|
|
||||||
<!-- <p><span>Tipo de empresa:</span> {{ company.company_type || 'No definido' }}</p> -->
|
|
||||||
<p><span>{{ t('labels.codeId') }}:</span> {{ company.company_code }}</p>
|
<p><span>{{ t('labels.codeId') }}:</span> {{ company.company_code }}</p>
|
||||||
<p><span>{{ t('labels.dateMembership') }}: </span>{{getDateMonthDay(company.createdAt)}}</p>
|
<p><span>{{ t('labels.dateMembership') }}: </span>{{getDateMonthDay(company.createdAt)}}</p>
|
||||||
<p><span>{{ t('company.segment') }}:</span> {{ company._categories }}</p>
|
<p><span>{{ t('company.segment') }}:</span> {{ company._categories }}</p>
|
||||||
<!-- <p><span>Afiliación: </span> {{company.membership}}</p> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-sm-12">
|
<div class="col-lg-6 col-sm-12">
|
||||||
<p><span>{{ t('labels.locationLoadState') }}: </span>{{company._company_state}}</p>
|
<p><span>{{ t('labels.locationLoadState') }}: </span>{{company._company_state}}</p>
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ import { ref } from 'vue';
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
/* background-color: rgb(184, 236, 234); */
|
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
filter: drop-shadow(0px 4px 4px rgba(0, 255, 255,0.3));
|
filter: drop-shadow(0px 4px 4px rgba(0, 255, 255,0.3));
|
||||||
border-radius: 13px;
|
border-radius: 13px;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
if(result.isConfirmed) {
|
if(result.isConfirmed) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: t('messages.loading'),
|
title: t('messages.loading'),
|
||||||
html: t('loads.loadingDel') + '...',// add html attribute if you want or remove
|
html: t('loads.loadingDel') + '...',
|
||||||
allowOutsideClick: false,
|
allowOutsideClick: false,
|
||||||
didOpen: () => {
|
didOpen: () => {
|
||||||
Swal.showLoading()
|
Swal.showLoading()
|
||||||
|
|||||||
@@ -222,5 +222,4 @@
|
|||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log(props.user)
|
||||||
|
|
||||||
defineEmits(['set-user'])
|
defineEmits(['set-user'])
|
||||||
|
|
||||||
const companyStore = useCompanyStore();
|
const companyStore = useCompanyStore();
|
||||||
@@ -80,22 +82,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-sm-12" v-if="readonly">
|
<div class="col-lg-6 col-sm-12" v-if="readonly">
|
||||||
<p><span>{{ t('global.segments') }}: </span>{{user.categories?.map((e) => e.name).join(', ')}}</p>
|
<p><span>{{ t('global.segments') }}: </span>{{user.categories?.map((e) => e.name).join(', ')}}</p>
|
||||||
<p><span>{{ t('labels.locationLoadCity') }}: </span>{{user._user_city}}</p>
|
|
||||||
<p><span>{{ t('labels.locationLoadState') }}: </span>{{user._user_state}}</p>
|
<p><span>{{ t('labels.locationLoadState') }}: </span>{{user._user_state}}</p>
|
||||||
<p v-if="user.company.truck_type"><span>{{ t('labels.truckUsed') }}: </span> {{user._truck_type}}</p>
|
<p><span>{{ t('labels.locationLoadCity') }}: </span>{{user._user_city}}</p>
|
||||||
<p ><span>{{ t('labels.userInfo') }}: </span> {{user.user_description}}</p>
|
<p v-if="user._truck_type"><span>{{ t('labels.truckUsed') }}: </span> {{user._truck_type}}</p>
|
||||||
<p v-if="user.createAt"><span>{{ t('labels.memberSince') }}: </span>{{getDateOnly(user.createAt)}}</p>
|
<p v-if="user.createAt"><span>{{ t('labels.memberSince') }}: </span>{{getDateOnly(user.createAt)}}</p>
|
||||||
<p v-if="readonly && user.company.membership"><span>Tipo de afiliación: </span> {{user.company.membership}}</p>
|
<p v-if="user.user_description"><span>{{ t('labels.userInfo') }}: </span> {{user.user_description}}</p>
|
||||||
|
<!-- <p v-if="readonly && user.company.membership"><span>Tipo de afiliación: </span> {{user.company.membership}}</p> -->
|
||||||
<!-- <p><span>{{ t('labels.userRole') }}: </span>{{user.job_role}}</p> -->
|
<!-- <p><span>{{ t('labels.userRole') }}: </span>{{user.job_role}}</p> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 col-sm-12" v-else>
|
<div class="col-lg-6 col-sm-12" v-else>
|
||||||
<p><span>{{ t('global.segments') }}: </span>{{user.categories?.map((e) => e.name).join(', ')}}</p>
|
<p><span>{{ t('global.segments') }}: </span>{{user.categories?.map((e) => e.name).join(', ')}}</p>
|
||||||
<p><span>{{ t('labels.locationLoadCity') }}: </span>{{user.user_city?.join(', ')}}</p>
|
|
||||||
<p><span>{{ t('labels.locationLoadState') }}: </span>{{user.user_state?.join(', ')}}</p>
|
<p><span>{{ t('labels.locationLoadState') }}: </span>{{user.user_state?.join(', ')}}</p>
|
||||||
|
<p><span>{{ t('labels.locationLoadCity') }}: </span>{{user.user_city?.join(', ')}}</p>
|
||||||
<p v-if="user.truck_type"><span>{{ t('labels.truckUsed') }}: </span> {{user.truck_type?.join(', ')}}</p>
|
<p v-if="user.truck_type"><span>{{ t('labels.truckUsed') }}: </span> {{user.truck_type?.join(', ')}}</p>
|
||||||
<p><span>{{ t('labels.userInfo') }}: </span> {{user.user_description}}</p>
|
|
||||||
<p v-if="user.createAt"><span>{{ t('labels.memberSince') }}: </span>{{getDateOnly(user.createAt)}}</p>
|
<p v-if="user.createAt"><span>{{ t('labels.memberSince') }}: </span>{{getDateOnly(user.createAt)}}</p>
|
||||||
<p v-if="readonly && user.company.membership" ><span>Tipo de afiliación: </span> {{user.company.membership}}</p>
|
<p v-if="user.user_description"><span>{{ t('labels.userInfo') }}: </span> {{user.user_description}}</p>
|
||||||
|
<!-- <p v-if="readonly && user.company.membership" ><span>Tipo de afiliación: </span> {{user.company.membership}}</p> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-row" v-if="readonly === false && (authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager')">
|
<div class="btn-row" v-if="readonly === false && (authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager')">
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
if(result.isConfirmed) {
|
if(result.isConfirmed) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: t('messages.loading'),
|
title: t('messages.loading'),
|
||||||
html: t('vehicles.loadingDel') + '...',// add html attribute if you want or remove
|
html: t('vehicles.loadingDel') + '...',
|
||||||
allowOutsideClick: false,
|
allowOutsideClick: false,
|
||||||
didOpen: () => {
|
didOpen: () => {
|
||||||
Swal.showLoading()
|
Swal.showLoading()
|
||||||
|
|||||||
@@ -32,7 +32,6 @@
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log(props.budget);
|
|
||||||
if(props.budget) {
|
if(props.budget) {
|
||||||
budgetForm.budget_id = props.budget._id;
|
budgetForm.budget_id = props.budget._id;
|
||||||
budgetForm.client = props.budget.client;
|
budgetForm.client = props.budget.client;
|
||||||
@@ -116,10 +115,6 @@
|
|||||||
client: null
|
client: null
|
||||||
})
|
})
|
||||||
|
|
||||||
// const total = computed(() => {
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
const totalTravel = computed(() => {
|
const totalTravel = computed(() => {
|
||||||
budgetForm.total_travel = budgetForm.warehouse_distance * 1 + budgetForm.delivery_distance * 1 + budgetForm.pickup_distance * 1;
|
budgetForm.total_travel = budgetForm.warehouse_distance * 1 + budgetForm.delivery_distance * 1 + budgetForm.pickup_distance * 1;
|
||||||
budgetForm.total_travel = isNaN(budgetForm.total_travel) ? 0.0 : budgetForm.total_travel;
|
budgetForm.total_travel = isNaN(budgetForm.total_travel) ? 0.0 : budgetForm.total_travel;
|
||||||
@@ -257,7 +252,6 @@
|
|||||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<!-- <h2 class="title mt-2 mb-3">Calculadora</h2> -->
|
|
||||||
<div></div>
|
<div></div>
|
||||||
<button
|
<button
|
||||||
id="btnClosebudgetModal"
|
id="btnClosebudgetModal"
|
||||||
@@ -575,7 +569,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.calculator-card__subtitle {
|
.calculator-card__subtitle {
|
||||||
// background-color: #50b1e5;
|
|
||||||
background-color: #FBBA33;
|
background-color: #FBBA33;
|
||||||
padding: 8px 20px;
|
padding: 8px 20px;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
|
|||||||
@@ -27,7 +27,6 @@
|
|||||||
userForm.last_name = props.user.last_name;
|
userForm.last_name = props.user.last_name;
|
||||||
userForm.email = props.user.email;
|
userForm.email = props.user.email;
|
||||||
userForm.phone = props.user.phone;
|
userForm.phone = props.user.phone;
|
||||||
// userForm.phone2 = props.user.phone2;
|
|
||||||
userForm.job_role = props.user.job_role;
|
userForm.job_role = props.user.job_role;
|
||||||
userForm.categories = props.user.categories;
|
userForm.categories = props.user.categories;
|
||||||
userForm.user_city = props.user.user_city?.map(m =>{
|
userForm.user_city = props.user.user_city?.map(m =>{
|
||||||
@@ -92,7 +91,6 @@
|
|||||||
last_name: userForm.last_name,
|
last_name: userForm.last_name,
|
||||||
email: userForm.email,
|
email: userForm.email,
|
||||||
phone: userForm.phone,
|
phone: userForm.phone,
|
||||||
// phone2: userForm.phone2,
|
|
||||||
job_role: userForm.job_role,
|
job_role: userForm.job_role,
|
||||||
permissions: authStore.user.permissions,
|
permissions: authStore.user.permissions,
|
||||||
company: authStore.user.company,
|
company: authStore.user.company,
|
||||||
|
|||||||
@@ -70,8 +70,6 @@
|
|||||||
padding: 20px 20px;
|
padding: 20px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* flex-wrap: nowrap; */
|
|
||||||
/* overflow: hidden; */
|
|
||||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -83,9 +83,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|
||||||
//Continua en la lina 568 web_main
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,10 +8,6 @@
|
|||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const user = reactive({
|
const user = reactive({
|
||||||
// name: '',
|
|
||||||
// lastName: '',
|
|
||||||
// phone1: '',
|
|
||||||
// phone2: '',
|
|
||||||
name: auth.user?.first_name,
|
name: auth.user?.first_name,
|
||||||
lastName: auth.user?.last_name,
|
lastName: auth.user?.last_name,
|
||||||
phone1: auth.user?.phone,
|
phone1: auth.user?.phone,
|
||||||
|
|||||||
@@ -144,12 +144,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* .box-back-btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 16px 0px;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.warning-info {
|
.warning-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
@@ -165,7 +159,6 @@
|
|||||||
.warning {
|
.warning {
|
||||||
font-size: 33px;
|
font-size: 33px;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
/* color: white; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-block {
|
.btn-block {
|
||||||
|
|||||||
@@ -210,12 +210,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* .box-back-btn {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
padding: 16px 0px;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.warning-info {
|
.warning-info {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
|
|||||||
@@ -92,9 +92,6 @@
|
|||||||
formLoad.segment = loadStore.currentLoad.categories?.length <= 0 ? [] : loadStore.currentLoad.categories.map(m =>{
|
formLoad.segment = loadStore.currentLoad.categories?.length <= 0 ? [] : loadStore.currentLoad.categories.map(m =>{
|
||||||
return m;
|
return m;
|
||||||
});
|
});
|
||||||
// formLoad.segment = loadStore.currentLoad.categories?.length <= 0 ? null : loadStore.currentLoad.categories.map(m =>{
|
|
||||||
// return m;
|
|
||||||
// });
|
|
||||||
startLocation.value = loadStore.currentLoad.origin_formatted_address;
|
startLocation.value = loadStore.currentLoad.origin_formatted_address;
|
||||||
endLocation.value = loadStore.currentLoad.destination_formatted_address;
|
endLocation.value = loadStore.currentLoad.destination_formatted_address;
|
||||||
formLoad.terms = loadStore.currentLoad.product;
|
formLoad.terms = loadStore.currentLoad.product;
|
||||||
@@ -165,7 +162,6 @@
|
|||||||
|
|
||||||
const getLocations = async() => {
|
const getLocations = async() => {
|
||||||
loadingLocations.value = true;
|
loadingLocations.value = true;
|
||||||
// filterQueryVehicles.value.company = "company="+ localStorage.getItem('id');
|
|
||||||
await companyStore.getLocationsLoads()
|
await companyStore.getLocationsLoads()
|
||||||
loadingLocations.value = false;
|
loadingLocations.value = false;
|
||||||
}
|
}
|
||||||
@@ -207,7 +203,6 @@
|
|||||||
city: '',
|
city: '',
|
||||||
country: '',
|
country: '',
|
||||||
postalCode: '',
|
postalCode: '',
|
||||||
// ref: '',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const destination = reactive({
|
const destination = reactive({
|
||||||
@@ -217,7 +212,6 @@
|
|||||||
city: '',
|
city: '',
|
||||||
country: '',
|
country: '',
|
||||||
postalCode: '',
|
postalCode: '',
|
||||||
// ref: '',
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const setLoadData = () => {
|
const setLoadData = () => {
|
||||||
|
|||||||
@@ -4,19 +4,16 @@ import CustomPopup from './CustomPopup.vue';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
// import { useAuthStore } from '../stores/auth';
|
|
||||||
|
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
|
|
||||||
const openPopup = ref(false);
|
const openPopup = ref(false);
|
||||||
const options = ref([]);
|
const options = ref([]);
|
||||||
const lang = ref(null);
|
const lang = ref(null);
|
||||||
// const auth = useAuthStore();
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const langInit = localStorage.getItem('lang') ?? locale.value;
|
const langInit = localStorage.getItem('lang') ?? locale.value;
|
||||||
locale.value = langInit
|
locale.value = langInit
|
||||||
// auth.lang = langInit;
|
|
||||||
lang.value = {value: langInit, label: langInit == 'en' ? t('global.en') : t('global.es')}
|
lang.value = {value: langInit, label: langInit == 'en' ? t('global.en') : t('global.es')}
|
||||||
options.value = [
|
options.value = [
|
||||||
{value: 'es',label: t('global.es')},
|
{value: 'es',label: t('global.es')},
|
||||||
@@ -107,7 +104,6 @@ const closePopup = () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* width: 65%; */
|
|
||||||
}
|
}
|
||||||
.box-register{
|
.box-register{
|
||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
@@ -131,7 +127,6 @@ const closePopup = () => {
|
|||||||
|
|
||||||
.app-btn{
|
.app-btn{
|
||||||
background-color: #FBBA33;
|
background-color: #FBBA33;
|
||||||
/* background-color: #000; */
|
|
||||||
border: none;
|
border: none;
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@
|
|||||||
const initData = async() => {
|
const initData = async() => {
|
||||||
isLoading.value = true;
|
isLoading.value = true;
|
||||||
const code = props.proposal.load.shipment_code;
|
const code = props.proposal.load.shipment_code;
|
||||||
// console.log(props.proposal)
|
|
||||||
const filter = "?shipment_code[$in]=" + code;
|
const filter = "?shipment_code[$in]=" + code;
|
||||||
const resp = await loadStore.getLoad(filter);
|
const resp = await loadStore.getLoad(filter);
|
||||||
if(resp.total > 0) {
|
if(resp.total > 0) {
|
||||||
@@ -61,7 +60,6 @@
|
|||||||
if(addressOrigin.lat && addressOrigin.lng) {
|
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 {
|
} else {
|
||||||
// console.log('No hay coords origin')
|
|
||||||
let startLocation = addressOrigin.street_address1 + ', ' + addressOrigin.city + ', ' + addressOrigin.state + ', ' + addressOrigin.country + ', ' +addressOrigin.zipcode;
|
let startLocation = addressOrigin.street_address1 + ', ' + addressOrigin.city + ', ' + addressOrigin.state + ', ' + addressOrigin.country + ', ' +addressOrigin.zipcode;
|
||||||
originCoords.value = await geocodeAddress(startLocation);
|
originCoords.value = await geocodeAddress(startLocation);
|
||||||
}
|
}
|
||||||
@@ -69,7 +67,6 @@
|
|||||||
if(addressDestination.lat && addressDestination.lng) {
|
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 {
|
} else {
|
||||||
// console.log('No hay coords destinatiom')
|
|
||||||
let endLocation = addressDestination.street_address1 + ', ' + addressDestination.city + ', ' + addressDestination.state + ', ' + addressDestination.country + ', ' +addressDestination.zipcode;
|
let endLocation = addressDestination.street_address1 + ', ' + addressDestination.city + ', ' + addressDestination.state + ', ' + addressDestination.country + ', ' +addressDestination.zipcode;
|
||||||
destinationCoords.value = await geocodeAddress(endLocation);
|
destinationCoords.value = await geocodeAddress(endLocation);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,10 @@
|
|||||||
const originCoords = ref(null);
|
const originCoords = ref(null);
|
||||||
const destinationCoords = ref(null);
|
const destinationCoords = ref(null);
|
||||||
const polyline = ref([]);
|
const polyline = ref([]);
|
||||||
// const startLocation = ref({ lat: 37.7749, lng: -122.4194 }); // San Francisco
|
|
||||||
// const endLocation = ref({ lat: 34.0522, lng: -118.2437 }); // Los Angeles
|
|
||||||
const mapKey = import.meta.env.VITE_MAP_KEY;
|
const mapKey = import.meta.env.VITE_MAP_KEY;
|
||||||
|
|
||||||
onMounted(async() => {
|
onMounted(async() => {
|
||||||
window.addEventListener('resize', handleResize);
|
window.addEventListener('resize', handleResize);
|
||||||
// mapRef.value = this.$refs.myMap;
|
|
||||||
if(window.innerWidth <= 1024) {
|
if(window.innerWidth <= 1024) {
|
||||||
zoom.value = 4;
|
zoom.value = 4;
|
||||||
heightMap.value = 420;
|
heightMap.value = 420;
|
||||||
@@ -22,9 +19,6 @@
|
|||||||
|
|
||||||
originCoords.value = await geocodeAddress('C. 40 370, San Román, 97540 Izamal, Yuc.');
|
originCoords.value = await geocodeAddress('C. 40 370, San Román, 97540 Izamal, Yuc.');
|
||||||
destinationCoords.value = await geocodeAddress('Izamal-Valladolid, 97557 Sudzal, Yuc.');
|
destinationCoords.value = await geocodeAddress('Izamal-Valladolid, 97557 Sudzal, Yuc.');
|
||||||
|
|
||||||
// Trazar la ruta entre el origen y el destino
|
|
||||||
// await getDirections();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -55,7 +49,6 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getDirections = async () => {
|
const getDirections = async () => {
|
||||||
// const apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs';
|
|
||||||
const originLatLng = `${originCoords.value.lat},${originCoords.value.lng}`;
|
const originLatLng = `${originCoords.value.lat},${originCoords.value.lng}`;
|
||||||
const destinationLatLng = `${destinationCoords.value.lat},${destinationCoords.value.lng}`;
|
const destinationLatLng = `${destinationCoords.value.lat},${destinationCoords.value.lng}`;
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
const deleteNoty = async() => {
|
const deleteNoty = async() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await deleteNotification(props.noty._id);
|
const resp = await deleteNotification(props.noty._id);
|
||||||
console.log(resp);
|
|
||||||
if(resp.msg === 'Done') {
|
if(resp.msg === 'Done') {
|
||||||
notyStore.removeNoty(props.noty._id);
|
notyStore.removeNoty(props.noty._id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
noty.toggleNotifications()
|
noty.toggleNotifications()
|
||||||
noty.newNoty = false;
|
noty.newNoty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -69,15 +68,12 @@
|
|||||||
padding: 20px 16px;
|
padding: 20px 16px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* flex-wrap: nowrap; */
|
|
||||||
/* overflow: hidden; */
|
|
||||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
max-height: 500px;
|
max-height: 500px;
|
||||||
/* padding: 20px 20px; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-prefs {
|
.section-prefs {
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ import { onMounted, ref } from 'vue';
|
|||||||
})
|
})
|
||||||
|
|
||||||
const setPage = (p) => {
|
const setPage = (p) => {
|
||||||
console.log('Page:', p);
|
|
||||||
currentPage.value = p
|
currentPage.value = p
|
||||||
const skip = (p - 1) * props.limit;
|
const skip = (p - 1) * props.limit;
|
||||||
emits('get-elements', {skip: skip, page: p});
|
emits('get-elements', {skip: skip, page: p});
|
||||||
|
|||||||
@@ -102,8 +102,6 @@
|
|||||||
padding: 20px 32px;
|
padding: 20px 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* flex-wrap: nowrap; */
|
|
||||||
/* overflow: hidden; */
|
|
||||||
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,34 +114,6 @@
|
|||||||
class="nav-link" :to="{name: 'calculator'}">{{ t('global.calculator') }}</RouterLink>
|
class="nav-link" :to="{name: 'calculator'}">{{ t('global.calculator') }}</RouterLink>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<!-- <li
|
|
||||||
v-if="auth.user?.permissions === 'role_carrier'"
|
|
||||||
:class="[route.name === 'carriers' ? 'bg-nav-active' : '']">
|
|
||||||
<div>
|
|
||||||
<i class="fa-solid fa-truck" :class="[route.name === 'carriers' ? 'router-link-active' : '']"></i>
|
|
||||||
<RouterLink
|
|
||||||
active-class="router-link-active"
|
|
||||||
class="nav-link" :to="{name: 'carriers'}">Transportistas</RouterLink>
|
|
||||||
</div>
|
|
||||||
</li> -->
|
|
||||||
<!-- <li
|
|
||||||
v-if="auth.user?.permissions === 'role_shipper'"
|
|
||||||
:class="[route.name === 'carriers' ? 'bg-nav-active' : '']">
|
|
||||||
<div>
|
|
||||||
<i class="fa-solid fa-truck" :class="[route.name === 'carriers' ? 'router-link-active' : '']"></i>
|
|
||||||
<RouterLink
|
|
||||||
active-class="router-link-active"
|
|
||||||
class="nav-link" :to="{name: 'carriers'}">Transportistas</RouterLink>
|
|
||||||
</div>
|
|
||||||
</li> -->
|
|
||||||
<!-- <li :class="[route.name === 'reports' ? 'bg-nav-active' : '']">
|
|
||||||
<div>
|
|
||||||
<i class="fa-solid fa-chart-simple" :class="[route.name === 'reports' ? 'router-link-active' : '']"></i>
|
|
||||||
<RouterLink
|
|
||||||
active-class="router-link-active"
|
|
||||||
class="nav-link" :to="{name: 'reports'}">Reportes</RouterLink>
|
|
||||||
</div>
|
|
||||||
</li> -->
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="eta-info">
|
<div class="eta-info">
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
@@ -252,7 +224,6 @@
|
|||||||
|
|
||||||
.nav-link{
|
.nav-link{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
/* color: #5f5c5c; */
|
|
||||||
color: #ebd6d6;
|
color: #ebd6d6;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
margin-right: 1.2rem;
|
margin-right: 1.2rem;
|
||||||
@@ -263,22 +234,17 @@
|
|||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.nav-link:hover{
|
.nav-link:hover{
|
||||||
/* color: #413f3c; */
|
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
.nav-link:focus{
|
.nav-link:focus{
|
||||||
/* color: #413f3c; */
|
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.eta-info {
|
.eta-info {
|
||||||
// position: fixed;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
// margin-top: 8px;
|
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
// background-color: red;
|
|
||||||
align-items: start;
|
align-items: start;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,14 +196,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="modal-footer">
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
class="btn btn-dark radius-sm"
|
|
||||||
data-dismiss="modal"
|
|
||||||
@click="$emit('reset-vehicle')"
|
|
||||||
>Cerrar</button>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// defineProps(['selectedCities', 'multiple']);
|
|
||||||
defineProps({
|
defineProps({
|
||||||
selectedCities: {
|
selectedCities: {
|
||||||
type: Array
|
type: Array
|
||||||
|
|||||||
@@ -50,7 +50,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const handleSave = async() => {
|
const handleSave = async() => {
|
||||||
// const resp = editCompany()
|
|
||||||
const resp = validations();
|
const resp = validations();
|
||||||
if(resp !== '') {
|
if(resp !== '') {
|
||||||
msgError.value = resp;
|
msgError.value = resp;
|
||||||
@@ -169,10 +168,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* .modal-width{
|
|
||||||
width: 1500px !important;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.view-form {
|
.view-form {
|
||||||
padding: 1rem 4rem;
|
padding: 1rem 4rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
padding: 16px 32px;
|
padding: 16px 32px;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
/* opacity: 0.9; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// defineProps(['selectedCategory']);
|
|
||||||
defineProps({
|
defineProps({
|
||||||
selectedProduct: {
|
selectedProduct: {
|
||||||
type: Array
|
type: Array
|
||||||
@@ -29,7 +28,6 @@
|
|||||||
const resp = await searchProducts(query);
|
const resp = await searchProducts(query);
|
||||||
options.value = resp;
|
options.value = resp;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
// truckTypes.value = resp;
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// defineProps(['selectedCategory']);
|
|
||||||
defineProps({
|
defineProps({
|
||||||
selectedCategory: {
|
selectedCategory: {
|
||||||
type: Array
|
type: Array
|
||||||
@@ -25,7 +24,6 @@
|
|||||||
const resp = await searchcategories(query);
|
const resp = await searchcategories(query);
|
||||||
options.value = resp;
|
options.value = resp;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
// truckTypes.value = resp;
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// defineProps(['selectedState', 'multiple']);
|
|
||||||
defineProps({
|
defineProps({
|
||||||
selectedState: {
|
selectedState: {
|
||||||
type: Array
|
type: Array
|
||||||
@@ -26,7 +25,6 @@
|
|||||||
options.value = resp;
|
options.value = resp;
|
||||||
isLoading.value = false;
|
isLoading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
const isLoading = ref(false);
|
const isLoading = ref(false);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
// defineProps(['selectedTruckType']);
|
|
||||||
defineProps({
|
defineProps({
|
||||||
selectedTruckType: {
|
selectedTruckType: {
|
||||||
type: Array
|
type: Array
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export default function useAttachments() {
|
|||||||
attachments.value = data;
|
attachments.value = data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
attachments.value = null;
|
attachments.value = null;
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export default function useCalendar() {
|
|||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
const getCalendarDate = async(startDate, endDate, filter) => {
|
const getCalendarDate = async(startDate, endDate, filter) => {
|
||||||
console.log(filter);
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const resp = await getCalendar(startDate, endDate, filter);
|
const resp = await getCalendar(startDate, endDate, filter);
|
||||||
if(resp === null) {
|
if(resp === null) {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default function useCompany() {
|
|||||||
if(companyStore.company === null) {
|
if(companyStore.company === null) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const companyId = auth.user.company;
|
const companyId = auth.user.company;
|
||||||
console.log(companyId)
|
|
||||||
const resp = await getCompany();
|
const resp = await getCompany();
|
||||||
companyStore.company = resp;
|
companyStore.company = resp;
|
||||||
company.value = resp;
|
company.value = resp;
|
||||||
|
|||||||
@@ -8,21 +8,6 @@ export default function useDirectionsRender() {
|
|||||||
const originCoords = ref(null);
|
const originCoords = ref(null);
|
||||||
const destinationCoords = 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) => {
|
const geocodeAddress = async (address) => {
|
||||||
try {
|
try {
|
||||||
const geocoder = new google.maps.Geocoder();
|
const geocoder = new google.maps.Geocoder();
|
||||||
@@ -32,7 +17,7 @@ export default function useDirectionsRender() {
|
|||||||
const longitude = data.results[0].geometry.location.lng();
|
const longitude = data.results[0].geometry.location.lng();
|
||||||
return {lng: longitude, lat: latitude};
|
return {lng: longitude, lat: latitude};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log('Error location', error);
|
// console.log('Error location', error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -65,45 +50,14 @@ export default function useDirectionsRender() {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
// console.log(error);
|
||||||
return [];
|
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 {
|
return {
|
||||||
originCoords,
|
originCoords,
|
||||||
geocodeAddress,
|
geocodeAddress,
|
||||||
getDirections,
|
getDirections,
|
||||||
// polylines
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,6 @@ export default function useDirectory() {
|
|||||||
if(resp !== null) {
|
if(resp !== null) {
|
||||||
companies.value = resp.data;
|
companies.value = resp.data;
|
||||||
companiesTotal.value = resp.total;
|
companiesTotal.value = resp.total;
|
||||||
console.log(companiesTotal.value)
|
|
||||||
} else {
|
} else {
|
||||||
companies.value = [];
|
companies.value = [];
|
||||||
companiesTotal.value = 0;
|
companiesTotal.value = 0;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ export default function useSearchLoads() {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/loads/find${filterStr}&$sort[createdAt]=-1`;
|
const endpoint = `/v1/loads/find${filterStr}&$sort[createdAt]=-1`;
|
||||||
// console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
total.value = data.total;
|
total.value = data.total;
|
||||||
loads.value = data.data;
|
loads.value = data.data;
|
||||||
|
|||||||
@@ -35,7 +35,6 @@
|
|||||||
.main-panel {
|
.main-panel {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 220px;
|
margin-left: 220px;
|
||||||
// width: calc(100wv - 220px) !important;
|
|
||||||
width: calc(100% - 220px); //new
|
width: calc(100% - 220px); //new
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,21 +14,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* .auth-layout {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
width: 100%;
|
|
||||||
margin: 0px 0px !important;
|
|
||||||
padding: 0px 0px !important;
|
|
||||||
overflow: hidden;
|
|
||||||
} */
|
|
||||||
.auth-layout {
|
.auth-layout {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
/* background-color: red; */
|
|
||||||
width: 55%;
|
width: 55%;
|
||||||
margin: 0px auto !important;
|
margin: 0px auto !important;
|
||||||
padding: 0px 5px !important;
|
padding: 0px 5px !important;
|
||||||
@@ -41,11 +32,6 @@
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* @media (max-width: 1024px) {
|
|
||||||
.auth-layout {
|
|
||||||
width: 80%;
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.auth-layout {
|
.auth-layout {
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import Header from '../components/Header.vue';
|
import Header from '../components/Header.vue';
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -18,7 +16,6 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
/* background-color: red; */
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0px auto !important;
|
margin: 0px auto !important;
|
||||||
padding: 0px 5px !important;
|
padding: 0px 5px !important;
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHistory } from 'vue-router'
|
||||||
import AuthLayout from '../layouts/AuthLayout.vue'
|
import AuthLayout from '../layouts/AuthLayout.vue'
|
||||||
import PublicLayout from '../layouts/PublicLayout.vue'
|
import PublicLayout from '../layouts/PublicLayout.vue'
|
||||||
// import {useAuthStore} from '../stores/auth';
|
|
||||||
|
|
||||||
// const authStore = useAuthStore();
|
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(import.meta.env.BASE_URL),
|
history: createWebHistory(import.meta.env.BASE_URL),
|
||||||
@@ -138,11 +135,6 @@ const router = createRouter({
|
|||||||
name: 'shippers',
|
name: 'shippers',
|
||||||
component: () => import('../views/ShippersView.vue'),
|
component: () => import('../views/ShippersView.vue'),
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// path: 'tracking/:code',
|
|
||||||
// name: 'tracking-load',
|
|
||||||
// component: () => import('../views/TrackingLoadView.vue'),
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
path: 'buscar-cargas',
|
path: 'buscar-cargas',
|
||||||
name: 'search-loads',
|
name: 'search-loads',
|
||||||
@@ -164,15 +156,11 @@ router.beforeEach( async(to, from, next) => {
|
|||||||
const session = localStorage.getItem('session');
|
const session = localStorage.getItem('session');
|
||||||
//Comprobamos si el usuario esta authenticado
|
//Comprobamos si el usuario esta authenticado
|
||||||
if(session) {
|
if(session) {
|
||||||
// if(!authStore.user) {
|
|
||||||
// await authStore.checkSession();
|
|
||||||
next();
|
next();
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
next({name: 'login'})
|
next({name: 'login'})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// No esta protegido
|
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export const login = async(body) => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = "/v1/account/authorize";
|
const endpoint = "/v1/account/authorize";
|
||||||
const {data} = await apiPublic.post(endpoint, body);
|
const {data} = await apiPublic.post(endpoint, body);
|
||||||
// console.log('auth: ', data);
|
|
||||||
if(data.accessToken !== null){
|
if(data.accessToken !== null){
|
||||||
if(data.user.job_role !== 'driver'){
|
if(data.user.job_role !== 'driver'){
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ export const getCompany = async() => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,7 +17,6 @@ export const updateCompany = async(formData) => {
|
|||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +27,6 @@ export const getUsers = async(filter) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,7 +37,6 @@ export const createUser = async(formData) => {
|
|||||||
const {data} = await api.post(endpoint, formData);
|
const {data} = await api.post(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,7 +47,6 @@ export const updateUser = async(user_id, formData) => {
|
|||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,7 +60,6 @@ export const updateMyUserProfile = async(formData) => {
|
|||||||
data: data
|
data: data
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return {
|
return {
|
||||||
msg: error.response.data.error,
|
msg: error.response.data.error,
|
||||||
data: null
|
data: null
|
||||||
@@ -79,7 +73,6 @@ export const deleteUser = async(user_id) => {
|
|||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +83,6 @@ export const getBudgets = async(filter) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,10 +92,8 @@ export const updateBudget = async(id, formData) => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = `v1/budgets/${id}`;
|
const endpoint = `v1/budgets/${id}`;
|
||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -114,7 +104,6 @@ export const createBudget = async(formData) => {
|
|||||||
const {data} = await api.post(endpoint, formData);
|
const {data} = await api.post(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -125,7 +114,6 @@ export const deleteBudget = async(id) => {
|
|||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -133,11 +121,9 @@ export const deleteBudget = async(id) => {
|
|||||||
export const getLocations = async(filter) => {
|
export const getLocations = async(filter) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/branches/find${filter}&$sort[createdAt]=1`;
|
const endpoint = `/v1/branches/find${filter}&$sort[createdAt]=1`;
|
||||||
console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,7 +134,6 @@ export const createLocation = async(formData) => {
|
|||||||
const {data} = await api.post(endpoint, formData);
|
const {data} = await api.post(endpoint, formData);
|
||||||
return {data};
|
return {data};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -159,7 +144,6 @@ export const updateLocation = async(id, formData) => {
|
|||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,7 +154,6 @@ export const deleteLocation = async(id) => {
|
|||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -178,14 +161,12 @@ export const deleteLocation = async(id) => {
|
|||||||
export const getCalendar = async(startDate, endDate, global) => {
|
export const getCalendar = async(startDate, endDate, global) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/loads/calendar?$sort[createdAt]=-1&date[lte]=${endDate}&date[gte]=${startDate}&global=${global}&elements=1000`;
|
const endpoint = `/v1/loads/calendar?$sort[createdAt]=-1&date[lte]=${endDate}&date[gte]=${startDate}&global=${global}&elements=1000`;
|
||||||
console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return {
|
return {
|
||||||
msg: "success",
|
msg: "success",
|
||||||
data: data
|
data: data
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return {
|
return {
|
||||||
msg: "Algo salió mal, intente nás tarde",
|
msg: "Algo salió mal, intente nás tarde",
|
||||||
data: null
|
data: null
|
||||||
@@ -198,13 +179,11 @@ export const getNotificationsCompany = async() => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = `/v1/notifications`;
|
const endpoint = `/v1/notifications`;
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data)
|
|
||||||
return {
|
return {
|
||||||
msg: "success",
|
msg: "success",
|
||||||
data: data
|
data: data
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return {
|
return {
|
||||||
msg: "Algo salió mal, intente nás tarde",
|
msg: "Algo salió mal, intente nás tarde",
|
||||||
data: null
|
data: null
|
||||||
@@ -218,7 +197,6 @@ export const deleteNotification = async(id) => {
|
|||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return {
|
return {
|
||||||
msg: "Algo salió mal, intente nás tarde",
|
msg: "Algo salió mal, intente nás tarde",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export const getLoadDirectories = async(filterStr) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -17,20 +16,16 @@ export const getVehicleDirectories = async(filter) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getFreeVehicles = async() => {
|
export const getFreeVehicles = async() => {
|
||||||
try {
|
try {
|
||||||
// console.log(process.env.API_URL + "/vehicles/?status=Free&updatedAt[$gt]=" + moment.utc(lasthour).valueOf());
|
|
||||||
const endpoint = `/v1/public-vehicles/location`;
|
const endpoint = `/v1/public-vehicles/location`;
|
||||||
console.log({endpoint});
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,12 +33,9 @@ export const getFreeVehicles = async() => {
|
|||||||
export const getNews = async() => {
|
export const getNews = async() => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/news`;
|
const endpoint = `/news`;
|
||||||
console.log({endpoint});
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data);
|
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,12 +43,9 @@ export const getNews = async() => {
|
|||||||
export const getCompanies = async(filter) => {
|
export const getCompanies = async(filter) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/companies/${filter}`;
|
const endpoint = `/v1/companies/${filter}`;
|
||||||
console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -64,11 +53,9 @@ export const getCompanies = async(filter) => {
|
|||||||
export const getLoadPublic = async(id) => {
|
export const getLoadPublic = async(id) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/public-load-tracking/${id}`;
|
const endpoint = `/v1/public-load-tracking/${id}`;
|
||||||
// console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,11 +63,9 @@ export const getLoadPublic = async(id) => {
|
|||||||
export const getUsersCompany = async(filter) => {
|
export const getUsersCompany = async(filter) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/users/find?${filter}`;
|
const endpoint = `/v1/users/find?${filter}`;
|
||||||
// console.log({endpoint});
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,13 +73,9 @@ export const getUsersCompany = async(filter) => {
|
|||||||
export const getPublicUsersCompany = async(filter) => {
|
export const getPublicUsersCompany = async(filter) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/companies/users/${filter}`;
|
const endpoint = `/v1/companies/users/${filter}`;
|
||||||
// console.log({endpoint});
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data.data)
|
|
||||||
// console.log(data);
|
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,7 +86,6 @@ export const getSettingsQuery = async(filter) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +96,6 @@ export const searchcategories = async(query) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,7 +106,6 @@ export const searchProducts = async(query) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -138,19 +116,16 @@ export const searchstates = async(query) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const searchcities = async(query) => {
|
export const searchcities = async(query) => {
|
||||||
try {
|
try {
|
||||||
// const endpoint = "/cities/?city_name[$regex]=" + query + "&city_name[$options]=i";
|
|
||||||
const endpoint = "/v1/cities/find?regex=" + query;
|
const endpoint = "/v1/cities/find?regex=" + query;
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data.data;
|
return data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,6 @@ export const getVehicles = async(filter) => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -18,7 +17,6 @@ export const updateVehicle = async(id, formData) => {
|
|||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,7 +27,6 @@ export const deleteVehicle = async(id) => {
|
|||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,7 +37,6 @@ export const createVehicle = async(formData) => {
|
|||||||
const {data} = await api.post(endpoint, formData);
|
const {data} = await api.post(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -51,7 +47,6 @@ export const saveProposal = async(formData) => {
|
|||||||
const {data} = await api.post(endpoint, formData);
|
const {data} = await api.post(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,7 +57,6 @@ export const updateProposal = async(id, formData) => {
|
|||||||
const {data} = await api.patch(endpoint, formData);
|
const {data} = await api.patch(endpoint, formData);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,19 +155,14 @@ export const useCompanyStore = defineStore('company', () => {
|
|||||||
proposals.value = [];
|
proposals.value = [];
|
||||||
proposalsTotal.value = 0;
|
proposalsTotal.value = 0;
|
||||||
proposalsCurrentPage.value = 0;
|
proposalsCurrentPage.value = 0;
|
||||||
// companyid = null;
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const $reset = () => {
|
const $reset = () => {
|
||||||
company.value = null;
|
company.value = null;
|
||||||
// companyid = null;
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
///loads?company=64fa70c130d2650011ac4f3a&status[$ne]=Closed,posted_by_name[$regex]=ju&posted_by_name[$options]=i
|
|
||||||
|
|
||||||
const getProposalsCompany = async(filter, reload = false) => {
|
const getProposalsCompany = async(filter, reload = false) => {
|
||||||
const companyId = localStorage.getItem('id');
|
const companyId = localStorage.getItem('id');
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
loadsDashboard.value = data.data;
|
loadsDashboard.value = data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loadsDashboard.value = [];
|
loadsDashboard.value = [];
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -34,7 +33,6 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
if(loadsDashboard.value.length <= 0 || reload) {
|
if(loadsDashboard.value.length <= 0 || reload) {
|
||||||
const endpoint = `/v1/proposals/find?carrier=${companyId}&elements=100`;
|
const endpoint = `/v1/proposals/find?carrier=${companyId}&elements=100`;
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data);
|
|
||||||
loadsDashboard.value = data.data.map( (e) => e.load);
|
loadsDashboard.value = data.data.map( (e) => e.load);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -53,14 +51,12 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
if(loads.value.length <= 0 || reload) {
|
if(loads.value.length <= 0 || reload) {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/loads/find?company=${companyid}&${filterStr}&$sort%5BcreatedAt%5D=-1`;
|
const endpoint = `/v1/loads/find?company=${companyid}&${filterStr}&$sort%5BcreatedAt%5D=-1`;
|
||||||
console.log(endpoint);
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
loads.value = data.data;
|
loads.value = data.data;
|
||||||
loadsTotal.value = data.total;
|
loadsTotal.value = data.total;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
loads.value = [];
|
loads.value = [];
|
||||||
loadsTotal.value = 0;
|
loadsTotal.value = 0;
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -68,13 +64,10 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
const getProposalsOfLoads = async(filterQuery) => {
|
const getProposalsOfLoads = async(filterQuery) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/proposals/find?load=${filterQuery}`;
|
const endpoint = `/v1/proposals/find?load=${filterQuery}`;
|
||||||
console.log(endpoint)
|
|
||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
console.log(data);
|
|
||||||
proposalsOfLoads.value = data.data;
|
proposalsOfLoads.value = data.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
proposalsOfLoads.value = [];
|
proposalsOfLoads.value = [];
|
||||||
console.log(error);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +78,6 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
loadsTotal.value++;
|
loadsTotal.value++;
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,10 +86,8 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = `/v1/proposals/${id}`;
|
const endpoint = `/v1/proposals/${id}`;
|
||||||
const {data} = await api.patch(endpoint, proposal);
|
const {data} = await api.patch(endpoint, proposal);
|
||||||
// console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -106,10 +96,8 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = `/v1/proposals/${id}`;
|
const endpoint = `/v1/proposals/${id}`;
|
||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
// console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,10 +106,8 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
try {
|
try {
|
||||||
const endpoint = `/v1/loads/${loadId}`;
|
const endpoint = `/v1/loads/${loadId}`;
|
||||||
const {data} = await api.patch(endpoint, load);
|
const {data} = await api.patch(endpoint, load);
|
||||||
// console.log(data);
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -129,12 +115,10 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
const deleteLoad = async(loadId) => {
|
const deleteLoad = async(loadId) => {
|
||||||
try {
|
try {
|
||||||
const endpoint = `/v1/loads/${loadId}`;
|
const endpoint = `/v1/loads/${loadId}`;
|
||||||
console.log(endpoint);
|
|
||||||
const {data} = await api.delete(endpoint);
|
const {data} = await api.delete(endpoint);
|
||||||
loadsTotal.value--;
|
loadsTotal.value--;
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,7 +129,6 @@ export const useLoadsStore = defineStore('load', () => {
|
|||||||
const {data} = await api.get(endpoint);
|
const {data} = await api.get(endpoint);
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ export const useVehiclesStore = defineStore('vehicles', () => {
|
|||||||
}
|
}
|
||||||
if(vehicles.value.length <= 0 || reload === true) {
|
if(vehicles.value.length <= 0 || reload === true) {
|
||||||
const resp = await getVehicles(filterStr + '&$sort%5BcreatedAt%5D=-1');
|
const resp = await getVehicles(filterStr + '&$sort%5BcreatedAt%5D=-1');
|
||||||
// console.log(resp);
|
|
||||||
if(resp !== null) {
|
if(resp !== null) {
|
||||||
vehiclesTotal.value = resp.total;
|
vehiclesTotal.value = resp.total;
|
||||||
vehicles.value = resp.data;
|
vehicles.value = resp.data;
|
||||||
@@ -44,15 +43,12 @@ export const useVehiclesStore = defineStore('vehicles', () => {
|
|||||||
const updateVehicleCompany = async(id, formData, localData = {}) => {
|
const updateVehicleCompany = async(id, formData, localData = {}) => {
|
||||||
const data = await updateVehicle(id, formData);
|
const data = await updateVehicle(id, formData);
|
||||||
if(data) {
|
if(data) {
|
||||||
console.log({data});
|
|
||||||
const index = vehicles.value.findIndex((vehicle) => vehicle._id === id);
|
const index = vehicles.value.findIndex((vehicle) => vehicle._id === id);
|
||||||
vehicles.value[index] = {
|
vehicles.value[index] = {
|
||||||
...vehicles.value[index],
|
...vehicles.value[index],
|
||||||
...data,
|
...data,
|
||||||
...localData
|
...localData
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(vehicles.value[index]);
|
|
||||||
return 'success';
|
return 'success';
|
||||||
} else {
|
} else {
|
||||||
return t('errors.generic');
|
return t('errors.generic');
|
||||||
|
|||||||
@@ -109,7 +109,6 @@
|
|||||||
|
|
||||||
const mapLoadsToEvents = () => {
|
const mapLoadsToEvents = () => {
|
||||||
events.value = [];
|
events.value = [];
|
||||||
console.log(loads.value)
|
|
||||||
loads.value.forEach((e) => {
|
loads.value.forEach((e) => {
|
||||||
const indicator = eventStatusLoad(e.load_status);
|
const indicator = eventStatusLoad(e.load_status);
|
||||||
const dateStart = getDateTime(e.est_loading_date, 0);
|
const dateStart = getDateTime(e.est_loading_date, 0);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getCompaniesByPage = (data) => {
|
const getCompaniesByPage = (data) => {
|
||||||
console.log(data);
|
|
||||||
// filterQuery.value.company_type = 'shipper';
|
// filterQuery.value.company_type = 'shipper';
|
||||||
filterQuery.value.page = "page="+ data.page;
|
filterQuery.value.page = "page="+ data.page;
|
||||||
currentCompaniesPage.value = data.page
|
currentCompaniesPage.value = data.page
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
clearMessages();
|
clearMessages();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(typeCompany);
|
|
||||||
step.value = 2;
|
step.value = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +65,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
step.value = 3;
|
step.value = 3;
|
||||||
// console.log(company);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSendRegister = async () => {
|
const handleSendRegister = async () => {
|
||||||
@@ -98,7 +96,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(result);
|
|
||||||
localStorage.setItem('id', result.data._id);
|
localStorage.setItem('id', result.data._id);
|
||||||
localStorage.setItem('session', auth.sesion);
|
localStorage.setItem('session', auth.sesion);
|
||||||
// localStorage.setItem('access', auth.token);
|
// localStorage.setItem('access', auth.token);
|
||||||
@@ -110,7 +107,6 @@
|
|||||||
"phone2" : user.phone2,
|
"phone2" : user.phone2,
|
||||||
};
|
};
|
||||||
let respUser = await updateMyUserProfile( userData );
|
let respUser = await updateMyUserProfile( userData );
|
||||||
// console.log('User create: ', respUser);
|
|
||||||
if(respUser.msg === 'success') {
|
if(respUser.msg === 'success') {
|
||||||
auth.user = respUser.data;
|
auth.user = respUser.data;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -161,10 +161,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* .profile {
|
|
||||||
margin: 0 auto;
|
|
||||||
} */
|
|
||||||
|
|
||||||
.box-btns {
|
.box-btns {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
|||||||
@@ -62,10 +62,6 @@
|
|||||||
segmentsData.value.push(e?.categories[0].name)
|
segmentsData.value.push(e?.categories[0].name)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if( (user.value?.permissions === "role_carrier") && e?.load?.categories) {
|
|
||||||
// segmentsData.value.push(e?.load?.categories[0].name)
|
|
||||||
// }
|
|
||||||
|
|
||||||
if( e?.origin?.city) {
|
if( e?.origin?.city) {
|
||||||
cities.value.push(e?.origin.city)
|
cities.value.push(e?.origin.city)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,20 +17,15 @@
|
|||||||
const limit = 10;
|
const limit = 10;
|
||||||
|
|
||||||
onMounted(() =>{
|
onMounted(() =>{
|
||||||
console.log('init')
|
|
||||||
getDataLoadsInit(false);
|
getDataLoadsInit(false);
|
||||||
})
|
})
|
||||||
|
|
||||||
///loads?company=64fa70c130d2650011ac4f3a&elements=3&page=0&status[$ne]=Closed&$sort%5BcreatedAt%5D=-1
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
watch(query, () => {
|
watch(query, () => {
|
||||||
filterQuery.value.page = "page="+ 0;
|
filterQuery.value.page = "page="+ 0;
|
||||||
filterQuery.value.limit = "elements="+ 100;
|
filterQuery.value.limit = "elements="+ 100;
|
||||||
if(query.value.length === 0){
|
if(query.value.length === 0){
|
||||||
console.log('Clear manueal')
|
|
||||||
// console.log(loadStore.loadsTotal)
|
|
||||||
clearRequest();
|
clearRequest();
|
||||||
filterQuery.value.search = "";
|
filterQuery.value.search = "";
|
||||||
getLoadWithFilters(filterQuery.value);
|
getLoadWithFilters(filterQuery.value);
|
||||||
@@ -47,7 +42,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getLoadsByPage = async(data) => {
|
const getLoadsByPage = async(data) => {
|
||||||
console.log(data);
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
filterQuery.value.page = "page="+ data.page;
|
filterQuery.value.page = "page="+ data.page;
|
||||||
loadStore.loadsCurrentPage = data.page
|
loadStore.loadsCurrentPage = data.page
|
||||||
@@ -57,7 +51,6 @@
|
|||||||
|
|
||||||
const getLoadWithFilters = async(filter) => {
|
const getLoadWithFilters = async(filter) => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
console.log(filter);
|
|
||||||
await loadStore.getCompanyLoads(filter, true);
|
await loadStore.getCompanyLoads(filter, true);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
@@ -65,7 +58,6 @@
|
|||||||
const search = () => {
|
const search = () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if(query.value.length >= 2){
|
if(query.value.length >= 2){
|
||||||
// filterQuery.value.search = "company_name[$regex]=" + query.value + "&company_name[$options]=i";
|
|
||||||
filterQuery.value.search = "posted_by_name[$regex]="+query.value+"&posted_by_name[$options]=i";
|
filterQuery.value.search = "posted_by_name[$regex]="+query.value+"&posted_by_name[$options]=i";
|
||||||
getLoadWithFilters(filterQuery.value);
|
getLoadWithFilters(filterQuery.value);
|
||||||
}
|
}
|
||||||
@@ -77,7 +69,6 @@
|
|||||||
clearRequest();
|
clearRequest();
|
||||||
filterQuery.value.search = ""
|
filterQuery.value.search = ""
|
||||||
filterQuery.value.status = "status[$ne]="+"Closed";
|
filterQuery.value.status = "status[$ne]="+"Closed";
|
||||||
console.log('click here');
|
|
||||||
if(query.value == ''){
|
if(query.value == ''){
|
||||||
getDataLoadsInit(true);
|
getDataLoadsInit(true);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
const locationCurrent = ref(null);
|
const locationCurrent = ref(null);
|
||||||
const openModal = ref(false);
|
const openModal = ref(false);
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
// const typeDirection = ref(null)
|
|
||||||
const typeDirection = ref({value: 'both', label: t('labels.both')})
|
const typeDirection = ref({value: 'both', label: t('labels.both')})
|
||||||
const optionsFilter = ref([]);
|
const optionsFilter = ref([]);
|
||||||
const openPopup = ref(false);
|
const openPopup = ref(false);
|
||||||
@@ -31,7 +30,6 @@
|
|||||||
|
|
||||||
const getInitData = async() => {
|
const getInitData = async() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
// companyStore.locationsCurrentPage = companyStore.locationsCurrentPage;
|
|
||||||
filterQuery.value.company = "company="+ localStorage.getItem('id');
|
filterQuery.value.company = "company="+ localStorage.getItem('id');
|
||||||
filterQuery.value.limit = "elements=" + limit;
|
filterQuery.value.limit = "elements=" + limit;
|
||||||
filterQuery.value.page = "page=" + 0;
|
filterQuery.value.page = "page=" + 0;
|
||||||
@@ -41,7 +39,6 @@
|
|||||||
{value: 'loading',label: t('labels.load')},
|
{value: 'loading',label: t('labels.load')},
|
||||||
{value: 'unloading',label: t('labels.download')}
|
{value: 'unloading',label: t('labels.download')}
|
||||||
]
|
]
|
||||||
console.log(companyStore.locations)
|
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,14 +71,12 @@
|
|||||||
if(query.value.length === 0){
|
if(query.value.length === 0){
|
||||||
clearRequest();
|
clearRequest();
|
||||||
filterQuery.value.search = "";
|
filterQuery.value.search = "";
|
||||||
// filterQuery.value.page = 1
|
|
||||||
getLocationsWithFilters(filterQuery.value);
|
getLocationsWithFilters(filterQuery.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
if(query.value.length >= 2){
|
if(query.value.length >= 2){
|
||||||
// filterQuery.value = "company_name[$regex]=" + query.value + "&company_name[$options]=i";
|
|
||||||
filterQuery.value.search = "branch_name[$regex]="+ query.value +"&branch_name[$options]=i";
|
filterQuery.value.search = "branch_name[$regex]="+ query.value +"&branch_name[$options]=i";
|
||||||
getLocationsWithFilters(filterQuery.value);
|
getLocationsWithFilters(filterQuery.value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ import { useI18n } from 'vue-i18n';
|
|||||||
token: resp.data.accessToken,
|
token: resp.data.accessToken,
|
||||||
user: resp.data.user,
|
user: resp.data.user,
|
||||||
})
|
})
|
||||||
// localStorage.setItem('session', resp.data.session_token);
|
|
||||||
// localStorage.setItem('access', resp.data.accessToken);
|
|
||||||
router.push({name: 'register-company'});
|
router.push({name: 'register-company'});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -127,8 +125,6 @@ import { useI18n } from 'vue-i18n';
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* min-width: 420px; */
|
|
||||||
/* padding: 2rem 3rem; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-success{
|
.icon-success{
|
||||||
|
|||||||
@@ -28,10 +28,7 @@
|
|||||||
|
|
||||||
const getInitialData = async() => {
|
const getInitialData = async() => {
|
||||||
await auth.authenticationPromise;
|
await auth.authenticationPromise;
|
||||||
// await authenticationPromise;
|
|
||||||
await company.getCompanyData();
|
await company.getCompanyData();
|
||||||
console.log(company.company)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -75,10 +72,6 @@
|
|||||||
<span class="font-weight-bold">{{ t('labels.segmentsCompany') }}: </span>
|
<span class="font-weight-bold">{{ t('labels.segmentsCompany') }}: </span>
|
||||||
{{company.company?.categories.map((e) => e.name).join(', ')}}
|
{{company.company?.categories.map((e) => e.name).join(', ')}}
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="item-company">
|
|
||||||
<span class="font-weight-bold">Afiliación: </span>
|
|
||||||
{{ company.company?.membership }}
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-12 col-md-6 col-lg-6">
|
<div class="col-sm-12 col-md-6 col-lg-6">
|
||||||
<div class="item-company">
|
<div class="item-company">
|
||||||
@@ -125,7 +118,6 @@
|
|||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
color: #323030;
|
color: #323030;
|
||||||
/* font-weight: bold; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-company span {
|
.item-company span {
|
||||||
|
|||||||
@@ -73,7 +73,6 @@
|
|||||||
checksum: checksum.value
|
checksum: checksum.value
|
||||||
}
|
}
|
||||||
const result = await recoveryPasswordConfirm(data);
|
const result = await recoveryPasswordConfirm(data);
|
||||||
// console.log(result);
|
|
||||||
if(result.msg === 'success' && result.data !== null){
|
if(result.msg === 'success' && result.data !== null){
|
||||||
msgSuccess.value = t('messages.changePassword');
|
msgSuccess.value = t('messages.changePassword');
|
||||||
step.value = 3;
|
step.value = 3;
|
||||||
|
|||||||
@@ -75,9 +75,7 @@
|
|||||||
checksum: checksum.value
|
checksum: checksum.value
|
||||||
}
|
}
|
||||||
const result = await regiterConfirm(data);
|
const result = await regiterConfirm(data);
|
||||||
// console.log(result);
|
|
||||||
if(result.msg === 'success' && result.data !== null){
|
if(result.msg === 'success' && result.data !== null){
|
||||||
// msgSuccess.value = 'Registro exitoso!';
|
|
||||||
step.value = 3;
|
step.value = 3;
|
||||||
checksum.value = '';
|
checksum.value = '';
|
||||||
Object.assign(form, {
|
Object.assign(form, {
|
||||||
|
|||||||
@@ -134,7 +134,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getLoadsByPage = (data) => {
|
const getLoadsByPage = (data) => {
|
||||||
console.log(data);
|
|
||||||
filterQuery.value.page = "page="+ data.page;
|
filterQuery.value.page = "page="+ data.page;
|
||||||
currentPage.value = data.page
|
currentPage.value = data.page
|
||||||
getLoadsPublished(filterQuery.value);
|
getLoadsPublished(filterQuery.value);
|
||||||
@@ -154,7 +153,6 @@
|
|||||||
const currentLoad = ref(null);
|
const currentLoad = ref(null);
|
||||||
|
|
||||||
const handleSetCurrentLoad = (load) => {
|
const handleSetCurrentLoad = (load) => {
|
||||||
console.log(load);
|
|
||||||
currentLoad.value = load
|
currentLoad.value = load
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +161,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const removeLoadOfList = (load) => {
|
const removeLoadOfList = (load) => {
|
||||||
console.log('se ejecuta removeLoadOfList');
|
|
||||||
loads.value = loads.value.filter((e) => e._id !== load._id);
|
loads.value = loads.value.filter((e) => e._id !== load._id);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -209,9 +209,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
border-radius: 13px;
|
border-radius: 13px;
|
||||||
/* background-color: red; */
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* align-items: center; */
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px 10%;
|
padding: 20px 10%;
|
||||||
|
|||||||
@@ -26,11 +26,7 @@
|
|||||||
getCompaniesData(filterQuery.value);
|
getCompaniesData(filterQuery.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
///v1/public-companies/shipper?elements=3&skip=6&$sort%5BcreatedAt%5D=-1
|
|
||||||
|
|
||||||
const getCompaniesByPage = (data) => {
|
const getCompaniesByPage = (data) => {
|
||||||
console.log(data);
|
|
||||||
// filterQuery.value.company_type = 'shipper';
|
|
||||||
filterQuery.value.page = "page="+ data.page;
|
filterQuery.value.page = "page="+ data.page;
|
||||||
currentCompaniesPage.value = data.page
|
currentCompaniesPage.value = data.page
|
||||||
getCompaniesData(filterQuery.value);
|
getCompaniesData(filterQuery.value);
|
||||||
@@ -190,9 +186,7 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
background-color: #FFF;
|
background-color: #FFF;
|
||||||
border-radius: 13px;
|
border-radius: 13px;
|
||||||
/* background-color: red; */
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
/* align-items: center; */
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 20px 10%;
|
padding: 20px 10%;
|
||||||
|
|||||||
@@ -37,7 +37,6 @@
|
|||||||
const id = route.params['code'];
|
const id = route.params['code'];
|
||||||
await getLoadTracking(id)
|
await getLoadTracking(id)
|
||||||
if(load.value !== null) {
|
if(load.value !== null) {
|
||||||
// console.log(load.value)
|
|
||||||
const addressOrigin = load.value?.origin_geo?.coordinates;
|
const addressOrigin = load.value?.origin_geo?.coordinates;
|
||||||
const addressDestination = load.value?.destination_geo?.coordinates;
|
const addressDestination = load.value?.destination_geo?.coordinates;
|
||||||
if(addressOrigin && addressDestination) {
|
if(addressOrigin && addressDestination) {
|
||||||
@@ -53,11 +52,8 @@
|
|||||||
lat: parseFloat(load.value.vehicle.last_location_lat),
|
lat: parseFloat(load.value.vehicle.last_location_lat),
|
||||||
lng: parseFloat(load.value.vehicle.last_location_lng)
|
lng: parseFloat(load.value.vehicle.last_location_lng)
|
||||||
}
|
}
|
||||||
console.log(vehicleLastLocation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
console.log(load.value);
|
|
||||||
switch (load.value.load_status) {
|
switch (load.value.load_status) {
|
||||||
case 'Loading':
|
case 'Loading':
|
||||||
isLoadActive.value = true;
|
isLoadActive.value = true;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
const limit = 10;
|
const limit = 10;
|
||||||
|
|
||||||
const getInitData = async() => {
|
const getInitData = async() => {
|
||||||
console.log('callll')
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
await companyStore.getUsersCompany(limit);
|
await companyStore.getUsersCompany(limit);
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -58,7 +58,6 @@
|
|||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
if(query.value.length >= 2){
|
if(query.value.length >= 2){
|
||||||
// filterQuery.value = "company_name[$regex]=" + query.value + "&company_name[$options]=i";
|
|
||||||
filterQuery.value.search = "truck_type[$regex]=" + query.value +"&truck_type[$options]=i";
|
filterQuery.value.search = "truck_type[$regex]=" + query.value +"&truck_type[$options]=i";
|
||||||
getVehiclesWithFilters(filterQuery.value);
|
getVehiclesWithFilters(filterQuery.value);
|
||||||
}
|
}
|
||||||
@@ -176,7 +175,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box-search {
|
.box-search {
|
||||||
/* width: 60%; */
|
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.custom-search {
|
.custom-search {
|
||||||
@@ -185,19 +183,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
/* .box-search {
|
|
||||||
width: 60%;
|
|
||||||
} */
|
|
||||||
.box-filters {
|
.box-filters {
|
||||||
gap: .4rem;
|
gap: .4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
/* .box-search {
|
|
||||||
width: 100%;
|
|
||||||
} */
|
|
||||||
.box-filters {
|
.box-filters {
|
||||||
gap: .3rem;
|
gap: .3rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user