Updated categories page
Deploy Frontend / build-and-deploy (push) Successful in 32s
Details
Deploy Frontend / build-and-deploy (push) Successful in 32s
Details
This commit is contained in:
parent
f7ca74a7b5
commit
a2cec7e2a3
|
|
@ -5,7 +5,7 @@ import { IconPencil, IconPlus, IconSearch, IconTrash } from '@tabler/icons-react
|
|||
|
||||
import { useCategories, useDeleteCategory } from '@/features/categories/hooks/useCategories'
|
||||
|
||||
import { ApprovalTopicCategory } from '@/src/types/api'
|
||||
import { ApprovalTopicCategory } from '@/types/api'
|
||||
import { PageHeader } from '@/components/ui/PageHeader'
|
||||
import { FilterBar } from '@/components/ui/FilterBar'
|
||||
import { DataTable, type Column } from '@/components/ui/DataTable'
|
||||
|
|
|
|||
|
|
@ -177,9 +177,19 @@ export default function HierarchiesPage() {
|
|||
try {
|
||||
await Promise.all(
|
||||
group.steps.map((step) =>
|
||||
updateHierarchy.mutateAsync({ ...step, target_system: targetSystem })
|
||||
updateHierarchy.mutateAsync({
|
||||
id: step.id!,
|
||||
subordinate_id: step.subordinate_id!,
|
||||
approver_id: step.approver_id!,
|
||||
department_id: step.department_id!,
|
||||
topic_category_id: step.topic_category_id ?? null,
|
||||
topic_id: step.topic_id ?? null,
|
||||
priority: step.priority ?? 0,
|
||||
target_system: targetSystem,
|
||||
})
|
||||
)
|
||||
)
|
||||
await queryClient.invalidateQueries({ queryKey: [HIERARCHIES_QUERY_KEY] })
|
||||
} catch (error) {
|
||||
notifications.show({ title: 'Ошибка', message: 'Не удалось обновить систему', color: 'red' })
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue