|
|
@@ -1,6 +1,6 @@ |
|
|
|
import { Component, OnInit } from '@angular/core'; |
|
|
|
|
|
|
|
type State = 'VIEW INITIAL DETAILS'|'ENTER MORE DETAILS'|'ASSIGN COMMITTEE'; |
|
|
|
type State = 'VIEW INITIAL DETAILS'|'ENTER MORE DETAILS'|'ASSIGN COMMITTEE'|'REVIEW NON COMPLIANCE'; |
|
|
|
type Role = 'Investigator'|'Hod'|'Panel'; |
|
|
|
|
|
|
|
@Component({ |
|
|
@@ -10,6 +10,7 @@ type Role = 'Investigator'|'Hod'|'Panel'; |
|
|
|
}) |
|
|
|
export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnInit { |
|
|
|
hasEnoughData = false; |
|
|
|
isNonCompliant = false; |
|
|
|
|
|
|
|
state: State; |
|
|
|
stateHistory: Array<State> = []; |
|
|
@@ -19,6 +20,7 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni |
|
|
|
canExecute: boolean; |
|
|
|
executingRole: Role; |
|
|
|
|
|
|
|
|
|
|
|
constructor() { |
|
|
|
const loginEmail = localStorage.getItem('loginEmail'); |
|
|
|
|
|
|
@@ -41,6 +43,10 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni |
|
|
|
this.state = 'ASSIGN COMMITTEE'; |
|
|
|
this.executingRole = 'Hod'; |
|
|
|
break; |
|
|
|
case 'REVIEW NON COMPLIANCE': |
|
|
|
this.state = 'REVIEW NON COMPLIANCE'; |
|
|
|
this.executingRole = 'Investigator'; |
|
|
|
break; |
|
|
|
default: |
|
|
|
this.state = 'VIEW INITIAL DETAILS'; |
|
|
|
this.executingRole = 'Investigator'; |
|
|
@@ -66,6 +72,10 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni |
|
|
|
this.state = 'ASSIGN COMMITTEE'; |
|
|
|
this.executingRole = 'Hod'; |
|
|
|
break; |
|
|
|
case 'ASSIGN COMMITTEE': |
|
|
|
this.state = 'REVIEW NON COMPLIANCE'; |
|
|
|
this.executingRole = 'Investigator'; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
localStorage.setItem('state', this.state); |
|
|
@@ -81,9 +91,6 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni |
|
|
|
} |
|
|
|
|
|
|
|
switch (this.state) { |
|
|
|
case 'ENTER MORE DETAILS': |
|
|
|
this.executingRole = 'Investigator'; |
|
|
|
break; |
|
|
|
case 'ASSIGN COMMITTEE': |
|
|
|
this.executingRole = 'Hod'; |
|
|
|
break; |
|
|
|