@abcagency/hc-ui-components 1.3.46 → 1.3.48
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/dist/components/HireControlMap.js +1 -0
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/containers/accordions/filter-item-container.js +1 -0
- package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
- package/dist/components/containers/filter/filter-item-container.js +3 -0
- package/dist/components/containers/filter/filter-item-container.js.map +1 -1
- package/dist/components/containers/maps/info-window-content-container.js +3 -3
- package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
- package/dist/components/containers/maps/map-container.js +34 -2
- package/dist/components/containers/maps/map-container.js.map +1 -1
- package/dist/components/containers/maps/map-list-container.js +4 -2
- package/dist/components/containers/maps/map-list-container.js.map +1 -1
- package/dist/components/modules/buttons/show-all-button.js +1 -2
- package/dist/components/modules/buttons/show-all-button.js.map +1 -1
- package/dist/components/modules/filter/location.js +3 -0
- package/dist/components/modules/filter/location.js.map +1 -1
- package/dist/components/modules/maps/map-list.js +3 -2
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/components/modules/maps/map.js.map +1 -1
- package/dist/util/filterUtil.js +16 -0
- package/dist/util/filterUtil.js.map +1 -1
- package/package.json +1 -1
- package/src/components/HireControlMap.js +1 -0
- package/src/components/containers/accordions/filter-item-container.js +1 -0
- package/src/components/containers/filter/filter-item-container.js +80 -77
- package/src/components/containers/maps/info-window-content-container.js +2 -2
- package/src/components/containers/maps/map-container.js +245 -206
- package/src/components/containers/maps/map-list-container.js +3 -1
- package/src/components/modules/buttons/show-all-button.js +2 -3
- package/src/components/modules/filter/location.js +7 -4
- package/src/components/modules/maps/map-list.js +13 -3
- package/src/components/modules/maps/map.js +64 -64
- package/src/util/filterUtil.js +17 -0
package/src/util/filterUtil.js
CHANGED
|
@@ -99,6 +99,23 @@ export const generateFilterOptions = (
|
|
|
99
99
|
if (index === 0 && filterOptions?.locations) {
|
|
100
100
|
return filterOptions.locations.find(filter => filter.id === fieldName);
|
|
101
101
|
}
|
|
102
|
+
if (fieldName === 'entityName' && filterOptions?.locations) {
|
|
103
|
+
const cityIncluded = siteConfig.locationFiltersShown.includes('city');
|
|
104
|
+
const stateIncluded = siteConfig.locationFiltersShown.includes('state');
|
|
105
|
+
const cityStateIncluded = siteConfig.locationFiltersShown.includes('cityState');
|
|
106
|
+
const filteredByLocation = allListings.filter(listing => {
|
|
107
|
+
const cityMatches = cityIncluded ? listing.fields.city === filteredListings[0].fields.city : true;
|
|
108
|
+
const stateMatches = stateIncluded ? listing.fields.state === filteredListings[0].fields.state : true;
|
|
109
|
+
const cityStateMatches = cityStateIncluded ? listing.fields.cityState === filteredListings[0].fields.cityState : true;
|
|
110
|
+
return cityMatches && stateMatches && cityStateMatches;
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
return {
|
|
114
|
+
id: fieldName,
|
|
115
|
+
title: siteConfig.fieldNames[fieldName],
|
|
116
|
+
items: getFilterOptions(allListings, filteredByLocation, fieldName, true)
|
|
117
|
+
};
|
|
118
|
+
}
|
|
102
119
|
return {
|
|
103
120
|
id: fieldName,
|
|
104
121
|
title: siteConfig.fieldNames[fieldName],
|