-
-
Notifications
You must be signed in to change notification settings - Fork 675
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: user and link selector #514
Conversation
4d381fb
to
9d7bbc6
Compare
Pull Request Test Coverage Report for Build 8587764926Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
async getFilterLinkRecords(tableId: string, viewId: string) { | ||
const view = await this.viewService.getViewById(viewId); | ||
const linkFields = await this.prismaService.field.findMany({ | ||
where: { tableId, deletedTime: null, type: FieldType.Link, options: { not: null } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options: { not: null }
is unnecessary
|
||
const fields = await this.fieldService.getFieldsByQuery(tableId, { | ||
viewId: view.id, | ||
filterHidden: !view.shareMeta?.includeHiddenField, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the share view of a form, there is no includeHiddenField
property, so there's no need to pass in the filterHidden
attribute
The main purpose is to get only the data necessary for the user and link selectors in the share view, and is an action to protect data security.
Under the Share page:
relationship
isoneOne
, then the associated table records that have already been selected cannot be selected again, so the returned records should be filtered out of the associated records that have already been selected.Of the other views, only the filter component currently requires a data source.