Giter Club home page Giter Club logo

rubyforgood / casa Goto Github PK

View Code? Open in Web Editor NEW
289.0 51.0 463.0 55.61 MB

Volunteer management system for nonprofit CASA, which serves foster youth in counties across America.

Home Page: https://casavolunteertracking.org/

License: MIT License

Ruby 68.08% JavaScript 7.04% HTML 14.21% Dockerfile 0.04% Shell 0.59% SCSS 3.29% CSS 4.30% Procfile 0.01% Nix 2.44%
rubyforgood casa pg-casa casa-volunteers foster-youth casa-chapters volunteer-management rails non-profit open-source

casa's Introduction

CASA Project and Organization Overview

rspec erb lint standardrb lint brakeman yarn lint

Maintainability Test Coverage Snyk Vulnerabilities Average time to resolve an issue

A CASA (Court Appointed Special Advocate) is a role where a volunteer advocates on behalf of a youth in their county's foster care system. CASA is also the namesake role of the national organization, CASA, which exists to cultivate and supervise volunteers carrying out this work – with county level chapters (operating relatively independently of each other) across the country.

Table of Contents

Welcome contributors!

We are very happy to have you! CASA and Ruby for Good are committed to welcoming new contributors of all skill levels.

Find issues to work on here on the issue board. Issues on the project's TODO column are another way to browse issues. Check to see that no one is assigned to the issue. Then comment on it to claim the issue. Commenting on an issue doesn't automatically get the issue assigned so double check the comments on an issue to see that no one is requesting assignment.

Pull requests which are not for an issue but which improve the codebase are also welcome! Feel free to make GitHub issues for bugs and improvements. A maintainer will be keeping an eye on issues and PRs every day or three.

Communication and Collaboration

We highly recommend that you join us in slack in the #casa channel so you can get fast help for any questions you may have.

Check out our google calendar to see when office hours and stakeholder meetings are.

You can also open an issue or comment on an issue on GitHub and a maintainer will reply to you.

About this project

CASA is a national organization with many regional chapters. We currently work with Prince George's County CASA in Maryland, Montgomery CASA Maryland, and Howard County Maryland

This system provides value by:

  • providing volunteers with a portal for logging activity
  • allow supervisors to oversee volunteer activity
  • generate reports on volunteer activity for admins to use in grant proposals

Read about the product sense that guides our approach to this work.

How CASA works:

  • A foster youth is represented as a CASA case.
  • The CASA case is assigned to a volunteer.
  • The volunteer records their efforts spent on the CASA case as case contacts.
  • Supervisors oversee CASA volunteers by monitoring, tracking, and advising them on CASA case activities.
  • At PG CASA, the minimum volunteer commitment is one year (this varies by CASA chapter, in San Francisco the minimum commitment is ~ two years). A volunteer's lifecycle is very long, so there's a lot of activity for chapters to organize.

Project Considerations

  • PG CASA is operating under a very tight budget. Right now, they manually input volunteer data into a volunteer management software built specifically for CASA, but upgrading their account for multiple user licenses to allow volunteers to self-log activity data is beyond their budget. Hence why we are building as lightweight a solution as possible that can sustain itself with Ruby for Good's support.
  • While the scope of this platform's use is currently for PG County CASA and Montgomery county CASA, we are building with a mind toward multitenancy so this platform could prospectively be used by other CASA chapters across the country.

More information:

The complete role description of a CASA volunteer in Prince George's County.

Developing! ✨🛠✨

How to Contribute

See our contributing guide 💖 ✨

Installation

Getting Started (Codespaces - EXPERIMENTAL) 🛠️

Open in GitHub Codespaces

  1. Follow the link above or follow instructions to create a new Codespace.; You can use the web editor, or even better open the Codespace in VSCode
  2. Wait for the container to start. This will take a few (10-15) minutes since Ruby needs to be installed, the database needs to be created, and the bin/setup script needs to run
  3. Run bin/dev and visit the URL that pops in VSCode up to see the CASA page
  4. Login as a sample user with these default credentials (which also work for QA):

Local Setup Instructions

