add: fixes user card & removed logs

This commit is contained in:
Alexandro Uc Santos
2024-09-25 20:27:00 -06:00
parent c217fdb20c
commit 0b56a2a223
67 changed files with 15 additions and 367 deletions

View File

@@ -68,7 +68,6 @@
<style scoped>
.attachment {
width: 100%;
/* border: 1px #e9e9e9 solid; */
display: flex;
flex-direction: column;
padding: 20px;
@@ -102,5 +101,4 @@
}
}
</style>

View File

@@ -83,7 +83,6 @@
<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.totalUtity') }}:</span> {{ formatCurrency( budget.total_profit ) }}</p>
<!-- <p>{{ $t('CALCULATOR.PROFIT_PERCENTAGE') }}: {{budget.profit_percentage}}%</p> -->
<p><span>{{ t('calculator.percentUtility') }}:</span> {{ totalPercentage }}</p>
</div>

View File

@@ -19,12 +19,9 @@
<div class="divider"></div>
<div class="row mt-4">
<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.dateMembership') }}: </span>{{getDateMonthDay(company.createdAt)}}</p>
<p><span>{{ t('company.segment') }}:</span> {{ company._categories }}</p>
<!-- <p><span>Afiliación: </span> {{company.membership}}</p> -->
</div>
<div class="col-lg-6 col-sm-12">
<p><span>{{ t('labels.locationLoadState') }}: </span>{{company._company_state}}</p>

View File

@@ -44,7 +44,6 @@ import { ref } from 'vue';
width: 100%;
padding: 12px 20px;
background-color: white;
/* background-color: rgb(184, 236, 234); */
margin-bottom: 15px;
filter: drop-shadow(0px 4px 4px rgba(0, 255, 255,0.3));
border-radius: 13px;

View File

