This repository was archived by the owner on Jul 11, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 7
7
<v-tabs-items >
8
8
<v-tab-item >
9
9
<v-card flat >
10
+ <v-progress-linear
11
+ v-if =" isFetchingSessions"
12
+ :indeterminate =" true"
13
+ />
14
+ <div
15
+ v-if =" !isFetchingSessions && !hasSessions"
16
+ class =" headline pa-4"
17
+ >Nenhuma Sessão! 😯</div >
10
18
<v-list two-line subheader >
11
19
<v-expansion-panel popout >
12
20
<v-expansion-panel-content
@@ -85,20 +93,26 @@ export default {
85
93
data : () => ({
86
94
sessions: [],
87
95
agendas: [],
88
- tab: " current"
96
+ tab: " current" ,
97
+ isFetchingSessions: false
89
98
}),
90
99
computed: {
91
100
... mapState ([" selectedAssociation" ]),
92
101
filteredSessions : function () {
93
102
return this .sessions .filter (s => s .status === this .statusFilter );
103
+ },
104
+ hasSessions : function () {
105
+ return this .filteredSessions .length !== 0 ;
94
106
}
95
107
},
96
108
mounted () {
97
109
this .addAssociationsSnapListener ();
110
+ this .isFetchingSessions = true ;
98
111
},
99
112
methods: {
100
113
addAssociationsSnapListener () {
101
114
sessionsRef (this .selectedAssociation .id ).onSnapshot (snapshot => {
115
+ this .isFetchingSessions = false
102
116
snapshot .docChanges ().forEach (async change => {
103
117
if (change .type === " added" ) {
104
118
this .sessions .push ({
@@ -160,6 +174,3 @@ export default {
160
174
}
161
175
};
162
176
</script >
163
-
164
- <style >
165
- </style >
You can’t perform that action at this time.
0 commit comments