sr-npm 1.7.174 → 1.7.176

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
@@ -58,7 +58,8 @@ async function saveJobsDataToCMS() {
58
58
  console.log(
59
59
  `Processing ${jobsData.length} jobs in ${totalChunks} chunks of max ${chunkSize} items each`
60
60
  );
61
-
61
+ console.log("truncating jobs collection");
62
+ await wixData.truncate(COLLECTIONS.JOBS);
62
63
  await chunkedBulkOperation({
63
64
  items: jobsData,
64
65
  chunkSize,
@@ -314,6 +315,10 @@ async function createCollections() {
314
315
  }
315
316
 
316
317
  async function aggregateJobs() {
318
+ console.log("truncating cities collection");
319
+ await wixData.truncate(COLLECTIONS.CITIES);
320
+ console.log("truncating amount of jobs per department collection");
321
+ await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
317
322
  console.log("Aggregating jobs");
318
323
  Promise.all([
319
324
  aggregateJobsByFieldToCMS({ field: JOBS_COLLECTION_FIELDS.CITY_TEXT, collection: COLLECTIONS.CITIES }),
@@ -323,6 +328,10 @@ async function aggregateJobs() {
323
328
  }
324
329
 
325
330
  async function referenceJobs() {
331
+ console.log("truncating cities collection");
332
+ await wixData.truncate(COLLECTIONS.CITIES);
333
+ console.log("truncating amount of jobs per department collection");
334
+ await wixData.truncate(COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT);
326
335
  console.log("Reference jobs");
327
336
  await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.DEPARTMENT_REF, sourceCollection: COLLECTIONS.AMOUNT_OF_JOBS_PER_DEPARTMENT, jobField: JOBS_COLLECTION_FIELDS.DEPARTMENT })
328
337
  await referenceJobsToField({ referenceField: JOBS_COLLECTION_FIELDS.CITY, sourceCollection: COLLECTIONS.CITIES, jobField: JOBS_COLLECTION_FIELDS.CITY_TEXT }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.174",
3
+ "version": "1.7.176",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -30,12 +30,12 @@ async function homePageOnReady(_$w,thisObject) {
30
30
  const markers = items.items.map(item => {
31
31
  const location = item.locationAddress.location;
32
32
  return {
33
- location: {
34
- latitude: location.latitude,
35
- longitude: location.longitude
36
- },
37
- address: item.locationAddress.formatted,
38
- description: `<a href=${linkUrl} target="_parent" rel="noopener noreferrer" style="color:#000000;text-decoration:underline;font-weight:bold;">View ${item.count} Open Positions</a>`
33
+ // location: {
34
+ // latitude: location.latitude,
35
+ // longitude: location.longitude
36
+ // },
37
+ // address: item.locationAddress.formatted,
38
+ // description: `<a href=${linkUrl} target="_parent" rel="noopener noreferrer" style="color:#000000;text-decoration:underline;font-weight:bold;">View ${item.count} Open Positions</a>`
39
39
  };
40
40
  });
41
41
  //@ts-ignore