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

@@ -109,7 +109,6 @@
const mapLoadsToEvents = () => {
events.value = [];
console.log(loads.value)
loads.value.forEach((e) => {
const indicator = eventStatusLoad(e.load_status);
const dateStart = getDateTime(e.est_loading_date, 0);

View File

@@ -30,7 +30,6 @@
});
const getCompaniesByPage = (data) => {
console.log(data);
// filterQuery.value.company_type = 'shipper';
filterQuery.value.page = "page="+ data.page;
currentCompaniesPage.value = data.page

View File

@@ -54,7 +54,6 @@
clearMessages();
return;
}
console.log(typeCompany);
step.value = 2;
}
@@ -66,7 +65,6 @@
return;
}
step.value = 3;
// console.log(company);
}
const handleSendRegister = async () => {
@@ -98,7 +96,6 @@
return;
}
// console.log(result);
localStorage.setItem('id', result.data._id);
localStorage.setItem('session', auth.sesion);
// localStorage.setItem('access', auth.token);
@@ -110,7 +107,6 @@
"phone2" : user.phone2,
};
let respUser = await updateMyUserProfile( userData );
// console.log('User create: ', respUser);
if(respUser.msg === 'success') {
auth.user = respUser.data;
} else {

View File

@@ -161,10 +161,6 @@
</template>
<style scoped>
/* .profile {
margin: 0 auto;
} */
.box-btns {
display: flex;
justify-content: flex-end;

View File

@@ -62,10 +62,6 @@
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) {
cities.value.push(e?.origin.city)
}

View File

@@ -17,20 +17,15 @@
const limit = 10;
onMounted(() =>{
console.log('init')
getDataLoadsInit(false);
})
///loads?company=64fa70c130d2650011ac4f3a&elements=3&page=0&status[$ne]=Closed&$sort%5BcreatedAt%5D=-1
const { t } = useI18n();
watch(query, () => {
filterQuery.value.page = "page="+ 0;
filterQuery.value.limit = "elements="+ 100;
if(query.value.length === 0){
console.log('Clear manueal')
// console.log(loadStore.loadsTotal)
clearRequest();
filterQuery.value.search = "";
getLoadWithFilters(filterQuery.value);
@@ -47,7 +42,6 @@
}
const getLoadsByPage = async(data) => {
console.log(data);
loading.value = true;
filterQuery.value.page = "page="+ data.page;
loadStore.loadsCurrentPage = data.page
@@ -57,7 +51,6 @@
const getLoadWithFilters = async(filter) => {
loading.value = true;
console.log(filter);
await loadStore.getCompanyLoads(filter, true);
loading.value = false;
}
@@ -65,7 +58,6 @@
const search = () => {
setTimeout(() => {
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";
getLoadWithFilters(filterQuery.value);
}
@@ -77,7 +69,6 @@
clearRequest();
filterQuery.value.search = ""
filterQuery.value.status = "status[$ne]="+"Closed";
console.log('click here');
if(query.value == ''){
getDataLoadsInit(true);
} else {

View File

@@ -17,7 +17,6 @@
const locationCurrent = ref(null);
const openModal = ref(false);
const { t, locale } = useI18n();
// const typeDirection = ref(null)
const typeDirection = ref({value: 'both', label: t('labels.both')})
const optionsFilter = ref([]);
const openPopup = ref(false);
@@ -31,7 +30,6 @@
const getInitData = async() => {
loading.value = true;
// companyStore.locationsCurrentPage = companyStore.locationsCurrentPage;
filterQuery.value.company = "company="+ localStorage.getItem('id');
filterQuery.value.limit = "elements=" + limit;
filterQuery.value.page = "page=" + 0;
@@ -41,7 +39,6 @@
{value: 'loading',label: t('labels.load')},
{value: 'unloading',label: t('labels.download')}
]
console.log(companyStore.locations)
loading.value = false;
}
@@ -74,14 +71,12 @@
if(query.value.length === 0){
clearRequest();
filterQuery.value.search = "";
// filterQuery.value.page = 1
getLocationsWithFilters(filterQuery.value);
}
});
const search = () => {
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";
getLocationsWithFilters(filterQuery.value);
}

View File

@@ -7,7 +7,7 @@
import { login } from '../services/auth';
import { RouterLink, useRouter } from 'vue-router';
import { useAuthStore } from '../stores/auth';
import { useI18n } from 'vue-i18n';
import { useI18n } from 'vue-i18n';
const form = reactive({
email: '',
@@ -55,8 +55,6 @@ import { useI18n } from 'vue-i18n';
token: resp.data.accessToken,
user: resp.data.user,
})
// localStorage.setItem('session', resp.data.session_token);
// localStorage.setItem('access', resp.data.accessToken);
router.push({name: 'register-company'});
}
} else {
@@ -127,8 +125,6 @@ import { useI18n } from 'vue-i18n';
display: flex;
flex-direction: column;
width: 100%;
/* min-width: 420px; */
/* padding: 2rem 3rem; */
}
.icon-success{

View File

@@ -28,10 +28,7 @@
const getInitialData = async() => {
await auth.authenticationPromise;
// await authenticationPromise;
await company.getCompanyData();
console.log(company.company)
}
@@ -75,10 +72,6 @@
<span class="font-weight-bold">{{ t('labels.segmentsCompany') }}: </span>
{{company.company?.categories.map((e) => e.name).join(', ')}}
</div>
<!-- <div class="item-company">
<span class="font-weight-bold">Afiliación: </span>
{{ company.company?.membership }}
</div> -->
</div>
<div class="col-sm-12 col-md-6 col-lg-6">
<div class="item-company">
@@ -125,7 +118,6 @@
margin-bottom: 1rem;
font-size: 1.2rem;
color: #323030;
/* font-weight: bold; */
}
.item-company span {

View File

@@ -73,7 +73,6 @@
checksum: checksum.value
}
const result = await recoveryPasswordConfirm(data);
// console.log(result);
if(result.msg === 'success' && result.data !== null){
msgSuccess.value = t('messages.changePassword');
step.value = 3;

View File

@@ -75,9 +75,7 @@
checksum: checksum.value
}
const result = await regiterConfirm(data);
// console.log(result);
if(result.msg === 'success' && result.data !== null){
// msgSuccess.value = 'Registro exitoso!';
step.value = 3;
checksum.value = '';
Object.assign(form, {

View File

@@ -134,7 +134,6 @@
}
const getLoadsByPage = (data) => {
console.log(data);
filterQuery.value.page = "page="+ data.page;
currentPage.value = data.page
getLoadsPublished(filterQuery.value);
@@ -154,7 +153,6 @@
const currentLoad = ref(null);
const handleSetCurrentLoad = (load) => {
console.log(load);
currentLoad.value = load
}
@@ -163,7 +161,6 @@
}
const removeLoadOfList = (load) => {
console.log('se ejecuta removeLoadOfList');
loads.value = loads.value.filter((e) => e._id !== load._id);
}
</script>

View File

@@ -209,9 +209,7 @@
margin: 0 auto;
background-color: #FFF;
border-radius: 13px;
/* background-color: red; */
flex-direction: column;
/* align-items: center; */
justify-content: center;
width: 100%;
padding: 20px 10%;

View File

@@ -26,11 +26,7 @@
getCompaniesData(filterQuery.value);
});
///v1/public-companies/shipper?elements=3&skip=6&$sort%5BcreatedAt%5D=-1
const getCompaniesByPage = (data) => {
console.log(data);
// filterQuery.value.company_type = 'shipper';
filterQuery.value.page = "page="+ data.page;
currentCompaniesPage.value = data.page
getCompaniesData(filterQuery.value);
@@ -190,9 +186,7 @@
margin: 0 auto;
background-color: #FFF;
border-radius: 13px;
/* background-color: red; */
flex-direction: column;
/* align-items: center; */
justify-content: center;
width: 100%;
padding: 20px 10%;

View File

@@ -37,7 +37,6 @@
const id = route.params['code'];
await getLoadTracking(id)
if(load.value !== null) {
// console.log(load.value)
const addressOrigin = load.value?.origin_geo?.coordinates;
const addressDestination = load.value?.destination_geo?.coordinates;
if(addressOrigin && addressDestination) {
@@ -53,11 +52,8 @@
lat: parseFloat(load.value.vehicle.last_location_lat),
lng: parseFloat(load.value.vehicle.last_location_lng)
}
console.log(vehicleLastLocation);
}
console.log(load.value);
switch (load.value.load_status) {
case 'Loading':
isLoadActive.value = true;

View File

@@ -20,7 +20,6 @@
const limit = 10;
const getInitData = async() => {
console.log('callll')
loading.value = true;
await companyStore.getUsersCompany(limit);
loading.value = false;

View File

@@ -58,7 +58,6 @@
const search = () => {
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";
getVehiclesWithFilters(filterQuery.value);
}
@@ -176,7 +175,6 @@
}
.box-search {
/* width: 60%; */
flex: 1;
}
.custom-search {
@@ -185,19 +183,12 @@
}
@media (max-width: 1024px) {
/* .box-search {
width: 60%;
} */
.box-filters {
gap: .4rem;
}
}
@media (max-width: 768px) {
/* .box-search {
width: 100%;
} */
.box-filters {
gap: .3rem;
}