sr-npm 1.7.190 → 1.7.192

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 +2 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.190",
3
+ "version": "1.7.192",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/pages/homePage.js CHANGED
@@ -25,46 +25,23 @@ async function homePageOnReady(_$w,thisObject) {
25
25
  const numOfItems = await _$w('#citiesDataset').getTotalCount();
26
26
  const items = await _$w('#citiesDataset').getItems(0, numOfItems);
27
27
  let baseUrl = await location.baseUrl();
28
- const linkUrl = `${baseUrl}/positions`;
29
- console.log("items#@#@$$#@#$$$#######");
30
28
  const markers = items.items.map(item => {
31
29
  const location = item.locationAddress.location;
32
30
  const cityName = encodeURIComponent(item.title); // Use the city name from the item
33
- const cityLinkUrl = `${linkUrl}?keyWord=${cityName}`; // Add city as search parameter
31
+ const cityLinkUrl = `${baseUrl}/positions?location=${cityName}`; // Add city as search parameter
34
32
  return {
35
33
  location: {
36
34
  latitude: location.latitude,
37
35
  longitude: location.longitude
38
36
  },
39
37
  address: item.locationAddress.formatted,
40
- description: `View ${item.count} Open Positions`,
41
- title: item.title, // Show the actual city name in title
42
38
  link: cityLinkUrl,
43
- linkTitle:"shit"
39
+ linkTitle:`View ${item.count} Open Positions`
44
40
  };
45
41
  });
46
42
  //@ts-ignore
47
43
  _$w('#googleMaps').setMarkers(markers);
48
44
  });
49
- _$w('#googleMaps').onMarkerClicked((event) => {
50
- console.log("event: ", event);
51
-
52
- // Get all markers from the map
53
- const allMarkers = _$w('#googleMaps').markers;
54
- console.log("allMarkers: ", allMarkers);
55
- const getMarker = _$w('#googleMaps').getMarkers();
56
- console.log("getMarker: ", getMarker);
57
-
58
- // Find the clicked marker by matching coordinates
59
- const clickedMarker = allMarkers.find(marker =>
60
- marker.location.latitude === event.location.latitude &&
61
- marker.location.longitude === event.location.longitude
62
- );
63
-
64
- if (clickedMarker && clickedMarker.linkUrl) {
65
- location.to(clickedMarker.linkUrl);
66
- }
67
- });
68
45
  }
69
46
 
70
47
  function init(_$w) {