|
|
|
@ -11,8 +11,10 @@
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Current</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Started</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Done</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Reset</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Best Of</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Series score</th>
|
|
|
|
|
<th class="border border-gray-400 text-left px-8 py-4">Reset score</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
@ -23,8 +25,10 @@
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.current }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.started }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.done }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.reset }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.bestOf }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.series.blue }} - {{ e.series.orange }}</td>
|
|
|
|
|
<td class="border border-gray-400 text-left px-8 py-4">{{ e.resets.blue }} - {{ e.resets.orange }}</td>
|
|
|
|
|
<!-- <td class="border border-gray-400 text-left px-8 py-4">
|
|
|
|
|
<table v-if="e.games">
|
|
|
|
|
<tbody>
|
|
|
|
@ -57,14 +61,23 @@
|
|
|
|
|
<input v-model="started" class="my-4 border border-gray-500 rounded-lg w-6 h-6" type="checkbox" />
|
|
|
|
|
<p class="mt-4">Done</p>
|
|
|
|
|
<input v-model="done" class="my-4 border border-gray-500 rounded-lg w-6 h-6" type="checkbox" />
|
|
|
|
|
<p class="mt-4">Reset</p>
|
|
|
|
|
<input v-model="reset" class="my-4 border border-gray-500 rounded-lg w-6 h-6" type="checkbox" />
|
|
|
|
|
<p class="mt-4">Best Of</p>
|
|
|
|
|
<input v-model="bestof" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
<fieldset v-if="item" class="border border-gray-400 rounded px-6 my-4">
|
|
|
|
|
<legend>Series Score</legend>
|
|
|
|
|
<p class="mt-4">Blue team</p>
|
|
|
|
|
<input v-model="blueSeries" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
<p class="mt-4">Orange team</p>
|
|
|
|
|
<input v-model="orangeSeries" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
<legend>Series Score</legend>
|
|
|
|
|
<p class="mt-4">Blue team</p>
|
|
|
|
|
<input v-model="blueSeries" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
<p class="mt-4">Orange team</p>
|
|
|
|
|
<input v-model="orangeSeries" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
</fieldset>
|
|
|
|
|
<fieldset v-if="item && reset === true" class="border border-gray-400 rounded px-6 my-4">
|
|
|
|
|
<legend>Reset Score</legend>
|
|
|
|
|
<p class="mt-4">Blue team</p>
|
|
|
|
|
<input v-model="blueReset" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
<p class="mt-4">Orange team</p>
|
|
|
|
|
<input v-model="orangeReset" class="block my-4 border border-gray-500 rounded-lg w-64 h-8 px-4" type="number" required />
|
|
|
|
|
</fieldset>
|
|
|
|
|
<button class="block w-64 h-10 text-white bg-red-700 rounded-lg hover:bg-red-600">Submit</button>
|
|
|
|
|
<button @click.prevent="delForm" v-if="item" class="block mt-4 w-64 h-10 text-white bg-red-700 rounded-lg hover:bg-red-600">Delete</button>
|
|
|
|
@ -88,9 +101,12 @@ export default {
|
|
|
|
|
const current = ref(false)
|
|
|
|
|
const started = ref(false)
|
|
|
|
|
const done = ref(false)
|
|
|
|
|
const reset = ref(0)
|
|
|
|
|
const bestof = ref(0)
|
|
|
|
|
const blueSeries = ref(0)
|
|
|
|
|
const orangeSeries = ref(0)
|
|
|
|
|
const blueReset = ref(0)
|
|
|
|
|
const orangeReset = ref(0)
|
|
|
|
|
|
|
|
|
|
const setItem = (e) => {
|
|
|
|
|
item.value = e._id
|
|
|
|
@ -100,12 +116,15 @@ export default {
|
|
|
|
|
current.value = e.current
|
|
|
|
|
started.value = e.started
|
|
|
|
|
done.value = e.done
|
|
|
|
|
reset.value = e.reset
|
|
|
|
|
bestof.value = e.bestOf
|
|
|
|
|
blueSeries.value = e.series.blue
|
|
|
|
|
orangeSeries.value = e.series.orange
|
|
|
|
|
blueReset.value = e.resets.blue
|
|
|
|
|
orangeReset.value = e.resets.orange
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const reset = () => {
|
|
|
|
|
const resetf = () => {
|
|
|
|
|
item.value = ''
|
|
|
|
|
type.value = ''
|
|
|
|
|
blue.value = ''
|
|
|
|
@ -113,9 +132,12 @@ export default {
|
|
|
|
|
current.value = false
|
|
|
|
|
started.value = false
|
|
|
|
|
done.value = false
|
|
|
|
|
reset.value = false
|
|
|
|
|
bestof.value = 0
|
|
|
|
|
blueSeries.value = 0
|
|
|
|
|
orangeSeries.value = 0
|
|
|
|
|
blueReset.value = 0
|
|
|
|
|
orangeReset.value = 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const form = () => {
|
|
|
|
@ -127,11 +149,16 @@ export default {
|
|
|
|
|
current: current.value,
|
|
|
|
|
started: started.value,
|
|
|
|
|
done: done.value,
|
|
|
|
|
reset: reset.value,
|
|
|
|
|
bestOf: bestof.value,
|
|
|
|
|
series: {
|
|
|
|
|
blue: blueSeries.value,
|
|
|
|
|
orange: orangeSeries.value,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
resets: {
|
|
|
|
|
blue: blueReset.value,
|
|
|
|
|
orange: orangeReset.value,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
} else if (type.value !== '') {
|
|
|
|
|
create('matches', {
|
|
|
|
@ -144,13 +171,13 @@ export default {
|
|
|
|
|
bestOf: bestof.value,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
reset()
|
|
|
|
|
resetf()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const delForm = () => {
|
|
|
|
|
if (item.value) {
|
|
|
|
|
del('matches', item.value)
|
|
|
|
|
reset()
|
|
|
|
|
resetf()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -162,9 +189,12 @@ export default {
|
|
|
|
|
orange,
|
|
|
|
|
blueSeries,
|
|
|
|
|
orangeSeries,
|
|
|
|
|
blueReset,
|
|
|
|
|
orangeReset,
|
|
|
|
|
current,
|
|
|
|
|
started,
|
|
|
|
|
done,
|
|
|
|
|
reset,
|
|
|
|
|
bestof,
|
|
|
|
|
setItem,
|
|
|
|
|
form,
|
|
|
|
|