GithubHelp home page GithubHelp logo

mainstmission / food-pantry-manager Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 14.0 5.56 MB

License: Other

Ruby 42.58% JavaScript 15.70% CoffeeScript 0.10% CSS 22.34% Shell 0.73% HTML 17.66% Gherkin 0.89%

food-pantry-manager's People

Contributors

adamferguson avatar coreypurcell avatar heatlill avatar jordanbyron avatar msergeant avatar nickyvu avatar sduckett avatar seejee avatar semmons99 avatar tbrooke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

food-pantry-manager's Issues

Creating a "Person" class

So, everything in here is about people. We have neighbors, volunteers, users, donors and it's quite easy for the same person to be more than one of these. These aren't classes, they're roles.

My proposal is the create a "Person" class which only has a first/last name and then a bunch of foreign keys. That way, a person isn't repeated throughout the database.

class Person < ActiveRecord::Base
  attr_accessible :first_name, :last_name

  has_many :addresses
  # I'd just alias #is_a to #has_one to make it read better.
  is_a :volunteer
  is_a :neighbor
  is_a :donor
  is_a :user

  def has_an_address?
    addresses.count > 0
  end

  def is_a_volunteer?
    volunteer.blank?
  end

  # etc...
end

class Volunteer < ActiveRecord::Base
  belongs_to :person
end

# ...

Sure, we could put it all onto one giant Person class. But nils are the greatest evil ever unleashed on the world. And SRP tells us each class should do one thing and do it right.

Thoughts? Seeing as this will be a lot of work, if we decide this is appropriate, I will take the first stab at it.

Create Households

Every person in the system will have at least one role they will be a neighbor, user, volunteer or whatever.

Some may be in households such as a husband and a wife or children, uncle brothers whatever. The Pantry has rules that a household can only get food a certain number of times a week or month.

Households would would be a has many through link with two person id field to link people together and a relationship field that specifies the relationship - spouse, child whatever.

When A person open the Neighbor view they will see the information as to that particular neighbor and the other people that are in the household

Form layouts

Right now the customer, volunteer, and user forms are the standard generated forms. We need to spend some time and lay out the forms and the show templates to not suck.

Create Intake Desk Home Page

The intake desk home page is a page that will allow the volunteer sitting is the desk to retrieve and add client information easily. Options not relevant to the task of client management will be hidden.

Home Screen

Initial Volunteer Table

Initial table could be as simple as name, email and add migrations later or
first name
last name
email
phone
street
city
zip
status [active,inactive,donor,worker]
photo

2nd Harvest stats

they want biweekly reports broken down by age group, number of family members etc.

Donation Tracking

Track Donors and Donations. Print receipts for donors. Track donations' weight. Reports for donations by month.

verify the rake setup process.

it looks like their might be some old instructions from before when Foreman was used. Also update the contributing guidelines if needed.

Rebirth of Roles

The existing users, donors, neighbors, volunteers, will become roles I assume that the authentication will remain in the role so I assume we wil have to make sure that a person is not visible except through his role

Instead of a migration this will be a "nuke" New model and migration - same information except for what was extracted to the person class

Volunteer sign in

Feature: We want to track the hours that volunteers are at the mission.

As a volunteer I want to sign in and sign out when I enter and leave the mission. See the mockup below.

Scenario: Sign in at the mission
Given I am a volunteer
When I sign in
Then my time should be tracked

Scenario: Sign out at the mission
Given I am a volunteer
When I sign out
Then my time should stop being tracked

mockup

Refactor cucumber specs

the cukes are badly written (this is entirely my fault ๐Ÿ‘Ž ) I want to see them written. If anyone has read the cucumber book you know what I want to see. Eventually I'll get around to this if no one else does.

Export to CSV

We should be able to export the data within food pantry manager.

Authorization setup

use authorization to limit Users/Volunteers/Donors/Donations to signed in users. Allow anyone to access the volunteer signin page.

Timecard is brittle

Timecard should allow a user to have more than one active timecard. When a users signs in, the system should check if they're already signed in and either prompt the user to set a sign_out_time for the old card, or automatically set the sign_out_time to the current time.

@tbrooke How do you want to handle this?

Sign In Report

