sr-npm 1.7.677 → 1.7.678
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 +1 -1
- package/pages/careersMultiBoxesPage.js +19 -20
package/package.json
CHANGED
|
@@ -126,7 +126,6 @@ async function loadJobs(_$w) {
|
|
|
126
126
|
let fields = await getAllRecords(COLLECTIONS.CUSTOM_FIELDS);
|
|
127
127
|
|
|
128
128
|
fields.push({_id:"Location",title:"Location"});
|
|
129
|
-
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER).data = fields;
|
|
130
129
|
const cities=await getAllRecords(COLLECTIONS.CITIES);
|
|
131
130
|
for(const city of cities) {
|
|
132
131
|
valueToJobs[city._id]=city.jobIds;
|
|
@@ -145,30 +144,30 @@ async function loadJobs(_$w) {
|
|
|
145
144
|
for(const [key, value] of valuesByFieldId) {
|
|
146
145
|
for(const field of fields) {
|
|
147
146
|
if(field._id===key) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
optionsByFieldId.set(key, originalOptions);
|
|
160
|
-
|
|
147
|
+
let originalOptions=[];
|
|
148
|
+
if(key==="Location") {
|
|
149
|
+
originalOptions=value.map(city=>({
|
|
150
|
+
label: city.city,
|
|
151
|
+
value: city._id
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
else{
|
|
155
|
+
originalOptions=value
|
|
156
|
+
}
|
|
161
157
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
optionsByFieldId.set(key, originalOptions);
|
|
159
|
+
for (const val of allvaluesobjects) {
|
|
160
|
+
counter[val.title]=val.totalJobs
|
|
161
|
+
}
|
|
165
162
|
|
|
166
|
-
|
|
163
|
+
countsByFieldId.set(key, new Map(originalOptions.map(o => [o.value, counter[o.label]])));
|
|
167
164
|
updateOptionsUI(_$w,field.title, field._id, ''); // no search query
|
|
165
|
+
_$w(`#${FiltersIds[field.title]}CheckBox`).selectedIndices = []; // start empty
|
|
168
166
|
//_$w("#CategoryCheckBox").options = valuesByFieldId.get(elemenet);
|
|
169
167
|
_$w(`#${FiltersIds[field.title]}CheckBox`).onChange(async (ev) => {
|
|
170
168
|
dontUpdateThisCheckBox=field._id;
|
|
171
169
|
const selected = ev.target.value; // array of selected value IDs
|
|
170
|
+
console.log("selected: ",selected)
|
|
172
171
|
if (selected && selected.length) {
|
|
173
172
|
selectedByField.set(field._id, selected);
|
|
174
173
|
} else {
|
|
@@ -193,8 +192,8 @@ async function loadJobs(_$w) {
|
|
|
193
192
|
|
|
194
193
|
await refreshFacetCounts(_$w);
|
|
195
194
|
// _$w(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_REPEATER).forEachItem(($item, itemData) => {
|
|
196
|
-
|
|
197
|
-
|
|
195
|
+
// const query = ($item(CAREERS_MULTI_BOXES_PAGE_CONSTS.FILTER_LABEL).value || '').toLowerCase().trim();
|
|
196
|
+
// updateOptionsUI($item, itemData._id, query);
|
|
198
197
|
|
|
199
198
|
|
|
200
199
|
|