14caad857d5feaa6fe5e5c4c18d6020824e595fc
Use location (machine number/alias) as display name fallback when printercsfname is not set. Show model number as secondary info instead of location to avoid redundancy. Fixes Coaching 115 and similar printers without CSF names assigned. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ShopDB Documentation
Last Updated: 2025-11-25 Current Status: Phase 2 Complete, Phase 3 Planned
Project Status Overview
Migration Progress
| Phase | Status | Description | Completed |
|---|---|---|---|
| Phase 1 | COMPLETE | Schema changes - new tables, columns, indexes | Nov 6, 2025 |
| Phase 2 | COMPLETE | PC migration to unified machines table | Nov 10, 2025 |
| Phase 3 | PLANNED | Network devices migration (servers, switches, cameras) | TBD |
Current Architecture
machines table (unified)
├── Equipment (machinetypeid 1-24, pctypeid IS NULL)
└── PCs (machinetypeid 25-29, pctypeid IS NOT NULL)
printers table (separate - by design)
Network devices (Phase 3 will migrate):
- servers, switches, cameras, accesspoints, idfs
- Will become machinetypeid 30-36 in machines table
Key Accomplishments (Oct-Nov 2025)
- Consolidated PCs into unified
machinestable (277 PCs migrated) - Created
communicationstable for all network interfaces (705+ records) - Created
machinerelationshipstable for PC/equipment relationships - Modernized all PC pages (displaypcs, displaypc, editpc)
- Fixed 36+ API bugs for PowerShell data collection
- Added compliance and warranty tracking infrastructure
- Implemented network map for all device types
Documentation Overview
For New Team Members
Start here in this order:
-
QUICK_REFERENCE.md - Quick facts, common tasks, cheat sheets (15 min)
-
ASP_DEVELOPMENT_GUIDE.md - Dev environment setup, VBScript patterns (30 min)
-
STANDARDS.md - Coding standards, security requirements (45 min)
-
DEEP_DIVE_REPORT.md - Complete database/architecture docs (reference)
-
NESTED_ENTITY_CREATION.md - Complex forms, inline entity creation (20 min)
Migration Documentation
Phase 1 & 2 (Complete)
| Document | Description |
|---|---|
| DATABASE_MIGRATION_FINAL_DESIGN.md | Complete Phase 1 specification |
| MIGRATION_QUICK_REFERENCE.md | Quick lookup for migration |
| PC_MACHINES_CONSOLIDATION_PLAN.md | Phase 2 PC migration plan |
| MACHINE_RELATIONSHIPS_EXAMPLES.md | Relationship query patterns |
Phase 3 (Planned)
| Document | Description |
|---|---|
| PHASE3_NETWORK_DEVICES_MIGRATION_PLAN.md | Network devices migration plan |
Core Documentation
Standards & Development
| Document | Purpose | Status |
|---|---|---|
| STANDARDS.md | Coding standards, security | Current |
| ASP_DEVELOPMENT_GUIDE.md | Dev setup, patterns | Current |
| QUICK_REFERENCE.md | Cheat sheets | Current |
| NESTED_ENTITY_CREATION.md | Complex forms | Current |
Architecture & Design
| Document | Purpose | Status |
|---|---|---|
| DEEP_DIVE_REPORT.md | Complete system documentation | Current |
| INFRASTRUCTURE_FINAL_ARCHITECTURE.md | Infrastructure design | Current |
| NETWORK_DEVICES_UNIFIED_DESIGN.md | Network unification design | Current |
SQL Migration Scripts
All migration scripts are in /sql/migration_phase*/ folders:
sql/
├── migration_phase1/ # Schema changes (8 scripts + rollbacks)
├── migration_phase2/ # PC data migration (8 scripts)
├── migration_phase3/ # Network devices (planned)
└── *.sql # Utility scripts
Quick Start
Dev Environment
# Start dev environment
~/start-dev-env.sh
# Check status
~/status-dev-env.sh
# Access application
http://192.168.122.151:8080
Git (Gitea)
# Gitea web UI
http://localhost:3000
# Clone repo
git clone ssh://git@localhost:2222/cproudlock/shopdb.git
Database
# Connect to MySQL
docker exec -it dev-mysql mysql -u root -prootpassword shopdb
# Quick queries
SELECT COUNT(*) FROM machines WHERE pctypeid IS NOT NULL; -- PCs
SELECT COUNT(*) FROM machines WHERE pctypeid IS NULL; -- Equipment
SELECT COUNT(*) FROM printers WHERE isactive = 1; -- Printers
Key Database Tables
Core Tables (Phase 2 Schema)
| Table | Purpose | Records |
|---|---|---|
machines |
All equipment + PCs | 500+ |
communications |
Network interfaces | 700+ |
machinerelationships |
PC/equipment links | 50+ |
printers |
Printers (separate) | 200+ |
warranties |
Warranty tracking | var |
compliance |
Compliance data | var |
Key Views
| View | Purpose |
|---|---|
vw_network_devices |
All network devices unified |
vw_active_pcs |
Active PCs with details |
vw_machine_relationships |
Relationship summary |
Recent Session Summaries
Located in project root:
| File | Date | Focus |
|---|---|---|
| SESSION_SUMMARY_2025-11-13.md | Nov 13 | Phase 2 testing, network_map fixes |
| SESSION_SUMMARY_2025-11-10.md | Nov 10 | Relationship fixes, Phase 3 planning |
Getting Help
- Check QUICK_REFERENCE.md first
- Search DEEP_DIVE_REPORT.md
- Review STANDARDS.md for coding questions
- Check session summaries for recent changes
Version History
| Version | Date | Changes |
|---|---|---|
| v2.0 | 2025-11-25 | Updated for Phase 2 completion, cleanup |
| v1.3 | 2025-10-20 | Added Git workflow documentation |
| v1.2 | 2025-10-20 | Added DEEP_DIVE_REPORT, QUICK_REFERENCE |
| v1.1 | 2025-10-10 | Added STANDARDS, NESTED_ENTITY_CREATION |
| v1.0 | 2025-10-09 | Initial ASP_DEVELOPMENT_GUIDE |
Maintained By: Development Team Last Updated: 2025-11-25
Description
Languages
Classic ASP
51.5%
JavaScript
35.9%
CSS
8.8%
HTML
1.9%
Python
1%
Other
0.9%