-
Notifications
You must be signed in to change notification settings - Fork 13.1k
[NEW] Capability to search visitors by custom fields #26312
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
0f5fb61
[IMPROVE] Capability to search visitors by custom fields
cauefcr 152638b
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 76c6ca6
reverting i18n change
cauefcr 9267b2f
Update apps/meteor/server/models/raw/LivechatVisitors.ts
cauefcr 51fcb54
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 181b23b
removing useless code
cauefcr bbaba3e
Merge branch 'fix/custom-field-search2' of ssh://github.com/RocketCha…
cauefcr d879b33
some extra changes to regex and queries and permissions
KevLehman 0f92df4
fix new custom fields searchable, fix deprecated field usage, and val…
cauefcr fb1a23a
Merge branch 'fix/custom-field-search2' of ssh://github.com/RocketCha…
cauefcr 8ce26b5
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 274909a
livechat/visitor.search tests
cauefcr 92678e2
better tests, thanks @kevin!
cauefcr 8f15363
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 04bebf4
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr b8f0558
proper test end
cauefcr 511e42b
Merge branch 'develop' into fix/custom-field-search2
KevLehman 3b414ee
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr b70de71
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr f67c01c
Merge branch 'fix/custom-field-search2' of ssh://github.com/RocketCha…
cauefcr 6097ad7
linting
cauefcr 641da30
Merge branch 'develop' into fix/custom-field-search2
KevLehman 6c83b8e
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 8c35f64
Merge branch 'fix/custom-field-search2' of ssh://github.com/RocketCha…
cauefcr 018742b
Merge branch 'develop' into fix/custom-field-search2
KevLehman 3f97b3e
Merge branch 'develop' into fix/custom-field-search2
KevLehman cca0adb
Merge branch 'develop' into fix/custom-field-search2
KevLehman f953ae8
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr c1d8685
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 4eda605
refactoring queries to proper models and other fixes
cauefcr 120332f
Merge branch 'fix/custom-field-search2' of ssh://github.com/RocketCha…
cauefcr 7f403b5
fixing type error
cauefcr 5f947f0
Merge branch 'develop' of ssh://github.com/RocketChat/Rocket.Chat int…
cauefcr 9094b7b
Merge branch 'develop' into fix/custom-field-search2
casalsgh 404f63a
Merge branch 'fix/custom-field-search2' of github.com:RocketChat/Rock…
KevLehman ae4ee00
small improvements
KevLehman a5d2c52
Merge remote-tracking branch 'origin/develop' into fix/custom-field-s…
sampaiodiego 04b77de
small refactor
sampaiodiego 31b73ac
remove that urlsearchparams
KevLehman 48e26ab
forgotten changes
sampaiodiego 9cd1fe3
Merge branch 'fix/custom-field-search2' of github.com:RocketChat/Rock…
sampaiodiego d142246
await but different
sampaiodiego File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ Meteor.methods({ | |
| scope: String, | ||
| visibility: String, | ||
| regexp: String, | ||
| searchable: Boolean, | ||
| }), | ||
| ); | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import type { Response } from 'supertest'; | ||
| import { ILivechatCustomField } from '@rocket.chat/core-typings'; | ||
| import { credentials, request, methodCall, api } from './../api-data'; | ||
|
|
||
| export const createCustomField = (customField: ILivechatCustomField) => new Promise((resolve, reject) => { | ||
| request | ||
| .get(api('livechat/custom-fields/'+customField.label)) | ||
| .set(credentials) | ||
| .send() | ||
| .end((err: Error, res:Response) => { | ||
| if (err) { | ||
| reject(err); | ||
| } else { | ||
| if (res.body.customField != null && res.body.customField != undefined) { | ||
| resolve(res.body.customField); | ||
| }else{ | ||
| request | ||
| .post(methodCall('livechat:saveCustomField')) | ||
| .send({ | ||
| message: JSON.stringify({ | ||
| method: 'livechat:saveCustomField', | ||
| params: [null,customField], | ||
| id: 'id', | ||
| msg: 'method', | ||
| }), | ||
| }) | ||
| .set(credentials) | ||
| .end((err: Error, res: Response): void => { | ||
| if (err) { | ||
| return reject(err); | ||
| } | ||
| resolve(res.body); | ||
| }); | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| }); | ||
|
|
||
| export const deleteCustomField = (customFieldID: string) => new Promise((resolve, reject) => { | ||
| request | ||
| .post(methodCall('livechat:saveCustomField')) | ||
| .send(customFieldID) | ||
| .set(credentials) | ||
| .end((err: Error, res: Response): void => { | ||
| if (err) { | ||
| return reject(err); | ||
| } | ||
| resolve(res.body); | ||
| }); | ||
| }); | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.