sr-npm 1.7.1350 → 1.7.1352
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/backend/data.js +3 -3
- package/package.json +2 -2
- package/pages/positionPage.js +13 -3
package/backend/data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { items: wixData } = require('@wix/data');
|
|
2
2
|
const { fetchPositionsFromSRAPI, fetchJobDescription, htmlRichContentConverter } = require('./fetchPositionsFromSRAPI');
|
|
3
|
-
const { createCollectionIfMissing } = require('
|
|
3
|
+
const { createCollectionIfMissing } = require('psdev-task-manager/backend/tasks/utils');
|
|
4
4
|
|
|
5
5
|
const { getAllPositions } = require('./queries');
|
|
6
6
|
const { retrieveSecretVal, getTokenFromCMS ,getApiKeys} = require('./secretsData');
|
|
@@ -152,7 +152,8 @@ async function retrieveJobsData() {
|
|
|
152
152
|
jobDescription: null, // Will be filled later
|
|
153
153
|
employmentType: position.typeOfEmployment.label,
|
|
154
154
|
releasedDate: position.releasedDate,
|
|
155
|
-
refId: position.refNumber
|
|
155
|
+
refId: position.refNumber,
|
|
156
|
+
_createdDate:position.releasedDate
|
|
156
157
|
};
|
|
157
158
|
|
|
158
159
|
getCustomFieldsAndValuesFromPosition(position, customFieldsLabels, customFieldsValues);
|
|
@@ -403,7 +404,6 @@ async function referenceJobs() {
|
|
|
403
404
|
|
|
404
405
|
async function syncJobsFast(taskData) {
|
|
405
406
|
try{
|
|
406
|
-
console.log("taskData: ", taskData);
|
|
407
407
|
const { excludedCustomFields } = taskData;
|
|
408
408
|
EXCLUDED_CUSTOM_FIELDS = new Set(excludedCustomFields);
|
|
409
409
|
console.log("Syncing jobs fast");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sr-npm",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1352",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/psdevteamenterprise/sr-npm#readme",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@hisense-staging/velo-npm": "3.0.19",
|
|
21
20
|
"@wix/data": "^1.0.349",
|
|
22
21
|
"@wix/essentials": "^0.1.24",
|
|
23
22
|
"@wix/secrets": "1.0.53",
|
|
@@ -26,6 +25,7 @@
|
|
|
26
25
|
"@wix/site-window": "^1.0.0",
|
|
27
26
|
"axios": "^1.11.0",
|
|
28
27
|
"jest": "^30.0.5",
|
|
28
|
+
"psdev-task-manager": "^2.0.8",
|
|
29
29
|
"psdev-utils": "1.7.3",
|
|
30
30
|
"tests-utils": "^1.0.7"
|
|
31
31
|
},
|
package/pages/positionPage.js
CHANGED
|
@@ -61,9 +61,10 @@ async function getCategoryValue(customValues) {
|
|
|
61
61
|
handleReferFriendButton(_$w,item);
|
|
62
62
|
handleApplyButton(_$w,item);
|
|
63
63
|
|
|
64
|
-
_$w
|
|
65
|
-
_$w
|
|
66
|
-
_$w
|
|
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;
|