Fix dualpath propagation, getShopfloorPCs filtering, USB management, and printer features

- Fix dualpath PC propagation direction (Equipment->PC) in api.asp and db_helpers.asp
- Fix early exit in CreatePCMachineRelationship preventing propagation
- Fix getShopfloorPCs to filter machinetypeid IN (33,34,35) instead of >= 33
- Fix getShopfloorPCs to show equipment numbers via GROUP_CONCAT subquery
- Add detailed PropagateDP logging for dualpath debugging
- Default "Show on Shopfloor Dashboard" checkbox to checked in addnotification.asp
- Add USB label batch printing, single USB labels, and USB history pages
- Add printer supplies tracking and toner report enhancements
- Add uptime map visualization page
- Add dashboard/lobby display SQL migration
- Update CLAUDE.md with IIS 401 workaround documentation
- Update TODO.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-02-03 10:44:55 -05:00
parent 8945fe2a0a
commit e382a3246e
27 changed files with 1926 additions and 255 deletions

View File

@@ -154,6 +154,31 @@ PCs are in the machines table, identified by:
- `pctypeid IS NOT NULL`
- `machinetypeid IN (33, 34, 35)`
### IIS 401 Error on New ASP Files
**Problem:** When creating new ASP files from scratch, they may return HTTP 200 on the first request but HTTP 401 Unauthorized on all subsequent requests.
**Symptoms:**
- First curl/browser request to new .asp file returns 200
- All following requests return 401 Unauthorized
- Existing files (like printerqrbatch.asp) work fine with consistent 200 responses
- Adding `<%@ Language=VBScript %>` directive alone does NOT fix it
**Solution:** Instead of creating new ASP files from scratch, **copy an existing working ASP file** to the new filename, then modify its contents:
```bash
# DON'T do this (creates file from scratch - will get 401 errors):
# Write tool to create newfile.asp
# DO this instead (copy existing working file):
cp printerqrbatch.asp newfile.asp
# Then use Edit tool to replace the content
```
**Why this works:** The exact root cause is unclear, but appears related to how IIS handles file metadata/permissions for newly created files vs. copied files. Copying preserves whatever attributes IIS needs to serve the file correctly.
**Verified fix:** Files created by copying printerqrbatch.asp consistently return 200 on multiple sequential requests.
## API Endpoints
**Base URL:** `http://192.168.122.151:8080/api.asp`