@abcagency/hc-ui-components 1.3.18 → 1.3.19
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/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/dist/apis/hcApi.js +85 -183
- package/dist/apis/hcApi.js.map +1 -1
- package/dist/components/HireControlMap.js +10 -5
- package/dist/components/HireControlMap.js.map +1 -1
- package/dist/components/modules/accordions/MapAccordionItem.js +10 -67
- package/dist/components/modules/accordions/MapAccordionItem.js.map +1 -1
- package/dist/components/modules/filter/index.js.map +1 -1
- package/dist/components/modules/filter/radio-item.js +1 -2
- package/dist/components/modules/filter/radio-item.js.map +1 -1
- package/dist/components/modules/jobListing/listing-details-container.js +45 -0
- package/dist/components/modules/jobListing/listing-details-container.js.map +1 -0
- package/dist/components/modules/jobListing/listing-details.js +24 -24
- package/dist/components/modules/jobListing/listing-details.js.map +1 -1
- package/dist/components/modules/{maps/list → list}/field-mapper.js +8 -7
- package/dist/components/modules/list/field-mapper.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/header-item.js +2 -2
- package/dist/components/modules/list/header-item.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/header.js +6 -4
- package/dist/components/modules/list/header.js.map +1 -0
- package/dist/components/modules/list/index.js +36 -0
- package/dist/components/modules/list/index.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/index.js +3 -1
- package/dist/components/modules/list/item-expand-card/index.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-contact-nav.js +2 -2
- package/dist/components/modules/list/item-expand-card/recruiter-contact-nav.js.map +1 -0
- package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-details.js +1 -1
- package/dist/components/modules/list/item-expand-card/recruiter-details.js.map +1 -0
- package/dist/components/modules/list/item-expand-card/recruiter-headshot.js.map +1 -0
- package/dist/components/modules/list/item-list.js +28 -0
- package/dist/components/modules/list/item-list.js.map +1 -0
- package/dist/components/modules/list/list-item/index.js +75 -0
- package/dist/components/modules/list/list-item/index.js.map +1 -0
- package/dist/components/modules/list/list-item/list-item-container.js +47 -0
- package/dist/components/modules/list/list-item/list-item-container.js.map +1 -0
- package/dist/components/modules/{maps/list/list-item/index.js → list/list-item/list-item.js} +29 -33
- package/dist/components/modules/list/list-item/list-item.js.map +1 -0
- package/dist/components/modules/maps/map-list.js +3 -3
- package/dist/components/modules/maps/map-list.js.map +1 -1
- package/dist/contexts/mapContext.js +84 -113
- package/dist/contexts/mapContext.js.map +1 -1
- package/dist/contexts/mapListContext.js +181 -293
- package/dist/contexts/mapListContext.js.map +1 -1
- package/dist/contexts/trackEventContext.js +1 -1
- package/dist/services/configService.js +10 -28
- package/dist/services/configService.js.map +1 -1
- package/dist/services/googlePlacesNearbyService.js +33 -58
- package/dist/services/googlePlacesNearbyService.js.map +1 -1
- package/dist/services/listingAggregatorService.js +35 -75
- package/dist/services/listingAggregatorService.js.map +1 -1
- package/dist/services/listingEntityService.js +10 -31
- package/dist/services/listingEntityService.js.map +1 -1
- package/dist/services/listingService.js +26 -60
- package/dist/services/listingService.js.map +1 -1
- package/dist/services/recruiterService.js +11 -31
- package/dist/services/recruiterService.js.map +1 -1
- package/dist/types/apis/hcApi.d.ts +5 -0
- package/dist/types/clientToken.d.ts +2 -0
- package/dist/types/components/modules/accordions/MapAccordionItem.d.ts +9 -0
- package/dist/types/components/modules/accordions/default.d.ts +19 -0
- package/dist/types/components/modules/buttons/button-group-apply.d.ts +24 -0
- package/dist/types/components/modules/buttons/commute-pill.d.ts +5 -0
- package/dist/types/components/modules/buttons/default.d.ts +48 -0
- package/dist/types/components/modules/buttons/pill-wrapper.d.ts +3 -0
- package/dist/types/components/modules/dialogs/apply-dialog.d.ts +8 -0
- package/dist/types/components/modules/filter/sort.d.ts +8 -0
- package/dist/types/components/modules/grid.d.ts +8 -0
- package/dist/types/components/modules/icon.d.ts +10 -0
- package/dist/types/components/modules/jobListing/listing-details-container.d.ts +6 -0
- package/dist/types/components/modules/jobListing/listing-details.d.ts +18 -0
- package/dist/types/components/modules/list/field-mapper.d.ts +10 -0
- package/dist/types/components/modules/list/header-item.d.ts +11 -0
- package/dist/types/components/modules/list/header.d.ts +11 -0
- package/dist/types/components/modules/list/index.d.ts +9 -0
- package/dist/types/components/modules/list/item-expand-card/index.d.ts +7 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-contact-nav.d.ts +17 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-details.d.ts +21 -0
- package/dist/types/components/modules/list/item-expand-card/recruiter-headshot.d.ts +8 -0
- package/dist/types/components/modules/list/item-list.d.ts +21 -0
- package/dist/types/components/modules/list/list-item/index.d.ts +12 -0
- package/dist/types/components/modules/list/list-item/list-item-container.d.ts +14 -0
- package/dist/types/components/modules/list/list-item/list-item.d.ts +3 -0
- package/dist/types/constants/eventTypes.d.ts +13 -0
- package/dist/types/contexts/mapContext.d.ts +29 -0
- package/dist/types/contexts/mapListContext.d.ts +58 -0
- package/dist/types/contexts/trackEventContext.d.ts +6 -0
- package/dist/types/enums/SectionType.d.ts +9 -0
- package/dist/types/hooks/useList.d.ts +13 -0
- package/dist/types/services/configService.d.ts +6 -0
- package/dist/types/services/googlePlacesNearbyService.d.ts +5 -0
- package/dist/types/services/listingAggregatorService.d.ts +12 -0
- package/dist/types/services/listingEntityService.d.ts +6 -0
- package/dist/types/services/listingService.d.ts +9 -0
- package/dist/types/services/recruiterService.d.ts +6 -0
- package/dist/types/types/Address.d.ts +7 -0
- package/dist/types/types/ContentSection.d.ts +8 -0
- package/dist/types/types/GetListingParams.d.ts +8 -0
- package/dist/types/types/LatLng.d.ts +4 -0
- package/dist/types/types/ListingEntity.d.ts +10 -0
- package/dist/types/types/ListingFields.d.ts +20 -0
- package/dist/types/types/Listings.d.ts +31 -0
- package/dist/types/types/Recruiter.d.ts +9 -0
- package/dist/types/types/SimilarListing.d.ts +24 -0
- package/dist/types/types/config/Colors.d.ts +8 -0
- package/dist/types/types/config/MapConfig.d.ts +29 -0
- package/dist/types/types/config/PointsOfInterestConfig.d.ts +13 -0
- package/dist/types/types/config/SearchConfig.d.ts +4 -0
- package/dist/types/util/filterUtil.d.ts +28 -0
- package/dist/types/util/loading.d.ts +3 -0
- package/dist/types/util/localStorageUtil.d.ts +3 -0
- package/dist/types/util/mapUtil.d.ts +15 -0
- package/dist/types/util/sortUtil.d.ts +1 -0
- package/dist/types/util/stringUtils.d.ts +1 -0
- package/dist/util/filterUtil.js +1 -3
- package/dist/util/filterUtil.js.map +1 -1
- package/dist/util/localStorageUtil.js +37 -28
- package/dist/util/localStorageUtil.js.map +1 -1
- package/dist/util/mapUtil.js.map +1 -1
- package/package.json +23 -17
- package/rollup.config.mjs +23 -19
- package/src/apis/{hcApi.js → hcApi.ts} +27 -11
- package/src/components/HireControlMap.js +132 -129
- package/src/components/modules/accordions/MapAccordionItem.js +32 -74
- package/src/components/modules/filter/index.js +89 -89
- package/src/components/modules/filter/radio-item.js +0 -1
- package/src/components/modules/jobListing/listing-details-container.js +40 -0
- package/src/components/modules/jobListing/listing-details.js +209 -99
- package/src/components/modules/{maps/list → list}/field-mapper.js +114 -112
- package/src/components/modules/{maps/list → list}/header.js +49 -47
- package/src/components/modules/list/index.tsx +83 -0
- package/src/components/modules/{maps/list → list}/item-expand-card/index.js +24 -22
- package/src/components/modules/list/item-list.tsx +198 -0
- package/src/components/modules/list/list-item/index.js +70 -0
- package/src/components/modules/list/list-item/list-item-container.js +43 -0
- package/src/components/modules/{maps/list/list-item/index.js → list/list-item/list-item.js} +32 -38
- package/src/components/modules/maps/map-list.js +74 -74
- package/src/contexts/mapContext.tsx +129 -0
- package/src/contexts/mapListContext.tsx +297 -0
- package/src/enums/SectionType.ts +9 -0
- package/src/services/{configService.js → configService.ts} +16 -16
- package/src/services/{googlePlacesNearbyService.js → googlePlacesNearbyService.ts} +11 -2
- package/src/services/listingAggregatorService.ts +76 -0
- package/src/services/listingEntityService.ts +16 -0
- package/src/services/listingService.ts +40 -0
- package/src/services/{recruiterService.js → recruiterService.ts} +18 -17
- package/src/types/Address.ts +7 -0
- package/src/types/ContentSection.ts +9 -0
- package/src/types/GetListingParams.ts +8 -0
- package/src/types/LatLng.ts +4 -0
- package/src/types/ListingEntity.ts +11 -0
- package/src/types/ListingFields.ts +20 -0
- package/src/types/Listings.ts +32 -0
- package/src/types/Recruiter.ts +9 -0
- package/src/types/SimilarListing.ts +24 -0
- package/src/types/config/Colors.ts +8 -0
- package/src/types/config/MapConfig.ts +30 -0
- package/src/types/config/PointsOfInterestConfig.ts +13 -0
- package/src/types/config/SearchConfig.ts +4 -0
- package/src/util/filterUtil.js +239 -239
- package/src/util/localStorageUtil.ts +34 -0
- package/src/util/mapUtil.js +91 -91
- package/tsconfig.json +23 -0
- package/dist/components/modules/maps/list/field-mapper.js.map +0 -1
- package/dist/components/modules/maps/list/header-item.js.map +0 -1
- package/dist/components/modules/maps/list/header.js.map +0 -1
- package/dist/components/modules/maps/list/index.js +0 -102
- package/dist/components/modules/maps/list/index.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/index.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-contact-nav.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-details.js.map +0 -1
- package/dist/components/modules/maps/list/item-expand-card/recruiter-headshot.js.map +0 -1
- package/dist/components/modules/maps/list/list-item/index.js.map +0 -1
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js +0 -372
- package/dist/services/_virtual/_rollupPluginBabelHelpers.js.map +0 -1
- package/dist/services/apis/hcApi.js +0 -189
- package/dist/services/apis/hcApi.js.map +0 -1
- package/dist/services/clientToken.js +0 -7
- package/dist/services/clientToken.js.map +0 -1
- package/dist/services/styles/index.css +0 -3
- package/src/components/modules/maps/list/index.js +0 -112
- package/src/contexts/mapContext.js +0 -101
- package/src/contexts/mapListContext.js +0 -242
- package/src/services/listingAggregatorService.js +0 -50
- package/src/services/listingEntityService.js +0 -15
- package/src/services/listingService.js +0 -26
- package/src/util/localStorageUtil.js +0 -27
- /package/dist/components/modules/{maps/list → list}/item-expand-card/recruiter-headshot.js +0 -0
- /package/src/components/modules/{maps/list → list}/header-item.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-contact-nav.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-details.js +0 -0
- /package/src/components/modules/{maps/list → list}/item-expand-card/recruiter-headshot.js +0 -0
|
@@ -1,33 +1,15 @@
|
|
|
1
|
-
import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import api from '../apis/hcApi.js';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
response = _context.sent;
|
|
15
|
-
return _context.abrupt("return", response);
|
|
16
|
-
case 7:
|
|
17
|
-
_context.prev = 7;
|
|
18
|
-
_context.t0 = _context["catch"](0);
|
|
19
|
-
console.error("Error retrieving map configuration:", _context.t0);
|
|
20
|
-
throw _context.t0;
|
|
21
|
-
case 11:
|
|
22
|
-
case "end":
|
|
23
|
-
return _context.stop();
|
|
24
|
-
}
|
|
25
|
-
}, _callee, null, [[0, 7]]);
|
|
26
|
-
}));
|
|
27
|
-
return function getMapConfig() {
|
|
28
|
-
return _ref.apply(this, arguments);
|
|
29
|
-
};
|
|
30
|
-
}();
|
|
3
|
+
const getMapConfig = async () => {
|
|
4
|
+
try {
|
|
5
|
+
const response = await api.get(`/MapConfig`);
|
|
6
|
+
return response;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
console.error("Error retrieving map configuration:", error);
|
|
10
|
+
throw error;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
31
13
|
|
|
32
14
|
export { getMapConfig };
|
|
33
15
|
//# sourceMappingURL=configService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configService.js","sources":["../../src/services/configService.
|
|
1
|
+
{"version":3,"file":"configService.js","sources":["../../src/services/configService.ts"],"sourcesContent":["import api from '~/apis/hcApi';\nimport { MapConfig } from '~/types/config/MapConfig';\n\nexport const getMapConfig = async (): Promise<MapConfig> => {\n\ttry {\n\t\tconst response = await api.get<MapConfig>(`/MapConfig`);\n\t\treturn response;\n\t} catch (error) {\n\t\tconsole.error(\"Error retrieving map configuration:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default {\n\tgetMapConfig\n};\n"],"names":[],"mappings":";;AAGa,MAAA,YAAY,GAAG,YAA+B;IAC1D,IAAI;QACH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAY,CAAY,UAAA,CAAA,CAAC,CAAC;AACxD,QAAA,OAAO,QAAQ,CAAC;AAChB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;AAC5D,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -1,61 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (response.ok) {
|
|
35
|
-
_context.next = 9;
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
throw new Error("HTTP error! status: ".concat(response.status));
|
|
39
|
-
case 9:
|
|
40
|
-
_context.next = 11;
|
|
41
|
-
return response.json();
|
|
42
|
-
case 11:
|
|
43
|
-
return _context.abrupt("return", _context.sent);
|
|
44
|
-
case 14:
|
|
45
|
-
_context.prev = 14;
|
|
46
|
-
_context.t0 = _context["catch"](3);
|
|
47
|
-
console.error('Error making the Nearby Search request:', _context.t0);
|
|
48
|
-
throw _context.t0;
|
|
49
|
-
case 18:
|
|
50
|
-
case "end":
|
|
51
|
-
return _context.stop();
|
|
52
|
-
}
|
|
53
|
-
}, _callee, null, [[3, 14]]);
|
|
54
|
-
}));
|
|
55
|
-
return function searchNearbyPlaces(_x, _x2, _x3) {
|
|
56
|
-
return _ref.apply(this, arguments);
|
|
57
|
-
};
|
|
58
|
-
}();
|
|
1
|
+
const searchNearbyPlaces = async (typesArray, location, radius) => {
|
|
2
|
+
const url = 'https://places.googleapis.com/v1/places:searchNearby';
|
|
3
|
+
const headers = {
|
|
4
|
+
'Content-Type': 'application/json',
|
|
5
|
+
'X-Goog-Api-Key': "AIzaSyAXPlfaoMCrmjNV1u-vFYdLBi7GkGeh4S4",
|
|
6
|
+
'X-Goog-FieldMask': 'places.location,places.displayName,places.types'
|
|
7
|
+
};
|
|
8
|
+
const data = {
|
|
9
|
+
includedTypes: typesArray,
|
|
10
|
+
maxResultCount: 20,
|
|
11
|
+
locationRestriction: {
|
|
12
|
+
circle: {
|
|
13
|
+
center: location,
|
|
14
|
+
radius: radius
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
try {
|
|
19
|
+
const response = await fetch(url, {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
headers: headers,
|
|
22
|
+
body: JSON.stringify(data)
|
|
23
|
+
});
|
|
24
|
+
if (!response.ok) {
|
|
25
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
26
|
+
}
|
|
27
|
+
return await response.json();
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error('Error making the Nearby Search request:', error);
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
59
34
|
|
|
60
35
|
export { searchNearbyPlaces };
|
|
61
36
|
//# sourceMappingURL=googlePlacesNearbyService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"googlePlacesNearbyService.js","sources":["../../src/services/googlePlacesNearbyService.
|
|
1
|
+
{"version":3,"file":"googlePlacesNearbyService.js","sources":["../../src/services/googlePlacesNearbyService.ts"],"sourcesContent":["export interface Location {\r\n\tlatitude: number;\r\n\tlongitude: number;\r\n}\r\n\r\nexport const searchNearbyPlaces = async (\r\n\ttypesArray: string[],\r\n\tlocation: Location,\r\n\tradius: number\r\n): Promise<any> => {\r\n\tconst url = 'https://places.googleapis.com/v1/places:searchNearby';\r\n\tconst headers = {\r\n\t\t'Content-Type': 'application/json',\r\n\t\t'X-Goog-Api-Key': process.env.GOOGLE_MAPS_API_KEY as string,\r\n\t\t'X-Goog-FieldMask': 'places.location,places.displayName,places.types'\r\n\t};\r\n\tconst data = {\r\n\t\tincludedTypes: typesArray,\r\n\t\tmaxResultCount: 20,\r\n\t\tlocationRestriction: {\r\n\t\t\tcircle: {\r\n\t\t\t\tcenter: location,\r\n\t\t\t\tradius: radius\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\ttry {\r\n\t\tconst response = await fetch(url, {\r\n\t\t\tmethod: 'POST',\r\n\t\t\theaders: headers,\r\n\t\t\tbody: JSON.stringify(data)\r\n\t\t});\r\n\t\tif (!response.ok) {\r\n\t\t\tthrow new Error(`HTTP error! status: ${response.status}`);\r\n\t\t}\r\n\t\treturn await response.json();\r\n\t} catch (error) {\r\n\t\tconsole.error('Error making the Nearby Search request:', error);\r\n\t\tthrow error;\r\n\t}\r\n};\r\n"],"names":[],"mappings":"AAKO,MAAM,kBAAkB,GAAG,OACjC,UAAoB,EACpB,QAAkB,EAClB,MAAc,KACG;IACjB,MAAM,GAAG,GAAG,sDAAsD,CAAC;AACnE,IAAA,MAAM,OAAO,GAAG;AACf,QAAA,cAAc,EAAE,kBAAkB;AAClC,QAAA,gBAAgB,EAAE,yCAAyC;AAC3D,QAAA,kBAAkB,EAAE,iDAAiD;KACrE,CAAC;AACF,IAAA,MAAM,IAAI,GAAG;AACZ,QAAA,aAAa,EAAE,UAAU;AACzB,QAAA,cAAc,EAAE,EAAE;AAClB,QAAA,mBAAmB,EAAE;AACpB,YAAA,MAAM,EAAE;AACP,gBAAA,MAAM,EAAE,QAAQ;AAChB,gBAAA,MAAM,EAAE,MAAM;AACd,aAAA;AACD,SAAA;KACD,CAAC;IAEF,IAAI;AACH,QAAA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;AACjC,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;AAC1B,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,CAAA,oBAAA,EAAuB,QAAQ,CAAC,MAAM,CAAE,CAAA,CAAC,CAAC;AAC1D,SAAA;AACD,QAAA,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;AAC7B,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;AAChE,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -1,83 +1,43 @@
|
|
|
1
|
-
import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime, toConsumableArray as _toConsumableArray } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import { getListings } from './listingService.js';
|
|
3
2
|
import { getRecruiters } from './recruiterService.js';
|
|
4
3
|
import { getListingEntities } from './listingEntityService.js';
|
|
5
4
|
import { getDistinctItemsByProximity } from '../util/mapUtil.js';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return getListingEntities(distinctEntityIds);
|
|
43
|
-
case 13:
|
|
44
|
-
_context.t0 = _context.sent;
|
|
45
|
-
_context.next = 19;
|
|
46
|
-
break;
|
|
47
|
-
case 16:
|
|
48
|
-
_context.next = 18;
|
|
49
|
-
return getListingEntities(distinctEntityIds, "".concat(commuteLocation.lat, ", ").concat(commuteLocation.lng));
|
|
50
|
-
case 18:
|
|
51
|
-
_context.t0 = _context.sent;
|
|
52
|
-
case 19:
|
|
53
|
-
fetchedEntities = _context.t0;
|
|
54
|
-
for (i = 0; i < listingsResult.length; i++) {
|
|
55
|
-
if (listingsResult[i].entityId != -1) {
|
|
56
|
-
listingsResult[i].fields.travelTime = fetchedEntities[listingsResult[i].entityId].travelTime;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
distinctItems = getDistinctItemsByProximity(listingsResult, fetchedEntities);
|
|
60
|
-
return _context.abrupt("return", {
|
|
61
|
-
listingsResult: listingsResult,
|
|
62
|
-
fetchedRecruiters: fetchedRecruiters,
|
|
63
|
-
fetchedEntities: fetchedEntities,
|
|
64
|
-
distinctItems: distinctItems
|
|
65
|
-
});
|
|
66
|
-
case 25:
|
|
67
|
-
_context.prev = 25;
|
|
68
|
-
_context.t1 = _context["catch"](1);
|
|
69
|
-
console.error("Error fetching listings:", _context.t1);
|
|
70
|
-
throw _context.t1;
|
|
71
|
-
case 29:
|
|
72
|
-
case "end":
|
|
73
|
-
return _context.stop();
|
|
74
|
-
}
|
|
75
|
-
}, _callee, null, [[1, 25]]);
|
|
76
|
-
}));
|
|
77
|
-
return function fetchListings(_x, _x2) {
|
|
78
|
-
return _ref.apply(this, arguments);
|
|
79
|
-
};
|
|
80
|
-
}();
|
|
6
|
+
const fetchListings = async (query, siteConfig, commuteLocation = null) => {
|
|
7
|
+
try {
|
|
8
|
+
const listingsResult = await getListings();
|
|
9
|
+
const recruiterIds = [
|
|
10
|
+
...new Set(listingsResult.map(listing => listing.recruiterId))
|
|
11
|
+
];
|
|
12
|
+
const fetchedRecruiters = await getRecruiters(recruiterIds);
|
|
13
|
+
const distinctEntityIds = [
|
|
14
|
+
...new Set(listingsResult.map(listing => listing.entityId))
|
|
15
|
+
];
|
|
16
|
+
const fetchedEntities = !commuteLocation
|
|
17
|
+
? await getListingEntities(distinctEntityIds)
|
|
18
|
+
: await getListingEntities(distinctEntityIds, `${commuteLocation.lat}, ${commuteLocation.lng}`);
|
|
19
|
+
for (let i = 0; i < listingsResult.length; i++) {
|
|
20
|
+
const listing = listingsResult[i];
|
|
21
|
+
if (listing.entityId && listing.entityId !== -1 && listing.fields) {
|
|
22
|
+
const entity = fetchedEntities[listing.entityId];
|
|
23
|
+
if (entity) {
|
|
24
|
+
listing.fields.travelTime = entity.travelTime;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
const distinctItems = getDistinctItemsByProximity(listingsResult, fetchedEntities);
|
|
29
|
+
return {
|
|
30
|
+
listingsResult,
|
|
31
|
+
fetchedRecruiters,
|
|
32
|
+
fetchedEntities,
|
|
33
|
+
distinctItems
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
console.error("Error fetching listings:", error);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
81
41
|
|
|
82
42
|
export { fetchListings as default };
|
|
83
43
|
//# sourceMappingURL=listingAggregatorService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listingAggregatorService.js","sources":["../../src/services/listingAggregatorService.
|
|
1
|
+
{"version":3,"file":"listingAggregatorService.js","sources":["../../src/services/listingAggregatorService.ts"],"sourcesContent":["import { getListings } from '~/services/listingService';\nimport { getRecruiters } from '~/services/recruiterService';\nimport { getListingEntities } from '~/services/listingEntityService';\n\nimport { getDistinctItemsByProximity } from '~/util/mapUtil';\nimport { Listing } from '~/types/Listings';\nimport { Recruiter } from '~/types/Recruiter';\nimport { ListingEntity } from '~/types/ListingEntity';\nimport { MapConfig } from '~/types/config/MapConfig';\n//import { ICommuteLocation } from '~/interfaces/ICommute';\n\ninterface SiteConfig {\n companyId: number;\n}\n\ninterface FetchListingsResult {\n listingsResult: Listing[];\n fetchedRecruiters: Recruiter[];\n fetchedEntities: Record<number, ListingEntity>;\n distinctItems: any; // Update this type based on the return type of getDistinctItemsByProximity\n}\n\nconst fetchListings = async (\n\tquery: string,\n\tsiteConfig: MapConfig,\n\tcommuteLocation: any | null = null\n): Promise<FetchListingsResult> => {\n\ttry {\n\t\tconst listingsResult = await getListings(\n\n\t\t);\n\n\t\tconst recruiterIds: number[] = [\n\t\t\t...new Set(listingsResult.map(listing => listing.recruiterId))\n\t\t] as number[];\n\n\t\tconst fetchedRecruiters = await getRecruiters(recruiterIds);\n\n\t\tconst distinctEntityIds: number[] = [\n\t\t\t...new Set(listingsResult.map(listing => listing.entityId))\n\t\t] as number[];\n\n\t\tconst fetchedEntities = !commuteLocation\n\t\t\t? await getListingEntities(distinctEntityIds)\n\t\t\t: await getListingEntities(\n\t\t\t\tdistinctEntityIds,\n\t\t\t\t`${commuteLocation.lat}, ${commuteLocation.lng}`\n\t\t\t);\n\t\tfor (let i = 0; i < listingsResult.length; i++) {\n\t\t\tconst listing = listingsResult[i];\n\t\t\tif (listing.entityId && listing.entityId !== -1 && listing.fields) {\n\t\t\t\tconst entity = fetchedEntities[listing.entityId];\n\t\t\t\tif (entity) {\n\t\t\t\t\tlisting.fields.travelTime = entity.travelTime;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst distinctItems = getDistinctItemsByProximity(\n\t\t\tlistingsResult,\n\t\t\tfetchedEntities\n\t\t);\n\n\t\treturn {\n\t\t\tlistingsResult,\n\t\t\tfetchedRecruiters,\n\t\t\tfetchedEntities,\n\t\t\tdistinctItems\n\t\t};\n\t} catch (error) {\n\t\tconsole.error(\"Error fetching listings:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default fetchListings;\n"],"names":[],"mappings":";;;;;AAsBM,MAAA,aAAa,GAAG,OACrB,KAAa,EACb,UAAqB,EACrB,eAAA,GAA8B,IAAI,KACD;IACjC,IAAI;AACH,QAAA,MAAM,cAAc,GAAG,MAAM,WAAW,EAEvC,CAAC;AAEF,QAAA,MAAM,YAAY,GAAa;AAC9B,YAAA,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC;SAClD,CAAC;AAEd,QAAA,MAAM,iBAAiB,GAAG,MAAM,aAAa,CAAC,YAAY,CAAC,CAAC;AAE5D,QAAA,MAAM,iBAAiB,GAAa;AACnC,YAAA,GAAG,IAAI,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC;SAC/C,CAAC;QAEd,MAAM,eAAe,GAAG,CAAC,eAAe;AACvC,cAAE,MAAM,kBAAkB,CAAC,iBAAiB,CAAC;AAC7C,cAAE,MAAM,kBAAkB,CACzB,iBAAiB,EACjB,CAAG,EAAA,eAAe,CAAC,GAAG,KAAK,eAAe,CAAC,GAAG,CAAA,CAAE,CAChD,CAAC;AACH,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/C,YAAA,MAAM,OAAO,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;AAClC,YAAA,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClE,MAAM,MAAM,GAAG,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjD,gBAAA,IAAI,MAAM,EAAE;oBACX,OAAO,CAAC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC9C,iBAAA;AACD,aAAA;AACD,SAAA;QAED,MAAM,aAAa,GAAG,2BAA2B,CAChD,cAAc,EACd,eAAe,CACf,CAAC;QAEF,OAAO;YACN,cAAc;YACd,iBAAiB;YACjB,eAAe;YACf,aAAa;SACb,CAAC;AACF,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,KAAK,CAAC,CAAC;AACjD,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
-
import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import api from '../apis/hcApi.js';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
_context.next = 4;
|
|
15
|
-
return api.post("/ListingEntities?origin=".concat(origin), entityIds);
|
|
16
|
-
case 4:
|
|
17
|
-
response = _context.sent;
|
|
18
|
-
return _context.abrupt("return", response);
|
|
19
|
-
case 8:
|
|
20
|
-
_context.prev = 8;
|
|
21
|
-
_context.t0 = _context["catch"](1);
|
|
22
|
-
console.error("Error fetching listing entities:", _context.t0);
|
|
23
|
-
throw _context.t0;
|
|
24
|
-
case 12:
|
|
25
|
-
case "end":
|
|
26
|
-
return _context.stop();
|
|
27
|
-
}
|
|
28
|
-
}, _callee, null, [[1, 8]]);
|
|
29
|
-
}));
|
|
30
|
-
return function getListingEntities(_x) {
|
|
31
|
-
return _ref.apply(this, arguments);
|
|
32
|
-
};
|
|
33
|
-
}();
|
|
3
|
+
const getListingEntities = async (entityIds, origin = '') => {
|
|
4
|
+
try {
|
|
5
|
+
const response = await api.post(`/ListingEntities?origin=${origin}`, entityIds);
|
|
6
|
+
return response;
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
console.error("Error fetching listing entities:", error);
|
|
10
|
+
throw error;
|
|
11
|
+
}
|
|
12
|
+
};
|
|
34
13
|
|
|
35
14
|
export { getListingEntities };
|
|
36
15
|
//# sourceMappingURL=listingEntityService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listingEntityService.js","sources":["../../src/services/listingEntityService.
|
|
1
|
+
{"version":3,"file":"listingEntityService.js","sources":["../../src/services/listingEntityService.ts"],"sourcesContent":["import api from '~/apis/hcApi';\nimport { ListingEntity } from '~/types/ListingEntity';\n\nexport const getListingEntities = async (entityIds: number[], origin = ''): Promise<ListingEntity[]> => {\n\ttry {\n\t\tconst response = await api.post<ListingEntity[]>(`/ListingEntities?origin=${origin}`, entityIds);\n\t\treturn response;\n\t} catch (error) {\n\t\tconsole.error(\"Error fetching listing entities:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default {\n\tgetListingEntities\n};\n"],"names":[],"mappings":";;AAGO,MAAM,kBAAkB,GAAG,OAAO,SAAmB,EAAE,MAAM,GAAG,EAAE,KAA8B;IACtG,IAAI;AACH,QAAA,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,IAAI,CAAkB,CAAA,wBAAA,EAA2B,MAAM,CAAA,CAAE,EAAE,SAAS,CAAC,CAAC;AACjG,QAAA,OAAO,QAAQ,CAAC;AAChB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;AACzD,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -1,64 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import api from './apis/hcApi.js';
|
|
1
|
+
import api from '../apis/hcApi.js';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return _ref.apply(this, arguments);
|
|
29
|
-
};
|
|
30
|
-
}();
|
|
31
|
-
var getListingDetails = /*#__PURE__*/function () {
|
|
32
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(listingId) {
|
|
33
|
-
var response;
|
|
34
|
-
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
35
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
36
|
-
case 0:
|
|
37
|
-
_context2.prev = 0;
|
|
38
|
-
_context2.next = 3;
|
|
39
|
-
return api.get("/ListingDetails/".concat(listingId));
|
|
40
|
-
case 3:
|
|
41
|
-
response = _context2.sent;
|
|
42
|
-
return _context2.abrupt("return", response);
|
|
43
|
-
case 7:
|
|
44
|
-
_context2.prev = 7;
|
|
45
|
-
_context2.t0 = _context2["catch"](0);
|
|
46
|
-
console.error(_context2.t0);
|
|
47
|
-
throw _context2.t0;
|
|
48
|
-
case 11:
|
|
49
|
-
case "end":
|
|
50
|
-
return _context2.stop();
|
|
51
|
-
}
|
|
52
|
-
}, _callee2, null, [[0, 7]]);
|
|
53
|
-
}));
|
|
54
|
-
return function getListingDetails(_x) {
|
|
55
|
-
return _ref2.apply(this, arguments);
|
|
56
|
-
};
|
|
57
|
-
}();
|
|
58
|
-
var listingService = {
|
|
59
|
-
getListings: getListings,
|
|
60
|
-
getListingDetails: getListingDetails
|
|
3
|
+
const getListings = async (params) => {
|
|
4
|
+
try {
|
|
5
|
+
const query = new URLSearchParams();
|
|
6
|
+
if (params) {
|
|
7
|
+
if (params.location)
|
|
8
|
+
params.location.forEach(loc => query.append('location', loc));
|
|
9
|
+
if (params.category)
|
|
10
|
+
params.category.forEach(cat => query.append('category', cat));
|
|
11
|
+
if (params.categoryClass)
|
|
12
|
+
params.categoryClass.forEach(catClass => query.append('categoryClass', catClass));
|
|
13
|
+
if (params.education)
|
|
14
|
+
params.education.forEach(edu => query.append('education', edu));
|
|
15
|
+
if (params.city)
|
|
16
|
+
params.city.forEach(cty => query.append('city', cty));
|
|
17
|
+
if (params.state)
|
|
18
|
+
params.state.forEach(st => query.append('state', st));
|
|
19
|
+
}
|
|
20
|
+
const response = await api.get(`/Listings?${query.toString()}`);
|
|
21
|
+
return response;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error(error);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
61
27
|
};
|
|
62
28
|
|
|
63
|
-
export {
|
|
29
|
+
export { getListings };
|
|
64
30
|
//# sourceMappingURL=listingService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listingService.js","sources":["../../src/services/listingService.
|
|
1
|
+
{"version":3,"file":"listingService.js","sources":["../../src/services/listingService.ts"],"sourcesContent":["// listingService.ts\nimport { GetListingsParams } from '~/types/GetListingParams';\nimport api from '../apis/hcApi';\nimport { Listing } from '../types/Listings';\n\nexport const getListings = async (params?: GetListingsParams): Promise<Listing[]> => {\n\ttry {\n\t\tconst query = new URLSearchParams();\n\n\t\tif (params) {\n\t\t\tif (params.location) params.location.forEach(loc => query.append('location', loc));\n\t\t\tif (params.category) params.category.forEach(cat => query.append('category', cat));\n\t\t\tif (params.categoryClass) params.categoryClass.forEach(catClass => query.append('categoryClass', catClass));\n\t\t\tif (params.education) params.education.forEach(edu => query.append('education', edu));\n\t\t\tif (params.city) params.city.forEach(cty => query.append('city', cty));\n\t\t\tif (params.state) params.state.forEach(st => query.append('state', st));\n\t\t}\n\n\t\tconst response = await api.get(`/Listings?${query.toString()}`);\n\t\treturn response as Listing[];\n\t} catch (error) {\n\t\tconsole.error(error);\n\t\tthrow error;\n\t}\n};\n\nexport const getListingDetails = async (listingId: string) => {\n\ttry {\n\t\tconst response = await api.get(`/ListingDetails/${listingId}`);\n\t\treturn response;\n\t} catch (error) {\n\t\tconsole.error(error);\n\t\tthrow error;\n\t}\n};\n\nexport default {\n\tgetListings,\n\tgetListingDetails\n};\n"],"names":[],"mappings":";;MAKa,WAAW,GAAG,OAAO,MAA0B,KAAwB;IACnF,IAAI;AACH,QAAA,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;AAEpC,QAAA,IAAI,MAAM,EAAE;YACX,IAAI,MAAM,CAAC,QAAQ;AAAE,gBAAA,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;YACnF,IAAI,MAAM,CAAC,QAAQ;AAAE,gBAAA,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,CAAC;YACnF,IAAI,MAAM,CAAC,aAAa;AAAE,gBAAA,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC;YAC5G,IAAI,MAAM,CAAC,SAAS;AAAE,gBAAA,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,CAAC;YACtF,IAAI,MAAM,CAAC,IAAI;AAAE,gBAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;YACvE,IAAI,MAAM,CAAC,KAAK;AAAE,gBAAA,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AACxE,SAAA;AAED,QAAA,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,CAAa,UAAA,EAAA,KAAK,CAAC,QAAQ,EAAE,CAAA,CAAE,CAAC,CAAC;AAChE,QAAA,OAAO,QAAqB,CAAC;AAC7B,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACrB,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
import { asyncToGenerator as _asyncToGenerator, regeneratorRuntime as _regeneratorRuntime } from '../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import api from '../apis/hcApi.js';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return api.get("/Recruiters?".concat(params));
|
|
16
|
-
case 4:
|
|
17
|
-
response = _context.sent;
|
|
18
|
-
return _context.abrupt("return", response.data);
|
|
19
|
-
case 8:
|
|
20
|
-
_context.prev = 8;
|
|
21
|
-
_context.t0 = _context["catch"](0);
|
|
22
|
-
console.error("Error fetching recruiters:", _context.t0);
|
|
23
|
-
throw _context.t0;
|
|
24
|
-
case 12:
|
|
25
|
-
case "end":
|
|
26
|
-
return _context.stop();
|
|
27
|
-
}
|
|
28
|
-
}, _callee, null, [[0, 8]]);
|
|
29
|
-
}));
|
|
30
|
-
return function getRecruiters(_x) {
|
|
31
|
-
return _ref.apply(this, arguments);
|
|
32
|
-
};
|
|
33
|
-
}();
|
|
3
|
+
const getRecruiters = async (recruiterIds) => {
|
|
4
|
+
try {
|
|
5
|
+
const params = recruiterIds.map(id => `recruiterIds=${id}`).join("&");
|
|
6
|
+
const response = await api.get(`/Recruiters?${params}`);
|
|
7
|
+
return response;
|
|
8
|
+
}
|
|
9
|
+
catch (error) {
|
|
10
|
+
console.error("Error fetching recruiters:", error);
|
|
11
|
+
throw error;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
34
14
|
|
|
35
15
|
export { getRecruiters };
|
|
36
16
|
//# sourceMappingURL=recruiterService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recruiterService.js","sources":["../../src/services/recruiterService.
|
|
1
|
+
{"version":3,"file":"recruiterService.js","sources":["../../src/services/recruiterService.ts"],"sourcesContent":["import api from '~/apis/hcApi';\nimport { Recruiter } from '~/types/Recruiter';\n\nexport const getRecruiters = async (recruiterIds: number[]): Promise<Recruiter[]> => {\n\ttry {\n\t\tconst params = recruiterIds.map(id => `recruiterIds=${id}`).join(\"&\");\n\n\t\tconst response = await api.get<Recruiter[]>(`/Recruiters?${params}`);\n\t\treturn response;\n\t} catch (error) {\n\t\tconsole.error(\"Error fetching recruiters:\", error);\n\t\tthrow error;\n\t}\n};\n\nexport default {\n\tgetRecruiters\n};\n"],"names":[],"mappings":";;MAGa,aAAa,GAAG,OAAO,YAAsB,KAA0B;IACnF,IAAI;AACH,QAAA,MAAM,MAAM,GAAG,YAAY,CAAC,GAAG,CAAC,EAAE,IAAI,CAAgB,aAAA,EAAA,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEtE,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAc,CAAe,YAAA,EAAA,MAAM,CAAE,CAAA,CAAC,CAAC;AACrE,QAAA,OAAO,QAAQ,CAAC;AAChB,KAAA;AAAC,IAAA,OAAO,KAAK,EAAE;AACf,QAAA,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;AACnD,QAAA,MAAM,KAAK,CAAC;AACZ,KAAA;AACF;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default MapAccordionItem;
|
|
2
|
+
declare function MapAccordionItem({ item, itemRefs, itemExpandedContent, isActive, children }: {
|
|
3
|
+
item: any;
|
|
4
|
+
itemRefs: any;
|
|
5
|
+
itemExpandedContent: any;
|
|
6
|
+
isActive: any;
|
|
7
|
+
children: any;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
import React from "react";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export const AccordionItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
2
|
+
export const AccordionTrigger: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
3
|
+
export const AccordionTriggerHasHeader: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
4
|
+
export const AccordionTriggerBlank: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
5
|
+
export const AccordionContent: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
6
|
+
export default Accordion;
|
|
7
|
+
import React from "react";
|
|
8
|
+
declare function Accordion({ className, type, defaultValue, collapsible, children }: {
|
|
9
|
+
className: any;
|
|
10
|
+
type?: string | undefined;
|
|
11
|
+
defaultValue: any;
|
|
12
|
+
collapsible?: boolean | undefined;
|
|
13
|
+
children: any;
|
|
14
|
+
}): React.JSX.Element;
|
|
15
|
+
declare namespace Accordion {
|
|
16
|
+
export { AccordionItem as Item };
|
|
17
|
+
export { AccordionTrigger as Trigger };
|
|
18
|
+
export { AccordionContent as Content };
|
|
19
|
+
}
|