feat: change default review scores to 0 and improve textarea styling
This commit is contained in:
@@ -41,9 +41,9 @@ const user = ref<User | null>(null)
|
||||
const review = ref<Review | null>(null)
|
||||
|
||||
// Form state with default values
|
||||
const song = ref(50)
|
||||
const show = ref(50)
|
||||
const costume = ref(50)
|
||||
const song = ref(0)
|
||||
const show = ref(0)
|
||||
const costume = ref(0)
|
||||
const textReview = ref('')
|
||||
const isSubmitting = ref(false)
|
||||
|
||||
@@ -91,9 +91,9 @@ async function fetchUserReview(userId: number) {
|
||||
|
||||
// Pre-fill form with existing review data
|
||||
if (reviewData) {
|
||||
song.value = reviewData.score_song || 50
|
||||
show.value = reviewData.score_show || 50
|
||||
costume.value = reviewData.score_costume || 50
|
||||
song.value = reviewData.score_song || 0
|
||||
show.value = reviewData.score_show || 0
|
||||
costume.value = reviewData.score_costume || 0
|
||||
textReview.value = reviewData.text_review || ''
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -210,11 +210,12 @@ onMounted(async () => {
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<label for="text_review">Arvostelu (vaihtoehtoinen)</label>
|
||||
<textarea id="text_review" placeholder="Arvostelu" class="textfield" v-model="textReview"/>
|
||||
<textarea id="text_review" placeholder="Arvostelu" class="textfield" rows="6" v-model="textReview"/>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn-primary">Arvostele</button>
|
||||
</form>
|
||||
<NuxtLink class="btn-primary" to="/">Palaa etusivulle</NuxtLink>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h1>Artist not found</h1>
|
||||
@@ -244,5 +245,6 @@ onMounted(async () => {
|
||||
padding: 6px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 6px;
|
||||
resize: none;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user