Downloading the Project (on a Mac or Linux machine)

  1. git clone https://github.com/rubyforgood/casa.git clone the repo to your local machine.
  2. You can ask a maintainer for permission to make a branch on this repo.
  3. You can also create a fork on GitHub and make a pull request from the fork.

Ruby

  1. Install a ruby version manager: rvm or rbenv
  2. when you cd into the project directory, let your version manager install the ruby version in .ruby-version. Right now that's Ruby 3.2.2
  3. gem install bundler

node.js

  1. (Recommended) Install nvm, which is a node version manager.
  2. Install a current LTS version of Node. lts/fermium works.
  3. Install yarn. On Ubuntu, make sure you install it from the official Yarn repo instead of cmdtest.

PostgreSQL ("postgres")

  1. Make sure that postgres is installed.

Chrome Browser

  1. The Spec tests uses Chrome Browser and Chromedriver for some of the tests. A current version of chromedriver will be installed when bundle install is run. TO install Chrome, see Chrome Install.

Another option is to install the Chromium browser for your operating system so the browser-based Ruby feature/integration tests can run. Installing chromium-browser is enough, including for many WSL (Windows subsystem for Linux) distributions.

If you are using Ubuntu on WSL and receive the following message when trying to run the test suite...

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with: snap install chromium

...check out the instructions on installing google-chrome and chromedriver for WSL Ubuntu.

Platform Specific Installation Instructions

Common issues

  1. If your rails/rake commands hang forever instead of running, try: rails app:update:bin
  2. There is currently no option for a user to sign up and create an account through the UI. This is intentional. If you want to log in, use a pre-seeded user account and its credentials.
  3. If you are on windows and see the error "Requirements support for mingw is not implemented yet" then use https://rubyinstaller.org/ instead
  4. Install imagemagick to see images locally. Instructions: https://imagemagick.org/script/download.php
  5. If you are running on an M1 mac, run the following command before you start the installation process:
    1. Set the architecture: $env /usr/bin/arch -arm64 /bin/zsh ---login
    2. Remove all gems before you proceed: gem uninstall -aIx
  6. If bin/setup fails with a credentials error:
    1. Open the .env file.
    2. Update the values of POSTGRES_USER and POSTGRES_PASSWORDto match your PostgreSQL credentials.
    3. Run bin/setup

Running the App / Verifying Installation

  1. cd casa/
  2. Run bin/setup
  3. Run bin/dev and visit http://localhost:3000/ to see the app running.

Logging in with seed users

Login as a regular user at http://localhost:3000/users/sign_in. Some example seed users:

Login as an all CASA admin at http://localhost:3000/all_casa_admins/sign_in. An example seed user:

The password for all seed users is 12345678

Local email

We are using Letter Opener in development to receive mail. All emails sent in development should open in a new tab in the browser.

To see local email previews, check out http://localhost:3000/rails/mailers

Running Tests

  • run the ruby test suite bin/rails spec
  • run the javascript test suite yarn test

If you have trouble running tests, check out CI scripts in .github/workflows/ for sample commands. Test coverage is run by simplecov on all builds and aggregated by CodeClimate

Cleaning up before you pull request

Run bin/lint to run all linters and fix issues. This will run:

  1. bundle exec standardrb --fix auto-fix Ruby linting issues more linter info
  2. bundle exec erblint --lint-all --autocorrect ERB linter
  3. yarn lint:fix to run the JS linter and fix issues
  4. rake factory_bot:lint if you have been editing factories and want to find factories and traits which produce invalid objects

If additional work arises from your pull request that is outside the scope of the issue it resolves, please open a new issue.

Stimulus

Issue 5016 started a refactor of Javascript to use Hotwire's Stimulus. To see if it's working for you, go to /casa_cases and see Stimulus is working! in your browser console.

Post-deployment tasks

We are using After Party to run post-deployment tasks. These tasks may include one-time necessary updates to the database. Run the tasks manually by:

bundle exec rake after_party:run

Alternatively, every time you pull the main branch, run:

bin/update

which will run any database migrations, update gems and yarn packages, and run the after party post-deployment tasks.

Other Documentation

Check out the wiki

There is a doc directory at the top level that includes:

Acknowledgements

