@autofleet/sadot 0.5.5-beta.10 → 0.5.5-beta.11
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.
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export const generateCustomFieldSearchQueryPayload = (
|
|
|
26
26
|
searchTerm: string,
|
|
27
27
|
model: ModelStatic,
|
|
28
28
|
entityId : string,
|
|
29
|
+
excludedCustomFieldsTypes : string[],
|
|
29
30
|
): CustomFieldsSearchPayload => {
|
|
30
31
|
const subQuery = 'EXISTS ('
|
|
31
32
|
+ ' SELECT 1'
|
|
@@ -33,7 +34,8 @@ export const generateCustomFieldSearchQueryPayload = (
|
|
|
33
34
|
+ ' INNER JOIN custom_field_definitions AS cd '
|
|
34
35
|
+ ` ON cd.entity_id = '${entityId}'`
|
|
35
36
|
+ ' AND cv.custom_field_definition_id = cd.id '
|
|
36
|
-
|
|
37
|
+
+ ` AND cd.model_type = '${model.name}' `
|
|
38
|
+
+ ` AND cd.field_type NOT IN (${excludedCustomFieldsTypes})`
|
|
37
39
|
+ ' WHERE'
|
|
38
40
|
+ ' "cv"."deleted_at" IS NULL'
|
|
39
41
|
+ ` AND "cv"."model_id" = "${model.name}"."id"`
|