Summary Table

Categories Total Count
PII 0
URL 0
DNS 0
EKL 0
IP 0
PORT 0
VsID 0
CF 0
AI 0
VPD 0
PL 0
Other 0

File Content

import { Component, OnInit } from '@angular/core';
import { RfaiAdminService } from './rfai-admin.service';
import { AppSettingsService } from './../../shared/app-settings/app-settings.service';
import { MenuModel } from './../../shared/menu/menu.component.model';
import { Router } from '@angular/router';
import { Subject } from 'rxjs/Subject';
import { WindowRefService } from '../../window-ref.service';
const empty = val => val === null || val === ''; //
//
function tabI(tabIt: boolean) {
return tabIt ? '0' : '-1';
} // tabindex for tabIt
// tabI sounds like 'tabby' hints to tabindex
// tabIt sounds like a predicate, i.e., a boolean

@Component({
selector: 'app-rfai-admin',
templateUrl: './rfai-admin.component.html',
styleUrls: [
'./../rfai-submission/rfai-submission.component.scss',
'./rfai-admin.component.scss'
]
})
export class RfaiAdminComponent implements OnInit {
// subscription: Subscription = new Subscription();
title = 'ARS Administration';
tabIdx = '0';
menu: MenuModel;
successMsg = '';
errorMsg = '';
errorStatus = false;
successStatus = false;
startEndDateFlag = false;
discardChangesModalClosed = true;
discardChangesSubject: Subject<boolean> = new Subject<boolean>();

// time = 0;
// pass back tabbable for use in other directives, like <app-header> and app-navigation>
// get tabbable() {
// return (
// this.codeModalClosed && this.payerModalClosed && this.confirmModalClosed
// );
// }

// Handle logic for [tabindex]
// Also suppress tabindex while !tabbable
// get tabindex() {
// return tabI(this.tabbable);
// }

// No longer individualized
// get codeTabI() { return tabI(this.codeModalClosed && this.confirmModalClosed); }
// get payerTabI() { return tabI(this.payerModalClosed && this.confirmModalClosed); }
// get modalTabI() { return tabI(this.codeModalClosed && this.payerModalClosed && this.confirmModalClosed); }

constructor(
private rfaiAdminService: RfaiAdminService,
private appSettingsService: AppSettingsService,
private windowService: WindowRefService,
private router: Router
) {}

ngOnInit() {
this.appSettingsService
.getMenu('ARS_MENU')
.subscribe(menu => (this.menu = menu));
this.rfaiAdminService.successMsgNotifier$.subscribe(data => {
this.successMsg = data;
});
this.rfaiAdminService.errorMsgNotifier$.subscribe(data => {
this.errorMsg = data;
});
this.rfaiAdminService.successStatusNotifier$.subscribe(data => {
this.successStatus = data;
});
this.rfaiAdminService.errorStatusNotifier$.subscribe(data => {
this.errorStatus = data;
});
this.rfaiAdminService.tabIdxNotifier$.subscribe(
tabIdx => (this.tabIdx = tabIdx)
);
}
navigate(path: string, evt) {
if (this.windowService.nativeWindow.navigator) {
if (evt.button === -1) {
this.router.navigate([path]);
}
} else {
if (evt.clientX === 0 && evt.clientY === 0) {
this.router.navigate([path]);
}
}
}
}