mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 10:52:08 +01:00
feat: enhance platform dashboard UX and add security controls
- Move Add Company button to Companies card header for better context - Add smart Save Changes button that only appears when data is modified - Implement navigation protection with unsaved changes warnings - Add company status checks to prevent suspended companies from processing data - Fix platform dashboard showing incorrect user counts - Add dark mode toggle to platform interface - Add copy-to-clipboard for generated credentials - Fix cookie conflicts between regular and platform auth - Add invitedBy and invitedAt tracking fields to User model - Improve overall platform management workflow and security
This commit is contained in:
@ -49,6 +49,8 @@ model Company {
|
||||
dashboardOpts Json?
|
||||
createdAt DateTime @default(now()) @db.Timestamptz(6)
|
||||
updatedAt DateTime @updatedAt @db.Timestamptz(6)
|
||||
/// Maximum number of users allowed for this company
|
||||
maxUsers Int @default(10)
|
||||
companyAiModels CompanyAIModel[]
|
||||
sessions Session[]
|
||||
imports SessionImport[]
|
||||
@ -78,6 +80,12 @@ model User {
|
||||
resetTokenExpiry DateTime? @db.Timestamptz(6)
|
||||
createdAt DateTime @default(now()) @db.Timestamptz(6)
|
||||
updatedAt DateTime @updatedAt @db.Timestamptz(6)
|
||||
/// Display name for the user
|
||||
name String? @db.VarChar(255)
|
||||
/// When this user was invited
|
||||
invitedAt DateTime? @db.Timestamptz(6)
|
||||
/// Email of the user who invited this user (for audit trail)
|
||||
invitedBy String? @db.VarChar(255)
|
||||
company Company @relation("CompanyUsers", fields: [companyId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([companyId])
|
||||
|
||||
Reference in New Issue
Block a user