@abcagency/hc-ui-components 1.3.98 → 1.3.99

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.
@@ -12,11 +12,6 @@ const getListings = async (params) => {
12
12
  // if (params.state) params.state.forEach(st => query.append('state', st));
13
13
  // }
14
14
  const response = await api.get(`/joblistings/maplistings`);
15
- for (var i = 0; i < response.length; i++) {
16
- response[i].fields.position = response[i].fields.title;
17
- response[i].fields.categoryClass = response[i].fields.category;
18
- response[i].fields.category = response[i].fields.subCategory;
19
- }
20
15
  return response;
21
16
  }
22
17
  catch (error) {
@@ -1 +1 @@
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\t// const query = new URLSearchParams();\n\n\t\t// if (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(`/joblistings/maplistings`);\n\t\tfor(var i = 0; i < (response as any).length; i++) {\n\n\t\t\t(response as any)[i].fields.position = (response as any)[i].fields.title;\n\t\t\t\t(response as any)[i].fields.categoryClass = (response as any)[i].fields.category;\n\t\t\t\t\t\t(response as any)[i].fields.category = (response as any)[i].fields.subCategory;\n\n\n\t\t}\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;;;;;;;;;;QAYH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,CAA0B,wBAAA,CAAA,CAAC,CAAC;AAC3D,QAAA,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAI,QAAgB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAEhD,YAAA,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAAI,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AACvE,YAAA,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,GAAI,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC9E,YAAA,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,GAAI,QAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;AAGlF,SAAA;AACD,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
+ {"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\t// const query = new URLSearchParams();\n\n\t\t// if (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(`/joblistings/maplistings`);\n\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;;;;;;;;;;QAYH,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,CAA0B,wBAAA,CAAA,CAAC,CAAC;AAE3D,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abcagency/hc-ui-components",
3
- "version": "1.3.98",
3
+ "version": "1.3.99",
4
4
  "description": "UI Components for HireControl",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -17,14 +17,7 @@ export const getListings = async (params?: GetListingsParams): Promise<Listing[]
17
17
  // }
18
18
 
19
19
  const response = await api.get(`/joblistings/maplistings`);
20
- for(var i = 0; i < (response as any).length; i++) {
21
20
 
22
- (response as any)[i].fields.position = (response as any)[i].fields.title;
23
- (response as any)[i].fields.categoryClass = (response as any)[i].fields.category;
24
- (response as any)[i].fields.category = (response as any)[i].fields.subCategory;
25
-
26
-
27
- }
28
21
  return response as Listing[];
29
22
  } catch (error) {
30
23
  console.error(error);