@@ -83,7 +83,6 @@ export class CardComponent implements OnInit, AfterViewInit {
8383
8484 errorMessage :any = '' ;
8585 showError :boolean = false ;
86- orgInfo :any = undefined ;
8786
8887 selectedPricePlanId : string | null = null ;
8988 selectedPricePlan :any = null ;
@@ -97,9 +96,7 @@ export class CardComponent implements OnInit, AfterViewInit {
9796 private readonly eventMessage : EventMessageService ,
9897 private readonly api : ApiServiceService ,
9998 private readonly priceService : PriceServiceService ,
100- private readonly cartService : ShoppingCartServiceService ,
101- private readonly accService : AccountServiceService ,
102- private readonly router : Router
99+ private readonly cartService : ShoppingCartServiceService
103100 ) {
104101 this . targetModal = document . getElementById ( 'details-modal' ) ;
105102 this . modal = new Modal ( this . targetModal ) ;
@@ -198,7 +195,6 @@ export class CardComponent implements OnInit, AfterViewInit {
198195 if ( specId != undefined ) {
199196 this . api . getProductSpecification ( specId ) . then ( spec => {
200197 this . prodSpec = spec ;
201- this . getOwner ( ) ;
202198 } )
203199 }
204200
@@ -386,30 +382,6 @@ async deleteProduct(product: Product | undefined){
386382 this . cdr . detectChanges ( ) ;
387383 }
388384
389- goToProductDetails ( productOff :Product | undefined ) {
390- document . querySelector ( "body > div[modal-backdrop]" ) ?. remove ( )
391- this . router . navigate ( [ '/search' , productOff ?. id ] ) ;
392- }
393-
394- goToOrgDetails ( id :any ) {
395- document . querySelector ( "body > div[modal-backdrop]" ) ?. remove ( )
396- this . router . navigate ( [ '/org-details' , id ] ) ;
397- }
398-
399- getOwner ( ) {
400- let parties = this . prodSpec ?. relatedParty ;
401- if ( parties )
402- for ( let i = 0 ; i < parties . length ; i ++ ) {
403- if ( parties [ i ] . role == 'Owner' ) {
404- if ( parties [ i ] . id . includes ( 'organization' ) ) {
405- this . accService . getOrgInfo ( parties [ i ] . id ) . then ( org => {
406- this . orgInfo = org ;
407- } )
408- }
409- }
410- }
411- }
412-
413385 onPricePlanSelected ( pricePlan :any ) {
414386 this . selectedPricePlanId = pricePlan . id ;
415387 this . selectedPricePlan = pricePlan ;
0 commit comments