Фиксы...
This commit is contained in:
@@ -785,6 +785,25 @@ const handleSave = async () => {
|
||||
if (result.success) {
|
||||
const newProjectId = result.id
|
||||
|
||||
// Создаём колонки для нового проекта
|
||||
const createdColumnIds = []
|
||||
for (const column of form.value.columns) {
|
||||
if (column.tempId) {
|
||||
const colResult = await store.addColumn(column.name_columns, column.color)
|
||||
if (colResult.success) {
|
||||
createdColumnIds.push(colResult.id)
|
||||
} else {
|
||||
toast.error('Ошибка создания колонки')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Устанавливаем последнюю колонку как финальную (id_ready)
|
||||
if (createdColumnIds.length > 0) {
|
||||
const lastColumnId = createdColumnIds[createdColumnIds.length - 1]
|
||||
await store.reorderColumns(createdColumnIds) // Это автоматически установит id_ready
|
||||
}
|
||||
|
||||
// Создаём отделы для нового проекта
|
||||
for (const department of form.value.departments) {
|
||||
if (department.tempId) {
|
||||
|
||||
Reference in New Issue
Block a user