Skip to content

Commit a688cb0

Browse files
committed
Forbid switching from pre-stages to next stage
1 parent a03b36e commit a688cb0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/control/MatchSettingsBar.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<b-button v-b-tooltip.hover.d500
2323
title="Proceed to the next stage"
2424
v-on:click="nextStage"
25-
:disabled="forbidMatchControls || noNextStage">
25+
:disabled="forbidMatchControls || noNextStage || preStage">
2626
Proceed to {{nextStageText}}
2727
</b-button>
2828

@@ -48,9 +48,9 @@
4848

4949
<script>
5050
import Settings from "../settings/Settings";
51-
import {getNextStage, canEndGameFromStage, stageNames} from "../../refereeState";
51+
import {getNextStage, canEndGameFromStage, stageNames, isPreStage} from "@/refereeState";
5252
import NewEvent from "../create-event/NewEvent";
53-
import {submitChange} from "../../submit";
53+
import {submitChange} from "@/submit";
5454
5555
export default {
5656
name: "MatchSettingsBar",
@@ -103,6 +103,9 @@
103103
showEndGame() {
104104
return canEndGameFromStage(this.$store.state.matchState.stage);
105105
},
106+
preStage() {
107+
return isPreStage(this.$store.state.matchState);
108+
},
106109
}
107110
}
108111
</script>

src/refereeState.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ export let isPreStage = function (state) {
5454
return state.stage === 'NORMAL_FIRST_HALF_PRE'
5555
|| state.stage === 'NORMAL_SECOND_HALF_PRE'
5656
|| state.stage === 'EXTRA_FIRST_HALF_PRE'
57-
|| state.stage === 'EXTRA_SECOND_HALF_PRE'
58-
|| state.stage === 'PENALTY_SHOOTOUT';
57+
|| state.stage === 'EXTRA_SECOND_HALF_PRE';
5958
};
6059

6160
export let convertStringLocation = function (loc) {

0 commit comments

Comments
 (0)