sr-npm 1.7.813 → 1.7.814
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 +4 -3
package/package.json
CHANGED
package/pages/positionPage.js
CHANGED
|
@@ -2,6 +2,7 @@ const { query } = require("wix-location-frontend");
|
|
|
2
2
|
const { getPositionWithMultiRefField } = require('../backend/queries');
|
|
3
3
|
const { COLLECTIONS,JOBS_COLLECTION_FIELDS,CUSTOM_FIELDS_COLLECTION_FIELDS } = require('../backend/collectionConsts');
|
|
4
4
|
const { items: wixData } = require('@wix/data');
|
|
5
|
+
const { location } = require("@wix/site-location");
|
|
5
6
|
const {
|
|
6
7
|
htmlToText,
|
|
7
8
|
appendQueryParams
|
|
@@ -56,7 +57,7 @@ async function getCategoryValueId(customFields) {
|
|
|
56
57
|
if(_$w('#relatedJobsRepNoDepartment')) // when there is no department, we filter based on category
|
|
57
58
|
{
|
|
58
59
|
console.log("i am here 3");
|
|
59
|
-
const relatedJobs=await getRelatedJobs(categoryValueId);
|
|
60
|
+
const relatedJobs=await getRelatedJobs(categoryValueId,item._id);
|
|
60
61
|
console.log("relatedJobs@@$@$@$$%%%%%%%%%%#$@: ", relatedJobs);
|
|
61
62
|
_$w('#relatedJobsRepNoDepartment').onItemReady(($item, itemData) => {
|
|
62
63
|
$item('#relatedJobTitle').text = itemData.title;
|
|
@@ -95,10 +96,10 @@ async function getCategoryValueId(customFields) {
|
|
|
95
96
|
_$w('#applyButton').link=url; //so it can be clicked
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
async function getRelatedJobs(categoryValueId) {
|
|
99
|
+
async function getRelatedJobs(categoryValueId,itemId) {
|
|
99
100
|
console.log("categoryValueId inside getRelatedJobs ", categoryValueId);
|
|
100
101
|
console.log("type of categoryValueId: ", typeof categoryValueId);
|
|
101
|
-
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]).find();
|
|
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]).neq(JOBS_COLLECTION_FIELDS.ID,itemId).find();
|
|
102
103
|
console.log("relatedJobs@@$@$@$#$@: ", relatedJobs);
|
|
103
104
|
return relatedJobs.items;
|
|
104
105
|
}
|