sr-npm 1.7.827 → 1.7.828
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.
|
|
3
|
+
"version": "1.7.828",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"@wix/site-window": "^1.0.0",
|
|
26
26
|
"axios": "^1.11.0",
|
|
27
27
|
"jest": "^30.0.5",
|
|
28
|
+
"psdev-utils": "1.7.3",
|
|
28
29
|
"tests-utils": "^1.0.7"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
@@ -198,8 +198,8 @@ async function loadJobsRepeater(_$w) {
|
|
|
198
198
|
try {
|
|
199
199
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).onItemReady(($item, itemData) => {
|
|
200
200
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER_ITEM_TITLE).text = itemData.title;
|
|
201
|
-
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER_ITEM_TITLE).onClick(
|
|
202
|
-
|
|
201
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER_ITEM_TITLE).onClick(() => {
|
|
202
|
+
location.to(itemData["link-jobs-title"]);
|
|
203
203
|
});
|
|
204
204
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER_ITEM_LOCATION).text=itemData.location.fullLocation
|
|
205
205
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER_ITEM_EMPLOYMENT_TYPE).text=itemData.employmentType
|
package/pages/pagesUtils.js
CHANGED
|
@@ -64,8 +64,8 @@ async function loadPrimarySearchRepeater(_$w) {
|
|
|
64
64
|
try {
|
|
65
65
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOB_RESULTS_REPEATER).onItemReady(async ($item, itemData) => {
|
|
66
66
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_POSITION_BUTTON).label = itemData.title || '';
|
|
67
|
-
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_POSITION_BUTTON).onClick(
|
|
68
|
-
|
|
67
|
+
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_POSITION_BUTTON).onClick(() => {
|
|
68
|
+
location.to(itemData["link-jobs-title"]);
|
|
69
69
|
})
|
|
70
70
|
|
|
71
71
|
});
|
|
@@ -75,7 +75,7 @@ async function loadPrimarySearchRepeater(_$w) {
|
|
|
75
75
|
$item(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_CATEGORY_BUTTON).onClick(async () => {
|
|
76
76
|
const baseUrl = await location.baseUrl();
|
|
77
77
|
const encodedCategory=encodeURIComponent(itemData._id);
|
|
78
|
-
|
|
78
|
+
location.to(`${baseUrl}/search?category=${encodedCategory}`);
|
|
79
79
|
});
|
|
80
80
|
});
|
|
81
81
|
} catch (error) {
|
|
@@ -118,7 +118,7 @@ _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).onKeyPress(async (even
|
|
|
118
118
|
else {
|
|
119
119
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
120
120
|
const baseUrl = await location.baseUrl();
|
|
121
|
-
|
|
121
|
+
location.to(`${baseUrl}/search?keyword=${encodedKeyWord}`);
|
|
122
122
|
// queryParams.add({ keyword:encodedKeyWord });
|
|
123
123
|
// handleUrlParams(_$w,{keyword:encodedKeyWord});
|
|
124
124
|
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
|
@@ -135,7 +135,7 @@ _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_BUTTON).onClick(async () => {
|
|
|
135
135
|
else {
|
|
136
136
|
let encodedKeyWord=encodeURIComponent(_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value);
|
|
137
137
|
const baseUrl = await location.baseUrl();
|
|
138
|
-
|
|
138
|
+
location.to(`${baseUrl}/search?keyword=${encodedKeyWord}`);
|
|
139
139
|
// queryParams.add({ keyword:encodedKeyWord });
|
|
140
140
|
// await primarySearch(_$w, _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value.trim());
|
|
141
141
|
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.RESULTS_CONTAINER).collapse();
|
package/pages/positionPage.js
CHANGED
|
@@ -3,6 +3,7 @@ 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
5
|
const { location } = require("@wix/site-location");
|
|
6
|
+
const{isElementExistOnPage} = require('psdev-utils');
|
|
6
7
|
const {
|
|
7
8
|
htmlToText,
|
|
8
9
|
appendQueryParams
|
|
@@ -19,12 +20,11 @@ const {
|
|
|
19
20
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
async function getCategoryValueId(
|
|
23
|
-
console.log("customFields: ", customFields);
|
|
23
|
+
async function getCategoryValueId(customValues) {
|
|
24
24
|
const categoryCustomField=await wixData.query(COLLECTIONS.CUSTOM_FIELDS).eq(CUSTOM_FIELDS_COLLECTION_FIELDS.TITLE,"Category").find().then(result => result.items[0]);
|
|
25
|
-
for(const
|
|
26
|
-
if(
|
|
27
|
-
return
|
|
25
|
+
for(const value of customValues) {
|
|
26
|
+
if(value.customField===categoryCustomField._id) {
|
|
27
|
+
return value._id;
|
|
28
28
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -36,7 +36,6 @@ async function getCategoryValueId(customFields) {
|
|
|
36
36
|
|
|
37
37
|
const item = await _$w('#datasetJobsItem').getCurrentItem();
|
|
38
38
|
const multiRefField=await getPositionWithMultiRefField(item._id);
|
|
39
|
-
console.log("multiRefField: ", multiRefField);
|
|
40
39
|
const categoryValueId=await getCategoryValueId(multiRefField);
|
|
41
40
|
|
|
42
41
|
handleReferFriendButton(_$w,item);
|
|
@@ -70,7 +69,7 @@ async function getCategoryValueId(customFields) {
|
|
|
70
69
|
);
|
|
71
70
|
location.to(clickedItemData["link-jobs-title"]);
|
|
72
71
|
});
|
|
73
|
-
if(
|
|
72
|
+
if(isElementExistOnPage(_$w('#relatedJobsDataset')))
|
|
74
73
|
{
|
|
75
74
|
_$w('#relatedJobsDataset').onReady(() => {
|
|
76
75
|
const count = _$w('#relatedJobsDataset').getTotalCount();
|
|
@@ -79,14 +78,22 @@ async function getCategoryValueId(customFields) {
|
|
|
79
78
|
}
|
|
80
79
|
});
|
|
81
80
|
}
|
|
81
|
+
else
|
|
82
|
+
{
|
|
83
|
+
console.log("check if it is working")
|
|
84
|
+
}
|
|
82
85
|
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
function handleReferFriendButton(_$w,item) {
|
|
86
|
-
if(!item.referFriendLink && _$w('#referFriendButton')){
|
|
89
|
+
if(!item.referFriendLink && isElementExistOnPage(_$w('#referFriendButton'))){
|
|
87
90
|
console.log("hiding referFriendButton");
|
|
88
91
|
_$w('#referFriendButton').hide();
|
|
89
92
|
}
|
|
93
|
+
else
|
|
94
|
+
{
|
|
95
|
+
console.log("check if it is working")
|
|
96
|
+
}
|
|
90
97
|
}
|
|
91
98
|
|
|
92
99
|
function handleApplyButton(_$w,item) {
|
|
@@ -26,15 +26,15 @@ async function handleRecentJobsSection(_$w) {
|
|
|
26
26
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
|
|
27
27
|
$item(supportTeamsPageIds.JOB_TITLE).text = itemData.title;
|
|
28
28
|
$item(supportTeamsPageIds.JOB_LOCATION).text = itemData.location.fullLocation;
|
|
29
|
-
$item(supportTeamsPageIds.JOB_TITLE).onClick(
|
|
30
|
-
|
|
29
|
+
$item(supportTeamsPageIds.JOB_TITLE).onClick( () => {
|
|
30
|
+
location.to(itemData["link-jobs-title"]);
|
|
31
31
|
})
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data = latestsJobs;
|
|
35
35
|
|
|
36
|
-
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick(
|
|
37
|
-
|
|
36
|
+
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick( () => {
|
|
37
|
+
location.to(`/search?category=${Value.title}`);
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|