diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-10-31 16:15:03 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-10-31 16:15:03 +0000 |
commit | 6dc9028fbb3856c8c7814446ed176880f7d5213f (patch) | |
tree | b45870b8c946e5304a2fd3ad64a1453d166da0ca /app/assets/javascripts/sidebar/stores | |
parent | 74a0e855e1d5049e265c85ac01d511c25f2a46f1 (diff) | |
download | gitlab-ce-6dc9028fbb3856c8c7814446ed176880f7d5213f.tar.gz |
Load participants async
Diffstat (limited to 'app/assets/javascripts/sidebar/stores')
-rw-r--r-- | app/assets/javascripts/sidebar/stores/sidebar_store.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/assets/javascripts/sidebar/stores/sidebar_store.js b/app/assets/javascripts/sidebar/stores/sidebar_store.js index d5d04103f3f..3150221b685 100644 --- a/app/assets/javascripts/sidebar/stores/sidebar_store.js +++ b/app/assets/javascripts/sidebar/stores/sidebar_store.js @@ -12,10 +12,14 @@ export default class SidebarStore { this.assignees = []; this.isFetching = { assignees: true, + participants: true, + subscriptions: true, }; this.autocompleteProjects = []; this.moveToProjectId = 0; this.isLockDialogOpen = false; + this.participants = []; + this.subscribed = null; SidebarStore.singleton = this; } @@ -37,6 +41,20 @@ export default class SidebarStore { this.humanTotalTimeSpent = data.human_total_time_spent; } + setParticipantsData(data) { + this.isFetching.participants = false; + this.participants = data.participants || []; + } + + setSubscriptionsData(data) { + this.isFetching.subscriptions = false; + this.subscribed = data.subscribed || false; + } + + setFetchingState(key, value) { + this.isFetching[key] = value; + } + addAssignee(assignee) { if (!this.findAssignee(assignee)) { this.assignees.push(assignee); @@ -61,6 +79,10 @@ export default class SidebarStore { this.autocompleteProjects = projects; } + setSubscribedState(subscribed) { + this.subscribed = subscribed; + } + setMoveToProjectId(moveToProjectId) { this.moveToProjectId = moveToProjectId; } |