fix: display only real sync errors in error count and list
- Added CountErroredChanges() method to count only pending changes with LastError - Previously, error count included all pending changes, not just failed ones - Added /api/sync/info endpoint with proper error count and error list - Added sync info modal to display sync status, error count, and error details - Made sync status indicators clickable to open the modal - Fixed disconnect between "Error count: 4" and "No errors" in the list Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -625,6 +625,7 @@ func setupRouter(db *gorm.DB, cfg *config.Config, local *localdb.LocalDB, dbUser
|
||||
syncAPI := api.Group("/sync")
|
||||
{
|
||||
syncAPI.GET("/status", syncHandler.GetStatus)
|
||||
syncAPI.GET("/info", syncHandler.GetInfo)
|
||||
syncAPI.POST("/components", syncHandler.SyncComponents)
|
||||
syncAPI.POST("/pricelists", syncHandler.SyncPricelists)
|
||||
syncAPI.POST("/all", syncHandler.SyncAll)
|
||||
|
||||
Reference in New Issue
Block a user