sr-npm 1.7.545 → 1.7.547

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.
@@ -97,7 +97,7 @@ const COLLECTIONS_FIELDS = {
97
97
  CUSTOM_VALUES: [
98
98
  {key:'title', type: 'TEXT'},
99
99
  {key:'customField', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.CUSTOM_FIELDS } } },
100
- {key:'multiRefJobsCustomValues', type: 'MULTI_REFERENCE', typeMetadata: { multiReference: { referencedCollectionId: COLLECTIONS.JOBS,referencingFieldKey:CUSTOM_VALUES_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,referencingDisplayName:MULTI_REF_JOBS_CUSTOM_VALUES.MULTI_REF_JOBS_CUSTOM_VALUES } } },
100
+ {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 } } },
101
101
  ],
102
102
  CUSTOM_FIELDS: [
103
103
  {key:'title', type: 'TEXT'},
package/backend/data.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const { items: wixData } = require('@wix/data');
2
2
  const { fetchPositionsFromSRAPI, fetchJobDescription } = require('./fetchPositionsFromSRAPI');
3
3
  const { createCollectionIfMissing } = require('@hisense-staging/velo-npm/backend');
4
- const { COLLECTIONS, COLLECTIONS_FIELDS,JOBS_COLLECTION_FIELDS,TEMPLATE_TYPE,TOKEN_NAME,CUSTOM_VALUES_COLLECTION_FIELDS,CUSTOM_FIELDS_COLLECTION_FIELDS } = require('./collectionConsts');
4
+ const { COLLECTIONS, COLLECTIONS_FIELDS,JOBS_COLLECTION_FIELDS,TEMPLATE_TYPE,TOKEN_NAME,CUSTOM_VALUES_COLLECTION_FIELDS } = require('./collectionConsts');
5
5
  const { chunkedBulkOperation, countJobsPerGivenField, fillCityLocationAndLocationAddress ,prepareToSaveArray,normalizeString} = require('./utils');
6
6
  const { getAllPositions } = require('./queries');
7
7
  const { retrieveSecretVal, getTokenFromCMS } = require('./secretsData');
@@ -55,8 +55,8 @@ function validateSingleDesiredBrand(desiredBrand) {
55
55
  function getCustomFieldsAndValuesFromPosition(position,customFieldsLabels,customFieldsValues,jobToCustomValues) {
56
56
  const customFieldsArray = Array.isArray(position?.customField) ? position.customField : [];
57
57
  for (const field of customFieldsArray) {
58
- if(field.fieldLabel==="Country" || field.fieldLabel==="Department") continue; //country and department are not custom fields, they are already in the job object
59
- const label = field.fieldLabel==="Brands" ? "brand" : field.fieldLabel
58
+ if(field.fieldLabel==="Country" || field.fieldLabel==="Department" || field.fieldLabel==="Brands") continue; //country and department are not custom fields, they are already in the job object
59
+ const label = field.fieldLabel
60
60
  const fieldId=field.fieldId
61
61
  const fieldLabel = normalizeString(label);
62
62
  const valueId=field.valueId
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.545",
3
+ "version": "1.7.547",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {