sr-npm 1.7.778 → 1.7.780
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 +1 -1
- package/pages/pagesUtils.js +11 -1
- package/pages/supportTeamsPage.js +1 -1
package/package.json
CHANGED
package/pages/pagesUtils.js
CHANGED
|
@@ -62,8 +62,18 @@ function groupValuesByField(values, refKey) {
|
|
|
62
62
|
console.log("categoryId: ", categoryId);
|
|
63
63
|
const result=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
64
64
|
console.log("result: ", result);
|
|
65
|
-
const categoryValue=result.
|
|
65
|
+
const categoryValue=result.find(value=>value._id===categoryId);
|
|
66
66
|
console.log("categoryValue: ", categoryValue);
|
|
67
|
+
const jobs=categoryValue.multiRefJobsCustomValues;
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
console.log("jobs: ", jobs);
|
|
71
|
+
const latestJobs = jobs
|
|
72
|
+
.sort((a, b) => new Date(b.releasedDate) - new Date(a.releasedDate))
|
|
73
|
+
.slice(0, 5);
|
|
74
|
+
console.log("latestJobs: ", latestJobs);
|
|
75
|
+
return latestJobs;
|
|
76
|
+
|
|
67
77
|
|
|
68
78
|
|
|
69
79
|
}
|
|
@@ -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
|
}
|