feat(submissions): scoped submissions per user/matchs, sync from polylan

This commit is contained in:
2026-09-16 13:12:22 +02:00
parent 85e67599af
commit fabf06e6d4
35 changed files with 1008 additions and 92 deletions
@@ -0,0 +1,54 @@
<script setup lang="ts">
interface ScopeOption {
id: string;
name: string;
}
interface Props {
eventPath: string;
gamePath: string;
gameName?: string;
scopes?: ScopeOption[];
}
const props = withDefaults(defineProps<Props>(), {
gameName: "Game",
scopes: () => [],
});
const goToScope = (scopeId: string) => {
window.location.href = `/${props.eventPath}/submissions/${props.gamePath}/${scopeId}`;
};
const goHome = () => {
window.location.href = `/${props.eventPath}`;
};
</script>
<template>
<div class="min-h-screen bg-base-200 flex items-center justify-center p-4">
<div class="card bg-base-100 shadow-lg w-full max-w-md">
<div class="card-body">
<h2 class="card-title">Select your match</h2>
<p class="text-base-content/70 mb-2">
You're assigned to multiple matches for {{ gameName }}. Pick which one you want to submit for.
</p>
<div class="flex flex-col gap-2 mt-2">
<button v-for="scope in scopes" :key="scope.id" @click="goToScope(scope.id)"
class="btn btn-outline justify-start">
<i class="mdi mdi-sword-cross mr-2"></i>
{{ scope.name }}
</button>
</div>
<div class="card-actions mt-4">
<button @click="goHome" class="btn btn-ghost btn-sm">
<i class="mdi mdi-arrow-left"></i>
Back
</button>
</div>
</div>
</div>
</div>
</template>