Commit Graph

107 Commits

Author SHA1 Message Date
Misaka
fad08796f7 feat: add user selection dialog for admin users
- Import and integrate UserSelectionDialog component
- Add state for user selection (showUserSelection, allUsers)
- Add isSwitchedByAdmin state to track admin-switched sessions
- Implement handleUserSelect and handleUserSelectionCancel handlers
- Update login flow to show user selection when admin logs in
- Add conditional logout button visibility based on user type
- Update UI to include UserSelectionDialog component
2026-03-01 18:00:52 +08:00
Misaka
829851e3ca feat: implement user authentication system
- Add SessionManager for managing user sessions (singleton pattern)
- Add BIPUsersDAO for database authentication
- Add LoginDialog component for username/password login
- Add UserSelectionDialog component for admin user selection
- Support silent login by computer name
- Implement main page with navigation to Extractor and Cleaner

Database:
- Table: dbo_BIPUsers
- Fields: UserName, Password, UserType, ComputerNmae

UI Flow:
1. Silent login on startup via computer name
2. Show login dialog if silent login fails
3. Display main page with user info and navigation
4. Support logout and re-login
2026-03-01 17:46:15 +08:00
Misaka
450eb41f96 feat: support productionID input for order number resolution
- Add OrderNumberResolver service to auto-recognize productionID and 生产订单号 formats
- Integrate MySQL database lookup for productionID to 生产订单号 conversion
- Update OrderNumberInput component with format statistics display
- Modify Extractor and Cleaner to resolve order numbers before processing

Database configuration:
- Table: productionContractData_26 年压力表合同数据
- Fields: 总排号 (productionID), 生产订单号 (production order number)

Supported formats:
- productionID: 2 digits + 1 letter + serial number (e.g., 26B742)
- 生产订单号:SC + 14 digits (e.g., SC70202601040109)
2026-03-01 17:00:10 +08:00
Misaka
e04337dc19 fix: improve error handling and logging for extractor and cleaner
- Load .env file in main process using dotenv
- Add detailed console logging for debugging
- Add validation for ERP configuration before extraction
- Improve error display in UI with selectable text
- Add stack trace logging for better debugging
2026-03-01 16:07:47 +08:00
Misaka
cb2a5a84b2 feat: implement CleanerPage UI with MaterialCodeInput component
- Add MaterialCodeInput component for entering material codes
- Create CleanerPage with dry-run mode support
- Add Cleaner page navigation in App.tsx
- Update CleanerAPI type to return response wrapper
2026-03-01 15:50:13 +08:00
Misaka
5760b56f70 feat: implement IPC handlers, database services and Extractor UI
- Add SqlServerService and MySqlService for database persistence
- Implement IPC handlers for file, extractor, cleaner, and database operations
- Define IPC API types and update preload script
- Create ExtractorPage UI with OrderNumberInput component
- Add unit and integration tests for MySQL and SQL Server
- Update vitest config with path aliases
2026-03-01 15:46:01 +08:00
Misaka
0077005cdd first commit 2026-02-28 20:36:59 +08:00