@@ -27,10 +27,6 @@ export class PaginationService {
2727
2828 async getItemsPaginated ( page :number , pageSize :any , next :boolean , items :any [ ] , nextItems :any [ ] , options :any ,
2929 handler : ( ...params : any [ ] ) => Promise < any > ) : Promise < any > {
30-
31- console . log ( 'options' )
32- console . log ( options )
33-
3430 try {
3531 let params : any [ ] = [ page ] ;
3632 if ( "keywords" in options ) {
@@ -68,8 +64,6 @@ export class PaginationService {
6864 page = 0 ;
6965 params [ 0 ] = page ;
7066
71- console . log ( '------ Calling handler' )
72- console . log ( params )
7367 let data = await handler ( ...params )
7468 items = data ;
7569 page = page + pageSize ;
@@ -86,7 +80,7 @@ export class PaginationService {
8680 page = page + pageSize ;
8781
8882 } catch ( err ) {
89- console . log ( err )
83+ console . error ( err )
9084 } finally {
9185 let page_check = true ;
9286 if ( nextItems . length > 0 ) {
@@ -246,7 +240,6 @@ export class PaginationService {
246240
247241 async getProducts ( page : number , keywords : any , filters ?: Category [ ] ) : Promise < ProductOffering [ ] > {
248242 try {
249- console . log ( '-------------------------- getProducts ----------------------------' ) ;
250243 // Get data from API
251244 const productOfferings : ProductOffering [ ] = filters && filters . length > 0
252245 ? await this . api . getProductsByCategory ( filters , page , keywords )
@@ -313,7 +306,6 @@ export class PaginationService {
313306
314307 async getProductsByCatalog ( page : number , keywords : any , filters ?: Category [ ] , id ?: any ) : Promise < ProductOffering [ ] > {
315308 try {
316- console . log ( '-------------------------- getProductsByCatalog ----------------------------' ) ;
317309 // Get data from API
318310 const productOfferings : ProductOffering [ ] = filters && filters . length > 0
319311 ? await this . api . getProductsByCategoryAndCatalog ( filters , id , page )
@@ -552,7 +544,6 @@ export class PaginationService {
552544 try {
553545 // Get Orders
554546 orders = await this . orderService . getProductOrders ( seller , page , filters , selectedDate , role ) ;
555- console . log ( 'getOrders' , orders ) ;
556547 // Obtener todas las cuentas de facturación en paralelo
557548 const billingAccounts = await Promise . all ( orders . map ( order => this . accountService . getBillingAccountById ( order . billingAccount . id ) ) ) ;
558549
@@ -561,7 +552,6 @@ export class PaginationService {
561552 // Obtener detalles de los productos en paralelo
562553 const items = await Promise . all ( order . productOrderItem . map ( async ( productOrderItem :any ) => {
563554 try {
564- console . log ( 'Soy un productOrderItem???????: ' , productOrderItem ) ;
565555 const offer = await this . api . getProductById ( productOrderItem . productOffering . id ) ;
566556 const spec = await this . api . getProductSpecification ( offer . productSpecification . id ) ;
567557
@@ -613,7 +603,6 @@ export class PaginationService {
613603 } ;
614604 } ) ) ;
615605
616- console . log ( 'Orders processed:' , ordersWithDetails ) ;
617606 return ordersWithDetails ;
618607 } catch ( error ) {
619608 console . error ( 'Error fetching orders:' , error ) ;
@@ -670,11 +659,8 @@ export class PaginationService {
670659
671660 async getInventory ( page : number , keywords : any , filters : Category [ ] , seller : any ) : Promise < any [ ] > {
672661 try {
673- console . log ( 'Fetching inventory...' ) ;
674-
675662 // Obtener inventario desde el servicio
676663 const data = await this . inventoryService . getInventory ( page , seller , filters , keywords ) ;
677- console . log ( 'Inventory received:' , data ) ;
678664
679665 // Obtener ofertas del inventario
680666 return await this . getOffers ( data ) ;
@@ -686,14 +672,11 @@ export class PaginationService {
686672 }
687673
688674 async getInvoices ( page :number , filters :Category [ ] , seller :any , selectedDate :any , role :any ) : Promise < any [ ] > {
689- console . log ( "---getInvoices---" )
675+
690676 let invoices = [ ]
691677 try {
692678 invoices = await this . invoicesService . getInvoices ( seller , page , filters , selectedDate , role )
693679 } finally {
694- console . log ( "params:" , seller , page , filters , selectedDate , role )
695- console . log ( "---getInvoices result:---" , invoices )
696- console . log ( invoices )
697680 return invoices
698681 }
699682 }
0 commit comments