Add device checklists and retro Mac favicon
Checklists feature: - device_checklists and checklist_items tables - Create multiple named checklists per device - Add/toggle/delete items with progress bar - Checkbox UI with green check, strikethrough for completed items - Delete checklist button with item count display Also adds the classic Mac happy face as favicon. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -195,6 +195,36 @@ export const installationLog = pgTable(
|
||||
]
|
||||
);
|
||||
|
||||
// ─── Device Checklists ──────────────────────────────────────────────
|
||||
|
||||
export const deviceChecklists = pgTable(
|
||||
'device_checklists',
|
||||
{
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
deviceId: uuid('device_id')
|
||||
.notNull()
|
||||
.references(() => devices.id, { onDelete: 'cascade' }),
|
||||
title: text('title').notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull()
|
||||
},
|
||||
(table) => [index('device_checklists_device_idx').on(table.deviceId)]
|
||||
);
|
||||
|
||||
export const checklistItems = pgTable(
|
||||
'checklist_items',
|
||||
{
|
||||
id: uuid('id').defaultRandom().primaryKey(),
|
||||
checklistId: uuid('checklist_id')
|
||||
.notNull()
|
||||
.references(() => deviceChecklists.id, { onDelete: 'cascade' }),
|
||||
text: text('text').notNull(),
|
||||
checked: boolean('checked').default(false).notNull(),
|
||||
sortOrder: integer('sort_order').default(0).notNull(),
|
||||
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull()
|
||||
},
|
||||
(table) => [index('checklist_items_checklist_idx').on(table.checklistId)]
|
||||
);
|
||||
|
||||
// ─── Device Log (append-only repair/operation history) ───────────────
|
||||
|
||||
export const deviceLog = pgTable(
|
||||
|
||||
Reference in New Issue
Block a user