Add displaylocations, location/inspection migrations, UI refinements
- New displaylocations.asp (production location listing) - 3 new SQL migrations: inspection machine type, location relationship types, pctype inspection update - displaymachine.asp / printbadge.asp substantial rework - editmachine/editpc/savemachineedit: ~50 line additions each - Dashboard index.html + tv-dashboard tweaks - .gitignore: block database-backup-*.sql, *.bak, *.pdf Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
19
sql/add_inspection_machine_type.sql
Normal file
19
sql/add_inspection_machine_type.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Add Inspection machine type and update 06xx machines
|
||||
-- Date: 2026-02-03
|
||||
-- Purpose: Create Inspection machine type for 0612-0615 machines so they
|
||||
-- appear on displaymachines.asp (previously hidden as LocationOnly)
|
||||
|
||||
-- 1. Add Inspection machine type
|
||||
INSERT INTO machinetypes (machinetypeid, machinetype) VALUES (47, 'Inspection');
|
||||
|
||||
-- 2. Create Inspection model (linked to new type, default vendor WJDT)
|
||||
INSERT INTO models (modelnumber, vendorid, machinetypeid, isactive)
|
||||
VALUES ('Inspection', 1, 47, 1);
|
||||
|
||||
-- 3. Update machines 0612-0615 to use the new Inspection model
|
||||
UPDATE machines
|
||||
SET modelnumberid = (SELECT modelnumberid FROM models WHERE modelnumber = 'Inspection' AND machinetypeid = 47 LIMIT 1)
|
||||
WHERE machinenumber IN ('0612', '0613', '0614', '0615');
|
||||
|
||||
-- 4. Enable WJDT vendor in machine edit model dropdown
|
||||
UPDATE vendors SET ismachine = 1 WHERE vendorid = 1;
|
||||
14
sql/add_location_relationship_types.sql
Normal file
14
sql/add_location_relationship_types.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Add relationship types for location management (bins, shelves, PC storage)
|
||||
-- Run against production MySQL
|
||||
|
||||
-- New relationship types
|
||||
INSERT INTO relationshiptypes (relationshiptypeid, relationshiptype, description, isactive, displayorder) VALUES
|
||||
(7, 'Contains', 'Location contains a sub-location (e.g., Bin contains Shelf)', 1, 7),
|
||||
(8, 'Stored At', 'PC or device is stored at this location', 1, 8);
|
||||
|
||||
-- Fix DT Office -> GJX9B2Z3ESF from "Controls" to "Stored At"
|
||||
-- Verify relationshipid 69 matches on prod before running
|
||||
UPDATE machinerelationships SET relationshiptypeid = 8 WHERE relationshipid = 69;
|
||||
|
||||
-- Flag IT Closet as a location (machineid=258)
|
||||
UPDATE machines SET islocationonly = 1 WHERE machineid = 258;
|
||||
24
sql/update_pctype_inspection.sql
Normal file
24
sql/update_pctype_inspection.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
-- ============================================================================
|
||||
-- Update PC Type #10: "Part Marker" → "Inspection"
|
||||
-- ============================================================================
|
||||
-- Date: 2026-02-05
|
||||
-- Description: Rename pctype 10 from "Part Marker" to "Inspection"
|
||||
--
|
||||
-- Run against: Production shopdb database
|
||||
-- ============================================================================
|
||||
|
||||
-- Update the pctype record
|
||||
UPDATE pctype
|
||||
SET typename = 'Inspection',
|
||||
description = 'Inspection system'
|
||||
WHERE pctypeid = 10;
|
||||
|
||||
-- Verify the change
|
||||
SELECT pctypeid, typename, description
|
||||
FROM pctype
|
||||
WHERE pctypeid = 10;
|
||||
|
||||
-- Show all PC types for reference
|
||||
SELECT pctypeid, typename, description, displayorder
|
||||
FROM pctype
|
||||
ORDER BY displayorder;
|
||||
Reference in New Issue
Block a user