sr-npm 1.7.785 → 1.7.786
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 +2 -5
- package/pages/supportTeamsPage.js +2 -3
package/package.json
CHANGED
package/pages/pagesUtils.js
CHANGED
|
@@ -63,11 +63,8 @@ function groupValuesByField(values, refKey) {
|
|
|
63
63
|
return result.find(value=>value._id===valueId);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
async function
|
|
67
|
-
console.log("Value: ", Value);
|
|
66
|
+
async function getLatestJobsByValue(Value) {
|
|
68
67
|
const jobs=Value.multiRefJobsCustomValues;
|
|
69
|
-
console.log("jobs: ", jobs);
|
|
70
|
-
|
|
71
68
|
const latestJobs = jobs
|
|
72
69
|
.sort((a, b) => new Date(b.releasedDate) - new Date(a.releasedDate))
|
|
73
70
|
.slice(0, 5);
|
|
@@ -82,6 +79,6 @@ function groupValuesByField(values, refKey) {
|
|
|
82
79
|
getFieldByTitle,
|
|
83
80
|
getCorrectOption,
|
|
84
81
|
getOptionIndexFromCheckBox,
|
|
85
|
-
|
|
82
|
+
getLatestJobsByValue,
|
|
86
83
|
getValueFromValueId
|
|
87
84
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const { getLatestJobsByValue, getValueFromValueId } = require('./pagesUtils');
|
|
2
2
|
const { location } = require("@wix/site-location");
|
|
3
3
|
const { supportTeamsPageIds } = require('../backend/consts');
|
|
4
4
|
|
|
@@ -23,8 +23,7 @@ async function bind(_$w) {
|
|
|
23
23
|
const currentItem= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
|
|
24
24
|
const valueId=supportTeamsPageIds.valueToValueIdMap[currentItem.title_fld]
|
|
25
25
|
const Value=await getValueFromValueId(valueId);
|
|
26
|
-
|
|
27
|
-
const latestsJobs=await getLatestJobsByValueId(Value);
|
|
26
|
+
const latestsJobs=await getLatestJobsByValue(Value);
|
|
28
27
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data = latestsJobs;
|
|
29
28
|
|
|
30
29
|
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick(async () => {
|