sr-npm 1.7.815 → 1.7.817

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.815",
3
+ "version": "1.7.817",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,6 @@ const {
21
21
 
22
22
  async function getCategoryValueId(customFields) {
23
23
  const categoryCustomField=await wixData.query(COLLECTIONS.CUSTOM_FIELDS).eq(CUSTOM_FIELDS_COLLECTION_FIELDS.TITLE,"Category").find().then(result => result.items[0]);
24
- console.log("categoryCustomField@@$@$@$#$@: ", categoryCustomField);
25
24
  for(const field of customFields) {
26
25
  if(field.customField===categoryCustomField._id) {
27
26
  return field._id;
@@ -37,13 +36,10 @@ async function getCategoryValueId(customFields) {
37
36
  const item = await _$w('#datasetJobsItem').getCurrentItem();
38
37
  const multiRefField=await getPositionWithMultiRefField(item._id);
39
38
  const categoryValueId=await getCategoryValueId(multiRefField);
40
- console.log("multiRefField@@$@$@$#$@: ", multiRefField);
41
- console.log("categoryValueId@@$@$@$#$@: ", categoryValueId);
42
39
 
43
40
  handleReferFriendButton(_$w,item);
44
41
 
45
42
  handleApplyButton(_$w,item);
46
- console.log("i am here");
47
43
 
48
44
  _$w('#companyDescriptionText').text = htmlToText(item.jobDescription.companyDescription.text);
49
45
  _$w('#responsibilitiesText').text = htmlToText(item.jobDescription.jobDescription.text);
@@ -53,12 +49,9 @@ async function getCategoryValueId(customFields) {
53
49
  {
54
50
  _$w('#additionalInfoText').text = htmlToText(item.jobDescription.additionalInformation.text);
55
51
  }
56
- console.log("i am here 2");
57
52
  if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
58
53
  {
59
- console.log("i am here 3");
60
54
  const relatedJobs=await getRelatedJobs(categoryValueId,item._id);
61
- console.log("relatedJobs@@$@$@$$%%%%%%%%%%#$@: ", relatedJobs);
62
55
  _$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
63
56
  $item('#relatedJobTitle').text = itemData.title;
64
57
  $item('#relatedJobLocation').text = itemData.location.fullLocation;
@@ -66,7 +59,7 @@ async function getCategoryValueId(customFields) {
66
59
  await location.to(itemData["link-jobs-title"]);
67
60
  });
68
61
  });
69
- _$w('#relatedJobsRepNoDepartment').data = relatedJobs.slice(0,5);
62
+ _$w('#relatedJobsRepNoDepartment').data = relatedJobs
70
63
 
71
64
  }
72
65
  });
@@ -97,10 +90,7 @@ async function getCategoryValueId(customFields) {
97
90
  }
98
91
 
99
92
  async function getRelatedJobs(categoryValueId,itemId) {
100
- console.log("categoryValueId inside getRelatedJobs ", categoryValueId);
101
- console.log("type of categoryValueId: ", typeof categoryValueId);
102
- 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(JOBS_COLLECTION_FIELDS.ID,itemId).find();
103
- console.log("relatedJobs@@$@$@$#$@: ", relatedJobs);
93
+ 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).find();
104
94
  return relatedJobs.items;
105
95
  }
106
96