feat: типы конфигураций из qt_settings в модалке проекта, копия сохраняет config_type
- модалка «Новая конфигурация в проекте» строит кнопки типа из qt_settings.config_types (новый тип «Сеть» появляется без релиза); - ручная полная синхронизация (/api/sync/all) тянет qt_settings; - копирование конфигурации (в т.ч. из версии) сохраняет config_type — раньше копия СХД/сети становилась «сервером». Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
54a7c7cc8d
commit
a939a5f36c
5 files changed
+109
-10
No files matched your search
@@ -240,7 +240,7 @@ type SyncAllResponse struct {
|
||||
|
||||
// SyncAll performs full bidirectional sync:
|
||||
// - push pending local changes (projects/configurations) to server
|
||||
// - pull components, pricelists, projects, and configurations from server
|
||||
// - pull components, pricelists, qt_settings, projects, and configurations from server
|
||||
// POST /api/sync/all
|
||||
func (h *SyncHandler) SyncAll(c *gin.Context) {
|
||||
if !h.ensureSyncReadiness(c) {
|
||||
@@ -282,6 +282,12 @@ func (h *SyncHandler) SyncAll(c *gin.Context) {
|
||||
slog.Warn("partnumber books pull failed during full sync", "error", err)
|
||||
}
|
||||
|
||||
// Configurator settings (config_types, tab_config, ...): non-fatal, the
|
||||
// local cache is kept on failure.
|
||||
if err := h.syncService.SyncQtSettings(); err != nil {
|
||||
slog.Warn("qt_settings sync failed during full sync", "error", err)
|
||||
}
|
||||
|
||||
projectsResult, err := h.syncService.ImportProjectsToLocal()
|
||||
if err != nil {
|
||||
slog.Error("project import failed during full sync", "error", err)
|
||||
|
||||
Reference in new issue
Block a user