sr-npm 1.7.594 → 1.7.596
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.
|
@@ -39,6 +39,7 @@ const CUSTOM_VALUES_COLLECTION_FIELDS = {
|
|
|
39
39
|
CUSTOM_FIELD: 'customField',
|
|
40
40
|
MULTI_REF_JOBS_CUSTOM_VALUES: 'multiRefJobsCustomValues',
|
|
41
41
|
TOTAL_JOBS: 'totalJobs',
|
|
42
|
+
JOB_IDS: 'jobIds',
|
|
42
43
|
}
|
|
43
44
|
const CUSTOM_FIELDS_COLLECTION_FIELDS = {
|
|
44
45
|
TITLE: 'title',
|
|
@@ -106,6 +107,7 @@ const COLLECTIONS_FIELDS = {
|
|
|
106
107
|
{key:'customField', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.CUSTOM_FIELDS } } },
|
|
107
108
|
{key:'totalJobs', type: 'NUMBER'},
|
|
108
109
|
{key:'multiRefJobsCustomValues', type: 'MULTI_REFERENCE', typeMetadata: { multiReference: { referencedCollectionId: COLLECTIONS.JOBS,referencingFieldKey:CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,referencingDisplayName:CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES } } },
|
|
110
|
+
{key:'jobIds', type: 'ARRAY'},
|
|
109
111
|
],
|
|
110
112
|
CUSTOM_FIELDS: [
|
|
111
113
|
{key:'title', type: 'TEXT'},
|
package/backend/data.js
CHANGED
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ const selectedByField = new Map(); // fieldId -> array of selected value IDs
|
|
|
7
7
|
const optionsByFieldId = new Map(); // fieldId -> [{label, value}]
|
|
8
8
|
const countsByFieldId = new Map();
|
|
9
9
|
let alljobs=[]
|
|
10
|
-
let valueToJobs=
|
|
10
|
+
let valueToJobs={}
|
|
11
11
|
async function careersMultiBoxesPageOnReady(_$w) {
|
|
12
12
|
await loadJobs(_$w);
|
|
13
13
|
await loadFilters(_$w);
|
|
@@ -49,8 +49,7 @@ async function careersMultiBoxesPageOnReady(_$w) {
|
|
|
49
49
|
if(valueToJobs.size===0) {
|
|
50
50
|
const allvaluesobjects=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
51
51
|
for (const value of allvaluesobjects) {
|
|
52
|
-
|
|
53
|
-
valueToJobs.set(value._id, result.items);
|
|
52
|
+
valueToJobs[value._id]= value.jobIds;
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
55
|
console.log("valueToJobs: ",valueToJobs)
|