sr-npm 1.7.894 → 1.7.896
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/backend/data.js
CHANGED
|
@@ -75,7 +75,7 @@ function getVisibility(position,customFieldsValues) {
|
|
|
75
75
|
let visibility;
|
|
76
76
|
position.visibility.toLowerCase()==="public"? visibility="external" : visibility="internal";
|
|
77
77
|
customFieldsValues["Visibility"][visibility] = visibility;
|
|
78
|
-
customValuesToJobs[visibility] ? customValuesToJobs[visibility].
|
|
78
|
+
customValuesToJobs[visibility] ? customValuesToJobs[visibility].add(position.id) : customValuesToJobs[visibility]=new Set([position.id])
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
function getEmploymentType(position,customFieldsValues) {
|
|
@@ -83,7 +83,7 @@ function getEmploymentType(position,customFieldsValues) {
|
|
|
83
83
|
customFieldsValues["employmentType"] = {};
|
|
84
84
|
}
|
|
85
85
|
customFieldsValues["employmentType"][position.typeOfEmployment.id] = position.typeOfEmployment.label;
|
|
86
|
-
customValuesToJobs[position.typeOfEmployment.id] ? customValuesToJobs[position.typeOfEmployment.id].
|
|
86
|
+
customValuesToJobs[position.typeOfEmployment.id] ? customValuesToJobs[position.typeOfEmployment.id].add(position.id) : customValuesToJobs[position.typeOfEmployment.id]=new Set([position.id])
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
function getCustomFieldsAndValuesFromPosition(position,customFieldsLabels,customFieldsValues) {
|
|
@@ -101,7 +101,7 @@ function getCustomFieldsAndValuesFromPosition(position,customFieldsLabels,custom
|
|
|
101
101
|
}
|
|
102
102
|
customFieldsValues[fieldId][valueId] = valueLabel;
|
|
103
103
|
|
|
104
|
-
customValuesToJobs[valueId] ? customValuesToJobs[valueId].
|
|
104
|
+
customValuesToJobs[valueId] ? customValuesToJobs[valueId].add(position.id) : customValuesToJobs[valueId]=new Set([position.id])
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
async function saveJobsDataToCMS() {
|
|
@@ -194,7 +194,7 @@ async function saveJobsDataToCMS() {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
async function insertJobsReference(valueId) {
|
|
197
|
-
await wixData.insertReference(COLLECTIONS.CUSTOM_VALUES, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,valueId, customValuesToJobs[valueId]);
|
|
197
|
+
await wixData.insertReference(COLLECTIONS.CUSTOM_VALUES, CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,valueId, Array.from(customValuesToJobs[valueId]));
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
async function populateCustomFieldsCollection(customFields) {
|
|
@@ -218,8 +218,8 @@ async function populateCustomValuesCollection(customFieldsValues) {
|
|
|
218
218
|
_id: valueId,
|
|
219
219
|
title: valuesMap[valueId],
|
|
220
220
|
customField: fieldId,
|
|
221
|
-
count:customValuesToJobs[valueId].
|
|
222
|
-
jobIds:customValuesToJobs[valueId],
|
|
221
|
+
count:customValuesToJobs[valueId].size,
|
|
222
|
+
jobIds:Array.from(customValuesToJobs[valueId]),
|
|
223
223
|
})
|
|
224
224
|
}
|
|
225
225
|
|
package/package.json
CHANGED
|
@@ -501,7 +501,6 @@ async function secondarySearch(_$w,query) {
|
|
|
501
501
|
try {
|
|
502
502
|
await bindPrimarySearch(_$w,allvaluesobjects,alljobs);
|
|
503
503
|
|
|
504
|
-
|
|
505
504
|
const secondarySearchDebounced = debounce(async () => {
|
|
506
505
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.SECONDARY_SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
507
506
|
await secondarySearch(_$w, query);
|