<commit_before>import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Event, Child } from '../../../shared/models';
import { HeaderService } from '../../header/header.service';
import { ApiService, RootService } from '../../../shared/services';
import { AdminService } from '../../admin.service';
import { Observable } from 'rxjs/Observable';

@Component({
  templateUrl: 'manage-children.component.html',
  styleUrls: ['manage-children.component.scss'],
  providers: [ ],
})
export class ManageChildrenComponent implements OnInit {
  children: Array<Child> = [];
  ready: boolean = false;

  constructor(private route: ActivatedRoute,
    private apiService: ApiService,
    private headerService: HeaderService,
    private rootService: RootService,
    private adminService: AdminService,
    private router: Router) {
  }

  ngOnInit(): void {
    let eventId = this.route.snapshot.params['eventId'];
    this.apiService.getEvent(eventId).subscribe((event: Event) => {
      this.headerService.announceEvent(event);

      this.adminService.getChildrenForEvent(eventId).subscribe((resp) => {
        this.children = resp;
        this.ready = true;
      });
    });
  }

  public isReady(): boolean {
    return this.ready;
  }

  public parentAndPhoneNumbers(child: Child): string {
    let parents = '';

    child.HeadsOfHousehold.forEach(hoh => {
      if (parents === '') {
        parents = `${hoh.Nickname} (${hoh.MobilePhone})`;
      } else {
        parents = `${parents}, ${hoh.Nickname} (${hoh.MobilePhone})`;
      }
    });

    return parents;
  }

  public reprint(child: Child): void {
    this.ready = false;

    this.adminService.reprint(child.EventParticipantId).subscribe((resp) => {
      this.ready = true;
    })
  }

  public reverseSignin(child: Child) {
    this.ready = false;

    this.adminService.reverseSignin(child.EventParticipantId).subscribe((resp) => {
      this.children.splice(this.children.indexOf(child), 1);
      this.ready = true;<commit_msg>DE2624 - No Success Message<commit_after>import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Event, Child } from '../../../shared/models';
import { HeaderService } from '../../header/header.service';
import { ApiService, RootService } from '../../../shared/services';
import { AdminService } from '../../admin.service';
import { Observable } from 'rxjs/Observable';

@Component({
  templateUrl: 'manage-children.component.html',
  styleUrls: ['manage-children.component.scss'],
  providers: [ ],
})
export class ManageChildrenComponent implements OnInit {
  children: Array<Child> = [];
  ready: boolean = false;

  constructor(private route: ActivatedRoute,
    private apiService: ApiService,
    private headerService: HeaderService,
    private rootService: RootService,
    private adminService: AdminService,
    private router: Router) {
  }

  ngOnInit(): void {
    let eventId = this.route.snapshot.params['eventId'];
    this.apiService.getEvent(eventId).subscribe((event: Event) => {
      this.headerService.announceEvent(event);

      this.adminService.getChildrenForEvent(eventId).subscribe((resp) => {
        this.children = resp;
        this.ready = true;
      });
    });
  }

  public isReady(): boolean {
    return this.ready;
  }

  public parentAndPhoneNumbers(child: Child): string {
    let parents = '';

    child.HeadsOfHousehold.forEach(hoh => {
      if (parents === '') {
        parents = `${hoh.Nickname} (${hoh.MobilePhone})`;
      } else {
        parents = `${parents}, ${hoh.Nickname} (${hoh.MobilePhone})`;
      }
    });

    return parents;
  }

  public reprint(child: Child): void {
    this.ready = false;

    this.adminService.reprint(child.EventParticipantId).subscribe((resp) => {
      this.ready = true;
    })
  }

  public reverseSignin(child: Child) {
    this.ready = false;

    this.adminService.reverseSignin(child.EventParticipantId).subscribe((resp) => {
      this.children.splice(this.children.indexOf(child), 1);
      this.ready = true;
      this.rootService.announceEvent('reverseSigninSuccess');
{'fraction_non_alphanumeric': 0.15234001910219674, 'fraction_numerical': 0.0014326647564469914, 'mean_word_length': 3.423442449841605, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563837', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1233, 'n_words': 247}