sr-npm 1.7.240 → 1.7.242
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/package.json +1 -1
- package/pages/careersPage.js +16 -10
package/package.json
CHANGED
package/pages/careersPage.js
CHANGED
|
@@ -144,10 +144,11 @@ async function handlePageParam(_$w) {
|
|
|
144
144
|
async function bind(_$w) {
|
|
145
145
|
await _$w('#jobsDataset').onReady(async () => {
|
|
146
146
|
await updateCount(_$w);
|
|
147
|
+
await updateMapMarkers(_$w);
|
|
147
148
|
|
|
148
149
|
});
|
|
149
150
|
|
|
150
|
-
if (await window.formFactor
|
|
151
|
+
if (await window.formFactor === "Mobile") {
|
|
151
152
|
_$w('#dropdownsContainer').collapse();
|
|
152
153
|
}
|
|
153
154
|
|
|
@@ -172,16 +173,17 @@ function init(_$w) {
|
|
|
172
173
|
_$w('#closeFiltersButton').onClick(()=>{
|
|
173
174
|
_$w('#dropdownsContainer, #closeFiltersButton').collapse();
|
|
174
175
|
});
|
|
175
|
-
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
179
|
+
console.log("applying filters");
|
|
179
180
|
const dropdownFiltersMapping = [
|
|
180
181
|
{ elementId: '#dropdownDepartment', field: 'department', value: _$w('#dropdownDepartment').value },
|
|
181
182
|
{ elementId: '#dropdownLocation', field: 'cityText', value: _$w('#dropdownLocation').value },
|
|
182
183
|
{ elementId: '#dropdownJobType', field: 'remote', value: _$w('#dropdownJobType').value},
|
|
183
184
|
{ elementId: '#searchInput', field: 'title', value: _$w('#searchInput').value }
|
|
184
185
|
];
|
|
186
|
+
console.log("dropdownFiltersMapping: ", dropdownFiltersMapping);
|
|
185
187
|
|
|
186
188
|
|
|
187
189
|
|
|
@@ -239,7 +241,7 @@ async function applyFilters(_$w, skipUrlUpdate = false) {
|
|
|
239
241
|
|
|
240
242
|
const count = await updateCount(_$w);
|
|
241
243
|
console.log("updating map markers");
|
|
242
|
-
await updateMapMarkers(_$w
|
|
244
|
+
await updateMapMarkers(_$w);
|
|
243
245
|
console.log("updating map markers completed");
|
|
244
246
|
count ? _$w('#resultsMultiState').changeState('results') : _$w('#resultsMultiState').changeState('noResults');
|
|
245
247
|
|
|
@@ -259,9 +261,13 @@ async function resetFilters(_$w) {
|
|
|
259
261
|
|
|
260
262
|
_$w('#resetFiltersButton').disable();
|
|
261
263
|
|
|
262
|
-
queryParams.remove(["keyWord", "department","page"]);
|
|
264
|
+
queryParams.remove(["keyWord", "department","page","location"]);
|
|
265
|
+
|
|
263
266
|
|
|
264
267
|
await updateCount(_$w);
|
|
268
|
+
console.log("reseting map markers");
|
|
269
|
+
await updateMapMarkers(_$w);
|
|
270
|
+
console.log("reseting map markers completed");
|
|
265
271
|
}
|
|
266
272
|
|
|
267
273
|
async function updateCount(_$w) {
|
|
@@ -339,8 +345,7 @@ async function handleLocationParam(_$w,location) {
|
|
|
339
345
|
|
|
340
346
|
}
|
|
341
347
|
|
|
342
|
-
async function updateMapMarkers(_$w
|
|
343
|
-
if(count>0){
|
|
348
|
+
async function updateMapMarkers(_$w){
|
|
344
349
|
const numOfItems = await _$w('#jobsDataset').getTotalCount();
|
|
345
350
|
const items = await _$w('#jobsDataset').getItems(0, numOfItems);
|
|
346
351
|
const markers = items.items.map(item => {
|
|
@@ -354,12 +359,13 @@ async function updateMapMarkers(_$w,count){
|
|
|
354
359
|
title: item.title,
|
|
355
360
|
};
|
|
356
361
|
});
|
|
362
|
+
console.log("markers: ", markers);
|
|
363
|
+
console.log("type of markers: ", typeof markers);
|
|
357
364
|
//@ts-ignore
|
|
358
365
|
_$w('#googleMaps').setMarkers(markers);
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
}
|
|
366
|
+
let getmarkers2=await _$w('#googleMaps').markers;
|
|
367
|
+
console.log("getmarkers2: ", getmarkers2);
|
|
368
|
+
|
|
363
369
|
}
|
|
364
370
|
|
|
365
371
|
|