Add soft delete for components (disabled flag)
Deploy to LXC / deploy (push) Successful in 22s

- disabled boolean on components table (default false)
- Component list filters out disabled components
- Component detail returns 404 for disabled
- Delete button with confirmation on component detail page
- Installation form filters out instances of disabled components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 14:50:18 +07:00
parent 5c4595ed16
commit 9a59213da0
5 changed files with 34 additions and 2 deletions
+1
View File
@@ -138,6 +138,7 @@ export const components = pgTable(
defaultCondition: text('default_condition').notNull().default('Working'),
defaultFirmwareVersion: text('default_firmware_version'),
defaultLocationId: uuid('default_location_id').references(() => locations.id),
disabled: boolean('disabled').default(false).notNull(),
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
updatedAt: timestamp('updated_at', { withTimezone: true }).defaultNow().notNull()
},