fixed forfeit button not working on page load
This commit is contained in:
@@ -520,6 +520,14 @@ templ fixtureResultDisplay(fixture *db.Fixture, result *db.FixtureResult) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
templ fixtureUploadPrompt(fixture *db.Fixture) {
|
templ fixtureUploadPrompt(fixture *db.Fixture) {
|
||||||
|
<div
|
||||||
|
x-data="{
|
||||||
|
open: false,
|
||||||
|
forfeitType: 'outright',
|
||||||
|
forfeitTeam: '',
|
||||||
|
forfeitReason: '',
|
||||||
|
}"
|
||||||
|
>
|
||||||
<div class="bg-mantle border border-surface1 rounded-lg p-6 text-center">
|
<div class="bg-mantle border border-surface1 rounded-lg p-6 text-center">
|
||||||
<div class="text-4xl mb-3">📋</div>
|
<div class="text-4xl mb-3">📋</div>
|
||||||
<p class="text-lg text-text font-medium mb-2">No Result Uploaded</p>
|
<p class="text-lg text-text font-medium mb-2">No Result Uploaded</p>
|
||||||
@@ -534,7 +542,7 @@ templ fixtureUploadPrompt(fixture *db.Fixture) {
|
|||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="$dispatch('open-forfeit-modal')"
|
@click="open = true"
|
||||||
class="inline-block px-4 py-2 bg-red hover:bg-red/80 text-mantle rounded-lg
|
class="inline-block px-4 py-2 bg-red hover:bg-red/80 text-mantle rounded-lg
|
||||||
font-medium transition hover:cursor-pointer"
|
font-medium transition hover:cursor-pointer"
|
||||||
>
|
>
|
||||||
@@ -543,17 +551,11 @@ templ fixtureUploadPrompt(fixture *db.Fixture) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@forfeitModal(fixture)
|
@forfeitModal(fixture)
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
templ forfeitModal(fixture *db.Fixture) {
|
templ forfeitModal(fixture *db.Fixture) {
|
||||||
<div
|
<div
|
||||||
x-data="{
|
|
||||||
open: false,
|
|
||||||
forfeitType: 'outright',
|
|
||||||
forfeitTeam: '',
|
|
||||||
forfeitReason: '',
|
|
||||||
}"
|
|
||||||
@open-forfeit-modal.window="open = true"
|
|
||||||
x-show="open"
|
x-show="open"
|
||||||
x-cloak
|
x-cloak
|
||||||
class="fixed inset-0 z-50 overflow-y-auto"
|
class="fixed inset-0 z-50 overflow-y-auto"
|
||||||
|
|||||||
Reference in New Issue
Block a user