From 2a54f9702266523fa111bae61923a71ab5b681d6 Mon Sep 17 00:00:00 2001 From: Ilya Date: Sun, 24 Nov 2024 22:35:27 +0300 Subject: [PATCH] fixed types for api-uilib (#38) --- src/models/index.ts | 2 +- src/pages/ReviewPage.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/models/index.ts b/src/models/index.ts index 7b43340..4cccd4b 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -15,6 +15,6 @@ export interface Toast { description?: string; } -export type Order = ('mark_general' | 'mark_kindness' | 'mark_freebie' | 'mark_clarity' | 'last_name')[]; +export type Order = ('mark_general' | 'mark_kindness' | 'mark_freebie' | 'mark_clarity' | 'last_name' | undefined)[]; export type Subject = string; export type Lecturer = components['schemas']['LecturerGet']; diff --git a/src/pages/ReviewPage.vue b/src/pages/ReviewPage.vue index 0348567..7f32258 100644 --- a/src/pages/ReviewPage.vue +++ b/src/pages/ReviewPage.vue @@ -42,6 +42,7 @@ const middleName = ref(lecturer?.middle_name); const photo = lecturer?.avatar_link ? `${PHOTO_BASE_PATH}${lecturer?.avatar_link}` : Placeholder; const subject = ref(''); const warningMessage = ref(''); +const isAnonymous = ref(false); async function sendReview() { warningMessage.value = ''; @@ -54,6 +55,7 @@ async function sendReview() { mark_kindness: kindReview.value, mark_freebie: freebieReview.value, mark_clarity: clearReview.value, + is_anonymous: isAnonymous.value, }, }); if (response.ok) { @@ -144,6 +146,9 @@ async function sendReview() { Общая оценка: {{ Number(generalReview) > 0 ? '+' + generalReview : generalReview }} +
+ +