Once we have the sign in/out feature complete, we will need to be able to view and print a report of everyone that is signed in. This report should have the pictures of volunteers. This is so an admin can quickly see how many people are currently signed in and at the mission.

Add Project History

Add the Project History found here.

We could add it directly to the README or create a HISTORY document and reference it in the README.

Create People

Create a basic class for a person that can be used in different roles through out the system

Last_name
first_name
middle_name
title
address
city
state
zip
phone
email
age
encrypted_ssn

Handling Social Security Numbers

So they are a plain string in the database right now, probably not best practice. Salting and encrypting sounds like a good idea, but I've never dealt with SSNs before.

Authentication/Authorization

We will need to control access to certain parts of the app, like volunteer management and user management. So we need an authentication/authorization setup. I imagine devise and cancan would suffice.

Customer food list prep - Input food needs and print list for order fillers

Like it says. Create a food prep list for the customer. Create a printable list for the fillers. Creation of the food prep list needs to be fast.

Right now the inventory is informal - the food list would be nonspecific user modifiable list of foods so we could do reports such as 20 cans of soup given out.

Time sheets

Obviously we need sign in/out working too.

Ability to print and email a volunteer hour statement to schools, businesses and governments for a specified period of time. We might want to tie this contact into a volunteers profile so that we can mass email the statements.

Can't sign up a new user

At least on heroku when signing up a new user:

ActiveModel::ForbiddenAttributes (ActiveModel::ForbiddenAttributes):
2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/strong_parameters-0.1.5/lib/active_model/forbidden_attributes_protection.rb:10:in sanitize_for_mass_assignment' 2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:75:inassign_attributes'
2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.8/lib/active_record/base.rb:498:in initialize' 2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/models/registerable.rb:20:innew'
2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/lib/devise/models/registerable.rb:20:in new_with_session' 2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/app/controllers/devise/registrations_controller.rb:13:increate'
2012-11-08T01:39:10+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/devise-2.1.2/app/controllers/devise/registrations_controller.rb:81:in `build_resource'

Nested People New Presenter? decorator?

with the redesign almost every view is going to have nested attributes for the person that is in the role that the view relates to. I looked ad cocoon and awesome_nested_fields

But since we are doing this everywhere can't we create either a presenter, helper, decorator -help me here so that in our forms we have = f.input.person to pull in the person fields

Customer Tracking

Customer Signups (Robin has the information that must be saved)
Notes for customers (family needs, status updates)
Customer food list prep - Input food needs and print list for order fillers

Informal inventory - the food list would be nonspecific user modifiable list of foods so we could do reports such as 20 cans of soup given out

2nd Harvest stats- they want biweekly reports broken down by age group, number of family members etc.

Interface with a scale for weighing donations

The scales have a serial port. Here is my proposal assuming the server and the scale are on the same network.

Use a serial to ethernet convertor like this Device Server to attach the scale to the network.

The frontend uses ajax to send a request to the backend. The backend server will then send a request to the device server and receive the current weight. It will then send the data back to the frontend.

The backend will manage scale setup. Things like IP Address of the device server, the format the request will need to be made for the device server. Names of scales if there are more than one etc. The frontend will provide buttons to get the weight from each scale.

This will need some pretty solid work on testing and integration tests. Good logging for troubleshooting etc. What happens when we need a different type of device server since that model is no longer made? Some of this is YAGNI.

None of this work is necessary since weight can be typed. We need to discuss whether this work is worth it.

DICUSS!!!!!!

Create a CONTRIBUTING.md

To promote contributions to the project, we can take advantage of the new CONTRIBUTING documentation that Github supports. I'd suggest move the contribution information into CONTRIBUTING.md and then pointing people to that documentation in the README.

Create Profile View

The profile view will be the first view that a volunteer enters into when they search for a neighbor. The profile view is a page that displays all information available on a particular family. From the profile view a volunteer may also click links to edit information or initiate an interactions such as notes and visits.

Profile View

Profile View 2

Profile View 3

Donor receipt printing

Easy printing of receipts for donors. We need a quick way of printing receipts for today's donations and printing receipts that cover a range of donations (probably defined by a date range). Prawn is a good library for generating PDFs.

Create Milestone

To meet the April deadline. I'd like to see a milestone created and issues assigned to it. It would be nice if the milestone included all necessary features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.