--- /dev/null
+/* Copyright (c) 2019 AT&T Intellectual Property. #\r
+# #\r
+# Licensed under the Apache License, Version 2.0 (the "License"); #\r
+# you may not use this file except in compliance with the License. #\r
+# You may obtain a copy of the License at #\r
+# #\r
+# http://www.apache.org/licenses/LICENSE-2.0 #\r
+# #\r
+# Unless required by applicable law or agreed to in writing, software #\r
+# distributed under the License is distributed on an "AS IS" BASIS, #\r
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
+# See the License for the specific language governing permissions and #\r
+# limitations under the License. #\r
+##############################################################################*/\r
+\r
+\r
+import { Component, OnInit, Inject } from '@angular/core';\r
+import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material';\r
+import { TestHeadService } from '../../services/test-head.service';\r
+\r
+@Component({\r
+ selector: 'app-select-test-head-modal',\r
+ templateUrl: './select-test-head-modal.component.pug',\r
+ styleUrls: ['./select-test-head-modal.component.scss']\r
+})\r
+export class SelectTestHeadModalComponent implements OnInit {\r
+\r
+ public data = {test_heads: []};\r
+ public test_heads;\r
+ public search;\r
+ public selected;\r
+\r
+ constructor(public dialogRef: MatDialogRef<SelectTestHeadModalComponent>,\r
+ private testHeadService: TestHeadService,\r
+ @Inject(MAT_DIALOG_DATA) public input_data\r
+ ) { }\r
+\r
+ ngOnInit() {\r
+ this.search = {};\r
+ this.input_data.testHead = {};\r
+ this.test_heads = [{}];\r
+ this.testHeadService.find({$limit: -1})\r
+ .subscribe(\r
+ (result) => {\r
+ this.test_heads = result;\r
+ },\r
+ (error) => {\r
+ alert(error.error.message);\r
+ });\r
+ //console.log(this.test_heads)\r
+ }\r
+\r
+}\r