sr-npm 1.7.815 → 1.7.816
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 +1 -1
- package/pages/positionPage.js +2 -9
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -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,10 +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("
|
|
54
|
+
console.log("item inside getRelatedJobs: ", item);
|
|
60
55
|
const relatedJobs=await getRelatedJobs(categoryValueId,item._id);
|
|
61
56
|
console.log("relatedJobs@@$@$@$$%%%%%%%%%%#$@: ", relatedJobs);
|
|
62
57
|
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
@@ -97,9 +92,7 @@ async function getCategoryValueId(customFields) {
|
|
|
97
92
|
}
|
|
98
93
|
|
|
99
94
|
async function getRelatedJobs(categoryValueId,itemId) {
|
|
100
|
-
|
|
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();
|
|
95
|
+
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();
|
|
103
96
|
console.log("relatedJobs@@$@$@$#$@: ", relatedJobs);
|
|
104
97
|
return relatedJobs.items;
|
|
105
98
|
}
|