feat: persist view filters and sorts on Update View button click (#1290)
* feat: add viewFilters table Closes #1121 * feat: add Update View button + Create View dropdown Closes #1124, #1289 * feat: add View Filter resolvers * feat: persist view filters and sorts on Update View button click Closes #1123 * refactor: code review - Rename recoil selectors - Rename filters `field` property to `key`
This commit is contained in:
@ -174,6 +174,7 @@ model Workspace {
|
||||
pipelineProgresses PipelineProgress[]
|
||||
activityTargets ActivityTarget[]
|
||||
viewFields ViewField[]
|
||||
viewFilters ViewFilter[]
|
||||
views View[]
|
||||
viewSorts ViewSort[]
|
||||
|
||||
@ -582,6 +583,7 @@ model View {
|
||||
id String @id @default(uuid())
|
||||
|
||||
fields ViewField[]
|
||||
filters ViewFilter[]
|
||||
name String
|
||||
objectId String
|
||||
sorts ViewSort[]
|
||||
@ -596,6 +598,34 @@ model View {
|
||||
@@map("views")
|
||||
}
|
||||
|
||||
enum ViewFilterOperand {
|
||||
Contains
|
||||
DoesNotContain
|
||||
GreaterThan
|
||||
LessThan
|
||||
Is
|
||||
IsNot
|
||||
}
|
||||
|
||||
model ViewFilter {
|
||||
displayValue String
|
||||
key String
|
||||
name String
|
||||
operand ViewFilterOperand
|
||||
value String
|
||||
|
||||
view View @relation(fields: [viewId], references: [id], onDelete: Cascade)
|
||||
viewId String
|
||||
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspaceId String
|
||||
|
||||
@@id([viewId, key])
|
||||
@@map("viewFilters")
|
||||
}
|
||||
|
||||
enum ViewSortDirection {
|
||||
asc
|
||||
desc
|
||||
|
||||
Reference in New Issue
Block a user