sr-npm 1.7.903 → 1.7.905
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/consts.js +1 -0
- package/package.json +1 -1
- package/pages/positionPage.js +4 -2
- package/pages/supportTeamsPage.js +8 -3
package/backend/consts.js
CHANGED
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -51,7 +51,7 @@ async function getCategoryValueId(customValues) {
|
|
|
51
51
|
}
|
|
52
52
|
if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
|
|
53
53
|
{
|
|
54
|
-
const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
|
|
54
|
+
const relatedJobs = await getRelatedJobs({ categoryValueId, itemId: item._id ,limit:5});
|
|
55
55
|
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
56
56
|
$item('#relatedJobTitle').text = itemData.title;
|
|
57
57
|
$item('#relatedJobLocation').text = itemData.location.fullLocation;
|
|
@@ -99,7 +99,9 @@ async function getCategoryValueId(customValues) {
|
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
async function getRelatedJobs(categoryValueId,itemId,limit=1000) {
|
|
102
|
+
async function getRelatedJobs({ categoryValueId, itemId, limit = 1000 }) {
|
|
103
|
+
|
|
104
|
+
|
|
103
105
|
const relatedJobs=await wixData.query(COLLECTIONS.JOBS).include(JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES).hasSome(JOBS_COLLECTION_FIELDS.MULTI_REF_JOBS_CUSTOM_VALUES,[categoryValueId]).ne("_id",itemId).limit(limit).find();
|
|
104
106
|
return relatedJobs.items;
|
|
105
107
|
}
|
|
@@ -27,12 +27,17 @@ async function handleRecentJobsSection(_$w) {
|
|
|
27
27
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
|
|
28
28
|
$item(supportTeamsPageIds.JOB_TITLE).text = itemData.title;
|
|
29
29
|
$item(supportTeamsPageIds.JOB_LOCATION).text = itemData.location.fullLocation;
|
|
30
|
-
|
|
31
|
-
location.to(itemData["link-jobs-title"]);
|
|
32
|
-
})
|
|
30
|
+
|
|
33
31
|
});
|
|
34
32
|
|
|
35
33
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data = latestsJobs;
|
|
34
|
+
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS_ITEM).onClick((event) => {
|
|
35
|
+
const data = _$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data;
|
|
36
|
+
const clickedItemData = data.find(
|
|
37
|
+
(item) => item._id === event.context.itemId,
|
|
38
|
+
);
|
|
39
|
+
location.to(clickedItemData["link-jobs-title"]);
|
|
40
|
+
});
|
|
36
41
|
|
|
37
42
|
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick( () => {
|
|
38
43
|
location.to(`/search?category=${Value.title}`);
|