feat: allow adding available pre-defined table columns to views (#1371)

* feat: allow adding available pre-defined table columns to views

Closes #1360

* fix: allow creating views with the same name for the same table

* refactor: code review

- rename things
- move handleColumnVisibilityChange to useTableColumns hook
This commit is contained in:
Thaïs
2023-08-30 11:33:21 +02:00
committed by GitHub
parent 9df4b475d8
commit 4aae22ab34
11 changed files with 148 additions and 82 deletions

View File

@ -0,0 +1,2 @@
-- DropIndex
DROP INDEX "views_workspaceId_type_objectId_name_key";

View File

@ -216,31 +216,31 @@ model WorkspaceMember {
model Company {
/// @Validator.IsString()
/// @Validator.IsOptional()
id String @id @default(uuid())
id String @id @default(uuid())
/// @Validator.IsString()
/// @Validator.IsOptional()
name String
name String
/// @Validator.IsString()
/// @Validator.IsOptional()
domainName String
domainName String
/// @Validator.IsString()
/// @Validator.IsOptional()
linkedinUrl String?
linkedinUrl String?
/// @Validator.IsNumber()
/// @Validator.IsOptional()
annualRecurringRevenue Int?
/// @Validator.IsBoolean()
/// @Validator.IsOptional()
idealCustomerProfile Boolean @default(false)
idealCustomerProfile Boolean @default(false)
/// @Validator.IsString()
/// @Validator.IsOptional()
xUrl String?
xUrl String?
/// @Validator.IsString()
/// @Validator.IsOptional()
address String
address String
/// @Validator.IsNumber()
/// @Validator.IsOptional()
employees Int?
employees Int?
people Person[]
accountOwner User? @relation(fields: [accountOwnerId], references: [id], onDelete: SetNull)
@ -603,7 +603,6 @@ model View {
/// @TypeGraphQL.omit(input: true, output: true)
workspaceId String
@@unique([workspaceId, type, objectId, name])
@@map("views")
}