feat: перелопатил синхронизацию преподавателей
Backend CI / build-and-test (push) Failing after 13m11s
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Failing after 10m12s
Frontend CI / build-and-check (push) Failing after 16m9s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Failing after 14m6s
🚀 Create and publish a Docker image / Build & publish backend image (push) Failing after 14m58s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Failing after 14m58s

This commit is contained in:
2026-05-24 21:06:03 +03:00
parent 6aef5dd66f
commit 99d25adbb1
33 changed files with 1756 additions and 90 deletions
+3 -2
View File
@@ -3,6 +3,7 @@ import { computed, ref } from 'vue'
import { lecturesApi, usersApi } from '@/api'
import { mapApiLecture, mapApiReview } from '@/api/mappers'
import type { Lecture, Review } from '@/types'
import type { LectureQuery } from '@/api/types'
import { useUserStore } from './user'
export const useLecturesStore = defineStore('lectures', () => {
@@ -18,11 +19,11 @@ export const useLecturesStore = defineStore('lectures', () => {
lectures.value.filter(l => registered.value.includes(l.id) || l.registered),
)
async function fetchLectures() {
async function fetchLectures(query: LectureQuery = {}) {
loading.value = true
error.value = null
try {
const payload = await lecturesApi.list({ PageSize: 100 })
const payload = await lecturesApi.list({ PageSize: 100, ...query })
lectures.value = payload.map(mapApiLecture)
registered.value = lectures.value.filter(l => l.registered).map(l => l.id)
} catch (err) {