sr-npm 1.7.933 → 1.7.934
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 +1 -0
- package/package.json +1 -1
- package/pages/supportTeamsPage.js +22 -9
package/backend/consts.js
CHANGED
package/package.json
CHANGED
|
@@ -3,21 +3,36 @@ const { location } = require("@wix/site-location");
|
|
|
3
3
|
const { supportTeamsPageIds } = require('../backend/consts');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
let currentItem;
|
|
7
7
|
async function supportTeasmPageOnReady(_$w) {
|
|
8
|
-
|
|
8
|
+
currentItem= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
|
|
9
|
+
console.log("currentItem: ",currentItem);
|
|
10
|
+
await handleRecentJobsSection(_$w);
|
|
11
|
+
handlePeopleSection(_$w);
|
|
12
|
+
handleVideoSection(_$w);
|
|
9
13
|
|
|
10
14
|
}
|
|
11
15
|
|
|
16
|
+
async function handleVideoSection(_$w) {
|
|
17
|
+
console.log("inside video section");
|
|
18
|
+
console.log("currentItem: ",currentItem);
|
|
19
|
+
|
|
20
|
+
}
|
|
12
21
|
|
|
22
|
+
async function handlePeopleSection(_$w) {
|
|
23
|
+
const currentPeopleItem= _$w(supportTeamsPageIds.PEOPLE_DATASET).getCurrentItem();
|
|
24
|
+
console.log("currentPeopleItem: ",currentPeopleItem);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
}
|
|
13
28
|
|
|
14
29
|
async function handleRecentJobsSection(_$w) {
|
|
15
30
|
|
|
16
|
-
|
|
31
|
+
|
|
17
32
|
console.log("currentItem 2 3 4: ",currentItem);
|
|
18
33
|
if(supportTeamsPageIds.excludeValues.has(currentItem.title_fld)) {
|
|
19
34
|
console.log("Value is excluded , collapsing recently Jobs Section ");
|
|
20
|
-
|
|
35
|
+
collapseSection(_$w);
|
|
21
36
|
return;
|
|
22
37
|
}
|
|
23
38
|
const valueId=supportTeamsPageIds.valueToValueIdMap[currentItem.title_fld]
|
|
@@ -28,7 +43,7 @@ async function handleRecentJobsSection(_$w) {
|
|
|
28
43
|
|
|
29
44
|
if(latestsJobs.length === 0) {
|
|
30
45
|
console.log("No jobs found , collapsing recently Jobs Section ");
|
|
31
|
-
|
|
46
|
+
collapseSection(_$w);
|
|
32
47
|
return;
|
|
33
48
|
}
|
|
34
49
|
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
|
|
@@ -52,12 +67,10 @@ async function handleRecentJobsSection(_$w) {
|
|
|
52
67
|
}
|
|
53
68
|
|
|
54
69
|
|
|
55
|
-
|
|
56
|
-
Promise.all([
|
|
70
|
+
function collapseSection(_$w) {
|
|
57
71
|
_$w(supportTeamsPageIds.RECENTLY_ADDED_JOBS_SECTION).collapse(),
|
|
58
72
|
_$w(supportTeamsPageIds.MOST_RECENT_JOBS_TITLE).collapse(),
|
|
59
|
-
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).collapse()
|
|
60
|
-
]);
|
|
73
|
+
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).collapse()
|
|
61
74
|
}
|
|
62
75
|
module.exports = {
|
|
63
76
|
supportTeasmPageOnReady,
|