sr-npm 1.7.961 → 1.7.963
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/careersMultiBoxesPage.js +6 -6
- package/pages/homePage.js +1 -3
- 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
|
@@ -208,8 +208,8 @@ async function loadJobsRepeater(_$w) {
|
|
|
208
208
|
|
|
209
209
|
const jobsFirstPage=alljobs.slice(0,pagination.pageSize);
|
|
210
210
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
211
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text =
|
|
212
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = currentJobs.length.toString();
|
|
211
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = "1"
|
|
212
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = Math.ceil(currentJobs.length/pagination.pageSize).toString();
|
|
213
213
|
updateTotalJobsCountText(_$w);
|
|
214
214
|
handlePaginationButtons(_$w);
|
|
215
215
|
} catch (error) {
|
|
@@ -381,8 +381,8 @@ async function loadJobsRepeater(_$w) {
|
|
|
381
381
|
let jobsFirstPage=[];
|
|
382
382
|
secondarySearchIsFilled? jobsFirstPage=currentSecondarySearchJobs.slice(0,pagination.pageSize):jobsFirstPage=currentJobs.slice(0,pagination.pageSize);
|
|
383
383
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
384
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text =
|
|
385
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = secondarySearchIsFilled? currentSecondarySearchJobs.length.toString():currentJobs.length.toString();
|
|
384
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = "1";
|
|
385
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = secondarySearchIsFilled? Math.ceil(currentSecondarySearchJobs.length/pagination.pageSize).toString():Math.ceil(currentJobs.length/pagination.pageSize).toString();
|
|
386
386
|
if(jobsFirstPage.length===0) {
|
|
387
387
|
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("noJobs");
|
|
388
388
|
}
|
|
@@ -480,8 +480,8 @@ async function secondarySearch(_$w,query) {
|
|
|
480
480
|
currentSecondarySearchJobs=allsecondarySearchJobs;
|
|
481
481
|
const jobsFirstPage=allsecondarySearchJobs.slice(0,pagination.pageSize);
|
|
482
482
|
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
|
|
483
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text =
|
|
484
|
-
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = allsecondarySearchJobs.length.toString();
|
|
483
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = "1";
|
|
484
|
+
_$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationTotalCountText).text = Math.ceil(allsecondarySearchJobs.length/pagination.pageSize).toString();
|
|
485
485
|
pagination.currentPage=1;
|
|
486
486
|
if(jobsFirstPage.length===0) {
|
|
487
487
|
await _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_MULTI_STATE_BOX).changeState("noJobs");
|
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
|
|
|
@@ -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 = {
|