sr-npm 1.7.805 → 1.7.807

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.805",
3
+ "version": "1.7.807",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@ const {
18
18
  }
19
19
 
20
20
  async function getCategoryValueId(customFields) {
21
- const categoryCustomField=await wixData.query(COLLECTIONS.CUSTOM_FIELDS).eq(CUSTOM_FIELDS_COLLECTION_FIELDS.TITLE,"Category").find();
21
+ const categoryCustomField=await wixData.query(COLLECTIONS.CUSTOM_FIELDS).eq(CUSTOM_FIELDS_COLLECTION_FIELDS.TITLE,"Category").find().then(result => result.items[0]);
22
22
  console.log("categoryCustomField@@$@$@$#$@: ", categoryCustomField);
23
23
  for(const field of customFields) {
24
24
  if(field.customField===categoryCustomField._id) {
@@ -41,6 +41,7 @@ async function getCategoryValueId(customFields) {
41
41
  handleReferFriendButton(_$w,item);
42
42
 
43
43
  handleApplyButton(_$w,item);
44
+ console.log("i am here");
44
45
 
45
46
  _$w('#companyDescriptionText').text = htmlToText(item.jobDescription.companyDescription.text);
46
47
  _$w('#responsibilitiesText').text = htmlToText(item.jobDescription.jobDescription.text);
@@ -50,10 +51,12 @@ async function getCategoryValueId(customFields) {
50
51
  {
51
52
  _$w('#additionalInfoText').text = htmlToText(item.jobDescription.additionalInformation.text);
52
53
  }
54
+ console.log("i am here 2");
53
55
  });
54
56
 
55
57
  if(_$w('#relatedJobsDataset'))
56
58
  {
59
+ console.log("relatedJobsDataset@@$@$@$#$@: ");
57
60
  _$w('#relatedJobsDataset').onReady(() => {
58
61
  const count = _$w('#relatedJobsDataset').getTotalCount();
59
62
  if(!count){
@@ -64,11 +67,17 @@ async function getCategoryValueId(customFields) {
64
67
 
65
68
  if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
66
69
  {
70
+ console.log("i am here 3");
67
71
  const relatedJobs=await getRelatedJobs();
68
72
  console.log("relatedJobs@@$@$@$$%%%%%%%%%%#$@: ", relatedJobs);
69
73
  _$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
70
- $item('#relatedJobsItem').text = itemData.title;
74
+ $item('#relatedJobTitle').text = itemData.title;
75
+ $item('#relatedJobLocation').text = itemData.location.fullLocation;
76
+ $item('#relatedJobTitle').onClick(async () => {
77
+ await location.to(itemData["link-jobs-title"]);
78
+ });
71
79
  });
80
+ _$w('#relatedJobsRepNoDepartment').data = relatedJobs.slice(0,5);
72
81
 
73
82
  }
74
83
  }