sr-npm 1.7.726 → 1.7.728

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.726",
3
+ "version": "1.7.728",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -58,16 +58,23 @@ async function handleUrlParams(_$w,urlParams) {
58
58
  queryParams.remove(["page"]);
59
59
  return;
60
60
  }
61
-
61
+ console.log(" previous pagination.currentPage: ", pagination.currentPage);
62
+ pagination.currentPage=Number(urlParams.page);
62
63
  console.log("(Number(urlParams.page)*pagination.pageSize).toString(); ", (Number(urlParams.page)*pagination.pageSize).toString());
63
64
  let paginationCurrentText=Number(urlParams.page)*pagination.pageSize
65
+ let startSlicIndex=pagination.pageSize*(pagination.currentPage-1);
66
+ let endSlicIndex=(pagination.pageSize)*(pagination.currentPage)+1;
64
67
  if(Number(urlParams.page)==Math.ceil(currentJobs.length/pagination.pageSize)) {
65
68
  console.log("last page, subtracting the remaining jobs from the pagination current text");
66
69
  paginationCurrentText=paginationCurrentText-(currentJobs.length%pagination.pageSize);
70
+ endSlicIndex=currentJobs.length;
67
71
  }
68
72
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.paginationCurrentText).text = paginationCurrentText.toString();
69
- pagination.currentPage=Number(urlParams.page);
70
- const jobsFirstPage=currentJobs.slice(pagination.pageSize*(pagination.currentPage),pagination.pageSize*pagination.currentPage);
73
+ console.log("pagination.currentPage: ", pagination.currentPage);
74
+ console.log("slicing starting from: ", startSlicIndex);
75
+ console.log("slicing ending at: ", endSlicIndex);
76
+ const jobsFirstPage=currentJobs.slice(startSlicIndex,endSlicIndex);
77
+ console.log("jobsFirstPage: ", jobsFirstPage);
71
78
  _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = jobsFirstPage;
72
79
  handlePaginationButtons(_$w);
73
80
  }