File tree 2 files changed +5
-22
lines changed
kolibri/plugins/coach/assets/src/views
2 files changed +5
-22
lines changed Original file line number Diff line number Diff line change 52
52
<template #tbody >
53
53
<tbody >
54
54
<tr
55
- v-for =" learner in learnersWithLearnOnlyDevices "
55
+ v-for =" learner in learnerMap "
56
56
:key =" learner.id"
57
57
>
58
58
<td >
123
123
className () {
124
124
return this .$store .state .classSummary .name ;
125
125
},
126
- learnersWithLearnOnlyDevices () {
127
- const lods = Object .fromEntries (
128
- Object .entries (this .learnerMap ).filter (([key ]) => key in this .classSyncStatusList ),
129
- );
130
- return lods;
131
- },
132
126
syncStatusOptions () {
133
127
const options = [];
134
128
for (const [value ] of Object .entries (SyncStatus)) {
Original file line number Diff line number Diff line change 120
120
},
121
121
},
122
122
created () {
123
- this .isPolling = true ;
124
- this .pollClassListSyncStatuses ();
125
- },
126
- beforeDestroy () {
127
- this .isPolling = false ;
123
+ this .fetchClassListSyncStatus ();
128
124
},
129
125
methods: {
130
126
... mapActions ([' fetchUserSyncStatus' ]),
131
- pollClassListSyncStatuses () {
132
- if (! this .isPolling ) {
133
- return ;
134
- }
127
+ fetchClassListSyncStatus () {
135
128
this .fetchUserSyncStatus ({ member_of: this .$route .params .classId }).then (data => {
136
- if (! data || ! Array .isArray (data)) {
137
- return ;
129
+ if (Array .isArray (data)) {
130
+ this . userSet = new Set ( data . map ( item => item . user )) ;
138
131
}
139
- this .userSet = new Set (data .map (item => item .user ));
140
- setTimeout (() => {
141
- this .pollClassListSyncStatuses ();
142
- }, ' 10000' );
143
132
});
144
133
},
145
134
},
You can’t perform that action at this time.
0 commit comments