File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 3333
3434<script >
3535import InfiniteScrollSelect from ' @/components/widgets/InfiniteScrollSelect'
36+ import eventBus from ' @/config/eventBus'
3637
3738export default {
3839 name: ' ProjectMenu' ,
@@ -42,7 +43,8 @@ export default {
4243 data () {
4344 return {
4445 selectedProjectId: null ,
45- loading: false
46+ loading: false ,
47+ timestamp: new Date ().getTime ()
4648 }
4749 },
4850 created () {
@@ -59,7 +61,8 @@ export default {
5961 projectsApiParams () {
6062 return {
6163 details: ' min' ,
62- listall: true
64+ listall: true ,
65+ timestamp: this .timestamp
6366 }
6467 }
6568 },
@@ -70,6 +73,9 @@ export default {
7073 this .selectedProjectId = newId
7174 }
7275 )
76+ eventBus .on (' projects-updated' , (args ) => {
77+ this .timestamp = new Date ().getTime ()
78+ })
7379 },
7480 beforeUnmount () {
7581 if (this .unwatchProject ) {
Original file line number Diff line number Diff line change @@ -1386,6 +1386,9 @@ export default {
13861386 if (' successMethod' in action) {
13871387 action .successMethod (this , result)
13881388 }
1389+ if ([' createProject' , ' updateProject' , ' deleteProject' ].includes (action .api )) {
1390+ eventBus .emit (' projects-updated' , { action: action .api , project: this .resource })
1391+ }
13891392 resolve (true )
13901393 },
13911394 errorMethod : () => {
You can’t perform that action at this time.
0 commit comments