diff --git a/src/components/ControllerPage.vue b/src/components/ControllerPage.vue
index 6b14d27..2740f72 100644
--- a/src/components/ControllerPage.vue
+++ b/src/components/ControllerPage.vue
@@ -87,7 +87,51 @@
{{ state.sp.punt.home }} – {{ state.sp.punt.guest }}
-
+
+
+
+
+
+
+
+
+
+ FORMAZIONE SET {{ state.sp.set.home + state.sp.set.guest + 1 }}
+
+
+
+
+
@@ -201,6 +245,11 @@ export default {
reconnectAttempts: 0,
maxReconnectDelay: 30000,
confirmReset: false,
+ showFormazioneModal: false,
+ formazioneSetData: {
+ home: ["1", "2", "3", "4", "5", "6"],
+ guest: ["1", "2", "3", "4", "5", "6"],
+ },
showConfig: false,
showCambiTeam: false,
showCambi: false,
@@ -374,6 +423,9 @@ export default {
if (msg.type === 'state') {
this.state = msg.state
+ if (this.state.sp.partitaFinita && this.showFormazioneModal) {
+ this.showFormazioneModal = false
+ }
} else if (msg.type === 'error') {
console.error('[Controller] Server error:', msg.message)
// Fornisce feedback di errore all'utente.
@@ -454,6 +506,21 @@ export default {
console.error('[Controller] Error:', message)
},
+ confermaSetEApriFormazione() {
+ this.sendAction({ type: 'confermaSet' })
+ this.formazioneSetData = {
+ home: ["1", "2", "3", "4", "5", "6"],
+ guest: ["1", "2", "3", "4", "5", "6"],
+ }
+ this.showFormazioneModal = true
+ },
+
+ confermaFormazioneSet() {
+ this.sendAction({ type: 'setFormazione', team: 'home', form: this.formazioneSetData.home })
+ this.sendAction({ type: 'setFormazione', team: 'guest', form: this.formazioneSetData.guest })
+ this.showFormazioneModal = false
+ },
+
doReset() {
this.sendAction({ type: 'resetta' })
this.confirmReset = false