@abcagency/hc-ui-components 1.3.58 → 1.3.60

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.
Files changed (139) hide show
  1. package/dist/components/HireControlMap.js +11 -1
  2. package/dist/components/HireControlMap.js.map +1 -1
  3. package/dist/components/containers/accordions/filter-item-container.js.map +1 -1
  4. package/dist/components/containers/filter/commute-container.js +1 -1
  5. package/dist/components/containers/filter/commute-container.js.map +1 -1
  6. package/dist/components/containers/filter/filter-container.js.map +1 -1
  7. package/dist/components/containers/filter/filter-item-container.js.map +1 -1
  8. package/dist/components/containers/filter/location-container.js.map +1 -1
  9. package/dist/components/containers/filter/points-of-interest-container.js.map +1 -1
  10. package/dist/components/containers/filter/points-of-interest-radio-item-container.js.map +1 -1
  11. package/dist/components/containers/filter/search-container.js.map +1 -1
  12. package/dist/components/containers/jobListing/listing-details-container.js +5 -1
  13. package/dist/components/containers/jobListing/listing-details-container.js.map +1 -1
  14. package/dist/components/containers/list/item-list-container.js.map +1 -1
  15. package/dist/components/containers/maps/info-window-content-container.js.map +1 -1
  16. package/dist/components/containers/maps/map-container.js +1 -1
  17. package/dist/components/containers/maps/map-list-container.js.map +1 -1
  18. package/dist/components/containers/maps/map-marker-container.js +1 -1
  19. package/dist/components/containers/maps/map-marker-container.js.map +1 -1
  20. package/dist/components/modules/accordions/default.js +2 -2
  21. package/dist/components/modules/accordions/filterItem.js.map +1 -1
  22. package/dist/components/modules/accordions/filters.js.map +1 -1
  23. package/dist/components/modules/buttons/button-group-apply.js +48 -54
  24. package/dist/components/modules/buttons/button-group-apply.js.map +1 -1
  25. package/dist/components/modules/buttons/default.js +2 -2
  26. package/dist/components/modules/cards/default.js +2 -2
  27. package/dist/components/modules/dialogs/apply-dialog.js +1 -1
  28. package/dist/components/modules/dialogs/apply-dialog.js.map +1 -1
  29. package/dist/components/modules/filter/commute.js +2 -2
  30. package/dist/components/modules/filter/commute.js.map +1 -1
  31. package/dist/components/modules/filter/index.js.map +1 -1
  32. package/dist/components/modules/filter/location.js.map +1 -1
  33. package/dist/components/modules/filter/radio-item.js.map +1 -1
  34. package/dist/components/modules/filter/search.js.map +1 -1
  35. package/dist/components/modules/filter/sort.js +2 -2
  36. package/dist/components/modules/grid.js +1 -1
  37. package/dist/components/modules/icon.js +1 -1
  38. package/dist/components/modules/jobListing/listing-details.js +8 -7
  39. package/dist/components/modules/jobListing/listing-details.js.map +1 -1
  40. package/dist/components/modules/list/field-mapper.js.map +1 -1
  41. package/dist/components/modules/list/header-item.js.map +1 -1
  42. package/dist/components/modules/list/header.js +1 -1
  43. package/dist/components/modules/list/item-expand-card/index.js +1 -1
  44. package/dist/components/modules/list/item-expand-card/index.js.map +1 -1
  45. package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js +38 -38
  46. package/dist/components/modules/list/item-expand-card/recruiter-details.js +40 -40
  47. package/dist/components/modules/list/item-expand-card/recruiter-headshot.js +20 -20
  48. package/dist/components/modules/list/item-list.js +3 -3
  49. package/dist/components/modules/list/item-list.js.map +1 -1
  50. package/dist/components/modules/list/list-item/list-item.js.map +1 -1
  51. package/dist/components/modules/maps/info-window-content.js.map +1 -1
  52. package/dist/components/modules/maps/map-list.js.map +1 -1
  53. package/dist/components/modules/maps/map-marker.js +1 -1
  54. package/dist/components/modules/maps/map-marker.js.map +1 -1
  55. package/dist/components/modules/maps/map.js +1 -1
  56. package/dist/components/modules/maps/place-marker.js +1 -1
  57. package/dist/components/modules/maps/tabs.js +1 -1
  58. package/dist/constants/eventTypes.js +1 -0
  59. package/dist/constants/eventTypes.js.map +1 -1
  60. package/dist/contexts/mapContext.js.map +1 -1
  61. package/dist/contexts/mapListContext.js +3 -1
  62. package/dist/contexts/mapListContext.js.map +1 -1
  63. package/dist/contexts/placesContext.js.map +1 -1
  64. package/dist/contexts/themeContext.js.map +1 -1
  65. package/dist/services/configService.js.map +1 -1
  66. package/dist/services/listingEntityService.js.map +1 -1
  67. package/dist/services/listingService.js.map +1 -1
  68. package/dist/services/recruiterService.js.map +1 -1
  69. package/dist/types/components/modules/buttons/button-group-apply.d.ts +4 -4
  70. package/dist/types/components/modules/jobListing/listing-details.d.ts +3 -1
  71. package/dist/types/constants/eventTypes.d.ts +1 -0
  72. package/dist/types/contexts/mapListContext.d.ts +4 -0
  73. package/dist/util/filterUtil.js +3 -3
  74. package/dist/util/filterUtil.js.map +1 -1
  75. package/dist/util/mapIconUtil.js.map +1 -1
  76. package/dist/util/mapUtil.js.map +1 -1
  77. package/package.json +90 -90
  78. package/src/.editorconfig +12 -12
  79. package/src/bundleIndex.js +14 -14
  80. package/src/components/HireControlMap.js +148 -142
  81. package/src/components/containers/accordions/filter-item-container.js +83 -83
  82. package/src/components/containers/filter/commute-container.js +89 -89
  83. package/src/components/containers/filter/filter-container.js +76 -76
  84. package/src/components/containers/filter/filter-item-container.js +117 -117
  85. package/src/components/containers/filter/location-container.js +45 -45
  86. package/src/components/containers/filter/points-of-interest-container.js +33 -33
  87. package/src/components/containers/filter/points-of-interest-radio-item-container.js +35 -35
  88. package/src/components/containers/filter/search-container.js +61 -61
  89. package/src/components/containers/jobListing/listing-details-container.js +3 -1
  90. package/src/components/containers/list/item-list-container.tsx +81 -81
  91. package/src/components/containers/maps/info-window-content-container.js +53 -53
  92. package/src/components/containers/maps/map-list-container.js +50 -50
  93. package/src/components/containers/maps/map-marker-container.js +78 -78
  94. package/src/components/modules/accordions/filterItem.js +27 -27
  95. package/src/components/modules/accordions/filters.js +32 -32
  96. package/src/components/modules/buttons/button-group-apply.js +115 -135
  97. package/src/components/modules/dialogs/apply-dialog.js +48 -48
  98. package/src/components/modules/filter/commute.js +108 -108
  99. package/src/components/modules/filter/index.js +55 -55
  100. package/src/components/modules/filter/location.js +51 -51
  101. package/src/components/modules/filter/radio-item.js +42 -42
  102. package/src/components/modules/filter/search.js +79 -79
  103. package/src/components/modules/jobListing/listing-details.js +110 -108
  104. package/src/components/modules/list/field-mapper.js +130 -130
  105. package/src/components/modules/list/header-item.js +92 -92
  106. package/src/components/modules/list/item-expand-card/index.js +22 -22
  107. package/src/components/modules/list/item-list.tsx +117 -117
  108. package/src/components/modules/list/list-item/list-item.js +130 -130
  109. package/src/components/modules/maps/info-window-content.js +64 -64
  110. package/src/components/modules/maps/map-list.js +38 -38
  111. package/src/components/modules/maps/map-marker.js +29 -29
  112. package/src/constants/eventTypes.js +15 -14
  113. package/src/contexts/mapContext.tsx +129 -129
  114. package/src/contexts/mapListContext.tsx +326 -318
  115. package/src/contexts/placesContext.js +102 -102
  116. package/src/contexts/themeContext.js +40 -40
  117. package/src/services/configService.ts +16 -16
  118. package/src/services/listingEntityService.ts +16 -16
  119. package/src/services/listingService.ts +40 -40
  120. package/src/services/recruiterService.ts +18 -18
  121. package/src/styles/bundle.css +268 -268
  122. package/src/styles/index.css +33 -33
  123. package/src/types/Address.ts +7 -7
  124. package/src/types/ContentSection.ts +9 -9
  125. package/src/types/GetListingParams.ts +8 -8
  126. package/src/types/LatLng.ts +4 -4
  127. package/src/types/ListingEntity.ts +11 -11
  128. package/src/types/ListingFields.ts +25 -25
  129. package/src/types/Listings.ts +32 -32
  130. package/src/types/Recruiter.ts +9 -9
  131. package/src/types/SimilarListing.ts +24 -24
  132. package/src/types/config/Colors.ts +8 -8
  133. package/src/types/config/MapConfig.ts +31 -31
  134. package/src/types/config/PointsOfInterestConfig.ts +13 -13
  135. package/src/types/config/SearchConfig.ts +4 -4
  136. package/src/util/filterUtil.js +2 -1
  137. package/src/util/mapIconUtil.js +180 -180
  138. package/src/util/mapUtil.js +92 -92
  139. package/dist/types/contexts/themeContext.d.ts +0 -11
