Skip to content

Allow admins to edit assigned volunteers on edit casa_case page#287

Merged
compwron merged 3 commits into
rubyforgood:masterfrom
colinsoleim:issue-90-edit-assigned-volunteers
May 23, 2020
Merged

Allow admins to edit assigned volunteers on edit casa_case page#287
compwron merged 3 commits into
rubyforgood:masterfrom
colinsoleim:issue-90-edit-assigned-volunteers

Conversation

@colinsoleim

@colinsoleim colinsoleim commented May 22, 2020

Copy link
Copy Markdown
Collaborator

What github issue is this PR for, if any?

Resolves #90

Checklist

  • I have performed a self-review of my own code
  • I added comments, particularly in hard-to-understand areas
  • I updated the /docs
  • I added tests that prove my fix is effective or that my feature works
  • bundle exec rake passes locally
  • My PR title includes "WIP" or is draft PR if work is in progress

What changed, and why?

This PR gives admins the ability to assign and unassign volunteers on the existing edit_casa_case view.

How will this affect user permissions?

Only admins can access the new page

How is this tested?

New tests have been added and local testing

Screenshots please :)

Screen Shot 2020-05-22 at 11 40 22 AM

@compwron compwron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks :) 💖🚀

@compwron

Copy link
Copy Markdown
Collaborator

it looks like the build is failing with:

Failure/Error: expect(page.all("table#volunteers tr").count).to eq 4
     
       expected: 4
            got: 6

That's probably just the new UI element showing up in an unspecific page search

@colinsoleim

Copy link
Copy Markdown
Collaborator Author

it looks like the build is failing with:

Failure/Error: expect(page.all("table#volunteers tr").count).to eq 4
     
       expected: 4
            got: 6

That's probably just the new UI element showing up in an unspecific page search

I think there may be an issue with Javascript on Travis? In its previous state, this test was passing on Travis but failing for me locally. This new version is passing for me locally, but failing here.

By default the dashboard page should only be showing the "Active" volunteers, so it should hide the 2 "inactive" volunteers, but it looks like it is showing everything for some reason.

@colinsoleim

Copy link
Copy Markdown
Collaborator Author

it looks like the build is failing with:

Failure/Error: expect(page.all("table#volunteers tr").count).to eq 4
     
       expected: 4
            got: 6

That's probably just the new UI element showing up in an unspecific page search

Yeah I just edited the test, and it's still failing even after the initial expect was removed. It looks like the jquery datatable filtering isn't working on Travis for some reason. I'll look into it now.

@colinsoleim

Copy link
Copy Markdown
Collaborator Author

Looks like there was an error with this test after we tried debugging some of the issues with the Heroku CSS. For some reason, upgrading some of the npm packages caused the issue, might have to be careful with that in the future in case we do have to upgrade. I reverted the versions for now, and everything appears to be fixed.

@compwron compwron merged commit 579ab66 into rubyforgood:master May 23, 2020
@compwron

Copy link
Copy Markdown
Collaborator

Thanks!!
Argh

@colinsoleim colinsoleim deleted the issue-90-edit-assigned-volunteers branch May 24, 2020 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants