approval list UI

This commit is contained in:
Fred KISSIE
2026-01-10 02:37:50 +01:00
parent 19c3efc9e9
commit 262376aa75
7 changed files with 230 additions and 12 deletions

View File

@@ -308,10 +308,12 @@ export const approvals = pgTable("approvals", {
clientId: integer("clientId").references(() => clients.clientId, {
onDelete: "cascade"
}), // clients reference user devices (in this case)
userId: varchar("userId").references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
}),
userId: varchar("userId")
.references(() => users.userId, {
// optionally tied to a user and in this case delete when the user deletes
onDelete: "cascade"
})
.notNull(),
decision: varchar("decision")
.$type<"approved" | "denied" | "pending">()
.default("pending")