sr-npm 1.7.642 → 1.7.643

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.642",
3
+ "version": "1.7.643",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -106,6 +106,13 @@ async function loadJobs(_$w) {
106
106
 
107
107
  // Set the filter label (category name)
108
108
  $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_LABEL).placeholder = itemData.title
109
+
110
+ // if(fieldId==="Location") {
111
+ // $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).options = cities.map(city=>({
112
+ // label: city.title,
113
+ // value: city._id
114
+ // }));
115
+ // }
109
116
 
110
117
  // Build CheckboxGroup options for this field
111
118
  const fieldValues = valuesByFieldId.get(fieldId) || [];
@@ -229,14 +236,17 @@ async function loadJobs(_$w) {
229
236
  console.log(currentJobs)
230
237
  let newFilteredJobs=[]
231
238
  let alreadyAddedJobs=[]
232
- console.log(selectedByField)
239
+ console.log("selectedByField: ",selectedByField)
233
240
 
234
241
  // AND across categories, OR within each category
235
242
  for (const [, values] of selectedByField.entries()) {
236
- console.log(values)
243
+ console.log("values: ",values)
237
244
  for(job of currentJobs) {
245
+ console.log("job: ",job)
246
+ console.log("job[filterByField]: ",job[filterByField])
247
+ console.log("job[filterByField].some(value=>values.includes(value))) ",job[filterByField].some(value=>values.includes(value))))
238
248
  if(job[filterByField].some(value=>values.includes(value))) {
239
-
249
+ console.log("!alreadyAddedJobs.includes(job._id) ",!alreadyAddedJobs.includes(job._id))
240
250
  if(!alreadyAddedJobs.includes(job._id)) {
241
251
  newFilteredJobs.push(job);
242
252
  alreadyAddedJobs.push(job._id);
@@ -250,7 +260,8 @@ async function loadJobs(_$w) {
250
260
 
251
261
  }
252
262
  }
253
- console.log(newFilteredJobs)
263
+ console.log("alreadyAddedJobs: ",alreadyAddedJobs)
264
+ console.log("newFilteredJobs: ",newFilteredJobs)
254
265
 
255
266
  await q.find()
256
267
  .then(async (res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;