@@ -1,102 +1,102 @@
1
- import React, { createContext, useContext, useEffect, useState } from 'react';
2
-
3
- import { markerIconProps } from '~/util/mapIconUtil';
4
-
5
- import { useMap } from '~/contexts/mapContext';
6
-
7
- import { searchNearbyPlaces } from '~/services/googlePlacesNearbyService';
8
-
9
- const PlacesContext = createContext();
10
-
11
- export const usePlaces = () => useContext(PlacesContext);
12
-
13
- export const PlacesProvider = ({ children, placeMappings, markerColors }) => {
14
- const { selectedPlaces, zoom, center } = useMap();
15
- const [poiMarkers, setPoiMarkers] = useState({ markers: [], icon: null });
16
- const [currentCenter, setCurrentCenter] = useState(center);
17
- const [currentZoom, setCurrentZoom] = useState(zoom);
18
- const [placesWindow, setPlacesWindow] = useState(false);
19
- const [selectedPlaceMarker, setSelectedPlaceMarker] = useState(null);
20
-
21
- const getRadiusForZoom = () => {
22
- if (currentZoom >= 18) return 1000;
23
- if (currentZoom <= 10) return 0;
24
-
25
- let tempZoom = Math.pow(19 - currentZoom, 4.85);
26
- let radius = tempZoom;
27
- let minRadius = 1500;
28
- let maxRadius = 800000;
29
-
30
- if (radius < minRadius) radius = minRadius;
31
- else if (radius > maxRadius) radius = maxRadius;
32
-
33
- return radius;
34
- };
35
-
36
- useEffect(() => {
37
- if (!selectedPlaces || (!selectedPlaces.length > 0) || !center || currentZoom < 12) {
38
- setPoiMarkers({ markers: [], icon: null });
39
- return;
40
- }
41
- const fetchPlaces = async () => {
42
- let poiTypes = [];
43
- const selectedPOICategories = selectedPlaces;
44
- selectedPOICategories.forEach(pointOfInterest => {
45
- poiTypes = poiTypes.concat(placeMappings[pointOfInterest]);
46
- });
47
-
48
- const radius = getRadiusForZoom();
49
- const location = { latitude: currentCenter.lat, longitude: currentCenter.lng };
50
-
51
- try {
52
- const response = await searchNearbyPlaces(poiTypes, location, radius);
53
- const newMarkers = response.places.map(place => {
54
- const getParentCategory = types => {
55
- const selectedTypes = selectedPOICategories.reduce((acc, category) => {
56
- return acc.concat(placeMappings[category]);
57
- }, []);
58
-
59
- for (const type of types) {
60
- if (!selectedTypes.includes(type)) continue;
61
- for (const category in placeMappings) {
62
- if (placeMappings[category].includes(type)) {
63
- return category;
64
- }
65
- }
66
-
67
- }
68
- };
69
-
70
- const icon = markerIconProps(markerColors.placeMarkers, getParentCategory(place.types));
71
-
72
- return {
73
- position: { lat: place.location.latitude, lng: place.location.longitude },
74
- title: place.displayName.text,
75
- icon: icon
76
- };
77
- });
78
- setPoiMarkers({ markers: newMarkers, icon: null });
79
- } catch (error) {
80
- console.error('Failed to fetch places:', error);
81
- }
82
- };
83
-
84
- fetchPlaces();
85
- }, [selectedPlaces, currentZoom, currentCenter]);
86
-
87
- return (
88
- <PlacesContext.Provider value={{
89
- poiMarkers,
90
- setCurrentCenter,
91
- currentCenter,
92
- setCurrentZoom,
93
- currentZoom,
94
- placesWindow,
95
- setPlacesWindow,
96
- selectedPlaceMarker,
97
- setSelectedPlaceMarker
98
- }}>
99
- {children}
100
- </PlacesContext.Provider>
101
- );
102
- };
1
+ import React, { createContext, useContext, useEffect, useState } from 'react';
2
+
3
+ import { markerIconProps } from '~/util/mapIconUtil';
4
+
5
+ import { useMap } from '~/contexts/mapContext';
6
+
7
+ import { searchNearbyPlaces } from '~/services/googlePlacesNearbyService';
8
+
9
+ const PlacesContext = createContext();
10
+
11
+ export const usePlaces = () => useContext(PlacesContext);
12
+
13
+ export const PlacesProvider = ({ children, placeMappings, markerColors }) => {
14
+ const { selectedPlaces, zoom, center } = useMap();
15
+ const [poiMarkers, setPoiMarkers] = useState({ markers: [], icon: null });
16
+ const [currentCenter, setCurrentCenter] = useState(center);
17
+ const [currentZoom, setCurrentZoom] = useState(zoom);
18
+ const [placesWindow, setPlacesWindow] = useState(false);
19
+ const [selectedPlaceMarker, setSelectedPlaceMarker] = useState(null);
20
+
21
+ const getRadiusForZoom = () => {
22
+ if (currentZoom >= 18) return 1000;
23
+ if (currentZoom <= 10) return 0;
24
+
25
+ let tempZoom = Math.pow(19 - currentZoom, 4.85);
26
+ let radius = tempZoom;
27
+ let minRadius = 1500;
28
+ let maxRadius = 800000;
29
+
30
+ if (radius < minRadius) radius = minRadius;
31
+ else if (radius > maxRadius) radius = maxRadius;
32
+
33
+ return radius;
34
+ };
35
+
36
+ useEffect(() => {
37
+ if (!selectedPlaces || (!selectedPlaces.length > 0) || !center || currentZoom < 12) {
38
+ setPoiMarkers({ markers: [], icon: null });
39
+ return;
40
+ }
41
+ const fetchPlaces = async () => {
42
+ let poiTypes = [];
43
+ const selectedPOICategories = selectedPlaces;
44
+ selectedPOICategories.forEach(pointOfInterest => {
45
+ poiTypes = poiTypes.concat(placeMappings[pointOfInterest]);
46
+ });
47
+
48
+ const radius = getRadiusForZoom();
49
+ const location = { latitude: currentCenter.lat, longitude: currentCenter.lng };
50
+
51
+ try {
52
+ const response = await searchNearbyPlaces(poiTypes, location, radius);
53
+ const newMarkers = response.places.map(place => {
54
+ const getParentCategory = types => {
55
+ const selectedTypes = selectedPOICategories.reduce((acc, category) => {
56
+ return acc.concat(placeMappings[category]);
57
+ }, []);
58
+
59
+ for (const type of types) {
60
+ if (!selectedTypes.includes(type)) continue;
61
+ for (const category in placeMappings) {
62
+ if (placeMappings[category].includes(type)) {
63
+ return category;
64
+ }
65
+ }
66
+
67
+ }
68
+ };
69
+
70
+ const icon = markerIconProps(markerColors.placeMarkers, getParentCategory(place.types));
71
+
72
+ return {
73
+ position: { lat: place.location.latitude, lng: place.location.longitude },
74
+ title: place.displayName.text,
75
+ icon: icon
76
+ };
77
+ });
78
+ setPoiMarkers({ markers: newMarkers, icon: null });
79
+ } catch (error) {
80
+ console.error('Failed to fetch places:', error);
81
+ }
82
+ };
83
+
84
+ fetchPlaces();
85
+ }, [selectedPlaces, currentZoom, currentCenter]);
86
+
87
+ return (
88
+ <PlacesContext.Provider value={{
89
+ poiMarkers,
90
+ setCurrentCenter,
91
+ currentCenter,
92
+ setCurrentZoom,
93
+ currentZoom,
94
+ placesWindow,
95
+ setPlacesWindow,
96
+ selectedPlaceMarker,
97
+ setSelectedPlaceMarker
98
+ }}>
99
+ {children}
100
+ </PlacesContext.Provider>
101
+ );
102
+ };
@@ -1,40 +1,40 @@
1
- import React, { useEffect } from 'react';
2
- import { createContext, useContext } from 'react';
3
-
4
- const ThemeContext = createContext();
5
-
6
- export const ThemeProvider = ({
7
- children,
8
- uiText,
9
- uiAccent,
10
- primary,
11
- primaryDark,
12
- secondary,
13
- secondaryDark
14
- }) => {
15
- useEffect(() => {
16
- document.documentElement.style.setProperty('--ui-text', uiText);
17
- document.documentElement.style.setProperty('--ui-accent', uiAccent);
18
- document.documentElement.style.setProperty('--primary', primary);
19
- document.documentElement.style.setProperty('--primary-dark', primaryDark);
20
- document.documentElement.style.setProperty('--secondary', secondary);
21
- document.documentElement.style.setProperty('--secondary-dark', secondaryDark);
22
- }, [uiText, uiAccent, primary, primaryDark, secondary, secondaryDark]);
23
-
24
- return (
25
- <ThemeContext.Provider
26
- value={{
27
- uiText,
28
- uiAccent,
29
- primary,
30
- primaryDark,
31
- secondary,
32
- secondaryDark
33
- }}
34
- >
35
- {children}
36
- </ThemeContext.Provider>
37
- );
38
- };
39
-
40
- export const useTheme = () => useContext(ThemeContext);
1
+ import React, { useEffect } from 'react';
2
+ import { createContext, useContext } from 'react';
3
+
4
+ const ThemeContext = createContext();
5
+
6
+ export const ThemeProvider = ({
7
+ children,
8
+ uiText,
9
+ uiAccent,
10
+ primary,
11
+ primaryDark,
12
+ secondary,
13
+ secondaryDark
14
+ }) => {
15
+ useEffect(() => {
16
+ document.documentElement.style.setProperty('--ui-text', uiText);
17
+ document.documentElement.style.setProperty('--ui-accent', uiAccent);
18
+ document.documentElement.style.setProperty('--primary', primary);
19
+ document.documentElement.style.setProperty('--primary-dark', primaryDark);
20
+ document.documentElement.style.setProperty('--secondary', secondary);
21
+ document.documentElement.style.setProperty('--secondary-dark', secondaryDark);
22
+ }, [uiText, uiAccent, primary, primaryDark, secondary, secondaryDark]);
23
+
24
+ return (
25
+ <ThemeContext.Provider
26
+ value={{
27
+ uiText,
28
+ uiAccent,
29
+ primary,
30
+ primaryDark,
31
+ secondary,
32
+ secondaryDark
33
+ }}
34
+ >
35
+ {children}
36
+ </ThemeContext.Provider>
37
+ );
38
+ };
39
+
40
+ export const useTheme = () => useContext(ThemeContext);
@@ -1,16 +1,16 @@
1
- import api from '~/apis/hcApi';
2
- import { MapConfig } from '~/types/config/MapConfig';
3
-
4
- export const getMapConfig = async (): Promise<MapConfig> => {
5
- try {
6
- const response = await api.get<MapConfig>(`/MapConfig`);
7
- return response;
8
- } catch (error) {
9
- console.error("Error retrieving map configuration:", error);
10
- throw error;
11
- }
12
- };
13
-
14
- export default {
15
- getMapConfig
16
- };
1
+ import api from '~/apis/hcApi';
2
+ import { MapConfig } from '~/types/config/MapConfig';
3
+
4
+ export const getMapConfig = async (): Promise<MapConfig> => {
5
+ try {
6
+ const response = await api.get<MapConfig>(`/MapConfig`);
7
+ return response;
8
+ } catch (error) {
9
+ console.error("Error retrieving map configuration:", error);
10
+ throw error;
11
+ }
12
+ };
13
+
14
+ export default {
15
+ getMapConfig
16
+ };
@@ -1,16 +1,16 @@
1
- import api from '~/apis/hcApi';
2
- import { ListingEntity } from '~/types/ListingEntity';
3
-
4
- export const getListingEntities = async (entityIds: number[], origin = ''): Promise<ListingEntity[]> => {
5
- try {
6
- const response = await api.post<ListingEntity[]>(`/ListingEntities?origin=${origin}`, entityIds);
7
- return response;
8
- } catch (error) {
9
- console.error("Error fetching listing entities:", error);
10
- throw error;
11
- }
12
- };
13
-
14
- export default {
15
- getListingEntities
16
- };
1
+ import api from '~/apis/hcApi';
2
+ import { ListingEntity } from '~/types/ListingEntity';
3
+
4
+ export const getListingEntities = async (entityIds: number[], origin = ''): Promise<ListingEntity[]> => {
5
+ try {
6
+ const response = await api.post<ListingEntity[]>(`/ListingEntities?origin=${origin}`, entityIds);
7
+ return response;
8
+ } catch (error) {
9
+ console.error("Error fetching listing entities:", error);
10
+ throw error;
11
+ }
12
+ };
13
+
14
+ export default {
15
+ getListingEntities
16
+ };
@@ -1,40 +1,40 @@
1
- // listingService.ts
2
- import { GetListingsParams } from '~/types/GetListingParams';
3
- import api from '../apis/hcApi';
4
- import { Listing } from '../types/Listings';
5
-
6
- export const getListings = async (params?: GetListingsParams): Promise<Listing[]> => {
7
- try {
8
- const query = new URLSearchParams();
9
-
10
- if (params) {
11
- if (params.location) params.location.forEach(loc => query.append('location', loc));
12
- if (params.category) params.category.forEach(cat => query.append('category', cat));
13
- if (params.categoryClass) params.categoryClass.forEach(catClass => query.append('categoryClass', catClass));
14
- if (params.education) params.education.forEach(edu => query.append('education', edu));
15
- if (params.city) params.city.forEach(cty => query.append('city', cty));
16
- if (params.state) params.state.forEach(st => query.append('state', st));
17
- }
18
-
19
- const response = await api.get(`/Listings?${query.toString()}`);
20
- return response as Listing[];
21
- } catch (error) {
22
- console.error(error);
23
- throw error;
24
- }
25
- };
26
-
27
- export const getListingDetails = async (listingId: string) => {
28
- try {
29
- const response = await api.get(`/ListingDetails/${listingId}`);
30
- return response;
31
- } catch (error) {
32
- console.error(error);
33
- throw error;
34
- }
35
- };
36
-
37
- export default {
38
- getListings,
39
- getListingDetails
40
- };
1
+ // listingService.ts
2
+ import { GetListingsParams } from '~/types/GetListingParams';
3
+ import api from '../apis/hcApi';
4
+ import { Listing } from '../types/Listings';
5
+
6
+ export const getListings = async (params?: GetListingsParams): Promise<Listing[]> => {
7
+ try {
8
+ const query = new URLSearchParams();
9
+
10
+ if (params) {
11
+ if (params.location) params.location.forEach(loc => query.append('location', loc));
12
+ if (params.category) params.category.forEach(cat => query.append('category', cat));
13
+ if (params.categoryClass) params.categoryClass.forEach(catClass => query.append('categoryClass', catClass));
14
+ if (params.education) params.education.forEach(edu => query.append('education', edu));
15
+ if (params.city) params.city.forEach(cty => query.append('city', cty));
16
+ if (params.state) params.state.forEach(st => query.append('state', st));
17
+ }
18
+
19
+ const response = await api.get(`/Listings?${query.toString()}`);
20
+ return response as Listing[];
21
+ } catch (error) {
22
+ console.error(error);
23
+ throw error;
24
+ }
25
+ };
26
+
27
+ export const getListingDetails = async (listingId: string) => {
28
+ try {
29
+ const response = await api.get(`/ListingDetails/${listingId}`);
30
+ return response;
31
+ } catch (error) {
32
+ console.error(error);
33
+ throw error;
34
+ }
35
+ };
36
+
37
+ export default {
38
+ getListings,
39
+ getListingDetails
40
+ };
@@ -1,18 +1,18 @@
1
- import api from '~/apis/hcApi';
2
- import { Recruiter } from '~/types/Recruiter';
3
-
4
- export const getRecruiters = async (recruiterIds: number[]): Promise<Recruiter[]> => {
5
- try {
6
- const params = recruiterIds.map(id => `recruiterIds=${id}`).join("&");
7
-
8
- const response = await api.get<Recruiter[]>(`/Recruiters?${params}`);
9
- return response;
10
- } catch (error) {
11
- console.error("Error fetching recruiters:", error);
12
- throw error;
13
- }
14
- };
15
-
16
- export default {
17
- getRecruiters
18
- };
1
+ import api from '~/apis/hcApi';
2
+ import { Recruiter } from '~/types/Recruiter';
3
+
4
+ export const getRecruiters = async (recruiterIds: number[]): Promise<Recruiter[]> => {
5
+ try {
6
+ const params = recruiterIds.map(id => `recruiterIds=${id}`).join("&");
7
+
8
+ const response = await api.get<Recruiter[]>(`/Recruiters?${params}`);
9
+ return response;
10
+ } catch (error) {
11
+ console.error("Error fetching recruiters:", error);
12
+ throw error;
13
+ }
14
+ };
15
+
16
+ export default {
17
+ getRecruiters
18
+ };