sr-npm 1.7.893 → 1.7.895

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].push(position.id) : customValuesToJobs[visibility]=[position.id]
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].push(position.id) : customValuesToJobs[position.typeOfEmployment.id]=[position.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].push(position.id) : customValuesToJobs[valueId]=[position.id]
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].length,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.893",
3
+ "version": "1.7.895",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -63,7 +63,6 @@ async function handleUrlParams(_$w,urlParams) {
63
63
  keyword=true;
64
64
  currentJobs=_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOB_RESULTS_REPEATER).data;
65
65
  }
66
-
67
66
  if(urlParams.brand) {
68
67
  applyFiltering=await handleParams(_$w,"brand",urlParams.brand)
69
68
  }