sr-npm 1.7.778 → 1.7.779

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.778",
3
+ "version": "1.7.779",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -64,6 +64,14 @@ function groupValuesByField(values, refKey) {
64
64
  console.log("result: ", result);
65
65
  const categoryValue=result.filter(value=>value._id===categoryId);
66
66
  console.log("categoryValue: ", categoryValue);
67
+ const jobs=categoryValue.multiRefJobsCustomValues;
68
+ console.log("jobs: ", jobs);
69
+ const latestJobs = jobs
70
+ .sort((a, b) => new Date(b.releasedDate) - new Date(a.releasedDate))
71
+ .slice(0, 5);
72
+ console.log("latestJobs: ", latestJobs);
73
+ return latestJobs;
74
+
67
75
 
68
76
 
69
77
  }
@@ -36,7 +36,7 @@ async function bindRepeater(_$w) {
36
36
  const categoryId=valueToCategoryIdMap[obj.title_fld]
37
37
  const latestsJobs=await getLatestJobsByCategoryId(categoryId);
38
38
  console.log("latestsJobs: ", latestsJobs);
39
-
39
+ _$w(RECENTLEY_ADDED_JOBS).data = latestsJobs;
40
40
  // const teamName=_$w(TEAM_NAME).label.toLowerCase();
41
41
  // _$w(RECENTLEY_ADDED_JOBS).data = await getLatestJobsByCategory(teamName);
42
42
  }