sr-npm 1.7.245 → 1.7.247

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sr-npm",
3
- "version": "1.7.245",
3
+ "version": "1.7.247",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  const { getAllPositions } = require('../backend/queries');
2
2
  const {wixData} = require('wix-data');
3
+ const { location } = require('@wix/site-location');
3
4
  const { window } = require('@wix/site-window');
4
5
  const { query,queryParams,to } = require("wix-location-frontend");
5
6
  const {
@@ -18,6 +19,7 @@ const {
18
19
  let queryDepartmentVar;
19
20
  let queryLocationVar;
20
21
  async function careersPageOnReady(_$w,thisObject,queryParams) {
22
+ console.log("careersPageOn@!$%#$%##$%$#$#$%#$%#Ready");
21
23
  console.log("queryParams: ", queryParams);
22
24
  const { page, keyWord, department, location } = queryParams;
23
25
  queryPageVar=page;
@@ -152,11 +154,13 @@ async function bind(_$w) {
152
154
  }
153
155
 
154
156
  _$w('#positionsRepeater').onItemReady(async ($item, itemData) => {
155
- $item('#positionItem').onClick(() => {
157
+ $item('#positionItem').onClick(async () => {
158
+ let baseUrl = await location.baseUrl();
159
+ console.log("baseUrl: ", baseUrl);
156
160
  console.log("itemData: ", itemData);
157
161
  console.log("$item: ", $item);
158
- console.log("itemData['link-jobs-title']: ", itemData['link-jobs-title']);
159
- to(`${itemData['link-jobs-title']}`);
162
+ console.log("itemData['link-jobs-title']: ", itemData['link-jobs-title'].replace(" ", "-"));
163
+ to(`${baseUrl}/jobs/${itemData._id}`);
160
164
  });
161
165
  });
162
166
  }