@cofondateurauchomage/libs 1.1.151 → 1.1.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import type { ICrmProfile } from "../db.model";
|
|
1
|
+
import type { IContact, ICrmProfile } from "../db.model";
|
|
2
2
|
/**
|
|
3
3
|
* Rebuilds `crm_profiles.searchText` from denormalized profile (+ contact for user/project).
|
|
4
4
|
* Uses {@link foldSearchText}; apply the same folding to user queries.
|
|
5
5
|
*/
|
|
6
|
-
export declare function buildCrmProfileSearchText(doc: ICrmProfile
|
|
6
|
+
export declare function buildCrmProfileSearchText(doc: Pick<ICrmProfile, "type" | "profile"> & {
|
|
7
|
+
contact?: IContact;
|
|
8
|
+
}): string;
|
|
@@ -27,8 +27,8 @@ function buildCrmProfileSearchText(doc) {
|
|
|
27
27
|
pushPart(parts, profile.firstName);
|
|
28
28
|
pushPart(parts, profile.lastName);
|
|
29
29
|
pushPart(parts, profile.city);
|
|
30
|
-
pushPart(parts, doc.contact
|
|
31
|
-
pushPart(parts, doc.contact
|
|
30
|
+
pushPart(parts, doc.contact?.email);
|
|
31
|
+
pushPart(parts, doc.contact?.linkedin);
|
|
32
32
|
}
|
|
33
33
|
else {
|
|
34
34
|
const profile = doc.profile;
|
|
@@ -36,8 +36,8 @@ function buildCrmProfileSearchText(doc) {
|
|
|
36
36
|
pushPart(parts, profile.firstName);
|
|
37
37
|
pushPart(parts, profile.lastName);
|
|
38
38
|
pushPart(parts, profile.city);
|
|
39
|
-
pushPart(parts, doc.contact
|
|
40
|
-
pushPart(parts, doc.contact
|
|
39
|
+
pushPart(parts, doc.contact?.email);
|
|
40
|
+
pushPart(parts, doc.contact?.linkedin);
|
|
41
41
|
}
|
|
42
42
|
return (0, stringUtils_1.foldSearchText)(parts.join(" "));
|
|
43
43
|
}
|