Fix pctypeid in inline UpdateCompleteAsset, add HEATTREAT variant, add relationship notification

api.asp:
- Add pctypeid to inline UPDATE and INSERT statements in UpdateCompleteAsset
- Call GetPCTypeIdFromPCType to properly map pcType string to pctypeid
- Add "HEATTREAT" (no space) variant to GetPCTypeIdFromPCType function

displaypc.asp:
- Add relationship notification for PC types that can control equipment
  (CMM=5, Wax/Trace=6, Keyence=7, Genspect=8, Heat Treat=9, Part Marker=10)
- Shows info alert with link to Edit Machine page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
cproudlock
2025-12-09 10:36:08 -05:00
parent 1eb3aceeb4
commit 6785a51da0
2 changed files with 28 additions and 22 deletions

View File

@@ -253,6 +253,11 @@ If machineTypeVal = "" Then machineTypeVal = "N/A"
buVal = rs("businessunit") & ""
If buVal = "" Then buVal = "N/A"
' Get pctypeid for relationship notification
Dim pctypeidVal
pctypeidVal = 0
If Not IsNull(rs("pctypeid")) Then pctypeidVal = CLng(rs("pctypeid"))
%>
<p class="mb-2"><%=Server.HTMLEncode(serialNumVal)%></p>
<p class="mb-2"><%=Server.HTMLEncode(hostnameVal)%></p>
@@ -479,7 +484,18 @@ End If
</div>
<div class="tab-pane" id="relationships">
<h5 class="mb-3">Machine Relationships</h5>
<%
' Show notification for PC types that can have equipment relationships
' CMM=5, Wax/Trace=6, Keyence=7, Genspect=8, Heat Treat=9, Part Marker=10
If pctypeidVal >= 5 And pctypeidVal <= 10 Then
%>
<div class="alert alert-info mb-3">
<i class="zmdi zmdi-info-outline"></i>
This PC type can be assigned to control equipment. Use <a href="editmachine.asp?machineid=<%=machineid%>">Edit Machine</a> to set up relationships.
</div>
<%
End If
%>
<!-- Machines Controlled by This PC -->
<h6 class="mt-3 mb-2"><i class="zmdi zmdi-settings"></i> Machines Controlled by This PC</h6>
<div class="table-responsive mb-4">