sr-npm 1.7.780 → 1.7.782
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/.github/workflows/update-sites.yml +1 -1
- package/backend/careersMultiBoxesPageIds.js +1 -1
- package/backend/collectionConsts.js +0 -3
- package/backend/data.js +1 -2
- package/package.json +1 -1
- package/pages/index.js +0 -1
- package/pages/pagesUtils.js +1 -22
- package/pages/supportTeamsPage.js +9 -21
|
@@ -12,7 +12,7 @@ permissions:
|
|
|
12
12
|
|
|
13
13
|
jobs:
|
|
14
14
|
update-sites:
|
|
15
|
-
uses: psdevteamenterprise/ci-workflows/.github/workflows/
|
|
15
|
+
uses: psdevteamenterprise/ci-workflows/.github/workflows/update-and-notify.yml@main
|
|
16
16
|
with:
|
|
17
17
|
sites_to_update: "[{repo: 'psdevteamenterprise/tests-site', secret: 'WIX_PS_API_KEY'},
|
|
18
18
|
{repo: 'psdevteamenterprise/external-template', secret: 'WIX_SR_API_KEY'},
|
|
@@ -24,7 +24,7 @@ const CAREERS_MULTI_BOXES_PAGE_CONSTS={
|
|
|
24
24
|
JOB_RESULTS_REPEATER: '#jobResultsRepeater',
|
|
25
25
|
CATEGORY_RESULTS_REPEATER: '#categoryResultsRepeater',
|
|
26
26
|
PRIMARY_SEARCH_MULTI_BOX: '#primarySearchMultiBox',
|
|
27
|
-
PRIMARY_SEARCH_POSITION_BUTTON: '#
|
|
27
|
+
PRIMARY_SEARCH_POSITION_BUTTON: '#primarySearchPositionButton',
|
|
28
28
|
PRIMARY_SEARCH_CATEGORY_BUTTON: '#primarySearchCategoryButton',
|
|
29
29
|
RESULTS_CONTAINER: '#resultsContainer',
|
|
30
30
|
PRIMARY_SEARCH_BUTTON: '#primarySearchButton',
|
|
@@ -8,7 +8,6 @@ const COLLECTIONS = {
|
|
|
8
8
|
CUSTOM_VALUES:'CustomValues',
|
|
9
9
|
CUSTOM_FIELDS:'CustomFields',
|
|
10
10
|
SITE_CONFIGS: 'SiteConfigs',
|
|
11
|
-
SUPPORT_TEAMS: 'SupportTeams',
|
|
12
11
|
|
|
13
12
|
}
|
|
14
13
|
const JOBS_COLLECTION_FIELDS = {
|
|
@@ -30,7 +29,6 @@ const JOBS_COLLECTION_FIELDS = {
|
|
|
30
29
|
BRAND_REF: 'brandRef',
|
|
31
30
|
MULTI_REF_JOBS_CUSTOM_VALUES: 'multiRefJobsCustomValues',
|
|
32
31
|
EMPLOYMENT_TYPE: 'employmentType',
|
|
33
|
-
RELEASED_DATE: 'releasedDate',
|
|
34
32
|
}
|
|
35
33
|
const AMOUNT_OF_JOBS_PER_DEPARTMENT_COLLECTION_FIELDS = {
|
|
36
34
|
TITLE: 'title',
|
|
@@ -92,7 +90,6 @@ const COLLECTIONS_FIELDS = {
|
|
|
92
90
|
{key:'brandRef', type: 'REFERENCE', typeMetadata: { reference: { referencedCollectionId: COLLECTIONS.BRANDS } } },
|
|
93
91
|
{key: 'image', type: 'IMAGE' },
|
|
94
92
|
{key:'employmentType', type: 'TEXT'},
|
|
95
|
-
{key:'releasedDate', type: 'TEXT'},
|
|
96
93
|
],
|
|
97
94
|
TEMPLATE_TYPE: [
|
|
98
95
|
{key:'templateType', type: 'TEXT'},
|
package/backend/data.js
CHANGED
|
@@ -125,8 +125,7 @@ async function saveJobsDataToCMS() {
|
|
|
125
125
|
language: position.language?.label || '',
|
|
126
126
|
brand: getBrand(position.customField),
|
|
127
127
|
jobDescription: null, // Will be filled later
|
|
128
|
-
employmentType: position.typeOfEmployment.label
|
|
129
|
-
releasedDate: position.releasedDate
|
|
128
|
+
employmentType: position.typeOfEmployment.label
|
|
130
129
|
};
|
|
131
130
|
|
|
132
131
|
getCustomFieldsAndValuesFromPosition(position,customFieldsLabels,customFieldsValues);
|
package/package.json
CHANGED
package/pages/index.js
CHANGED
package/pages/pagesUtils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const { items: wixData } = require('@wix/data');
|
|
2
|
-
const { JOBS_COLLECTION_FIELDS
|
|
2
|
+
const { JOBS_COLLECTION_FIELDS } = require('../backend/collectionConsts');
|
|
3
3
|
|
|
4
4
|
function groupValuesByField(values, refKey) {
|
|
5
5
|
const map = new Map();
|
|
@@ -58,26 +58,6 @@ function groupValuesByField(values, refKey) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async function getLatestJobsByCategoryId(categoryId) {
|
|
62
|
-
console.log("categoryId: ", categoryId);
|
|
63
|
-
const result=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
64
|
-
console.log("result: ", result);
|
|
65
|
-
const categoryValue=result.find(value=>value._id===categoryId);
|
|
66
|
-
console.log("categoryValue: ", categoryValue);
|
|
67
|
-
const jobs=categoryValue.multiRefJobsCustomValues;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
console.log("jobs: ", jobs);
|
|
71
|
-
const latestJobs = jobs
|
|
72
|
-
.sort((a, b) => new Date(b.releasedDate) - new Date(a.releasedDate))
|
|
73
|
-
.slice(0, 5);
|
|
74
|
-
console.log("latestJobs: ", latestJobs);
|
|
75
|
-
return latestJobs;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
61
|
module.exports = {
|
|
82
62
|
groupValuesByField,
|
|
83
63
|
debounce,
|
|
@@ -86,5 +66,4 @@ function groupValuesByField(values, refKey) {
|
|
|
86
66
|
getFieldByTitle,
|
|
87
67
|
getCorrectOption,
|
|
88
68
|
getOptionIndexFromCheckBox,
|
|
89
|
-
getLatestJobsByCategoryId
|
|
90
69
|
}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
const { getLatestJobsByCategoryId } = require('./pagesUtils');
|
|
2
2
|
const { location } = require("@wix/site-location");
|
|
3
|
-
const
|
|
4
|
-
const JOB_LOCATION="#jobLocation"
|
|
5
|
-
const JOB_TITLE="#jobTitle"
|
|
6
|
-
const TEAM_NAME="#teamName"
|
|
7
|
-
const SEE_ALL_JOBS_TEXT="#seeAllJobsText"
|
|
8
|
-
const TEAM_SUPPORT_DYNAMIC_DATASET="#dynamicDataset"
|
|
9
|
-
const valueToCategoryIdMap={
|
|
10
|
-
"Human Resouces":"PeopleSupport"
|
|
11
|
-
}
|
|
3
|
+
const { supportTeamsPageIds } = require('../backend/consts');
|
|
12
4
|
|
|
13
5
|
async function supportTeasmPageOnReady(_$w) {
|
|
14
6
|
|
|
@@ -18,27 +10,23 @@ async function supportTeasmPageOnReady(_$w) {
|
|
|
18
10
|
|
|
19
11
|
function loadOnClick(_$w)
|
|
20
12
|
{
|
|
21
|
-
_$w(SEE_ALL_JOBS_TEXT).onClick(async () => {
|
|
13
|
+
_$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick(async () => {
|
|
22
14
|
await location.to(`/search`);
|
|
23
15
|
});
|
|
24
16
|
}
|
|
25
17
|
|
|
26
18
|
async function bindRepeater(_$w) {
|
|
27
|
-
_$w(RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
|
|
28
|
-
$item(JOB_TITLE).text = itemData.title;
|
|
29
|
-
$item(JOB_LOCATION).text = itemData.location.fullLocation;
|
|
30
|
-
$item(JOB_TITLE).onClick(async () => {
|
|
19
|
+
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
|
|
20
|
+
$item(supportTeamsPageIds.JOB_TITLE).text = itemData.title;
|
|
21
|
+
$item(supportTeamsPageIds.JOB_LOCATION).text = itemData.location.fullLocation;
|
|
22
|
+
$item(supportTeamsPageIds.JOB_TITLE).onClick(async () => {
|
|
31
23
|
await location.to(itemData["link-jobs-title"]);
|
|
32
24
|
})
|
|
33
25
|
});
|
|
34
|
-
let obj= _$w(TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
|
|
35
|
-
|
|
36
|
-
const categoryId=valueToCategoryIdMap[obj.title_fld]
|
|
26
|
+
let obj= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
|
|
27
|
+
const categoryId=supportTeamsPageIds.valueToCategoryIdMap[obj.title_fld]
|
|
37
28
|
const latestsJobs=await getLatestJobsByCategoryId(categoryId);
|
|
38
|
-
|
|
39
|
-
_$w(RECENTLEY_ADDED_JOBS).data = latestsJobs;
|
|
40
|
-
// const teamName=_$w(TEAM_NAME).label.toLowerCase();
|
|
41
|
-
// _$w(RECENTLEY_ADDED_JOBS).data = await getLatestJobsByCategory(teamName);
|
|
29
|
+
_$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data = latestsJobs;
|
|
42
30
|
}
|
|
43
31
|
|
|
44
32
|
module.exports = {
|