import { Component } from '@angular/core' ; import { NbDialogRef } from '@nebular/theme' ; import { TranslateService } from '@ngx-translate/core' ; import { PaymentService } from 'apps/gauzy/src/app/@core/services/payment.service' ; import { TranslationBaseComponent } from 'apps/gauzy/src/app/@shared/language-base/translation-base.component' ; import { IInvoice , IPayment } from '@gauzy/contracts' ; @ Component ( { selector : 'ga-payment-receipt-mutation' , templateUrl : './payment-receipt-mutation.component.html' } ) export class InvoicePaymentReceiptMutationComponent extends TranslationBaseComponent { constructor ( readonly translateService , private paymentService , protected dialogRef ) { super ( translateService ) ; } invoice : IInvoice ; payment : IPayment ; async send ( ) { await this . paymentService . sendReceipt ( this . payment , this . invoice ) ; } cancel ( ) { this . dialogRef . close ( ) ; } }