fixes: make proposals

This commit is contained in:
Alexandro Uc Santos
2024-08-10 18:39:08 -06:00
parent 535b000005
commit 3cd6715c4b
8 changed files with 10 additions and 19 deletions

View File

@@ -48,7 +48,6 @@ export const useAuthStore = defineStore('auth', () => {
user.value = resp.data.user;
sesion.value = resp.data.session_token;
token.value = resp.data.accessToken;
console.log(resp.data.user)
localStorage.setItem('session', resp.data.session_token);
localStorage.setItem('access', resp.data.accessToken);
localStorage.setItem('id', resp.data.user.company._id);
@@ -72,7 +71,6 @@ export const useAuthStore = defineStore('auth', () => {
const updateProfile = async(data) => {
const response = await updateMyUserProfile(data);
// console.log(response);
if( response.msg === 'success') {
user.value = response.data;
return response;

View File

@@ -27,7 +27,6 @@ export const useCompanyStore = defineStore('company', () => {
const getCompanyData = async() => {
const companyId = localStorage.getItem('id');
console.log({companyId});
loading.value = true;
if(!company.value) {
loading.value = true;
@@ -39,7 +38,6 @@ export const useCompanyStore = defineStore('company', () => {
const getUsersCompany = async(limit = 1, page = 0, reload = false) => {
const companyId = localStorage.getItem('id');
console.log(companyId);
if(users.value.length <= 0 || reload === true) {
// const filter = `company=${companyId}`;
const filter = `company=${companyId}&elements=${limit}&page=${page}`;
@@ -175,7 +173,6 @@ export const useCompanyStore = defineStore('company', () => {
try {
if(proposals.value.length <= 0 || reload) {
const endpoint = `/v1/proposals/find?carrier=${companyId}&${filter}&$sort%5BcreatedAt%5D=-1`;
console.log(endpoint)
const {data} = await api.get(endpoint);
proposals.value = data.data;
proposalsTotal.value = data.total;
@@ -223,7 +220,6 @@ export const useCompanyStore = defineStore('company', () => {
if(budgets.value.length <= 0 || reload === true) {
try {
const data = await getBudgets(filterStr);
console.log(data.total);
if(data.total > 0) {
budgets.value = data.data;
budgetsTotal.value = data.total;