File tree Expand file tree Collapse file tree 1 file changed +19
-5
lines changed
src/components/game-events Expand file tree Collapse file tree 1 file changed +19
-5
lines changed Original file line number Diff line number Diff line change 16
16
Submitted by: {{gameEvent.origins}}
17
17
</p >
18
18
<div class =" btn-accept"
19
- v-if =" gameEvent.type === 'possibleGoal' "
19
+ v-if =" showAcceptGoal( gameEvent) "
20
20
v-b-tooltip.hover.righttop =" 'Accept this goal'" >
21
21
<a @click =" acceptGoal(gameEvent)" >
22
22
<font-awesome-icon icon =" check-circle" class =" fa-lg" ></font-awesome-icon >
38
38
},
39
39
gameEventsPresent () {
40
40
return this .gameEvents != null && this .gameEvents .length > 0 ;
41
+ },
42
+ goalEventPresent () {
43
+ for (let event of this .state .gameEvents ) {
44
+ if (event .type === ' goal' ) {
45
+ return true ;
46
+ }
47
+ }
48
+ return false ;
41
49
}
42
50
},
43
51
methods: {
52
+ showAcceptGoal (gameEvent ) {
53
+ return ! this .goalEventPresent && gameEvent .type === ' possibleGoal' ;
54
+ },
44
55
details (gameEvent ) {
45
56
let key = Object .keys (gameEvent .details )[0 ];
46
57
return gameEvent .details [key];
91
102
text-align : left ;
92
103
}
93
104
94
- .details-row {
95
- margin-bottom : 0 ;
105
+ .btn-accept {
106
+ position : absolute ;
107
+ right : 0 ;
108
+ bottom : 0 ;
109
+ margin : 0.3em ;
96
110
}
97
111
98
- .btn-accept {
99
- margin : 0.1 em ;
112
+ .details-row {
113
+ margin-bottom : 0 ;
100
114
}
101
115
</style >
You can’t perform that action at this time.
0 commit comments