Добавил запрос на создание препода от кафедры

This commit is contained in:
dipatrik10
2026-06-02 00:01:14 +03:00
parent 4b05d4287c
commit 4adce0b89c
23 changed files with 1370 additions and 51 deletions

View File

@@ -109,15 +109,23 @@ function invalidateCache(url) {
'/api/specialties',
'/api/education-forms',
'/api/users',
'/api/teacher-requests',
'/api/department/teacher-requests',
'/api/department/teachers',
'/api/equipments',
'/api/classrooms'
];
for (const prefix of cacheKeysToClear) {
if (url.includes(prefix)) {
for (const cacheKey of cache.keys()) {
if (cacheKey.includes(prefix)) {
cache.delete(cacheKey);
}
const affectedPrefixes = new Set(cacheKeysToClear.filter(prefix => url.includes(prefix)));
if (url.includes('/api/teacher-requests')) {
affectedPrefixes.add('/api/users');
}
if (url.includes('/api/department/teachers')) {
affectedPrefixes.add('/api/users/teachers');
}
for (const prefix of affectedPrefixes) {
for (const cacheKey of cache.keys()) {
if (cacheKey.includes(prefix)) {
cache.delete(cacheKey);
}
}
}