Thank you to Scout for letting us use their dashboard for free!

Join info for all public meetings is posted in the rubyforgood slack in the #casa channel

Feedback

We are very interested in your feedback! Please give us some :) https://forms.gle/1D5ACNgTs2u9gSdh9

casa's People

Contributors

7riumph avatar aedwardg avatar colinsoleim avatar compwron avatar crespire avatar dependabot-preview[bot] avatar dependabot[bot] avatar drewapeterson7671 avatar efgalvao avatar elasticspoon avatar elhalvers avatar erik-trantt avatar erinclaudio avatar firelemons avatar garbar avatar harsohailb avatar jmkoni avatar keithrbennett avatar learningstuff98 avatar librod89 avatar littleforest avatar marmitoth avatar mussajoop avatar pollygee avatar scottolsen avatar seanmarcia avatar shamitomita avatar thrillberg avatar vasconsaurus avatar xihai01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

casa's Issues

supervisor receives weekly digest email of their volunteers' updates

Part of epic #105

What type of user is this for? [volunteer/supervisor/admin/all
supervisor

Where does/should this occur?
system email sent to supervisor

Description
Digest emails should include the following:

  • most recent case_contact attempted
  • number of successful case_contacts made
  • number of unsuccessful case_contacts made

Screenshots
Here is an example of a PG CASA email:
PG CASA

And here are some examples of digest emails:
LinkedIn
Sprout Social
DropBox

Related issues
#125, #22

[old epic] Database

All work related to database & data that lives in it i.e.:

casa_cases
volunteers
case_contacts
case_assignments
database schema changes

Related to the following open issues: #34

Update text for deactivated volunteer email

Part of epic #3

What type of user is it for? [volunteer/supervisor/admin/all
volunteers

New email text
https://github.com/rubyforgood/casa/blob/master/app/views/volunteer_mailer/deactivation.html.erb

Subject: Your account has been deactivated

Hello [volunteer display name],

Your CASA/Prince George’s County volunteer console account has been deactivated. Should you resume service as a CASA volunteer in the future, your account will be reactivated. Thank you for your service to CASA!

If you have any questions, please contact your most recent Case Supervisor for assistance.

– CASA/Prince George’s County

Related issues
#125, #23

Hour & Minutes input for case_contact

Part of epic #3 (volunteer dashboard) & epic #59 (data)

Currently, volunteers can only input case_contact time value in duration_minutes.

PG CASA would like a volunteer to be able to log case_contact time values in duration_minutes AND duration_hours.

Ex: 1 hr. 15 minutes

Resolution should account for calculating total case_contact durations for reporting purposes.
Ex: When an admin pulls a report of total time spent on case_contacts, that number should look like: 5 hrs 15 minutes not 3 hrs 135 minutes

Some possible ways of handling this:

  • two drop down menus: one for duration_minutes and one for duration hours
  • user inputs pre-formatted numerical text value (like the way occurred_at is handled)

See here for reference on staging

[old epic] Front end design

All work pertaining to how stuff looks on the front end! Will touch work on epics #3 & #4

Priorities

Not priority, but would be nice if you wanna make it happen!

  • light graphic design as needed that makes navigation easy and intuitive and on brand.

Open issues related to this epic: #8 #46

casa_admin can deactivate user account

part of epic #4

What type of user is this for? [volunteer/supervisor/admin/all]
admin

Where does/should this occur?
This should be an addition to the admin dashboard under edit Volunteer.

Description
deactivating a volunteer account means the volunteer can no longer log in. This is not needed for MVP right now but we do need to build it.

related to issues
#22

"other" casa contact type behavior

relates to #28

As a volunteer that is logging a new Case Contact event, I should not see the "other contact type" text box unless "other" is chosen as a Case Contact Type.

As a volunteer, I expect that if "other" is chosen, then the "other contact type" text field is required.

As a volunteer, I expect for the "other contact type" to no longer be visible if I choose "other" and then choose another option in the "case contact type" select.

User Permissions

CASA Volunteer Portal - User Permissions

Permissions by roles (in order of least permissions)

Permission all roles have

  • View their own profile
  • Edit their own profile

Volunteer

  • Create new case_contact for their casa_case
  • Edit case_contact details for their casa_case (needs confirmation and details from stakeholders)
  • Edit teen_program_eligible for their casa_case
  • View case_contact details for all case_contacts they have had with active casa_case. They should not be able to see or edit case_contacts for casa_case that was reassigned to a different volunteer even if they might have created those case_contact records.

Supervisor

🚨 This role exists but the flows associated with this role do not as they are POST MVP 🚨

  • volunteers assigned to them, regardless of case assignment status (view and edit)
  • case_contacts associated with a supervisor's volunteer assignments (view and edit)
  • casa_cases associated with a supervisor's volunteer assignments (view and edit)
  • volunteer and case assignments for their volunteers (view and edit)
  • generate reports (need more details)

Admin

  • generate reports (need more details)
  • create new volunteers
  • assign supervisors to volunteers
  • assign a volunteer to a casa_case
  • unassign a volunteer from a casa_case
  • should be able to see all data but we might tailor the data shown to the dashboard just for usability purposes
  • admin should not be able to create case_contacts and any related objects we might build tied to case_contacts

Volunteer view - case_contacts

Related to #3

  • button to create new_case_contact
    • button leads to new_case_contact path (#28
  • infinite previous case contacts
    • should pull all information from previous case_contact including:
      • date, case_contact type, time duration
    • sorted by newest at the top

***only case_contacts from active casa_case_assignments should display in the volunteer view.

Admin view/edit case page should include volunteer/s assigned to the case

Part of epic #4 (Admin Dashboard)

What type of user is this for? [volunteer/supervisor/admin/all]
This feature is for admins and should not change what non-admins can see or do.

Where does/should this occur?
Currently, in the admin view/edit case view, admins only see case info.

Description
Add to this view the volunteer/s currently actively assigned to the case. ( case_assignment.is_active == true )
Display volunteer as volunteer name not id or email. If volunteer name is not in the db schema yet, display volunteer email. The volunteer's name (or email) should be a link to the admin view/edit volunteer page.

Screenshots
https://casa-r4g-staging.herokuapp.com/casa_cases/14/edit
Screen Shot 2020-04-18 at 3 36 32 PM

Volunteer view permissions

A volunteer should only be able to view the following:

Their own:

  • case_contacts & case_contact history [infinite view for now]
  • volunteer_name >> double check code naming convention
  • volunteer_phone >> double check code naming convention
  • volunteer_email >> double check code naming convention
  • casa_case_id

Edit volunteer view (as volunteer)

Related to #3, volunteers can edit an existing volunteer with the following items:

  • name (text)
  • phone number (text)
  • email (text)

Also we want to display static data:

  • start date (date)
  • assigned case number (link to the case)

Remove extra Login button and make Logout button match

  • There is an extra Login button at the bottom of the Login page, which isn't functional - I assume the functional one above came from Devise - which should be removed:
  • The Logout button should be updated to match the Login button

Here are the Login buttons:
Login Screen Shot 2020-04-06 at 7 14 08 PM


Here is the Logout button
Logout 2020-04-06 at 7 13 31 PM

Permissions for supervisors - post MVP

This issue affects: supervisors

Supervisors should be able to:

  1. View ALL volunteers, not just "their" volunteers (because they may need to help out other supervisors) But their default view should be only their volunteers, who they need to supervise)
  2. Assign ANY volunteer to ANY case (not just "their" volunteers and cases)
  3. Edit a case's "transition aged youth" flag
  4. Edit their own name

Supervisors should NOT be able to:

  1. edit the names of anyone other than themselves
  2. create new volunteers
  3. create new casa case

Frontend Testing

As discussed in the CASA slack channel, I'm going to be implementing Cypress so that Javascript is testable.

As a part of this I would like to:

  • programmatically sign in users
  • create fixtures for test setup
  • convert the current Capybara tests to Cypress tests
  • cypress integrated into CI
  • README instructions on how to run

admin view - casa_cases

Relates to #4

Cases -
Index view of all case ids, in order of newest case on top. Should link to a case edit view/popup-type box.
New Case button on top.

casa_admin import many volunteers

Make a UI where an admin can

  1. import a csv or paste a list of volunteer emails and names to create volunteers in the system.
  2. same for casa cases, with case_number and optional tranistion-aged youth field
  3. import list of supervisor-volunteer linkages, supervisor name to volunteer name
  4. import list of volunteer-case linkages, volunteer name to case_number

show_casa_case view for Admins

Admins should be able to click on a casa_case from anywhere on the platform and see a show view displaying the following casa_case details:

  • casa_case's case_number
  • Volunteer email/indentifying info via case_assignment (potentially a list)
    • whether or not this case_assignment is_active
    • case_contacts infinite view by volunteer with rows displaying:
      • case_contact type
      • case_contact duration

'teen program eligible' checkbox can remain

Admin view/edit individual volunteer

This is part of epic "Admin view" (#4 ). Relates to issue #91 (change volunteer assignment).

What type of user is this for? [volunteer/admin/supervisor/all]
admin

Where does/should this occur?
When an admin is on their dashboard and clicks the "edit" button on a volunteer and are taken to the edit volunteer page

Description
Here, admins should be able to:

  • see and edit volunteer display name
  • see and edit volunteer email address
  • see volunteer start date (date formatted: dd/mm/yyyy)
  • see and edit volunteer status to be active or inactive (maybe as a radio button, dropdown, or toggle? Have fun!) - you will need to add this database column
  • see a list of cases assigned to the volunteer, with an "edit" link for each which links to the edit case view, and an "unassign" link which unassigns the case from the volunteer
  • assign volunteer to new case
  • deactivate volunteer account (see issue #204)

Future work (NOT in this issue):

  1. At the bottom should be a "View as the volunteer" button. (see #3 for full details on volunteer dash view)

Relates to issues
#21 #22 #204

Add basic styles

Create style guide that can be applied across system using Modular CSS or bootstrap (or something else not listed here, just be sure to file an ADR describing your decision about this!)

Please reference #38 for colors and fonts.

Related to #38

Admin

Filter issues by the label "Admin" to see all work related to this epic.

Context
Post MVP, we are focused on improving the admin user experience by refining core functionalities and adding new features.

Permissions
Admins have the highest level of permissions within a single CASA Org instance.
Admins can:

  • create, view, edit, and deactivate accounts
  • create, view, and edit case contacts
  • import new volunteers, supervisors, and cases
  • generate system reports
  • customize their CASA Org instance

How to access
Log in to QA using the following credentials:
email: [email protected]
password: 123456

Volunteer

Filter issues by the "Volunteer" label to view all work related to this epic.

Permissions
Volunteers have the lowest level of permissions within a single CASA Org instance, but the volunteer account is the most important user type from a business perspective – the data that volunteers log (case_contacts) are the focal point of the entire platform.

Context
Post MVP, we are focused on improving the volunteer user experience by refining core functionalities and adding new features (and new data points for volunteers to log), including:

  • follow up activity per case contact (reference mockups in epic #532)
  • the ability to download a partially pre-filled court report template
  • the ability to complete new activities, including: submitting a court report, and items on a forthcoming emancipation checklist (tasks related to preparing a foster youth for emancipation from the foster system)

How to access the volunteer dashboard
Log in to QA using the following credentials:
email: [email protected]
password: 123456

Format volunteer import data

Revise .csv formatting to ensure it's compatible with how data should display on the backend post import.

Will do once this is ready to release to CASA.

Related to epic #59

Admin can create new Volunteer users

Admin clicks button to create new volunteer.
Password for new account is generated.
Password creation triggers system email notifying admin of password.

new_case_contact form

Related to #27 and #3

Source: new_case_contact button

Fields to display on form:

  • type (radio button, populated by hard coded options)
  • hours (drop down menu that accepts only numbers but allows 15 minute increments. Ex: .15, 1.15, etc)
    • date - (pre-filled with html placeholder: mm/dd/yyyy and default to today's date) (post MVP: include a calendar popup, likely want to refer to a library for this)
  • ^^^ will be related to new post MVP issue: research libraries for calendar pop up options.
  • submit button [related to new issue to come re: submit button backend stuff]
    • submit redirects to dashboard view

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.