fix bus phase 3/2
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2026-01-15 12:05:57 +03:00
parent 684e416588
commit 7421f33de8
6 changed files with 400 additions and 58 deletions

View File

@ -230,8 +230,19 @@ export function IdeasTable() {
updateIdea.mutate(
{ id, dto },
{
onSuccess: (updatedIdea) => {
setDetailIdea(updatedIdea);
onSuccess: () => {
// Обновляем только те поля, которые были отправлены в dto
// Это сохраняет specification и другие поля которые не редактировались
setDetailIdea((prev) => {
if (!prev) return prev;
const updates: Partial<Idea> = {};
(Object.keys(dto) as (keyof UpdateIdeaDto)[]).forEach((key) => {
if (dto[key] !== undefined) {
(updates as Record<string, unknown>)[key] = dto[key];
}
});
return { ...prev, ...updates };
});
},
},
);

View File

@ -0,0 +1,4 @@
{
"status": "failed",
"failedTests": []
}