Remove category grouping from machine type dropdowns

Simplified machine type dropdowns to flat list without category
grouping. This removes dependency on the 'category' column in
machinetypes table which may not exist on all environments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-01-22 16:24:07 -05:00
parent 12a35ed7e0
commit 1b7946900c
7 changed files with 12 additions and 99 deletions

View File

@@ -167,20 +167,13 @@
<select class="form-control" id="newmodelmachinetypeid" name="newmodelmachinetypeid">
<option value="">-- Select Machine Type --</option>
<%
Dim rsMachineTypes, lastCat
strSQL = "SELECT machinetypeid, machinetype, category FROM machinetypes WHERE isactive = 1 ORDER BY category, machinetype ASC"
Dim rsMachineTypes
strSQL = "SELECT machinetypeid, machinetype FROM machinetypes WHERE isactive = 1 ORDER BY machinetype ASC"
Set rsMachineTypes = objconn.Execute(strSQL)
lastCat = ""
While Not rsMachineTypes.EOF
If rsMachineTypes("category") <> lastCat Then
If lastCat <> "" Then Response.Write("</optgroup>")
Response.Write("<optgroup label='" & Server.HTMLEncode(rsMachineTypes("category")) & "'>")
lastCat = rsMachineTypes("category")
End If
Response.Write("<option value='" & rsMachineTypes("machinetypeid") & "'>" & Server.HTMLEncode(rsMachineTypes("machinetype")) & "</option>")
rsMachineTypes.MoveNext
Wend
If lastCat <> "" Then Response.Write("</optgroup>")
rsMachineTypes.Close
Set rsMachineTypes = Nothing
%>