sr-npm 1.7.781 → 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.
|
@@ -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/consts.js
CHANGED
|
@@ -80,38 +80,9 @@ const TASK_TYPE = {
|
|
|
80
80
|
EVENT: 'event',
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
-
const supportTeamsPageIds={
|
|
84
|
-
RECENTLEY_ADDED_JOBS: "#recentleyAddedJobs",
|
|
85
|
-
JOB_LOCATION: "#jobLocation",
|
|
86
|
-
JOB_TITLE: "#jobTitle",
|
|
87
|
-
SEE_ALL_JOBS_TEXT: "#seeAllJobsText",
|
|
88
|
-
TEAM_SUPPORT_DYNAMIC_DATASET: "#dynamicDataset",
|
|
89
|
-
valueToCategoryIdMap: {
|
|
90
|
-
"Human Resouces":"PeopleSupport",
|
|
91
|
-
"Buying":"Merchandise",
|
|
92
|
-
"Tech":"InformationServices",
|
|
93
|
-
"Planning":"Merchandise",
|
|
94
|
-
"Digital":"ecommerceandDigital",// this field doesnt exists in the database
|
|
95
|
-
"Marketing":"Marketing",
|
|
96
|
-
"Finance":"Finance",// this field doesnt exists in the database
|
|
97
|
-
"Services":"ServicesInstallation",
|
|
98
|
-
"Design":"Merchandise",
|
|
99
|
-
"Retail Operations":"Operations",// this field doesnt exists in the database
|
|
100
|
-
"Data":"InsightsandDataScience",// this field doesnt exists in the database
|
|
101
|
-
"Property":"Property",// this field doesnt exists in the database,
|
|
102
|
-
"Legal":"Legal",// this field doesnt exists in the database,
|
|
103
|
-
"Supply Chain":"Logistics",
|
|
104
|
-
"Contact Centre":"CustomerEngagementCentres",// this field doesnt exists in the database
|
|
105
|
-
"Commercial":"CommercialSales",// this field doesnt exists in the database
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
83
|
module.exports = {
|
|
112
84
|
TASKS_NAMES,
|
|
113
85
|
TASK_TYPE,
|
|
114
86
|
TASKS,
|
|
115
87
|
QUERY_MAX_LIMIT,
|
|
116
|
-
supportTeamsPageIds,
|
|
117
88
|
};
|
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,17 +58,6 @@ function groupValuesByField(values, refKey) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
async function getLatestJobsByCategoryId(categoryId) {
|
|
62
|
-
const result=await getAllRecords(COLLECTIONS.CUSTOM_VALUES);
|
|
63
|
-
const categoryValue=result.find(value=>value._id===categoryId);
|
|
64
|
-
const jobs=categoryValue.multiRefJobsCustomValues;
|
|
65
|
-
|
|
66
|
-
const latestJobs = jobs
|
|
67
|
-
.sort((a, b) => new Date(b.releasedDate) - new Date(a.releasedDate))
|
|
68
|
-
.slice(0, 5);
|
|
69
|
-
return latestJobs;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
61
|
module.exports = {
|
|
73
62
|
groupValuesByField,
|
|
74
63
|
debounce,
|
|
@@ -77,5 +66,4 @@ function groupValuesByField(values, refKey) {
|
|
|
77
66
|
getFieldByTitle,
|
|
78
67
|
getCorrectOption,
|
|
79
68
|
getOptionIndexFromCheckBox,
|
|
80
|
-
getLatestJobsByCategoryId
|
|
81
69
|
}
|