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

@@ -199,9 +199,8 @@ If modelid = "new" Then
' Handle new machine type creation (nested)
If newmodelmachinetypeid = "new" Then
Dim newmachinetypename, newmachinetypecategory
Dim newmachinetypename
newmachinetypename = Trim(Request.Form("newmachinetypename"))
newmachinetypecategory = Trim(Request.Form("newmachinetypecategory"))
If newmachinetypename = "" Then
objConn.Close
@@ -209,19 +208,14 @@ If modelid = "new" Then
Response.End
End If
If newmachinetypecategory = "" Then
newmachinetypecategory = "Equipment"
End If
' Insert new machine type using parameterized query
Dim sqlNewMT, cmdNewMT
sqlNewMT = "INSERT INTO machinetypes (machinetype, category, isactive) VALUES (?, ?, 1)"
sqlNewMT = "INSERT INTO machinetypes (machinetype, isactive) VALUES (?, 1)"
Set cmdNewMT = Server.CreateObject("ADODB.Command")
cmdNewMT.ActiveConnection = objConn
cmdNewMT.CommandText = sqlNewMT
cmdNewMT.CommandType = 1
cmdNewMT.Parameters.Append cmdNewMT.CreateParameter("@machinetype", 200, 1, 50, newmachinetypename)
cmdNewMT.Parameters.Append cmdNewMT.CreateParameter("@category", 200, 1, 50, newmachinetypecategory)
On Error Resume Next
cmdNewMT.Execute