Skip to content

Commit

Permalink
Implement Food Type Checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
entrotech committed Nov 3, 2020
1 parent 8013a95 commit 4c2a486
Show file tree
Hide file tree
Showing 8 changed files with 1,201 additions and 221 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
},
};
22 changes: 20 additions & 2 deletions app/services/stakeholder-best-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,11 @@ 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
Expand Down Expand Up @@ -173,6 +175,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,
Expand All @@ -181,6 +189,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,
Expand Down Expand Up @@ -224,8 +233,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()}
Expand Down Expand Up @@ -296,6 +307,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,
Expand All @@ -304,6 +321,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,
Expand Down
11 changes: 10 additions & 1 deletion app/services/stakeholder-log-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down Expand Up @@ -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,
});
});

Expand Down
Loading

0 comments on commit 4c2a486

Please sign in to comment.