diff --git a/.eslintrc.js b/.eslintrc.js
index b679b6fa9..84311232b 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -16,4 +16,12 @@ module.exports = {
rules: {
"prettier/prettier": "error",
},
+ settings: {
+ react: {
+ // Version checking of react. Default is "detect", which
+ // fails at the root directory, since react is not installed
+ // here. Providing a dummy number supresses the warning
+ version: "16.0",
+ },
+ },
};
diff --git a/app/services/account-service.js b/app/services/account-service.js
index 0b269866d..199a246e4 100644
--- a/app/services/account-service.js
+++ b/app/services/account-service.js
@@ -402,7 +402,7 @@ const setPermissions = async (userId, permissionName, value) => {
try {
// do a tiny bit of sanity checking on our input
var booleanValue = Boolean(value);
- const updateSql = `update login set ${permissionName}=$1} where id = ${userId};`;
+ const updateSql = `update login set ${permissionName}=$1 where id = ${userId};`;
await pool.query(updateSql, [booleanValue]);
return {
success: true,
diff --git a/app/services/stakeholder-best-service.js b/app/services/stakeholder-best-service.js
index d56fc8ada..a9b94e653 100644
--- a/app/services/stakeholder-best-service.js
+++ b/app/services/stakeholder-best-service.js
@@ -12,6 +12,9 @@ record has been approved, it will be the most recent version (i.e., have
If you make changes to the database structure, be sure to update these
methods as well as the corresponding methods in the stakeholder-service.js.
+You can search by max/min lat, lng bounds or by a center and radius(distance),
+with bounds taking precedence.
+
*/
const booleanEitherClause = (columnName, value) => {
@@ -27,13 +30,16 @@ const search = async ({
latitude,
longitude,
distance,
+ maxLat,
+ maxLng,
+ minLat,
+ minLng,
isInactive,
verificationStatusId,
tenantId,
}) => {
const locationClause = buildLocationClause(latitude, longitude);
const categoryClause = buildCTEClause(categoryIds, "");
-
const sql = `${categoryClause}
select s.id, s.name, s.address_1, s.address_2, s.city, s.state, s.zip,
s.phone, s.latitude, s.longitude, s.website, s.notes,
@@ -62,16 +68,20 @@ const search = async ({
s.donation_delivery_instructions, s.donation_notes, s.covid_notes,
s.category_notes, s.eligibility_notes, s.food_types, s.languages,
s.v_name, s.v_categories, s.v_address, s.v_phone, s.v_email,
- s.v_hours, s.verification_status_id, s.inactive_temporary,
+ s.v_hours, s.v_food_types, s.verification_status_id, s.inactive_temporary,
array_to_json(s.hours) as hours, s.category_ids,
s.neighborhood_id, s.is_verified,
+ s.food_bakery, s.food_dry_goods, s.food_produce,
+ s.food_dairy, s.food_prepared, s.food_meat,
${locationClause ? `${locationClause} AS distance,` : ""}
${buildLoginSelectsClause()}
from stakeholder_set as s
${buildLoginJoinsClause()}
- where s.tenant_id = ${tenantId}
+ where s.tenant_id = ${tenantId}
${
- Number(distance) && locationClause
+ maxLat && maxLng && minLat && minLng
+ ? buildBounds({ maxLat, maxLng, minLat, minLng })
+ : Number(distance) && locationClause
? `AND ${locationClause} < ${distance}`
: ""
}
@@ -83,7 +93,6 @@ const search = async ({
}
order by distance
`;
- // console.log(sql);
let stakeholders = [];
let categoriesResults = [];
var stakeholderResult, stakeholder_ids;
@@ -173,6 +182,12 @@ const search = async ({
covidNotes: row.covid_notes || "",
categoryNotes: row.category_notes || "",
eligibilityNotes: row.eligibility_notes || "",
+ foodBakery: row.food_bakery,
+ foodDryGoods: row.food_dry_goods,
+ foodProduce: row.food_produce,
+ foodDairy: row.food_dairy,
+ foodPrepared: row.food_prepared,
+ foodMeat: row.food_meat,
foodTypes: row.food_types || "",
languages: row.languages || "",
confirmedName: row.v_name,
@@ -181,6 +196,7 @@ const search = async ({
confirmedPhone: row.v_phone,
confirmedEmail: row.v_email,
confirmedHours: row.v_hours,
+ confirmedFoodTypes: row.v_food_types,
verificationStatusId: row.verification_status_id,
inactiveTemporary: row.inactive_temporary,
neighborhoodId: row.neighborhood_id,
@@ -224,8 +240,10 @@ const selectById = async (id) => {
s.donation_delivery_instructions, s.donation_notes, s.covid_notes,
s.category_notes, s.eligibility_notes, s.food_types, s.languages,
s.v_name, s.v_categories, s.v_address, s.v_phone, s.v_email,
- s.v_hours, s.verification_status_id, s.inactive_temporary,
+ s.v_hours, s.v_food_types, s.verification_status_id, s.inactive_temporary,
s.neighborhood_id, s.is_verified,
+ s.food_bakery, s.food_dry_goods, s.food_produce,
+ s.food_dairy, s.food_prepared, s.food_meat,
${buildLoginSelectsClause()}
from stakeholder_best s
${buildLoginJoinsClause()}
@@ -296,6 +314,12 @@ const selectById = async (id) => {
covidNotes: row.covid_notes || "",
categoryNotes: row.category_notes || "",
eligibilityNotes: row.eligibility_notes || "",
+ foodBakery: row.food_bakery,
+ foodDryGoods: row.food_dry_goods,
+ foodProduce: row.food_produce,
+ foodDairy: row.food_dairy,
+ foodPrepared: row.food_prepared,
+ foodMeat: row.food_meat,
foodTypes: row.food_types || "",
languages: row.languages || "",
confirmedName: row.v_name,
@@ -304,6 +328,7 @@ const selectById = async (id) => {
confirmedPhone: row.v_phone,
confirmedEmail: row.v_email,
confirmedHours: row.v_hours,
+ confirmedFoodTypes: row.v_food_types,
verificationStatusId: row.verification_status_id,
inactiveTemporary: row.inactive_temporary,
neighborhoodId: row.neighborhood_id,
@@ -349,6 +374,13 @@ const buildLocationClause = (latitude, longitude) => {
return locationClause;
};
+const buildBounds = ({ maxLat, maxLng, minLat, minLng }) => {
+ return `
+ AND s.latitude BETWEEN ${minLat} AND ${maxLat}
+ AND s.longitude BETWEEN ${minLng} AND ${maxLng}
+ `;
+};
+
const buildLoginJoinsClause = () => {
return `
left join login L1 on s.created_login_id = L1.id
diff --git a/app/services/stakeholder-log-service.js b/app/services/stakeholder-log-service.js
index dfa9d7bcc..308b7151c 100644
--- a/app/services/stakeholder-log-service.js
+++ b/app/services/stakeholder-log-service.js
@@ -31,8 +31,10 @@ const selectById = async (id) => {
s.donation_delivery_instructions, s.donation_notes, s.covid_notes,
s.category_notes, s.eligibility_notes, s.food_types, s.languages,
s.v_name, s.v_categories, s.v_address, s.v_phone, s.v_email,
- s.v_hours, s.verification_status_id, s.inactive_temporary,
+ s.v_hours, s.v_food_types, s.verification_status_id, s.inactive_temporary,
s.neighborhood_id,
+ s.food_bakery, s.food_dry_goods, s.food_produce,
+ s.food_dairy, s.food_prepared, s.food_meat,
${buildLoginSelectsClause()}
from stakeholder_log s
${buildLoginJoinsClause()}
@@ -107,11 +109,18 @@ const selectById = async (id) => {
confirmedPhone: row.v_phone,
confirmedEmail: row.v_email,
confirmedHours: row.v_hours,
+ confirmedFoodTypes: row.v_food_types,
verificationStatusId: row.verification_status_id,
inactiveTemporary: row.inactive_temporary,
neighborhoodId: row.neighborhood_id,
neighborhoodName: row.neighborhood_name,
completeCriticalPercent: row.complete_critical_percent,
+ foodBakery: row.food_bakery,
+ foodDryGoods: row.food_dry_goods,
+ foodProduce: row.food_produce,
+ foodDairy: row.food_dairy,
+ foodPrepared: row.food_prepared,
+ foodMeat: row.food_meat,
});
});
diff --git a/app/services/stakeholder-service.js b/app/services/stakeholder-service.js
index 694a0d63b..19254c574 100644
--- a/app/services/stakeholder-service.js
+++ b/app/services/stakeholder-service.js
@@ -86,10 +86,12 @@ const search = async ({
as claimed_date, s.claimed_login_id,
s.requirements, s.admin_notes, s.inactive, s.email, s.covid_notes,
s.v_name, s.v_categories, s.v_address, s.v_phone, s.v_email,
- s.v_hours, s.verification_status_id, s.inactive_temporary,
+ s.v_hours, s.v_food_types, s.verification_status_id, s.inactive_temporary,
s.neighborhood_id, n.name as neighborhood_name,
s.complete_critical_percent,
${locationClause ? `${locationClause} AS distance,` : ""}
+ s.food_bakery, s.food_dry_goods, s.food_produce,
+ s.food_dairy, s.food_prepared, s.food_meat,
${buildLoginSelectsClause()}
from stakeholder_set as s
left outer join neighborhood n on s.neighborhood_id = n.id
@@ -199,11 +201,18 @@ const search = async ({
confirmedPhone: row.v_phone,
confirmedEmail: row.v_email,
confirmedHours: row.v_hours,
+ confirmedFoodTypes: row.v_food_types,
verificationStatusId: row.verification_status_id,
inactiveTemporary: row.inactive_temporary,
neighborhoodId: row.neighborhood_id,
neighborhoodName: row.neighborhood_name,
completeCriticalPercent: row.complete_critical_percent,
+ foodBakery: row.food_bakery,
+ foodDryGoods: row.food_dry_goods,
+ foodProduce: row.food_produce,
+ foodDairy: row.food_dairy,
+ foodPrepared: row.food_prepared,
+ foodMeat: row.food_meat,
});
});
@@ -249,8 +258,10 @@ const selectById = async (id) => {
s.donation_delivery_instructions, s.donation_notes, s.covid_notes,
s.category_notes, s.eligibility_notes, s.food_types, s.languages,
s.v_name, s.v_categories, s.v_address, s.v_phone, s.v_email,
- s.v_hours, s.verification_status_id, s.inactive_temporary,
+ s.v_hours, s.v_food_types, s.verification_status_id, s.inactive_temporary,
s.neighborhood_id,
+ s.food_bakery, s.food_dry_goods, s.food_produce,
+ s.food_dairy, s.food_prepared, s.food_meat,
${buildLoginSelectsClause()}
from stakeholder s
${buildLoginJoinsClause()}
@@ -329,9 +340,16 @@ const selectById = async (id) => {
confirmedPhone: row.v_phone,
confirmedEmail: row.v_email,
confirmedHours: row.v_hours,
+ confirmedFoodTypes: row.v_food_types,
verificationStatusId: row.verification_status_id,
inactiveTemporary: row.inactive_temporary,
neighborhoodId: row.neighborhood_id,
+ foodBakery: row.food_bakery,
+ foodDryGoods: row.food_dry_goods,
+ foodProduce: row.food_produce,
+ foodDairy: row.food_dairy,
+ foodPrepared: row.food_prepared,
+ foodMeat: row.food_meat,
};
// Don't have a distance, since we didn't specify origin
@@ -541,8 +559,15 @@ const insert = async (model) => {
confirmedPhone,
confirmedEmail,
confirmedHours,
+ confirmedFoodTypes,
verificationStatusId,
inactiveTemporary,
+ foodBakery,
+ foodDryGoods,
+ foodProduce,
+ foodDairy,
+ foodPrepared,
+ foodMeat,
} = model;
try {
let hoursSqlValues = hours.length
@@ -562,66 +587,71 @@ const insert = async (model) => {
// (ARRAY['(2,Wed,13:02,13:04)', '(3,Thu,07:00,08:00)'])::stakeholder_hours[]); --array of stakeholder_hours
// objects, which are defined as a postgres type (see repo file for more detail on this type).
const invokeSprocSql = `CALL create_stakeholder(
- ${toSqlNumeric(0)}::INT,
- ${toSqlNumeric(tenantId)}::INT,
- ${toSqlString(name)}::VARCHAR, ${toSqlString(
- address1
- )}::VARCHAR, ${toSqlString(address2)}::VARCHAR,
- ${toSqlString(city)}::VARCHAR, ${toSqlString(
- state
- )}::VARCHAR, ${toSqlString(zip)}::VARCHAR,
- ${toSqlString(phone)}::VARCHAR,
- ${toSqlNumeric(latitude)}::NUMERIC, ${toSqlNumeric(longitude)}::NUMERIC,
- ${toSqlString(website)}::VARCHAR, ${toSqlBoolean(inactive)},
- ${toSqlString(notes)}::VARCHAR, ${toSqlString(requirements)}::VARCHAR,
- ${toSqlString(adminNotes)}::VARCHAR, ${toSqlNumeric(loginId)}::INT,
- ${toSqlString(parentOrganization)}::VARCHAR, ${toSqlString(
- physicalAccess
- )}::VARCHAR,
- ${toSqlString(email)}::VARCHAR, ${toSqlString(items)}::VARCHAR,
- ${toSqlString(services)}::VARCHAR, ${toSqlString(facebook)}::VARCHAR,
- ${toSqlString(twitter)}::VARCHAR, ${toSqlString(pinterest)}::VARCHAR,
- ${toSqlString(linkedin)}::VARCHAR, ${toSqlString(description)}::VARCHAR,
- ${toSqlTimestamp(submittedDate)}::TIMESTAMPTZ, ${toSqlNumeric(
- submittedLoginId
- )}::INT,
- ${toSqlTimestamp(approvedDate)}::TIMESTAMP,
- ${toSqlNumeric(reviewedLoginId)}::INT,
- ${toSqlTimestamp(assignedDate)}::TIMESTAMP, ${toSqlNumeric(
- assignedLoginId
- )}::INT,
- ${toSqlTimestamp(claimedDate)}::TIMESTAMP, ${toSqlNumeric(
- claimedLoginId
- )}::INT,
- ${toSqlString(reviewNotes)}::VARCHAR, ${toSqlString(instagram)}::VARCHAR,
- ${toSqlString(adminContactName)}::VARCHAR, ${toSqlString(
- adminContactPhone
- )}::VARCHAR,
- ${toSqlString(adminContactEmail)}::VARCHAR,
- ${toSqlString(donationContactName)}::VARCHAR,
- ${toSqlString(donationContactPhone)}::VARCHAR,
- ${toSqlString(donationContactEmail)}::VARCHAR,
- ${toSqlBoolean(donationPickup)},
- ${toSqlBoolean(donationAcceptFrozen)},
- ${toSqlBoolean(donationAcceptRefrigerated)},
- ${toSqlBoolean(donationAcceptPerishable)},
- ${toSqlString(donationSchedule)}::VARCHAR,
- ${toSqlString(donationDeliveryInstructions)}::VARCHAR,
- ${toSqlString(donationNotes)}::VARCHAR,
- ${toSqlString(covidNotes)}::VARCHAR,
- ${toSqlString(categoryNotes)}::VARCHAR,
- ${toSqlString(eligibilityNotes)}::VARCHAR,
- ${toSqlString(foodTypes)}::VARCHAR,
- ${toSqlString(languages)}::VARCHAR,
- ${toSqlBoolean(confirmedName)},
- ${toSqlBoolean(confirmedCategories)},
- ${toSqlBoolean(confirmedAddress)},
- ${toSqlBoolean(confirmedPhone)},
- ${toSqlBoolean(confirmedEmail)},
- ${toSqlBoolean(confirmedHours)},
- ${toSqlNumeric(verificationStatusId)}::INT,
- ${toSqlBoolean(inactiveTemporary)},
- ${categories}, ${formattedHours})`;
+ ${toSqlNumeric(0)}::INT,
+ ${toSqlNumeric(tenantId)}::INT,
+ ${toSqlString(name)}::VARCHAR,
+ ${toSqlString(address1)}::VARCHAR,
+ ${toSqlString(address2)}::VARCHAR,
+ ${toSqlString(city)}::VARCHAR,
+ ${toSqlString(state)}::VARCHAR,
+ ${toSqlString(zip)}::VARCHAR,
+ ${toSqlString(phone)}::VARCHAR,
+ ${toSqlNumeric(latitude)}::NUMERIC,
+ ${toSqlNumeric(longitude)}::NUMERIC,
+ ${toSqlString(website)}::VARCHAR, ${toSqlBoolean(inactive)},
+ ${toSqlString(notes)}::VARCHAR,
+ ${toSqlString(requirements)}::VARCHAR,
+ ${toSqlString(adminNotes)}::VARCHAR,
+ ${toSqlNumeric(loginId)}::INT,
+ ${toSqlString(parentOrganization)}::VARCHAR,
+ ${toSqlString(physicalAccess)}::VARCHAR,
+ ${toSqlString(email)}::VARCHAR,
+ ${toSqlString(items)}::VARCHAR,
+ ${toSqlString(services)}::VARCHAR, ${toSqlString(facebook)}::VARCHAR,
+ ${toSqlString(twitter)}::VARCHAR, ${toSqlString(pinterest)}::VARCHAR,
+ ${toSqlString(linkedin)}::VARCHAR, ${toSqlString(description)}::VARCHAR,
+ ${toSqlTimestamp(submittedDate)}::TIMESTAMPTZ,
+ ${toSqlNumeric(submittedLoginId)}::INT,
+ ${toSqlTimestamp(approvedDate)}::TIMESTAMP,
+ ${toSqlNumeric(reviewedLoginId)}::INT,
+ ${toSqlTimestamp(assignedDate)}::TIMESTAMP,
+ ${toSqlNumeric(assignedLoginId)}::INT,
+ ${toSqlTimestamp(claimedDate)}::TIMESTAMP,
+ ${toSqlNumeric(claimedLoginId)}::INT,
+ ${toSqlString(reviewNotes)}::VARCHAR,
+ ${toSqlString(instagram)}::VARCHAR,
+ ${toSqlString(adminContactName)}::VARCHAR,
+ ${toSqlString(adminContactPhone)}::VARCHAR,
+ ${toSqlString(adminContactEmail)}::VARCHAR,
+ ${toSqlString(donationContactName)}::VARCHAR,
+ ${toSqlString(donationContactPhone)}::VARCHAR,
+ ${toSqlString(donationContactEmail)}::VARCHAR,
+ ${toSqlBoolean(donationPickup)},
+ ${toSqlBoolean(donationAcceptFrozen)},
+ ${toSqlBoolean(donationAcceptRefrigerated)},
+ ${toSqlBoolean(donationAcceptPerishable)},
+ ${toSqlString(donationSchedule)}::VARCHAR,
+ ${toSqlString(donationDeliveryInstructions)}::VARCHAR,
+ ${toSqlString(donationNotes)}::VARCHAR,
+ ${toSqlString(covidNotes)}::VARCHAR,
+ ${toSqlString(categoryNotes)}::VARCHAR,
+ ${toSqlString(eligibilityNotes)}::VARCHAR,
+ ${toSqlString(foodTypes)}::VARCHAR,
+ ${toSqlString(languages)}::VARCHAR,
+ ${toSqlBoolean(confirmedName)},
+ ${toSqlBoolean(confirmedCategories)},
+ ${toSqlBoolean(confirmedAddress)},
+ ${toSqlBoolean(confirmedPhone)},
+ ${toSqlBoolean(confirmedEmail)},
+ ${toSqlBoolean(confirmedHours)},
+ ${toSqlBoolean(confirmedFoodTypes)},
+ ${toSqlNumeric(verificationStatusId)}::INT,
+ ${toSqlBoolean(inactiveTemporary)},
+ ${categories}, ${formattedHours},
+ ${toSqlBoolean(foodBakery)}, ${toSqlBoolean(foodDryGoods)},
+ ${toSqlBoolean(foodProduce)}, ${toSqlBoolean(foodDairy)},
+ ${toSqlBoolean(foodPrepared)}, ${toSqlBoolean(foodMeat)}
+ )`;
const stakeholderResult = await pool.query(invokeSprocSql);
const id = stakeholderResult.rows[0].s_id;
return { id };
@@ -787,8 +817,15 @@ const update = async (model) => {
confirmedPhone,
confirmedEmail,
confirmedHours,
+ confirmedFoodTypes,
verificationStatusId,
inactiveTemporary,
+ foodBakery,
+ foodDryGoods,
+ foodProduce,
+ foodDairy,
+ foodPrepared,
+ foodMeat,
} = model;
let hoursSqlValues = hours.length
@@ -812,70 +849,74 @@ const update = async (model) => {
// (ARRAY['(2,Wed,13:02,13:04)', '(3,Thu,07:00,08:00)'])::stakeholder_hours[]); --array of stakeholder_hours
// objects, which are defined as a postgres type (see repo file for more detail on this type).
const invokeSprocSql = `CALL update_stakeholder (
- ${toSqlString(name)}::VARCHAR, ${toSqlString(
- address1
- )}::VARCHAR, ${toSqlString(address2)}::VARCHAR,
- ${toSqlString(city)}::VARCHAR, ${toSqlString(
- state
- )}::VARCHAR, ${toSqlString(zip)}::VARCHAR, ${toSqlString(phone)}::VARCHAR,
- ${toSqlNumeric(latitude)}::NUMERIC, ${toSqlNumeric(
- longitude
- )}::NUMERIC, ${toSqlString(website)}::VARCHAR,
- ${toSqlBoolean(inactive)}, ${toSqlString(notes)}::VARCHAR, ${toSqlString(
- requirements
- )}::VARCHAR,
- ${toSqlString(adminNotes)}::VARCHAR, ${toSqlString(
- parentOrganization
- )}::VARCHAR, ${toSqlString(physicalAccess)}::VARCHAR,
- ${toSqlString(email)}::VARCHAR, ${toSqlString(
- items
- )}::VARCHAR, ${toSqlString(services)}::VARCHAR, ${toSqlString(
- facebook
- )}::VARCHAR,
- ${toSqlString(twitter)}::VARCHAR, ${toSqlString(
- pinterest
- )}::VARCHAR, ${toSqlString(linkedin)}::VARCHAR, ${toSqlString(
- description
- )}::VARCHAR,
- ${toSqlNumeric(loginId)}::INT, ${toSqlTimestamp(
- submittedDate
- )}::TIMESTAMPTZ, ${toSqlNumeric(submittedLoginId)}::INT,
- ${toSqlTimestamp(approvedDate)}::TIMESTAMP,
- ${toSqlNumeric(reviewedLoginId)}::INT,
- ${toSqlTimestamp(assignedDate)}::TIMESTAMP, ${toSqlNumeric(
- assignedLoginId
- )}::INT, ${toSqlTimestamp(claimedDate)}::TIMESTAMP,
- ${toSqlNumeric(claimedLoginId)}::INT, ${toSqlString(
- reviewNotes
- )}::VARCHAR, ${toSqlString(instagram)}::VARCHAR,
- ${toSqlString(adminContactName)}::VARCHAR, ${toSqlString(
- adminContactPhone
- )}::VARCHAR, ${toSqlString(adminContactEmail)}::VARCHAR,
- ${toSqlString(donationContactName)}::VARCHAR, ${toSqlString(
- donationContactPhone
- )}::VARCHAR, ${toSqlString(donationContactEmail)}::VARCHAR,
- ${toSqlBoolean(donationPickup)}, ${toSqlBoolean(
- donationAcceptFrozen
- )}, ${toSqlBoolean(donationAcceptRefrigerated)},
- ${toSqlBoolean(donationAcceptPerishable)}, ${toSqlString(
- donationSchedule
- )}::VARCHAR, ${toSqlString(donationDeliveryInstructions)}::VARCHAR,
- ${toSqlString(donationNotes)}::VARCHAR, ${toSqlString(
- covidNotes
- )}::VARCHAR, ${toSqlString(categoryNotes)}::VARCHAR,
- ${toSqlString(eligibilityNotes)}::VARCHAR, ${toSqlString(
- foodTypes
- )}::VARCHAR, ${toSqlString(languages)}::VARCHAR,
- ${toSqlBoolean(confirmedName)}, ${toSqlBoolean(
- confirmedCategories
- )}, ${toSqlBoolean(confirmedAddress)},
- ${toSqlBoolean(confirmedPhone)}, ${toSqlBoolean(
- confirmedEmail
- )}, ${toSqlBoolean(confirmedHours)},
- ${toSqlNumeric(verificationStatusId)}::INT, ${toSqlBoolean(
- inactiveTemporary
- )},
- ${id}, ${categories}, ${formattedHours})`;
+ ${toSqlString(name)}::VARCHAR,
+ ${toSqlString(address1)}::VARCHAR,
+ ${toSqlString(address2)}::VARCHAR,
+ ${toSqlString(city)}::VARCHAR,
+ ${toSqlString(state)}::VARCHAR,
+ ${toSqlString(zip)}::VARCHAR,
+ ${toSqlString(phone)}::VARCHAR,
+ ${toSqlNumeric(latitude)}::NUMERIC,
+ ${toSqlNumeric(longitude)}::NUMERIC,
+ ${toSqlString(website)}::VARCHAR,
+ ${toSqlBoolean(inactive)},
+ ${toSqlString(notes)}::VARCHAR,
+ ${toSqlString(requirements)}::VARCHAR,
+ ${toSqlString(adminNotes)}::VARCHAR,
+ ${toSqlString(parentOrganization)}::VARCHAR,
+ ${toSqlString(physicalAccess)}::VARCHAR,
+ ${toSqlString(email)}::VARCHAR,
+ ${toSqlString(items)}::VARCHAR,
+ ${toSqlString(services)}::VARCHAR,
+ ${toSqlString(facebook)}::VARCHAR,
+ ${toSqlString(twitter)}::VARCHAR,
+ ${toSqlString(pinterest)}::VARCHAR,
+ ${toSqlString(linkedin)}::VARCHAR,
+ ${toSqlString(description)}::VARCHAR,
+ ${toSqlNumeric(loginId)}::INT,
+ ${toSqlTimestamp(submittedDate)}::TIMESTAMPTZ,
+ ${toSqlNumeric(submittedLoginId)}::INT,
+ ${toSqlTimestamp(approvedDate)}::TIMESTAMP,
+ ${toSqlNumeric(reviewedLoginId)}::INT,
+ ${toSqlTimestamp(assignedDate)}::TIMESTAMP,
+ ${toSqlNumeric(assignedLoginId)}::INT,
+ ${toSqlTimestamp(claimedDate)}::TIMESTAMP,
+ ${toSqlNumeric(claimedLoginId)}::INT,
+ ${toSqlString(reviewNotes)}::VARCHAR,
+ ${toSqlString(instagram)}::VARCHAR,
+ ${toSqlString(adminContactName)}::VARCHAR,
+ ${toSqlString(adminContactPhone)}::VARCHAR,
+ ${toSqlString(adminContactEmail)}::VARCHAR,
+ ${toSqlString(donationContactName)}::VARCHAR,
+ ${toSqlString(donationContactPhone)}::VARCHAR,
+ ${toSqlString(donationContactEmail)}::VARCHAR,
+ ${toSqlBoolean(donationPickup)},
+ ${toSqlBoolean(donationAcceptFrozen)},
+ ${toSqlBoolean(donationAcceptRefrigerated)},
+ ${toSqlBoolean(donationAcceptPerishable)},
+ ${toSqlString(donationSchedule)}::VARCHAR,
+ ${toSqlString(donationDeliveryInstructions)}::VARCHAR,
+ ${toSqlString(donationNotes)}::VARCHAR,
+ ${toSqlString(covidNotes)}::VARCHAR,
+ ${toSqlString(categoryNotes)}::VARCHAR,
+ ${toSqlString(eligibilityNotes)}::VARCHAR,
+ ${toSqlString(foodTypes)}::VARCHAR,
+ ${toSqlString(languages)}::VARCHAR,
+ ${toSqlBoolean(confirmedName)},
+ ${toSqlBoolean(confirmedCategories)},
+ ${toSqlBoolean(confirmedAddress)},
+ ${toSqlBoolean(confirmedPhone)},
+ ${toSqlBoolean(confirmedEmail)}, ${toSqlBoolean(confirmedHours)},
+ ${toSqlBoolean(confirmedFoodTypes)},
+ ${toSqlNumeric(verificationStatusId)}::INT,
+ ${toSqlBoolean(inactiveTemporary)},
+ ${id},
+ ${categories},
+ ${formattedHours},
+ ${toSqlBoolean(foodBakery)}, ${toSqlBoolean(foodDryGoods)},
+ ${toSqlBoolean(foodProduce)}, ${toSqlBoolean(foodDairy)},
+ ${toSqlBoolean(foodPrepared)}, ${toSqlBoolean(foodMeat)}
+ )`;
try {
await pool.query(invokeSprocSql);
diff --git a/client/package-lock.json b/client/package-lock.json
index be803c288..9a7412c48 100644
--- a/client/package-lock.json
+++ b/client/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "food-oasis-client",
- "version": "1.0.21",
+ "version": "1.0.28",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/client/package.json b/client/package.json
index 8adb39302..c31ef3d66 100644
--- a/client/package.json
+++ b/client/package.json
@@ -1,7 +1,7 @@
{
"name": "food-oasis-client",
"description": "React Client for Food Oasis",
- "version": "1.0.26",
+ "version": "1.0.28",
"author": "Hack for LA",
"license": "GPL-2.0",
"private": true,
diff --git a/client/public/index.html b/client/public/index.html
index c4d63487c..d99e01ab4 100644
--- a/client/public/index.html
+++ b/client/public/index.html
@@ -67,5 +67,32 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
+
+
+
+
+
+
+
+
+
+
+