CoquiCoders/bizwallet — pull request #68 by MrMaksimize (2014-08-11 23:34:28+00:00)
Title: Separate agency

[ ] Create Agency Model
[ ] Associate User to Agency (Agency belongs to / is created by user).
[ ] Add agencyId column to Opportunities Table
[ ] Associate from Agency to Opportunity (Opportunity Belongs To Agency)
[ ] SELECT DISTINCT all agencies in Opportunity table, iterate over, and create them as agency models.
[ ] Update All opportunities first querying agency name to find the id of the matching agency, and updating accordingly
[ ] Write tests so that when a new opportunity is created when an agency id, the agency is selected.
[ ] Provide admin UI for creating, deleting, listing and editing agencies
[ ] Updated admin UI on Opportunity Edit and Create to automatically feed in Agency, and create new ones if needed.
[ ] Update controllers to accomodate ui