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:
cproudlock
2026-04-17 12:06:28 -04:00
parent 814897f075
commit 08ffa4ba36
22 changed files with 951 additions and 170 deletions

View File

@@ -651,6 +651,34 @@
Call SyncDualpathPartnerData(objConn, CLng(machineid), tempDualpathID)
End If
'=============================================================================
' INSERT PARENT LOCATION RELATIONSHIP (Contains)
'=============================================================================
Dim parentlocationid, containsTypeID
parentlocationid = Trim(Request.Form("parentlocationid"))
If parentlocationid <> "" And IsNumeric(parentlocationid) And CLng(parentlocationid) > 0 Then
Set rsCheck = objConn.Execute("SELECT relationshiptypeid FROM relationshiptypes WHERE relationshiptype = 'Contains'")
If Not rsCheck.EOF Then containsTypeID = rsCheck("relationshiptypeid")
rsCheck.Close
If Not IsEmpty(containsTypeID) Then
Dim cmdRelLoc
Set cmdRelLoc = Server.CreateObject("ADODB.Command")
cmdRelLoc.ActiveConnection = objConn
cmdRelLoc.CommandText = "INSERT INTO machinerelationships (machineid, related_machineid, relationshiptypeid, isactive) VALUES (?, ?, ?, 1)"
cmdRelLoc.CommandType = 1
cmdRelLoc.Parameters.Append cmdRelLoc.CreateParameter("@machineid", 3, 1, , CLng(parentlocationid))
cmdRelLoc.Parameters.Append cmdRelLoc.CreateParameter("@related_machineid", 3, 1, , CLng(machineid))
cmdRelLoc.Parameters.Append cmdRelLoc.CreateParameter("@relationshiptypeid", 3, 1, , containsTypeID)
On Error Resume Next
cmdRelLoc.Execute
Set cmdRelLoc = Nothing
On Error Goto 0
End If
End If
'=============================================================================
' UPDATE OR INSERT COMPLIANCE DATA
'=============================================================================