Skip to content

Commit 5247483

Browse files
authored
Fix some bugs (#2274)
1 parent 172f412 commit 5247483

File tree

9 files changed

+16
-23
lines changed

9 files changed

+16
-23
lines changed

client/src/components/Admin/ParentOrganizations.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function ParentOrganizations(props) {
101101
setActiveOrg({
102102
code: "",
103103
name: "",
104-
TENANT_ID,
104+
tenantId: TENANT_ID,
105105
});
106106
};
107107

client/src/components/Admin/TagAdmin.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ function TagAdmin(props) {
100100
const handleAddNew = () => {
101101
setActiveTag({
102102
name: "",
103-
TENANT_ID,
103+
tenantId: TENANT_ID,
104104
});
105105
};
106106

client/src/components/FoodSeeker/SearchResults/ResultsFilters/ResultsFilters.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import useGeolocation, { useLocationPermission } from "hooks/useGeolocation";
1010
import PropTypes from "prop-types";
1111
import { useCallback, useEffect, useState } from "react";
1212
import * as analytics from "services/analytics";
13-
import { tenantDetails } from "../../../../helpers/Configuration";
1413
import CategoryButton from "./CategoryButton";
1514
import SwitchViewsButton from "./SwitchViewsButton";
1615
import useFeatureFlag from "hooks/useFeatureFlag";
@@ -19,6 +18,7 @@ import {
1918
useUserCoordinates,
2019
} from "../../../../appReducer";
2120
import { useMapbox } from "../../../../hooks/useMapbox";
21+
import { TENANT_CONFIG } from "../../../../helpers/Constants";
2222

2323
const ResultsFilters = ({
2424
categoryIds,
@@ -28,7 +28,7 @@ const ResultsFilters = ({
2828
}) => {
2929
const isMealsSelected = categoryIds.indexOf(MEAL_PROGRAM_CATEGORY_ID) >= 0;
3030
const isPantrySelected = categoryIds.indexOf(FOOD_PANTRY_CATEGORY_ID) >= 0;
31-
const { taglineText } = tenantDetails;
31+
const { taglineText } = TENANT_CONFIG;
3232
const { getUserLocation } = useGeolocation();
3333
const searchCoordinates = useSearchCoordinates();
3434
const userCoordinates = useUserCoordinates();

client/src/helpers/Configuration.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

client/src/services/logins-service.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { TENANT_ID } from "helpers/Constants";
33
const baseUrl = "/api/logins";
44

55
export const getAll = async (email = undefined) => {
6-
const response = await axios.get(baseUrl, { params: { email, TENANT_ID } });
6+
const response = await axios.get(baseUrl, {
7+
params: { email, tenantId: TENANT_ID },
8+
});
79

810
return response.data;
911
};

client/src/services/neighborhood-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { TENANT_ID } from "helpers/Constants";
44
const baseUrl = "/api/neighborhoods";
55

66
export const getAll = async (searchParams) => {
7-
const params = { ...searchParams, TENANT_ID };
7+
const params = { ...searchParams, tenantId: TENANT_ID };
88
try {
99
const response = await axios.get(baseUrl, {
1010
params,

client/src/services/parent-organization-service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export const getAllByTenantId = async () => {
1515
export const update = async (data) => {
1616
const response = await axios.put(`${baseUrl}/${data.id}`, {
1717
...data,
18-
TENANT_ID,
18+
tenantId: TENANT_ID,
1919
});
2020
return response.data;
2121
};
2222

2323
export const post = async (data) => {
2424
const response = await axios.post(`${baseUrl}`, {
2525
...data,
26-
TENANT_ID,
26+
tenantId: TENANT_ID,
2727
});
2828
return response.data;
2929
};

client/src/services/stakeholder-service.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { formatDate } from "helpers";
66
const baseUrl = "/api/stakeholders";
77

88
export const search = async (searchParams) => {
9-
searchParams = { ...searchParams, TENANT_ID } || { TENANT_ID };
9+
searchParams = { ...searchParams, tenantId: TENANT_ID };
1010

1111
const response = await axios.get(`${baseUrl}`, {
1212
params: searchParams,
@@ -44,7 +44,7 @@ export const getById = async (id) => {
4444
export const post = async (stakeholder) => {
4545
const response = await axios.post(baseUrl, {
4646
...stakeholder,
47-
TENANT_ID,
47+
tenantId: TENANT_ID,
4848
});
4949
return response.data;
5050
};
@@ -65,7 +65,7 @@ export const put = async (stakeholder) => {
6565
export const requestAssignment = async (loginId) => {
6666
const response = await axios.post(`${baseUrl}/requestAssignment`, {
6767
loginId,
68-
TENANT_ID,
68+
tenantId: TENANT_ID,
6969
});
7070
return response.data;
7171
};
@@ -74,7 +74,7 @@ export const checkAvailableAssignmentsAdmin = async () => {
7474
const response = await axios.get(
7575
`${baseUrl}/checkAvailableAssignmentsAdmin`,
7676
{
77-
params: { TENANT_ID },
77+
params: { tenantId: TENANT_ID },
7878
}
7979
);
8080
return response.data;

client/src/services/tag-service.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ export const getAllByTenantId = async () => {
1515
export const update = async (data) => {
1616
const response = await axios.put(`${baseUrl}/${data.id}`, {
1717
...data,
18-
TENANT_ID,
18+
tenantId: TENANT_ID,
1919
});
2020
return response.data;
2121
};
2222

2323
export const post = async (data) => {
2424
const response = await axios.post(`${baseUrl}`, {
2525
...data,
26-
TENANT_ID,
26+
tenantId: TENANT_ID,
2727
});
2828
return response.data;
2929
};

0 commit comments

Comments
 (0)