sr-npm 1.7.897 → 1.7.898

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.
Files changed (2) hide show
  1. package/backend/data.js +5 -3
  2. package/package.json +1 -1
package/backend/data.js CHANGED
@@ -153,7 +153,7 @@ async function saveJobsDataToCMS() {
153
153
  await getSiteConfig();
154
154
  }
155
155
  if (siteconfig.customFields==="true") {
156
- await populateCustomFieldsCollection(customFieldsLabels);
156
+ await populateCustomFieldsCollection(customFieldsLabels,templateType);
157
157
  await populateCustomValuesCollection(customFieldsValues);
158
158
  }
159
159
  // Sort jobs by title (ascending, case-insensitive, numeric-aware)
@@ -197,10 +197,12 @@ async function insertJobsReference(valueId) {
197
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
- async function populateCustomFieldsCollection(customFields) {
200
+ async function populateCustomFieldsCollection(customFields,templateType) {
201
201
  let fieldstoinsert=[]
202
202
  customFields["employmentType"] = "Employment Type";
203
- customFields["Visibility"] = "Visibility";
203
+ if(templateType===TEMPLATE_TYPE.INTERNAL){
204
+ customFields["Visibility"] = "Visibility";
205
+ }
204
206
  for(const ID of Object.keys(customFields)){
205
207
  fieldstoinsert.push({
206
208
  title: customFields[ID],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.897",
3
+ "version": "1.7.898",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {