File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 12
12
</template >
13
13
14
14
<script >
15
+ import Vue from ' vue'
15
16
import custosStore from " airavata-custos-portal/src/lib/store" ;
16
17
import {custosService } from " airavata-custos-portal/src/lib/store/util/custos.util" ;
17
18
19
+ Vue .prototype .userFetchStatus = {};
20
+
18
21
export default {
19
22
name: " block-tooltip-user" ,
20
23
store: custosStore,
@@ -42,9 +45,11 @@ export default {
42
45
}
43
46
},
44
47
methods: {
45
- refreshData () {
46
- if (! this .user ) {
47
- this .$store .dispatch (" user/fetchUsers" , {clientId: custosService .clientId , username: this .username });
48
+ async refreshData () {
49
+ if (! this .user && ! this .userFetchStatus [this .username ]) {
50
+ this .userFetchStatus [this .username ] = " FETCHING" ;
51
+ await this .$store .dispatch (" user/fetchUsers" , {clientId: custosService .clientId , username: this .username });
52
+ this .userFetchStatus [this .username ] = " COMPLETED" ;
48
53
}
49
54
}
50
55
},
You can’t perform that action at this time.
0 commit comments