1
0

Добавление в Архив + Фронт

1. Переписал модуль выпадающего слева меню
2. Добавил механику Архивации задач
3. Запоминания выбранного отдела
This commit is contained in:
2026-01-13 07:04:10 +07:00
parent 6688b8e37c
commit 44b6e636d4
17 changed files with 2434 additions and 1594 deletions

View File

@@ -70,7 +70,8 @@ export const columnsApi = {
// ==================== CARDS ====================
export const cardsApi = {
getAll: () => request('/api/task', { credentials: 'include' }),
// archive: 0 = неархивные (по умолчанию), 1 = архивные, 'all' = все
getAll: (archive = 0) => request(`/api/task${archive !== 0 ? `?archive=${archive}` : ''}`, { credentials: 'include' }),
updateOrder: (id, column_id, to_index) => request('/api/task', {
method: 'POST',
credentials: 'include',
@@ -94,6 +95,12 @@ export const cardsApi = {
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ action: 'delete', id })
}),
setArchive: (id, archive = 1) => request('/api/task', {
method: 'POST',
credentials: 'include',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ action: 'set_archive', id, archive })
})
}