diff --git a/backend/database/migrations.py b/backend/database/migrations.py
index e6b372a..94958cb 100644
--- a/backend/database/migrations.py
+++ b/backend/database/migrations.py
@@ -45,6 +45,10 @@ async def ensure_agents_table():
await conn.execute("CREATE TYPE config_status AS ENUM ('PENDING', 'APPLIED');")
logger.info("Successfully created config_status enum type.")
+ await conn.execute("ALTER TYPE config_status ADD VALUE IF NOT EXISTS 'REJECTED';")
+ await conn.execute("ALTER TYPE config_status ADD VALUE IF NOT EXISTS 'DELETION';")
+ logger.info("Ensured REJECTED and DELETION values exist in config_status enum.")
+
# First, create essential tables if they don't exist
await create_essential_tables(conn)
diff --git a/frontend/src/components/ApplyManagement.js b/frontend/src/components/ApplyManagement.js
index 35256bd..1541e6e 100644
--- a/frontend/src/components/ApplyManagement.js
+++ b/frontend/src/components/ApplyManagement.js
@@ -1243,39 +1243,41 @@ const ApplyManagement = () => {
{/* Pending Versions Section */}
{pendingVersions.length > 0 && (
-
-
+
+
Pending Changes ({pendingVersions.length})
-
- {pendingVersions.map((version, index) => (
- }
- >
-
-
{version.version_name}
-
- {new Date(version.created_at).toLocaleString()}
+
+
+ {pendingVersions.map((version, index) => (
+ }
+ >
+
+
{version.version_name}
+
+ {new Date(version.created_at).toLocaleString()}
+
+
+ PENDING
+
+
}
+ onClick={() => handleViewChange(version)}
+ style={{ padding: 0, height: 'auto', fontSize: 11 }}
+ >
+ View Change
+
-
- PENDING
-
- }
- onClick={() => handleViewChange(version)}
- style={{ padding: 0, height: 'auto', fontSize: 11 }}
- >
- View Change
-
-
-
- ))}
-
+
+ ))}
+
+
)}
@@ -1298,31 +1300,33 @@ const ApplyManagement = () => {
style={{ margin: '20px 0' }}
/>
) : (
-
- {appliedVersions.map((version, index) => (
- : undefined}
- >
-
-
{version.version_name}
-
- {new Date(version.created_at).toLocaleString()}
+
+
+ {appliedVersions.map((version, index) => (
+ : undefined}
+ >
+
+
{version.version_name}
+
+ {new Date(version.created_at).toLocaleString()}
+
+
}
+ onClick={() => handleViewChange(version)}
+ style={{ padding: 0, height: 'auto', fontSize: 11 }}
+ >
+ View Change
+
- }
- onClick={() => handleViewChange(version)}
- style={{ padding: 0, height: 'auto', fontSize: 11 }}
- >
- View Change
-
-
-
- ))}
-
+
+ ))}
+
+
)}
@@ -1343,42 +1347,44 @@ const ApplyManagement = () => {
style={{ margin: '20px 0' }}
/>
) : (
-
- {rejectedVersions.map((version, index) => (
- }
- >
-
-
{version.version_name}
-
- Rejected: {new Date(version.updated_at || version.created_at).toLocaleString()}
+
+
+ {rejectedVersions.map((version, index) => (
+ }
+ >
+
+
{version.version_name}
+
+ Rejected: {new Date(version.updated_at || version.created_at).toLocaleString()}
+
+
+ }
+ onClick={() => handleViewChange(version)}
+ style={{ padding: 0, height: 'auto', fontSize: 11 }}
+ >
+ View Changes
+
+ }
+ onClick={() => handleUndoRejected(version)}
+ style={{ padding: 0, height: 'auto', fontSize: 11, color: '#1890ff' }}
+ >
+ Undo
+
+
-
- }
- onClick={() => handleViewChange(version)}
- style={{ padding: 0, height: 'auto', fontSize: 11 }}
- >
- View Changes
-
- }
- onClick={() => handleUndoRejected(version)}
- style={{ padding: 0, height: 'auto', fontSize: 11, color: '#1890ff' }}
- >
- Undo
-
-
-
-
- ))}
-
+
+ ))}
+
+
)}