Options
All
  • Public
  • Public/Protected
  • All
Menu

Registers groupsComponent as a component in knockout

Hierarchy

  • groupsController

Index

Constructors

constructor

Properties

Private _env

_env: any = ko.observable(appConfig.env)

Private allUsersArray

allUsersArray: any = ko.observableArray([])

Private allUsersNameArray

allUsersNameArray: any = ko.observableArray([])

Private currentChatId

currentChatId: any = ko.observable(null)

Private current_user

current_user: any = ko.observable("")

Private current_user_obj

current_user_obj: any = ko.observable({})

Private groupArray

groupArray: KnockoutObservableArray<collab.component.IChatHistory> = ko.observableArray([])

Private groupUsersList

groupUsersList: any = ko.observableArray([])

Private group_users

group_users: any = ko.observableArray([])

Private groupsQuery

groupsQuery: any = ko.observable("")

searchGroupsResults

searchGroupsResults: any = ko.computed(() => {const q = this.groupsQuery().toLowerCase();return this.groupArray().filter((i: any) => {return i.subject.toLowerCase().indexOf(q) >= 0;});})

A user can have multiple groups. The method searches for particular group and bounces back the result.

function

searchGroupsResults

returns

Returns the searched group name(s)

Private selectedIndex

selectedIndex: any = ko.observable(0)

Private showChatComponent

showChatComponent: any = ko.observable(false)

Private showLoader

showLoader: any = ko.observable(false)

Private subject

subject: any = ko.observable("")

Private subscriptions

subscriptions: Array<any> = []

Methods

changeIcon

  • changeIcon(): void

chatGroupCreation

  • chatGroupCreation(): void

closeGroupModal

  • closeGroupModal(): void

closePopover

  • closePopover(): void

dispose

  • dispose(): void

focusOnSearch

  • focusOnSearch(): void

init

  • init(): void

onIndexSelected

  • onIndexSelected(index: any): void

removeUserRecent

  • removeUserRecent(res: any): void
  • A user has a list of all the groups that he is a participant of. He can remove a particular group from his list only if he is the creator of that group. removeUserRecent removes a group conversation from your list.

    Parameters

    • res: any

      conversation group details that is to be removed

    Returns void

startChat

  • startChat(chatIndex: collab.component.IChatHistory): void