@@ -188,7 +188,6 @@ export class PunchoutService implements PunchoutFacade {
188
188
punchoutState . punchoutSession ?. punchOutOperation ===
189
189
PunchOutOperation . EDIT
190
190
) {
191
- console . log ( 'in EDIT' ) ;
192
191
this . punchoutStoreService . updatePunchoutState ( {
193
192
cancelRequisition : false ,
194
193
} ) ;
@@ -262,7 +261,6 @@ export class PunchoutService implements PunchoutFacade {
262
261
}
263
262
264
263
protected setPunchoutInitialCart ( cartId : string ) : void {
265
- console . log ( 'setPunchoutInitialCart' , cartId ) ;
266
264
this . takeCart ( cartId )
267
265
. pipe (
268
266
map ( ( cart ) => {
@@ -278,34 +276,22 @@ export class PunchoutService implements PunchoutFacade {
278
276
next : (
279
277
entries : { productCode : string ; quantity : number } [ ] | undefined
280
278
) => {
281
- console . log ( 'setPunchoutInitialCart1' , entries ) ;
282
279
if ( entries ?. length ) {
283
280
this . punchoutStoreService . updatePunchoutState ( {
284
281
punchoutInitialCart : { entries } ,
285
282
} ) ;
286
283
}
287
284
} ,
288
- error : ( error ) => {
289
- console . log ( 'error,' , error ) ;
290
- } ,
291
- complete : ( ) => {
292
- console . log ( 'setPunchoutInitialcart completed' ) ;
293
- } ,
294
285
} ) ;
295
286
}
296
287
297
288
protected revertToInitialCart ( state : PunchoutState ) : Observable < boolean > {
298
- console . log ( 'revertToInitialCart in' ) ;
299
-
300
289
if ( ! state ?. punchoutSession ?. cartId ) {
301
290
return of ( true ) ;
302
291
}
303
-
304
292
return this . takeCart ( state . punchoutSession . cartId ) . pipe (
305
293
switchMap ( ( cart ) => {
306
294
cart ?. entries ?. forEach ( ( entry ) => {
307
- console . log ( 'entry' , entry ) ;
308
-
309
295
this . multiCartFacade . removeEntry (
310
296
state . punchoutSession ?. customerId as string ,
311
297
state . punchoutSession ?. cartId as string ,
@@ -317,7 +303,6 @@ export class PunchoutService implements PunchoutFacade {
317
303
state . punchoutSession ?. cartId as string
318
304
) . pipe (
319
305
tap ( ( ) => {
320
- console . log ( 'revertToInitialCart next' ) ;
321
306
this . multiCartFacade . addEntries (
322
307
state . punchoutSession ?. customerId as string ,
323
308
state . punchoutSession ?. cartId as string ,
@@ -342,13 +327,9 @@ export class PunchoutService implements PunchoutFacade {
342
327
}
343
328
344
329
protected ensureStableCart ( cartId : string ) : Observable < boolean > {
345
- console . log ( 'ensureStableCart' ) ;
346
330
return this . multiCartFacade . isStable ( cartId ) . pipe (
347
- tap ( ( ) => console . log ( 'isStable1' ) ) ,
348
331
filter ( ( stable ) => stable ) ,
349
- take ( 1 ) ,
350
- tap ( ( ) => console . log ( 'isStable2' ) )
332
+ take ( 1 )
351
333
) ;
352
- // return of(true);
353
334
}
354
335
}
0 commit comments