sr-npm 1.7.183 → 1.7.184

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pages/homePage.js +15 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.183",
3
+ "version": "1.7.184",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -29,21 +29,30 @@ async function homePageOnReady(_$w,thisObject) {
29
29
  console.log("items#@#@$$#@#$$$#######");
30
30
  const markers = items.items.map(item => {
31
31
  const location = item.locationAddress.location;
32
+ const cityName = encodeURIComponent(item.title);
32
33
  return {
33
34
  location: {
34
35
  latitude: location.latitude,
35
36
  longitude: location.longitude
36
37
  },
37
- address: item.locationAddress.formatted,
38
- // description: `<a href=${linkUrl} target="_parent" rel="noopener noreferrer" style="color:#000000;text-decoration:underline;font-weight:bold;">View ${item.count} Open Positions</a>`
39
- description: `<a href=${linkUrl} target="_parent" rel="noopener noreferrer" style="color:#000000;text-decoration:underline;font-weight:bold;">View ${item.count} Open Positions</a>`,
40
- random:"random",
41
- title:"213123231",
42
- linkUrl:linkUrl
38
+ address: item.locationAddress.formatted,
39
+ description: `View ${item.count} Open Positions in ${item.title}`,
40
+ title: item.title,
41
+ cityName: item.title, // Store city name for click handler
42
+ _id: item._id
43
43
  };
44
44
  });
45
45
  //@ts-ignore
46
46
  _$w('#googleMaps').setMarkers(markers);
47
+
48
+ // Add click handler for map markers
49
+ _$w('#googleMaps').onMarkerClick((event) => {
50
+ const marker = event.marker;
51
+ if (marker.cityName) {
52
+ const cityName = encodeURIComponent(marker.cityName);
53
+ location.to(`/positions?keyWord=${cityName}`);
54
+ }
55
+ });
47
56
  });
48
57
  }
49
58