sr-npm 1.7.605 → 1.7.606
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
|
@@ -189,11 +189,14 @@ async function loadJobs(_$w) {
|
|
|
189
189
|
value: o.value
|
|
190
190
|
};
|
|
191
191
|
});
|
|
192
|
-
|
|
192
|
+
console.log("base: ",base)
|
|
193
|
+
console.log("countsMap: ",countsMap)
|
|
194
|
+
console.log("withCounts: ",withCounts)
|
|
193
195
|
// Apply search
|
|
194
196
|
const filtered = searchQuery
|
|
195
197
|
? withCounts.filter(o => (o.label || '').toLowerCase().includes(searchQuery))
|
|
196
198
|
: withCounts;
|
|
199
|
+
console.log("filte@$@#@#$red: ",filtered)
|
|
197
200
|
|
|
198
201
|
// Preserve currently selected values that are still visible
|
|
199
202
|
const prevSelected = $item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER_ITEM_CHECKBOX).value || [];
|
|
@@ -217,7 +220,10 @@ async function loadJobs(_$w) {
|
|
|
217
220
|
}
|
|
218
221
|
|
|
219
222
|
q.find()
|
|
220
|
-
.then((res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
|
|
223
|
+
.then((res) => { _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.JOBS_REPEATER).data = res.items;
|
|
224
|
+
currentJobs=res.items.map(job=>job._id);
|
|
225
|
+
console.log("updated currentJobs: ",currentJobs)
|
|
226
|
+
})
|
|
221
227
|
.catch((err) => { console.error('Failed to filter jobs:', err); });
|
|
222
228
|
}
|
|
223
229
|
|
|
@@ -229,6 +235,15 @@ async function refreshFacetCounts(_$w) {
|
|
|
229
235
|
}
|
|
230
236
|
|
|
231
237
|
const fieldIds = Array.from(optionsByFieldId.keys());
|
|
238
|
+
for (const valueId of valueToJobs.keys()) {
|
|
239
|
+
for (const jobId of currentJobs) {
|
|
240
|
+
if (valueToJobs[valueId].includes(jobId)) {
|
|
241
|
+
countsByFieldId.set(valueId, (countsByFieldId.get(valueId) || 0) + 1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
|
|
232
247
|
// Run per-field queries in parallel
|
|
233
248
|
const tasks = fieldIds.map(async (fieldId) => {
|
|
234
249
|
// Build query with selections from all other fields
|