20 lines
540 B
TypeScript
20 lines
540 B
TypeScript
import { Component, Input } from '@angular/core';
|
|
import { FlightModel } from '@app/shared/models-legacy';
|
|
import { BuyTicketLogic } from './buy-ticket.logic';
|
|
|
|
@Component({
|
|
selector: 'buy-ticket-button',
|
|
templateUrl: './buy-ticket-button.component.html',
|
|
styleUrls: ['./buy-ticket-button.component.scss']
|
|
})
|
|
export class BuyTicketButtonComponent {
|
|
@Input() direct: FlightModel;
|
|
@Input() returning: FlightModel;
|
|
|
|
constructor(private logic: BuyTicketLogic) {}
|
|
|
|
buy() {
|
|
this.logic.buyAll(this.direct, this.returning);
|
|
}
|
|
}
|