import { Component, OnInit, Input } from '@angular/core'; import { TicketRefundBand, TournamentTicket, Tournament, } from 'tournee.businesslogic'; @Component({ selector: 'app-setup-refund-selectable-listing', templateUrl: './setup-refund-selectable-listing.component.html', styleUrls: ['./setup-refund-selectable-listing.component.css'] }) export class SetupRefundSelectableListingComponent implements OnInit { @Input() Ticket: TournamentTicket; @Input() Tournament: Tournament; @Input() IsNew: boolean; SelectedRefundBand: TicketRefundBand; constructor() { } ngOnInit() { this.SelectedRefundBand = new TicketRefundBand(this.Tournament.days[0].date_string); } store_band() { this.Ticket.store_band(this.SelectedRefundBand); this.SelectedRefundBand = new TicketRefundBand(this.Tournament.days[0].date_string); } cancel() { this.SelectedRefundBand = new TicketRefundBand(this.Tournament.days[0].date_string); } edit(band: TicketRefundBand) { this.SelectedRefundBand = JSON.parse(JSON.stringify(band)); } }