Class: AddPlayersComponent

AddPlayersComponent()

A component which represents the "Add Players" page. Allows users to add/remove players from their team.

Constructor

new AddPlayersComponent()

Source:

Extends

  • Component

Members

all_players :Array.<object>

All available players, whether they are on the user's team or not.
Type:
  • Array.<object>
Source:

filtered_players :Array.<object>

Array of currently displayed players, after the filter has been applied.
Type:
  • Array.<object>
Source:

my_team :Array.<object>

Array of players currently on the user's team.
Type:
  • Array.<object>
Source:

my_team_only :boolean

If true, then only the players on the user's team will be shown.
Type:
  • boolean
Source:

possible_players :Array.<object>

Array of currently displayed players, before the filter has been applied.
Type:
  • Array.<object>
Source:

quick_filter :string

The current value of the quick filter for players. If empty string, no filter is applied.
Type:
  • string
Source:

Methods

add_to_team(player)

Add the given player to the user's team, if not already there.
Parameters:
Name Type Description
player object
Source:

on_filter_change()

Called when the quick-filter changes. Applies the filter to the displayed players.
Source:

on_photo_hover(player)

Called when the user hovers over a player. Toggles the stats to be shown.
Parameters:
Name Type Description
player object
Source:

on_photo_leave(player)

Called when the user un-hovers over a player. Toggles the stats to hide.
Parameters:
Name Type Description
player object
Source:

remove_from_team(player)

Remove the given player from the user's team, if there.
Parameters:
Name Type Description
player object
Source:

to_all_players()

When called, change the display to show all available players.
Source:

to_my_team_only()

When called, change the display to show only the user's team.
Source:

(async) vue_on_create() → {Promise.<void>}

Called when the page is instantiated.
Source:
Returns:
Type
Promise.<void>