sr-npm 1.7.781 → 1.7.783

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.781",
3
+ "version": "1.7.783",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -2,20 +2,16 @@ const { getLatestJobsByCategoryId } = require('./pagesUtils');
2
2
  const { location } = require("@wix/site-location");
3
3
  const { supportTeamsPageIds } = require('../backend/consts');
4
4
 
5
- async function supportTeasmPageOnReady(_$w) {
6
5
 
7
- bindRepeater(_$w);
8
- loadOnClick(_$w)
9
- }
10
6
 
11
- function loadOnClick(_$w)
12
- {
13
- _$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick(async () => {
14
- await location.to(`/search`);
15
- });
7
+ async function supportTeasmPageOnReady(_$w) {
8
+ bind(_$w);
9
+
16
10
  }
17
11
 
18
- async function bindRepeater(_$w) {
12
+
13
+
14
+ async function bind(_$w) {
19
15
  _$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).onItemReady(($item, itemData) => {
20
16
  $item(supportTeamsPageIds.JOB_TITLE).text = itemData.title;
21
17
  $item(supportTeamsPageIds.JOB_LOCATION).text = itemData.location.fullLocation;
@@ -23,10 +19,15 @@ async function bindRepeater(_$w) {
23
19
  await location.to(itemData["link-jobs-title"]);
24
20
  })
25
21
  });
26
- let obj= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
27
- const categoryId=supportTeamsPageIds.valueToCategoryIdMap[obj.title_fld]
22
+
23
+ const currentItem= _$w(supportTeamsPageIds.TEAM_SUPPORT_DYNAMIC_DATASET).getCurrentItem();
24
+ const categoryId=supportTeamsPageIds.valueToCategoryIdMap[currentItem.title_fld]
28
25
  const latestsJobs=await getLatestJobsByCategoryId(categoryId);
29
26
  _$w(supportTeamsPageIds.RECENTLEY_ADDED_JOBS).data = latestsJobs;
27
+
28
+ _$w(supportTeamsPageIds.SEE_ALL_JOBS_TEXT).onClick(async () => {
29
+ await location.to(`/search?category=${categoryId}`);
30
+ });
30
31
  }
31
32
 
32
33
  module.exports = {