@@ -48,7 +48,7 @@
if(result.isConfirmed) {
Swal.fire({
title: t('messages.loading'),
html: t('loads.loadingDel') + '...',// add html attribute if you want or remove
html: t('loads.loadingDel') + '...',
allowOutsideClick: false,
didOpen: () => {
Swal.showLoading()

View File

@@ -222,5 +222,4 @@
gap: 0.2rem;
}
}
</style>

View File

@@ -18,6 +18,8 @@
}
})
console.log(props.user)
defineEmits(['set-user'])
@@ -80,22 +82,22 @@
</div>
<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('labels.locationLoadCity') }}: </span>{{user._user_city}}</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.userInfo') }}: </span> {{user.user_description}}</p>
<p><span>{{ t('labels.locationLoadCity') }}: </span>{{user._user_city}}</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="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> -->
</div>
<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('labels.locationLoadCity') }}: </span>{{user.user_city?.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><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="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 class="btn-row" v-if="readonly === false && (authStore.user?.job_role === 'owner' || authStore.user?.job_role === 'manager')">

View File

@@ -37,7 +37,7 @@
if(result.isConfirmed) {
Swal.fire({
title: t('messages.loading'),
html: t('vehicles.loadingDel') + '...',// add html attribute if you want or remove
html: t('vehicles.loadingDel') + '...',
allowOutsideClick: false,
didOpen: () => {
Swal.showLoading()

View File

@@ -32,7 +32,6 @@
const { t } = useI18n();
onMounted(() => {
console.log(props.budget);
if(props.budget) {
budgetForm.budget_id = props.budget._id;
budgetForm.client = props.budget.client;
@@ -116,10 +115,6 @@
client: null
})
// const total = computed(() => {
// });
const totalTravel = computed(() => {
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;
@@ -257,7 +252,6 @@
<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">Calculadora</h2> -->
<div></div>
<button
id="btnClosebudgetModal"
@@ -575,7 +569,6 @@
}
.calculator-card__subtitle {
// background-color: #50b1e5;
background-color: #FBBA33;
padding: 8px 20px;
color: #FFF;

View File

@@ -27,7 +27,6 @@
userForm.last_name = props.user.last_name;
userForm.email = props.user.email;
userForm.phone = props.user.phone;
// userForm.phone2 = props.user.phone2;
userForm.job_role = props.user.job_role;
userForm.categories = props.user.categories;
userForm.user_city = props.user.user_city?.map(m =>{
@@ -92,7 +91,6 @@
last_name: userForm.last_name,
email: userForm.email,
phone: userForm.phone,
// phone2: userForm.phone2,
job_role: userForm.job_role,
permissions: authStore.user.permissions,
company: authStore.user.company,

View File

@@ -70,8 +70,6 @@
padding: 20px 20px;
display: flex;
flex-direction: column;
/* flex-wrap: nowrap; */
/* overflow: hidden; */
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
}

View File

@@ -83,9 +83,6 @@
}
loading.value = false;
//Continua en la lina 568 web_main
}

View File

@@ -8,10 +8,6 @@
const loading = ref(false)
const user = reactive({
// name: '',
// lastName: '',
// phone1: '',
// phone2: '',
name: auth.user?.first_name,
lastName: auth.user?.last_name,
phone1: auth.user?.phone,

View File

@@ -144,12 +144,6 @@
</template>
<style scoped>
/* .box-back-btn {
display: flex;
justify-content: center;
padding: 16px 0px;
} */
.warning-info {
display: flex;
padding: 16px;
@@ -165,7 +159,6 @@
.warning {
font-size: 33px;
margin-right: 12px;
/* color: white; */
}
.btn-block {

View File

@@ -210,12 +210,6 @@
</template>
<style scoped>
/* .box-back-btn {
display: flex;
justify-content: center;
padding: 16px 0px;
} */
.warning-info {
display: flex;
padding: 16px;

View File

@@ -92,9 +92,6 @@
formLoad.segment = loadStore.currentLoad.categories?.length <= 0 ? [] : loadStore.currentLoad.categories.map(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;
endLocation.value = loadStore.currentLoad.destination_formatted_address;
formLoad.terms = loadStore.currentLoad.product;
@@ -165,7 +162,6 @@
const getLocations = async() => {
loadingLocations.value = true;
// filterQueryVehicles.value.company = "company="+ localStorage.getItem('id');
await companyStore.getLocationsLoads()
loadingLocations.value = false;
}
@@ -207,7 +203,6 @@
city: '',
country: '',
postalCode: '',
// ref: '',
});
const destination = reactive({
@@ -217,7 +212,6 @@
city: '',
country: '',
postalCode: '',
// ref: '',
});
const setLoadData = () => {

View File

@@ -4,19 +4,16 @@ import CustomPopup from './CustomPopup.vue';
import { ref } from 'vue';
import { onMounted } from 'vue';
import { watch } from 'vue';
// import { useAuthStore } from '../stores/auth';
const { t, locale } = useI18n();
const openPopup = ref(false);
const options = ref([]);
const lang = ref(null);
// const auth = useAuthStore();
onMounted(() => {
const langInit = localStorage.getItem('lang') ?? locale.value;
locale.value = langInit
// auth.lang = langInit;
lang.value = {value: langInit, label: langInit == 'en' ? t('global.en') : t('global.es')}
options.value = [
{value: 'es',label: t('global.es')},
@@ -107,7 +104,6 @@ const closePopup = () => {
align-items: center;
align-content: center;
width: 100%;
/* width: 65%; */
}
.box-register{
margin-left: 24px;
@@ -131,7 +127,6 @@ const closePopup = () => {
.app-btn{
background-color: #FBBA33;
/* background-color: #000; */
border: none;
color: #FFF;
border-radius: 25px;

View File

@@ -49,7 +49,6 @@
const initData = async() => {
isLoading.value = true;
const code = props.proposal.load.shipment_code;
// console.log(props.proposal)
const filter = "?shipment_code[$in]=" + code;
const resp = await loadStore.getLoad(filter);
if(resp.total > 0) {
@@ -61,7 +60,6 @@
if(addressOrigin.lat && 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);
}
@@ -69,7 +67,6 @@
if(addressDestination.lat && 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);
}

View File

@@ -8,13 +8,10 @@
const originCoords = ref(null);
const destinationCoords = ref(null);
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;
onMounted(async() => {
window.addEventListener('resize', handleResize);
// mapRef.value = this.$refs.myMap;
if(window.innerWidth <= 1024) {
zoom.value = 4;
heightMap.value = 420;
@@ -22,9 +19,6 @@
originCoords.value = await geocodeAddress('C. 40 370, San Román, 97540 Izamal, 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 apiKey = 'AIzaSyAJtfvrAKy7vnUSv2nzk4dYQkOs3OP4MMs';
const originLatLng = `${originCoords.value.lat},${originCoords.value.lng}`;
const destinationLatLng = `${destinationCoords.value.lat},${destinationCoords.value.lng}`;
try {

View File

@@ -34,7 +34,6 @@
const deleteNoty = async() => {
loading.value = true;
const resp = await deleteNotification(props.noty._id);
console.log(resp);
if(resp.msg === 'Done') {
notyStore.removeNoty(props.noty._id);
}

View File

@@ -10,7 +10,6 @@
noty.toggleNotifications()
noty.newNoty = false;
}
</script>
<template>
@@ -69,15 +68,12 @@
padding: 20px 16px;
display: flex;
flex-direction: column;
/* flex-wrap: nowrap; */
/* overflow: hidden; */
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
}
.body {
overflow-y: auto;
max-height: 500px;
/* padding: 20px 20px; */
}
.section-prefs {

View File

@@ -25,7 +25,6 @@ import { onMounted, ref } from 'vue';
})
const setPage = (p) => {
console.log('Page:', p);
currentPage.value = p
const skip = (p - 1) * props.limit;
emits('get-elements', {skip: skip, page: p});

View File

@@ -102,8 +102,6 @@
padding: 20px 32px;
display: flex;
flex-direction: column;
/* flex-wrap: nowrap; */
/* overflow: hidden; */
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.10));
}

View File

@@ -114,34 +114,6 @@
class="nav-link" :to="{name: 'calculator'}">{{ t('global.calculator') }}</RouterLink>
</div>
</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>
<div class="eta-info">
<div class="divider"></div>
@@ -252,7 +224,6 @@
.nav-link{
cursor: pointer;
/* color: #5f5c5c; */
color: #ebd6d6;
font-size: 1.2rem;
margin-right: 1.2rem;
@@ -263,22 +234,17 @@
color: #FFF;
}
.nav-link:hover{
/* color: #413f3c; */
color: #FFF;
}
.nav-link:focus{
/* color: #413f3c; */
color: #FFF;
}
.eta-info {
// position: fixed;
display: flex;
flex-direction: column;
// margin-top: 8px;
bottom: 10px;
gap: 1rem;
// background-color: red;
align-items: start;
padding: 10px 16px;
}

View File

@@ -196,14 +196,6 @@
</div>
</form>
</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>

View File

@@ -8,7 +8,6 @@
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedCities', 'multiple']);
defineProps({
selectedCities: {
type: Array

View File

@@ -50,7 +50,6 @@
});
const handleSave = async() => {
// const resp = editCompany()
const resp = validations();
if(resp !== '') {
msgError.value = resp;
@@ -169,10 +168,6 @@
</template>
<style scoped>
/* .modal-width{
width: 1500px !important;
} */
.view-form {
padding: 1rem 4rem;
}

View File

@@ -28,7 +28,6 @@
height: 100vh;
padding: 16px 32px;
background-color: #FFF;
/* opacity: 0.9; */
}
.body {

View File

@@ -8,7 +8,6 @@
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedCategory']);
defineProps({
selectedProduct: {
type: Array
@@ -29,7 +28,6 @@
const resp = await searchProducts(query);
options.value = resp;
isLoading.value = false;
// truckTypes.value = resp;
}
</script>

View File

@@ -8,7 +8,6 @@
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedCategory']);
defineProps({
selectedCategory: {
type: Array
@@ -25,7 +24,6 @@
const resp = await searchcategories(query);
options.value = resp;
isLoading.value = false;
// truckTypes.value = resp;
}
</script>

View File

@@ -8,7 +8,6 @@
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedState', 'multiple']);
defineProps({
selectedState: {
type: Array
@@ -26,7 +25,6 @@
options.value = resp;
isLoading.value = false;
}
</script>
<template>

View File

@@ -8,7 +8,6 @@
const isLoading = ref(false);
const { t } = useI18n();
// defineProps(['selectedTruckType']);
defineProps({
selectedTruckType: {
type: Array