sr-npm 1.7.961 → 1.7.962
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/consts.js +8 -0
- package/package.json +1 -1
- package/pages/homePage.js +1 -3
- package/pages/pagesUtils.js +1 -1
- package/pages/supportTeamsPage.js +12 -10
package/backend/consts.js
CHANGED
|
@@ -130,6 +130,13 @@ const LINKS={
|
|
|
130
130
|
login:'https://www.smartrecruiters.com/web-sso/saml/${companyId}/login',
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
|
|
134
|
+
const supportTeamsPageSections={
|
|
135
|
+
RECENT_JOBS: "recentJobs",
|
|
136
|
+
PEOPLE: "people",
|
|
137
|
+
VIDEO: "video",
|
|
138
|
+
}
|
|
139
|
+
|
|
133
140
|
module.exports = {
|
|
134
141
|
TASKS_NAMES,
|
|
135
142
|
TASK_TYPE,
|
|
@@ -137,4 +144,5 @@ const LINKS={
|
|
|
137
144
|
QUERY_MAX_LIMIT,
|
|
138
145
|
supportTeamsPageIds,
|
|
139
146
|
LINKS,
|
|
147
|
+
supportTeamsPageSections,
|
|
140
148
|
};
|
package/package.json
CHANGED
package/pages/homePage.js
CHANGED
|
@@ -15,15 +15,13 @@ async function homePageOnReady(_$w,thisObject=null) {
|
|
|
15
15
|
|
|
16
16
|
const queryResult = await wixData.query(COLLECTIONS.SITE_CONFIGS).find();
|
|
17
17
|
const siteconfig = queryResult.items[0];
|
|
18
|
-
if(siteconfig.
|
|
18
|
+
if(siteconfig.categorySearch==="true") {
|
|
19
19
|
const allJobs=await getAllRecords(COLLECTIONS.JOBS);
|
|
20
20
|
const allvaluesobjects=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
21
21
|
bindPrimarySearch(_$w,allvaluesobjects,allJobs);
|
|
22
22
|
loadPrimarySearchRepeater(_$w)
|
|
23
|
-
if(siteconfig.twg==="external") {
|
|
24
23
|
bindTeamRepeater(_$w)
|
|
25
24
|
bindViewAllButton(_$w)
|
|
26
|
-
}
|
|
27
25
|
}
|
|
28
26
|
else{
|
|
29
27
|
|
package/pages/pagesUtils.js
CHANGED
|
@@ -109,7 +109,7 @@ function loadPrimarySearchRepeater(_$w) {
|
|
|
109
109
|
const primarySearchDebounced = debounce(async () => {
|
|
110
110
|
const query = (_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).value || '').toLowerCase().trim();
|
|
111
111
|
await primarySearch(_$w, query, alljobs);
|
|
112
|
-
},
|
|
112
|
+
}, 150);
|
|
113
113
|
|
|
114
114
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.PRIMARY_SEARCH_INPUT).onInput(async () => {
|
|
115
115
|
await primarySearchDebounced();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const { getLatestJobsByValue, getValueFromValueId } = require('./pagesUtils');
|
|
2
2
|
const { location } = require("@wix/site-location");
|
|
3
|
-
const { supportTeamsPageIds } = require('../backend/consts');
|
|
3
|
+
const { supportTeamsPageIds,supportTeamsPageSections } = require('../backend/consts');
|
|
4
4
|
const { getAllRecordsWithoutMultiRef } = require('./pagesUtils');
|
|
5
5
|
|
|
6
6
|
let currentItem;
|
|
@@ -12,7 +12,7 @@ async function supportTeasmPageOnReady(_$w) {
|
|
|
12
12
|
async function handleVideoSection(_$w) {
|
|
13
13
|
if(!currentItem.videoExists) {
|
|
14
14
|
console.log("Video does not exist , collapsing video section ");
|
|
15
|
-
await collapseSection(_$w,
|
|
15
|
+
await collapseSection(_$w,supportTeamsPageSections.VIDEO);
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -24,7 +24,7 @@ async function handlePeopleSection(_$w) {
|
|
|
24
24
|
|
|
25
25
|
if(peopleToDisplay.length === 0) {
|
|
26
26
|
console.log("No people found , collapsing people section ");
|
|
27
|
-
await collapseSection(_$w,
|
|
27
|
+
await collapseSection(_$w,supportTeamsPageSections.PEOPLE);
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -36,14 +36,14 @@ async function handleRecentJobsSection(_$w) {
|
|
|
36
36
|
|
|
37
37
|
if(supportTeamsPageIds.excludeValues.has(currentItem.title_fld)) {
|
|
38
38
|
console.log("Value is excluded , collapsing recently Jobs Section ");
|
|
39
|
-
await collapseSection(_$w,
|
|
39
|
+
await collapseSection(_$w,supportTeamsPageSections.RECENT_JOBS);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
const valueId=supportTeamsPageIds.valueToValueIdMap[currentItem.title_fld]
|
|
43
43
|
const Value=await getValueFromValueId(valueId);
|
|
44
44
|
if(Value===undefined) {
|
|
45
45
|
console.log("Value is undefined , collapsing recently Jobs Section ");
|
|
46
|
-
await collapseSection(_$w,
|
|
46
|
+
await collapseSection(_$w,supportTeamsPageSections.RECENT_JOBS);
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
const latestsJobs=await getLatestJobsByValue(Value);
|
|
@@ -69,20 +69,22 @@ async function handleRecentJobsSection(_$w) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async function collapseSection(_$w,sectionName) {
|
|
72
|
-
if(sectionName ===
|
|
72
|
+
if(sectionName === supportTeamsPageSections.PEOPLE) {
|
|
73
73
|
await _$w(supportTeamsPageIds.PEOPLE_BUTTON).collapse();
|
|
74
74
|
await _$w(supportTeamsPageIds.PEOPLE_TITLE).collapse();
|
|
75
75
|
await _$w(supportTeamsPageIds.PEOPLE_REPEATER).collapse();
|
|
76
76
|
}
|
|
77
|
-
else if(sectionName ===
|
|
77
|
+
else if(sectionName === supportTeamsPageSections.VIDEO) {
|
|
78
78
|
await _$w(supportTeamsPageIds.VIDEO_TITLE).collapse();
|
|
79
79
|
await _$w(supportTeamsPageIds.VIDEO_PLAYER).collapse();
|
|
80
80
|
await _$w(supportTeamsPageIds.VIDEO_SECTION).collapse();
|
|
81
81
|
}
|
|
82
82
|
else {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
if(sectionName === supportTeamsPageSections.RECENT_JOBS) {
|
|
84
|
+
await _$w(supportTeamsPageIds.RECENT_JOBS_TITLE).collapse()
|
|
85
|
+
await _$w(supportTeamsPageIds.RECENT_JOBS_BUTTON).collapse()
|
|
86
|
+
await _$w(supportTeamsPageIds.RECENT_JOBS_SECTION).collapse()
|
|
87
|
+
}
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
module.exports = {
|