summaryrefslogtreecommitdiffstats
path: root/usecaseui-portal/src/app/services/services-list
diff options
context:
space:
mode:
Diffstat (limited to 'usecaseui-portal/src/app/services/services-list')
-rw-r--r--usecaseui-portal/src/app/services/services-list/services-list.component.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/usecaseui-portal/src/app/services/services-list/services-list.component.ts b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
index cc69e51a..0509e70a 100644
--- a/usecaseui-portal/src/app/services/services-list/services-list.component.ts
+++ b/usecaseui-portal/src/app/services/services-list/services-list.component.ts
@@ -44,6 +44,10 @@ export class ServicesListComponent implements OnInit {
this.myhttp.getAllCustomers()
.subscribe((data)=>{
this.customerList = data.map((item)=>{return {name:item["subscriber-name"],id:item["global-customer-id"]}});
+ if(this.customerList.length==0){
+ console.log("customerList.length == 0",this.customerList);
+ return false;
+ }
this.customerSelected = this.customerList[0];
this.choseCustomer(this.customerSelected);
// console.log(this.customers)
@@ -55,6 +59,10 @@ export class ServicesListComponent implements OnInit {
this.myhttp.getServiceTypes(this.customerSelected)
.subscribe((data)=>{
this.serviceTypeList = data.map((item)=>{return {name:item["service-type"]}});
+ if(this.serviceTypeList.length==0){
+ console.log("serviceTypeList.length == 0",this.serviceTypeList);
+ return false;
+ }
this.serviceTypeSelected = this.serviceTypeList[0];
this.choseServiceType(this.serviceTypeSelected);
// console.log(this.listServiceTypes);