store.main. getters

The getters to get data that's based off of the store state, but requires manipulation

Methods

(static) ORG_DOMAIN() → {String}

Get the domain of the organization (@domain.tld)

Returns:

The domain of the organization

Type: 
String

(static) account_ref() → {Object}

Get the user's absolute document reference (the signed-in account, even if it's a linked account)

Default Value
  • null
Returns:

The firebase document reference for the user's account

Type: 
Object

(static) active_doc() → {Object}

Get the user's active document (the signed-in account's doc, or the linked account's if it exists)

Default Value
  • null
See
  • active_ref
Returns:

The local copy of the document being used for dashboard data

Type: 
Object

(static) active_ref() → {Object}

Get the user's active document reference (the signed-in account's doc ref, or the linked account's if it exists)

Default Value
  • null
Returns:

The firebase document reference for the user's active account

Type: 
Object

(static) done_daily_survey() → {Boolean}

Check if user has completed the daily survey, or is a teacher

Default Value
  • false
See
  • save_daily_survey
Returns:

if the user / proxy for the user has completed the join form

Type: 
Boolean

(static) done_join_form() → {Boolean}

Check if user has completed the join form

Default Value
  • false
Returns:

if the user / proxy for the user has completed the join form

Type: 
Boolean

(static) done_tutorial() → {Boolean}

Check if user has completed the tutorial

Default Value
  • false
Returns:

if the user / proxy for the user has completed the tutorial

Type: 
Boolean

(static) finished_tasks() → {Array}

return all the finished tasks

Default Value
  • false
See
  • set_finished
Returns:

Finished Tasks

Type: 
Array

(static) get_loaded_classes() → {Array}

Get the classes that have been loaded for the loaded_email, and set the .is_joined property on each

Default Value
  • []
See
  • loaded_classes
  • loaded_email
  • fetch_classes_by_email
Returns:

Array of classes that have been loaded for the loaded_email

Type: 
Array

(static) get_theme() → {Theme}

Get theme from local storage or user doc

Default Value
  • Theme.Light
Returns:

Theme.Light or Theme.Dark

Type: 
Theme

(static) is_admin() → {Boolean}

Check if user is a admin - currently true for all users for testing purposes TODO

Default Value
  • false
Returns:

if the user is an admin

Type: 
Boolean

(static) is_teacher() → {Boolean}

Check if user is a teacher, or is in teacher mode locally (for testing)

Default Value
  • false
Returns:

if the user is a teacher

Type: 
Boolean

(static) linked_account_ref() → {Object}

Get the user's linked account document reference (the account that the user is linked to, if it exists)

Default Value
  • null
Returns:

The firebase document reference for the user's linked account

Type: 
Object

(static) linked_accounts() → {Array}

Get all linked accounts from active_doc.linked

Default Value
  • []
Returns:

Array of linked account emails

Type: 
Array

(static) non_recent_signin() → {Boolean}

Check if user signed in within the last 24 hours

Default Value
  • false
Returns:

if the user's session started within the last 24 hours

Type: 
Boolean

(static) notes() → {Object}

return all the notes in a dictionary with the ref as the key

Default Value
  • {}
Returns:

Dictionary of notes with refs as keys

Type: 
Object

(static) recently_joined() → {Boolean}

Check if user joined within the last 12 hours

Default Value
  • false
Returns:

if the user's account was created within the last 12 hours

Type: 
Boolean

(static) simplified() → {Boolean}

Get if the user is using a simplified view (true) or not (false)

Returns:

If the user is using a simplified view

Type: 
Boolean

(static) upcoming() → {Array}

et the upcoming tasks (after 8AM today)

Default Value
  • []
See
  • tasks
  • upcoming_todo
Returns:

Array of upcoming tasks

Type: 
Array

(static) upcoming_todo() → {Array}

Get the upcoming tasks (after 8AM today) that havent been marked as done

Default Value
  • []
See
  • tasks
  • upcoming
Returns:

Array of upcoming tasks

Type: 
Array