summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/views/management
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/views/management')
-rw-r--r--usecaseui-portal/src/app/views/management/management.component.ts18
1 files changed, 6 insertions, 12 deletions
diff --git a/usecaseui-portal/src/app/views/management/management.component.ts b/usecaseui-portal/src/app/views/management/management.component.ts
index 8220a166..b1a88e1e 100644
--- a/usecaseui-portal/src/app/views/management/management.component.ts
+++ b/usecaseui-portal/src/app/views/management/management.component.ts
@@ -28,27 +28,21 @@ import { ManagemencsService } from '../../core/services/managemencs.service';
export class ManagementComponent implements OnInit {
@HostBinding('@routerAnimate') routerAnimateState; //Routing animation
+ nocuster: boolean;
+ firstCustomer: string;
+
constructor(private managemencs: ManagemencsService) { }
ngOnInit() {
this.getAllCustomers();
}
-
- nocuster = true;
- firstCustomer = null;
- AllCustomersdata = [];
-
+
// Get all customers
getAllCustomers() {
this.managemencs.getAllCustomers().subscribe((data) => {
- if (data.length > 0) {
- this.nocuster = false;
- } else {
- this.nocuster = true;
- }
+ this.nocuster = data.length > 0 ? false : true;
})
}
-
createNewCustomer(customer) {
let createParams = {
customerId: customer
@@ -63,6 +57,6 @@ export class ManagementComponent implements OnInit {
})
}
clearCustomerInput() {
- this.firstCustomer = null;
+ this.firstCustomer = '';
}
}