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:
2026-04-07 10:31:38 +07:00
parent 04ca0a8299
commit dbe82c1019
4 changed files with 232 additions and 2 deletions
+30
View File
@@ -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(