sr-npm 3.1.35 → 3.1.37

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": "3.1.35",
3
+ "version": "3.1.37",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -61,9 +61,10 @@ async function getCategoryValue(customValues) {
61
61
  handleReferFriendButton(_$w,item);
62
62
  handleApplyButton(_$w,item);
63
63
 
64
- _$w('#companyDescriptionText').content = item.jobDescription.companyDescription;
65
- _$w('#responsibilitiesText').content = item.jobDescription.jobDescription;
66
- _$w('#qualificationsText').content = item.jobDescription.qualifications;
64
+ handleStackContent(_$w,item.jobDescription.companyDescription,'companyDescriptionStack','companyDescriptionText');
65
+ handleStackContent(_$w,item.jobDescription.jobDescription,'responsibilitiesStack','responsibilitiesText');
66
+ handleStackContent(_$w,item.jobDescription.qualifications,'qualificationsStack','qualificationsText');
67
+
67
68
  _$w('#relatedJobsTitleText').text = `More ${item.department} Positions`;
68
69
  if(isElementExistOnPage(_$w('#additionalInfoText')))
69
70
  {
@@ -149,6 +150,15 @@ async function getCategoryValue(customValues) {
149
150
  return appendQueryParams(url, query);
150
151
  }
151
152
 
153
+ function handleStackContent(_$w,content,stackId,textId) {
154
+ if(content===undefined) {
155
+ _$w(stackId).collapse();
156
+ }
157
+ else {
158
+ _$w(textId).content = content;
159
+ }
160
+ }
161
+
152
162
  async function getRelatedJobs({ categoryValueId, itemId, limit = 1000 }) {
153
163
  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();
154
164
  return relatedJobs.items;