@@ -26,6 +26,7 @@ import { AssignPanelComponent } from './pages/investigate-business-entities-and- | |||||
import { TextareaComponent } from './widgets/form/textarea/textarea.component'; | import { TextareaComponent } from './widgets/form/textarea/textarea.component'; | ||||
import { MultiFileUploadComponent } from './widgets/form/multi-file-upload/multi-file-upload.component'; | import { MultiFileUploadComponent } from './widgets/form/multi-file-upload/multi-file-upload.component'; | ||||
import { ReviewNonComplianceComponent } from './pages/investigate-business-entities-and-individuals/review-non-compliance/review-non-compliance.component'; | import { ReviewNonComplianceComponent } from './pages/investigate-business-entities-and-individuals/review-non-compliance/review-non-compliance.component'; | ||||
import { ConcurComplianceReviewComponent } from './pages/investigate-business-entities-and-individuals/concur-compliance-review/concur-compliance-review.component'; | |||||
@NgModule({ | @NgModule({ | ||||
declarations: [ | declarations: [ | ||||
@@ -50,7 +51,8 @@ import { ReviewNonComplianceComponent } from './pages/investigate-business-entit | |||||
AssignPanelComponent, | AssignPanelComponent, | ||||
TextareaComponent, | TextareaComponent, | ||||
MultiFileUploadComponent, | MultiFileUploadComponent, | ||||
ReviewNonComplianceComponent | |||||
ReviewNonComplianceComponent, | |||||
ConcurComplianceReviewComponent | |||||
], | ], | ||||
imports: [ | imports: [ | ||||
BrowserModule, | BrowserModule, | ||||
@@ -0,0 +1,47 @@ | |||||
<div class="screen-holder"> | |||||
<h3>Concur on compliance result</h3> | |||||
<div class="files-heading">Financial statements:</div> | |||||
<div class="files-holder"> | |||||
<app-file | |||||
name="Q1 Account statement" | |||||
[sizeInBytes]="300000" | |||||
extension="xls" | |||||
link="/assets/files/spreadsheet.xlsx" | |||||
></app-file> | |||||
<app-file | |||||
name="Q2 Account statement" | |||||
[sizeInBytes]="340000" | |||||
extension="xls" | |||||
link="/assets/files/spreadsheet.xlsx" | |||||
></app-file> | |||||
<app-file | |||||
name="Q3 Account statement" | |||||
[sizeInBytes]="320000" | |||||
extension="xls" | |||||
link="/assets/files/spreadsheet.xlsx" | |||||
></app-file> | |||||
</div> | |||||
<div class="files-heading">Analysis documents:</div> | |||||
<div class="files-holder"> | |||||
<app-file | |||||
name="Analysis" | |||||
[sizeInBytes]="500000" | |||||
extension="docx" | |||||
link="/assets/files/document.docx" | |||||
></app-file> | |||||
</div> | |||||
<app-textarea | |||||
label="Remarks" | |||||
[value]="remarks" | |||||
(onChange)="updateRemarks($event)" | |||||
></app-textarea> | |||||
<div class="compliance-check"> | |||||
<label> | |||||
<input type="checkbox" [(ngModel)]="isConcurring" (ngModelChange)="toggleIsConcurring($event)"> | |||||
<span>The panel agrees with the investigator's findings</span> | |||||
</label> | |||||
</div> |
@@ -0,0 +1,41 @@ | |||||
.screen-holder { | |||||
width: calc(70% - 2rem); | |||||
padding: 4rem; | |||||
margin: 0 auto; | |||||
} | |||||
h3 { | |||||
font-size: 2rem; | |||||
color: var(--dark-grey); | |||||
filter: brightness(80%); | |||||
font-weight: 500; | |||||
margin: 2rem 0; | |||||
} | |||||
.files-heading { | |||||
font-size: 1.4rem; | |||||
color: var(--primary); | |||||
font-weight: 400; | |||||
letter-spacing: 0.5px; | |||||
margin-bottom: 5px; | |||||
} | |||||
.files-holder { | |||||
margin-bottom: 25px; | |||||
& > * { | |||||
margin-right: 15px; | |||||
} | |||||
} | |||||
.compliance-check { | |||||
font-size: 1.4rem; | |||||
color: var(--dark-grey); | |||||
padding: 2rem; | |||||
text-align: center; | |||||
margin-top: 20px; | |||||
input { | |||||
margin-right: 10px; | |||||
} | |||||
} |
@@ -0,0 +1,25 @@ | |||||
import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||||
import { ConcurComplianceReviewComponent } from './concur-compliance-review.component'; | |||||
describe('ConcurComplianceReviewComponent', () => { | |||||
let component: ConcurComplianceReviewComponent; | |||||
let fixture: ComponentFixture<ConcurComplianceReviewComponent>; | |||||
beforeEach(async () => { | |||||
await TestBed.configureTestingModule({ | |||||
declarations: [ ConcurComplianceReviewComponent ] | |||||
}) | |||||
.compileComponents(); | |||||
}); | |||||
beforeEach(() => { | |||||
fixture = TestBed.createComponent(ConcurComplianceReviewComponent); | |||||
component = fixture.componentInstance; | |||||
fixture.detectChanges(); | |||||
}); | |||||
it('should create', () => { | |||||
expect(component).toBeTruthy(); | |||||
}); | |||||
}); |
@@ -0,0 +1,34 @@ | |||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; | |||||
@Component({ | |||||
selector: 'app-concur-compliance-review', | |||||
templateUrl: './concur-compliance-review.component.html', | |||||
styleUrls: ['./concur-compliance-review.component.scss'] | |||||
}) | |||||
export class ConcurComplianceReviewComponent implements OnInit { | |||||
@Input() remarks = ''; | |||||
@Input() isConcurring = true; | |||||
@Output() onRemarksUpdate = new EventEmitter<string>(); | |||||
@Output() onIsConcurringUpdate = new EventEmitter<boolean>(); | |||||
constructor() { } | |||||
ngOnInit(): void { | |||||
} | |||||
updateRemarks(remarks: string) { | |||||
this.remarks = remarks; | |||||
this.onRemarksUpdate.emit(remarks); | |||||
} | |||||
toggleIsConcurring(isConcurring: boolean) { | |||||
this.isConcurring = isConcurring; | |||||
this.onIsConcurringUpdate.emit(isConcurring); | |||||
} | |||||
} |
@@ -32,9 +32,20 @@ | |||||
<app-review-non-compliance | <app-review-non-compliance | ||||
*ngIf="state === 'REVIEW NON COMPLIANCE'" | *ngIf="state === 'REVIEW NON COMPLIANCE'" | ||||
[panelRemarks]="panelRemarks" | |||||
[isNonCompliant]="isNonCompliant" | [isNonCompliant]="isNonCompliant" | ||||
(onNonComplianceUpdate)="isNonCompliant = $event" | (onNonComplianceUpdate)="isNonCompliant = $event" | ||||
></app-review-non-compliance> | ></app-review-non-compliance> | ||||
<app-concur-compliance-review | |||||
*ngIf="state === 'CONCUR COMPLIANCE REVIEW'" | |||||
[isConcurring]="isPanelConcurring" | |||||
[remarks]="panelRemarks" | |||||
(onIsConcurringUpdate)="isPanelConcurring = $event" | |||||
(onRemarksUpdate)="updatePanelRemarks($event)" | |||||
></app-concur-compliance-review> | |||||
<div class="form-action-buttons"> | <div class="form-action-buttons"> | ||||
<button class="common-button neutral" *ngIf="stateHistory.length > 0" (click)="goBack()"> | <button class="common-button neutral" *ngIf="stateHistory.length > 0" (click)="goBack()"> | ||||
@@ -1,6 +1,6 @@ | |||||
import { Component, OnInit } from '@angular/core'; | import { Component, OnInit } from '@angular/core'; | ||||
type State = 'VIEW INITIAL DETAILS'|'ENTER MORE DETAILS'|'ASSIGN COMMITTEE'|'REVIEW NON COMPLIANCE'; | |||||
type State = 'VIEW INITIAL DETAILS'|'ENTER MORE DETAILS'|'ASSIGN COMMITTEE'|'REVIEW NON COMPLIANCE'|'CONCUR COMPLIANCE REVIEW'; | |||||
type Role = 'Investigator'|'Hod'|'Panel'; | type Role = 'Investigator'|'Hod'|'Panel'; | ||||
@Component({ | @Component({ | ||||
@@ -12,6 +12,9 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
hasEnoughData = false; | hasEnoughData = false; | ||||
isNonCompliant = false; | isNonCompliant = false; | ||||
isPanelConcurring = true; | |||||
panelRemarks = ''; | |||||
state: State; | state: State; | ||||
stateHistory: Array<State> = []; | stateHistory: Array<State> = []; | ||||
@@ -22,6 +25,11 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
constructor() { | constructor() { | ||||
const panelRemarks = localStorage.getItem('panelRemarks'); | |||||
if (panelRemarks) { | |||||
this.panelRemarks = panelRemarks; | |||||
} | |||||
const loginEmail = localStorage.getItem('loginEmail'); | const loginEmail = localStorage.getItem('loginEmail'); | ||||
if (loginEmail && loginEmail.toLocaleLowerCase().startsWith('hod')) { | if (loginEmail && loginEmail.toLocaleLowerCase().startsWith('hod')) { | ||||
@@ -47,6 +55,10 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
this.state = 'REVIEW NON COMPLIANCE'; | this.state = 'REVIEW NON COMPLIANCE'; | ||||
this.executingRole = 'Investigator'; | this.executingRole = 'Investigator'; | ||||
break; | break; | ||||
case 'CONCUR COMPLIANCE REVIEW': | |||||
this.state = 'CONCUR COMPLIANCE REVIEW'; | |||||
this.executingRole = 'Panel'; | |||||
break; | |||||
default: | default: | ||||
this.state = 'VIEW INITIAL DETAILS'; | this.state = 'VIEW INITIAL DETAILS'; | ||||
this.executingRole = 'Investigator'; | this.executingRole = 'Investigator'; | ||||
@@ -55,6 +67,11 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
this.canExecute = this.loginRole === this.executingRole; | this.canExecute = this.loginRole === this.executingRole; | ||||
} | } | ||||
updatePanelRemarks(remarks: string) { | |||||
this.panelRemarks = remarks; | |||||
localStorage.setItem('panelRemarks', remarks); | |||||
} | |||||
proceed() { | proceed() { | ||||
this.stateHistory.push(this.state); | this.stateHistory.push(this.state); | ||||
@@ -76,6 +93,16 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
this.state = 'REVIEW NON COMPLIANCE'; | this.state = 'REVIEW NON COMPLIANCE'; | ||||
this.executingRole = 'Investigator'; | this.executingRole = 'Investigator'; | ||||
break; | break; | ||||
case 'REVIEW NON COMPLIANCE': | |||||
this.state = 'CONCUR COMPLIANCE REVIEW'; | |||||
this.executingRole = 'Panel'; | |||||
break; | |||||
case 'CONCUR COMPLIANCE REVIEW': | |||||
if (!this.isPanelConcurring) { | |||||
this.state = 'REVIEW NON COMPLIANCE'; | |||||
this.executingRole = 'Investigator'; | |||||
} | |||||
break; | |||||
} | } | ||||
localStorage.setItem('state', this.state); | localStorage.setItem('state', this.state); | ||||
@@ -94,6 +121,9 @@ export class InvestigateBusinessEntitiesAndIndividualsComponent implements OnIni | |||||
case 'ASSIGN COMMITTEE': | case 'ASSIGN COMMITTEE': | ||||
this.executingRole = 'Hod'; | this.executingRole = 'Hod'; | ||||
break; | break; | ||||
case 'CONCUR COMPLIANCE REVIEW': | |||||
this.executingRole = 'Panel'; | |||||
break; | |||||
default: | default: | ||||
this.executingRole = 'Investigator'; | this.executingRole = 'Investigator'; | ||||
} | } | ||||
@@ -1,6 +1,11 @@ | |||||
<div class="screen-holder"> | <div class="screen-holder"> | ||||
<h3>Review compliance of entity</h3> | <h3>Review compliance of entity</h3> | ||||
<ng-container *ngIf="panelRemarks"> | |||||
<div class="panel-heading">Panel remarks:</div> | |||||
<p class="panel-remarks">{{ panelRemarks }}</p> | |||||
</ng-container> | |||||
<div class="files-heading">Financial statements:</div> | <div class="files-heading">Financial statements:</div> | ||||
<div class="files-holder"> | <div class="files-holder"> | ||||
<app-file | <app-file | ||||
@@ -12,6 +12,19 @@ h3 { | |||||
margin: 2rem 0; | margin: 2rem 0; | ||||
} | } | ||||
.panel-heading { | |||||
font-size: 1.8rem; | |||||
color: var(--highlight); | |||||
font-weight: 400; | |||||
letter-spacing: 0.5px; | |||||
margin-bottom: 5px; | |||||
} | |||||
.panel-remarks { | |||||
font-size: 1.6rem; | |||||
margin-bottom: 25px; | |||||
} | |||||
.files-heading { | .files-heading { | ||||
font-size: 1.4rem; | font-size: 1.4rem; | ||||
color: var(--primary); | color: var(--primary); | ||||
@@ -6,6 +6,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; | |||||
styleUrls: ['./review-non-compliance.component.scss'] | styleUrls: ['./review-non-compliance.component.scss'] | ||||
}) | }) | ||||
export class ReviewNonComplianceComponent implements OnInit { | export class ReviewNonComplianceComponent implements OnInit { | ||||
@Input() panelRemarks = ''; | |||||
@Input() isNonCompliant = false; | @Input() isNonCompliant = false; | ||||
@Output() onNonComplianceUpdate = new EventEmitter<boolean>(); | @Output() onNonComplianceUpdate = new EventEmitter<boolean>(); | ||||
@@ -1,4 +1,4 @@ | |||||
<div class="input-holder"> | <div class="input-holder"> | ||||
<label> {{ label }}: </label> | <label> {{ label }}: </label> | ||||
<textarea [placeholder]="placeholder ? placeholder : ''"></textarea> | |||||
<textarea [placeholder]="placeholder ? placeholder : ''" [ngModel]="value" (ngModelChange)="updateValue($event)"></textarea> | |||||
</div> | </div> |
@@ -1,4 +1,4 @@ | |||||
import { Component, Input, OnInit } from '@angular/core'; | |||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; | |||||
@Component({ | @Component({ | ||||
selector: 'app-textarea', | selector: 'app-textarea', | ||||
@@ -8,10 +8,17 @@ import { Component, Input, OnInit } from '@angular/core'; | |||||
export class TextareaComponent implements OnInit { | export class TextareaComponent implements OnInit { | ||||
@Input() label = ''; | @Input() label = ''; | ||||
@Input() placeholder: string|undefined; | @Input() placeholder: string|undefined; | ||||
@Input() value = ''; | |||||
@Output() onChange = new EventEmitter<string>(); | |||||
constructor() { } | constructor() { } | ||||
ngOnInit(): void { | ngOnInit(): void { | ||||
} | } | ||||
updateValue(value: string) { | |||||
this.onChange.emit(value); | |||||
} | |||||
} | } |