Skip to content

Commit

Permalink
Merge pull request #766 from hackforla/678-food-type-checkboxes
Browse files Browse the repository at this point in the history
Implement Food Type Checkboxes
  • Loading branch information
entrotech authored Nov 3, 2020
2 parents 4fe2a24 + 4c2a486 commit 582805d
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 @@ -68,9 +68,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 @@ -180,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,
Expand All @@ -188,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,
Expand Down Expand Up @@ -231,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()}
Expand Down Expand Up @@ -303,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,
Expand All @@ -311,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,
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 582805d

Please sign in to comment.