Skip to content

Commit

Permalink
fixed types for api-uilib (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuevIO authored Nov 24, 2024
1 parent 8adf33d commit 2a54f97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
5 changes: 5 additions & 0 deletions src/pages/ReviewPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand All @@ -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) {
Expand Down Expand Up @@ -144,6 +146,9 @@ async function sendReview() {
Общая оценка: {{ Number(generalReview) > 0 ? '+' + generalReview : generalReview }}
</div>
</div>
<div>
<v-switch v-model="isAnonymous" color="primary" label="Аноимный отзыв" hide-details />
</div>

<v-btn color="secondary" class="mt-3" rounded="pill" text="отправить" @click="sendReview"></v-btn>
</div>
Expand Down

0 comments on commit 2a54f97

Please sign in to comment.