diff options
author | Ittay Stern <ittay.stern@att.com> | 2019-07-07 19:23:03 +0300 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-07-08 16:13:43 +0300 |
commit | f792671ae247a931f34d902e9276202b5016ef9a (patch) | |
tree | 6104971e8074c9a3d720836276ff18619719ec02 /vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts | |
parent | fc62274e8d15964d63c62bf0e2f4abc040252ee9 (diff) |
Merge from ecomp 718fd196 - Modern UI
Issue-ID: VID-378
Change-Id: I2736b98426e324ec3aa233b034229ba84d99839f
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts b/vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts deleted file mode 100644 index 9736563af..000000000 --- a/vid-webpack-master/src/app/shared/components/searchMembersModal/members-table/members-table.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import {Component, Input, OnChanges, Output, SimpleChanges, EventEmitter} from '@angular/core'; -import {VnfMember} from "../../../models/VnfMember"; -import {MembersTableService} from "./members-table.service"; -import * as _ from 'lodash'; - -export class CustomTableColumnDefinition { - public displayName = ''; - public key : any = ''; - public type? = 'text'; - public filter? = ''; -} - -@Component({ - selector: 'app-members-table', - templateUrl: './members-table.component.html', - styleUrls: ['./members-table.component.scss'] -}) - -export class MembersTableComponent implements OnChanges{ - filterValue: string = null; - allMemberStatusMap = null; - membersTableService : MembersTableService; - headers: CustomTableColumnDefinition[] = MembersTableService.getHeaders(); - @Input() data: VnfMember[]; - @Input() description: string; - @Output() selectedMembersAmountChange : EventEmitter<number> = new EventEmitter(); - constructor(private _membersTableService : MembersTableService){ - this.membersTableService = this._membersTableService; - } - - ngOnChanges(changes: SimpleChanges): void { - if(_.isNil(this.data)){ - this._membersTableService.resetAll(); - }else { - this._membersTableService.allMemberStatusMap = MembersTableService.generateAllMembersStatus(this.data); - this._membersTableService.filteredMembers = MembersTableService.sortVnfMembersByName(this.data, "instanceName"); - this._membersTableService.updateAmountsAndCheckAll(); - } - } - - search(searchStr: string): void { - this.filterValue = searchStr; - this._membersTableService.filterMembers(this.filterValue); - } - - changeAllCheckboxStatus(status: boolean) : void { - this._membersTableService.changeAllCheckboxStatus(status); - this.selectedMembersAmountChange.emit(this._membersTableService.numberOfSelectedVnfMembers); - } - - - changeCheckboxStatus(vnfInstanceId: string) : void { - this._membersTableService.changeCheckboxStatus(vnfInstanceId); - this.selectedMembersAmountChange.emit(this._membersTableService.numberOfSelectedVnfMembers); - } - -} |