feat: migrate ERP configuration from .env to per-user database storage
- Moved ERP credentials (URL, username, password) from environment variables to dbo_BIPUsers table - Each user now has their own ERP configuration stored in the database - Added UserErpConfigService for managing per-user ERP settings - Updated cleaner and extractor handlers to fetch ERP config from database instead of .env - Removed ERP fields from ConfigManager UI editable fields - Added new IPC handlers and preload APIs for user ERP config management - Includes migration script to transfer existing .env ERP settings to database - Added migration guide documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,16 @@ const api = {
|
||||
ipcRenderer.invoke('materialType:delete', { materialName, managerName }),
|
||||
upsertBatch: (request: MaterialTypeBatchRequest) =>
|
||||
ipcRenderer.invoke('materialType:upsertBatch', request)
|
||||
},
|
||||
|
||||
// User ERP Configuration service
|
||||
userErpConfig: {
|
||||
getCurrent: () => ipcRenderer.invoke('user-erp-config:getCurrent'),
|
||||
update: (config: { url: string; username: string; password: string }) =>
|
||||
ipcRenderer.invoke('user-erp-config:update', config),
|
||||
testConnection: (config: { url: string; username: string; password: string }) =>
|
||||
ipcRenderer.invoke('user-erp-config:testConnection', config),
|
||||
getAll: () => ipcRenderer.invoke('user-erp-config:getAll')
|
||||
}
|
||||
} as const
|
||||
|
||||
|
||||
Reference in New Issue
Block a user