Add smart self-healing for sync errors
Implements automatic repair mechanism for pending changes with sync errors: - Projects: validates and fixes empty name/code fields - Configurations: ensures project references exist or assigns system project - Clears errors and resets attempts to give changes another sync chance Backend: - LocalDB.RepairPendingChanges() with smart validation logic - POST /api/sync/repair endpoint - Detailed repair results with remaining errors Frontend: - Auto-repair section in sync modal shown when errors exist - "ИСПРАВИТЬ" button with clear explanation of actions - Real-time feedback with result messages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1653,6 +1653,7 @@ func setupRouter(cfg *config.Config, local *localdb.LocalDB, connMgr *db.Connect
|
||||
syncAPI.POST("/push", syncHandler.PushPendingChanges)
|
||||
syncAPI.GET("/pending/count", syncHandler.GetPendingCount)
|
||||
syncAPI.GET("/pending", syncHandler.GetPendingChanges)
|
||||
syncAPI.POST("/repair", syncHandler.RepairPendingChanges)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user