Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuevIO committed Nov 24, 2024
1 parent 2a54f97 commit 556071e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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' | undefined)[];
export type Order = 'mark_general' | 'mark_kindness' | 'mark_freebie' | 'mark_clarity' | 'last_name' | undefined;
export type Subject = string;
export type Lecturer = components['schemas']['LecturerGet'];
12 changes: 6 additions & 6 deletions src/pages/MainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getPhoto } from '@/utils';
const profileStore = useProfileStore();
const orderValues: Ref<Order> = ref(['mark_general']);
const orderValues: Ref<Order> = ref('mark_general');
let order: Ref<string> = ref('по общей оценке');
let offset = 0;
const query = ref('');
Expand Down Expand Up @@ -72,19 +72,19 @@ async function orderLecturers() {
page.value = 1;
switch (order.value) {
case 'по общей оценке':
orderValues.value[0] = 'mark_general';
orderValues.value = 'mark_general';
break;
case 'по доброте':
orderValues.value[0] = 'mark_kindness';
orderValues.value = 'mark_kindness';
break;
case 'по халявности':
orderValues.value[0] = 'mark_freebie';
orderValues.value = 'mark_freebie';
break;
case 'по понятности':
orderValues.value[0] = 'mark_clarity';
orderValues.value = 'mark_clarity';
break;
case 'по фамилии':
orderValues.value[0] = 'last_name';
orderValues.value = 'last_name';
break;
}
await loadLecturers(query.value, 0, orderValues, subject);
Expand Down

0 comments on commit 556071e

Please sign in to comment.