sr-npm 1.7.919 → 1.7.921

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.919",
3
+ "version": "1.7.921",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -10,7 +10,7 @@ const {
10
10
  } = require('../public/utils');
11
11
 
12
12
 
13
- let siteconfig;
13
+
14
14
 
15
15
  async function positionPageOnReady(_$w) {
16
16
 
@@ -32,24 +32,11 @@ async function getCategoryValueId(customValues) {
32
32
 
33
33
 
34
34
  async function bind(_$w) {
35
- siteconfig=await wixData.query(COLLECTIONS.SITE_CONFIGS).find().then(result => result.items[0]);
36
35
  _$w('#datasetJobsItem').onReady(async () => {
37
36
 
38
37
  const item = await _$w('#datasetJobsItem').getCurrentItem();
39
- if(siteconfig.customFields==="true"){
40
38
  const multiRefField=await getPositionWithMultiRefField(item._id);
41
39
  const categoryValueId=await getCategoryValueId(multiRefField);
42
- const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
43
- console.log("relatedJobs: ", relatedJobs);
44
- if(_$w('#relatedJobsRepNoDepartment') && relatedJobs.length>0) // when there is no department, we filter based on category
45
- {
46
- _$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
47
- $item('#relatedJobTitle').text = itemData.title;
48
- $item('#relatedJobLocation').text = itemData.location.fullLocation;
49
- });
50
- _$w('#relatedJobsRepNoDepartment').data = relatedJobs;
51
- }
52
- }
53
40
  handleReferFriendButton(_$w,item);
54
41
  handleApplyButton(_$w,item);
55
42
 
@@ -62,18 +49,25 @@ async function getCategoryValueId(customValues) {
62
49
  {
63
50
  _$w('#additionalInfoText').text = htmlToText(item.jobDescription.additionalInformation.text);
64
51
  }
65
-
52
+ if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
53
+ {
54
+ const relatedJobs=await getRelatedJobs(categoryValueId,item._id,5);
55
+ _$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
56
+ $item('#relatedJobTitle').text = itemData.title;
57
+ $item('#relatedJobLocation').text = itemData.location.fullLocation;
58
+ });
59
+ _$w('#relatedJobsRepNoDepartment').data = relatedJobs;
60
+
61
+
62
+ }
66
63
  });
67
- if(isElementExistOnPage(_$w('#relatedJobsNoDepartmentItem')))
68
- {
69
64
  _$w('#relatedJobsNoDepartmentItem').onClick((event) => {
70
65
  const data = _$w("#relatedJobsRepNoDepartment").data;
71
- const clickedItemData = data.find(
72
- (item) => item._id === event.context.itemId,
73
- );
74
- location.to(clickedItemData["link-jobs-title"]);
75
- });
76
- }
66
+ const clickedItemData = data.find(
67
+ (item) => item._id === event.context.itemId,
68
+ );
69
+ location.to(clickedItemData["link-jobs-title"]);
70
+ });
77
71
  if(isElementExistOnPage(_$w('#relatedJobsDataset')))
78
72
  {
79
73
  _$w('#relatedJobsDataset').onReady(() => {
@@ -15,6 +15,7 @@ async function handleRecentJobsSection(_$w) {
15
15
 
16
16
  const currentItem= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
17
17
  console.log("currentItem: ",currentItem);
18
+
18
19
  if(supportTeamsPageIds.excludeValues.has(currentItem.title_fld)) {
19
20
  console.log("Value is excluded , collapsing recently Jobs Section ");
20
21
  await collapseSection(_$w);