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:
@@ -142,6 +142,26 @@
|
||||
Set rsDualpath = Nothing
|
||||
Set cmd = Nothing
|
||||
|
||||
' Load parent location (this machine is contained by a location)
|
||||
Dim parentlocationid
|
||||
parentlocationid = ""
|
||||
strSQL = "SELECT mr.machineid AS parentid FROM machinerelationships mr " &_
|
||||
"JOIN relationshiptypes rt ON mr.relationshiptypeid = rt.relationshiptypeid " &_
|
||||
"WHERE mr.related_machineid = ? AND rt.relationshiptype = 'Contains' AND mr.isactive = 1"
|
||||
Set cmd = Server.CreateObject("ADODB.Command")
|
||||
cmd.ActiveConnection = objConn
|
||||
cmd.CommandText = strSQL
|
||||
cmd.CommandType = 1
|
||||
cmd.Parameters.Append cmd.CreateParameter("@machineid", 3, 1, , machineid)
|
||||
Dim rsParentLoc
|
||||
Set rsParentLoc = cmd.Execute
|
||||
If NOT rsParentLoc.EOF Then
|
||||
If NOT IsNull(rsParentLoc("parentid")) Then parentlocationid = rsParentLoc("parentid")
|
||||
End If
|
||||
rsParentLoc.Close
|
||||
Set rsParentLoc = Nothing
|
||||
Set cmd = Nothing
|
||||
|
||||
' Load compliance data
|
||||
Dim thirdpartymanaged, thirdpartymanager, otassetsystem, dodassettype
|
||||
thirdpartymanaged = "NA" : thirdpartymanager = "" : otassetsystem = "" : dodassettype = ""
|
||||
@@ -630,6 +650,38 @@
|
||||
<small class="form-text text-muted">Select a backup/redundant machine (creates bidirectional relationship)</small>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="parentlocationid"><i class="zmdi zmdi-pin"></i> Parent Location</label>
|
||||
<select class="form-control" id="parentlocationid" name="parentlocationid">
|
||||
<option value="">-- None --</option>
|
||||
<%
|
||||
Dim rsLocations
|
||||
strSQL = "SELECT machineid, machinenumber, alias FROM machines WHERE islocationonly = 1 AND isactive = 1 AND machineid <> ? ORDER BY machinenumber ASC"
|
||||
Set cmd = Server.CreateObject("ADODB.Command")
|
||||
cmd.ActiveConnection = objConn
|
||||
cmd.CommandText = strSQL
|
||||
cmd.CommandType = 1
|
||||
cmd.Parameters.Append cmd.CreateParameter("@machineid", 3, 1, , machineid)
|
||||
Set rsLocations = cmd.Execute
|
||||
While Not rsLocations.EOF
|
||||
Dim locDisplay, selectedLoc
|
||||
locDisplay = rsLocations("machinenumber") & ""
|
||||
selectedLoc = ""
|
||||
If NOT IsNull(rsLocations("alias")) AND rsLocations("alias") & "" <> "" Then
|
||||
locDisplay = locDisplay & " (" & rsLocations("alias") & ")"
|
||||
End If
|
||||
If CStr(rsLocations("machineid")) = CStr(parentlocationid) Then selectedLoc = " selected"
|
||||
Response.Write("<option value='" & rsLocations("machineid") & "'" & selectedLoc & ">" & Server.HTMLEncode(locDisplay) & "</option>")
|
||||
rsLocations.MoveNext
|
||||
Wend
|
||||
rsLocations.Close
|
||||
Set rsLocations = Nothing
|
||||
Set cmd = Nothing
|
||||
%>
|
||||
</select>
|
||||
<small class="form-text text-muted">Select a location that contains this machine (e.g., IT Closet, Bin, Shelf)</small>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
|
||||
Reference in New Issue
Block a user