Добавление в Архив + Фронт
1. Переписал модуль выпадающего слева меню 2. Добавил механику Архивации задач 3. Запоминания выбранного отдела
This commit is contained in:
@@ -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 })
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user