import { Component, OnInit } from '@angular/core'; import { TaxService } from '../../../services/tax/tax.service'; import { DynamicDialogRef, DynamicDialogConfig } from 'primeng/api'; @Component({ selector: 'app-default-tax-rates', templateUrl: './default-tax-rates.component.html', styleUrls: ['./default-tax-rates.component.scss'] }) export class DefaultTaxRatesComponent implements OnInit { companyId:number=0; shippingProfileId:number=0; countryName:string=""; constructor(private taxService:TaxService, public refer: DynamicDialogRef, public config: DynamicDialogConfig) { } ngOnInit() { if(this.config.data.companyId){ this.companyId = this.config.data.companyId } if(this.config.data.shippingProfileId){ this.shippingProfileId = this.config.data.shippingProfileId } if(this.config.data.countryName){ this.countryName = this.config.data.countryName } } // get country tax deleteBaseTax() { this.taxService.GetBaseTaxRates(this.companyId, this.shippingProfileId, 'DELETE').subscribe(data => { this.refer.close(); }) } }