Merge pull request #7 from kelvinikome/master
Bug fixes
diff --git a/src/app/centers/form/form.component.ts b/src/app/centers/form/form.component.ts
index 4c2d42c..bec8e31 100644
--- a/src/app/centers/form/form.component.ts
+++ b/src/app/centers/form/form.component.ts
@@ -31,6 +31,7 @@
import * as fromRoot from '../../store';
import {SEARCH as SEARCH_OFFICE} from '../../store/office/office.actions';
import {SEARCH as SEARCH_ROLE} from '../../store/role/role.actions';
+import { Staff } from '../../services/domain/center/staff';
export interface EmployeeFormData {
user: User;
@@ -66,6 +67,8 @@
roles: Observable<Role[]>;
+ staffs: Staff[];
+
detailForm: FormGroup;
contactForm: FormGroup;
officeForm: FormGroup;
diff --git a/src/app/collection/collection.component.ts b/src/app/collection/collection.component.ts
index e338269..6696f24 100644
--- a/src/app/collection/collection.component.ts
+++ b/src/app/collection/collection.component.ts
@@ -1,12 +1,15 @@
import {Component, OnInit} from '@angular/core';
import {ActivatedRoute, Params, Router} from '@angular/router';
-import {Employee} from '../services/office/domain/employee.model';
+import {Employee, Center} from '../services/office/domain/employee.model';
import {FetchRequest} from '../services/domain/paging/fetch-request.model';
import {TableData} from '../common/data-table/data-table.component';
import {Store} from '@ngrx/store';
import * as fromRoot from '../store';
import {Observable} from 'rxjs/Observable';
import {SEARCH} from '../store/employee/employee.actions';
+import { Staff } from '../services/domain/center/staff';
+import { Office } from '../services/office/domain/office.model';
+import { Group } from '../services/domain/group/group';
@@ -21,6 +24,11 @@
loading$: Observable<boolean>;
+ staffs: Staff[] = [];
+ offices: Office[] = [];
+ centers: Center[] = [];
+ groups: Group[] = [];
+
columns: any[] = [
{ name: 'name', label: 'Name' },
{ name: 'accountNumber', label: 'Account #' },
diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
index acdec56..3b0d001 100644
--- a/src/app/login/login.component.html
+++ b/src/app/login/login.component.html
@@ -70,14 +70,15 @@
</div>
<div class="app-input1">
<mat-form-field class="app-input2">
- <input matInput placeholder="Password" type="password" formControlName="password" autocomplete="new-password" [type]="!hide ? 'password' : 'text'">
+ <input matInput placeholder="Password" type="password" formControlName="password" autocomplete="new-password" [type]="passwordField ? 'password' : 'text'">
<mat-error *ngIf="form.get('password').hasError('required')">
Required
</mat-error>
- <mat-icon matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' : 'visibility' }}</mat-icon>
+ <mat-icon matSuffix (click)="togglePasswordField()">{{passwordField ? 'visibility_off' : 'visibility'}}</mat-icon>
</mat-form-field>
</div>
<br>
+ <p style="color:red;text-align: center">{{ error$ | async }}</p>
<br>
<p>
<button mat-raised-button color="primary" type="submit" class="btn" [disabled]="form.invalid">Sign In</button>
diff --git a/src/app/login/login.component.ts b/src/app/login/login.component.ts
index 69e5038..accd5c4 100644
--- a/src/app/login/login.component.ts
+++ b/src/app/login/login.component.ts
@@ -45,6 +45,7 @@
];
form: FormGroup;
+ passwordField: boolean = true;
error$: Observable<string>;
@@ -99,6 +100,13 @@
}
});
}
+
+ togglePasswordField() {
+ if (this.passwordField)
+ this.passwordField = false
+ else
+ this.passwordField = true
+ }
selectLanguage(selectChange: MatSelectChange): void {
sessionStorage.setItem(TRANSLATE_STORAGE_KEY, selectChange.value);
diff --git a/src/app/services/domain/center/staff.ts b/src/app/services/domain/center/staff.ts
new file mode 100644
index 0000000..5ba6eee
--- /dev/null
+++ b/src/app/services/domain/center/staff.ts
@@ -0,0 +1,3 @@
+export interface Staff {
+
+}
\ No newline at end of file
diff --git a/src/app/services/domain/group/group.ts b/src/app/services/domain/group/group.ts
new file mode 100644
index 0000000..bbc93b0
--- /dev/null
+++ b/src/app/services/domain/group/group.ts
@@ -0,0 +1,3 @@
+export interface Group {
+
+}
\ No newline at end of file