Commit Graph

44 Commits

Author SHA1 Message Date
decabeza
abf04bea4c Add related content section on proposal dashboard 2019-09-11 19:45:19 +02:00
Javi Martín
a21240b230 Use Date.current and Time.current
Using Date.today and Time.now might lead to inconsistencies if the time
zone the application uses is not the same as the system time zone.
2019-08-28 20:32:40 +02:00
Alberto
2f8505332e Merge pull request #3574 from consul/remove-dashboard-polls
Allow users to delete dashboard polls
2019-06-01 11:06:34 +02:00
decabeza
3855bf26ad Allow users to delete dashboard polls 2019-05-31 11:55:23 +02:00
decabeza
4c5b2723f4 Create new messages section for proposal's dashboard 2019-05-31 11:42:15 +02:00
Javi Martín
307cf24846 Use describe on feature tests
The `type: :feature` is automatically detected by RSpec because these
tests are inside the `spec/features` folder. Using `feature` re-adds a
`type: :feature` to these files, which will result in a conflict when we
upgrade to Rails 5.1's system tests.

Because of this change, we also need to change `background` to `before`
or else these tests will fail.
2019-05-28 16:36:54 +02:00
Javi Martín
55c8fa3297 Fix obsolete respond_with_bip usage
Since we removed the `best_in_place` gem, this method doesn't exist
anymore. We're replacing it with what the method actually does.

Note the test doesn't check the poll is correctly updated. We could add
a `visit proposal_dashboard_polls_path(proposal)` before checking the
"Show results" field, but then we would enter a race condition between
this request and the AJAX request. A proper solution would be to provide
actual feedback to the user so they know the poll has been updated, and
then checking that feedback is present in the tests.
2019-05-09 19:41:04 +02:00
decabeza
9f973bf789 Add message on dashboard request to archived proposals 2019-04-29 15:46:44 +02:00
decabeza
20f505ab7c Fix specs 2019-04-29 15:44:41 +02:00
voodoorai2000
dfbdc0568c Allow actions to be unexecuted
Before actions could be marked as executed. With this commit we are also allowing actions to be marked as unexecuted.
2019-04-29 15:43:53 +02:00
voodoorai2000
6f3b213612 Refactor proposal poll routes
Moving routes from custom file to the proposal's routes file.
2019-04-29 15:43:25 +02:00
voodoorai2000
93972eeb33 Use custom url for proposal poll results 2019-04-29 15:42:27 +02:00
voodoorai2000
93ff173a0d Use a custom url for proposal polls
Before we used the standard poll url (vota/:id) for a user generated poll.

However this url is considered too important for this kind of polls, so we are changing it to a namespaced url (proposals/:proposal_id/polls/:id)
2019-04-29 15:42:04 +02:00
decabeza
0994ef2342 Hide request to admin button for archived proposals 2019-04-24 14:08:22 +02:00
decabeza
4100bf2ddf Update dashboard specs 2019-04-24 14:00:38 +02:00
decabeza
c76b465ce8 Show message when request a resource to admins 2019-04-24 13:58:42 +02:00
decabeza
5b8fe4bb98 Add truncate to proposed action description
The show description link only appears if the description is longer than defined length.
2019-04-24 13:58:37 +02:00
decabeza
91be3cf775 Fix more hound warnings 2019-03-27 15:22:14 +01:00
decabeza
e5bff01027 Replace incoming filter on dashboard polls
Add starts_at attribute intead of incoming because this scope doesn't exists anymore.
2019-03-26 18:25:35 +01:00
decabeza
f47ec9d7dc Fix hound warnings 2019-03-26 18:21:19 +01:00
Alberto
29a87e2746 Merge branch 'dashboard' into dashboard-polish 2019-03-26 12:19:20 +01:00
Raimond Garcia
f6526f4a45 Merge pull request #3271 from Platoniq/dashboard-user-communication
Dashboard user communication
2019-03-26 12:10:18 +01:00
Senén Rodero Rodríguez
5e98c23be5 Fix HTML markup
We cannot use 'id' html attributes on nested answers
because there will be many answers form each question so
this would have generated invalid HTML.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
bc2d020d7e Add nested specs
Check remove behavior of poll nested resources: Questions and Answers
2019-03-21 14:51:17 +01:00
taitus
a1de5b2334 Display tag "new" on actions
An author will see a "new" tag on each action or resource that has appeared on his dashboard since his last login.
Too add "new" tag on dashbord menu when there are new resources.
2019-03-21 12:29:31 +01:00
decabeza
d07a8712bf Remove duplicated spec
Same spec on line 115
2019-03-19 18:25:48 +01:00
decabeza
3f1d3f3443 Fix hound warnings 2019-03-19 18:24:49 +01:00
Alberto
7b2258aeb0 Merge pull request #3263 from Platoniq/dashboard-recommended-actions-page
Dashboard recommended actions page
2019-03-19 16:21:28 +01:00
taitus
9fac661f0c Create scope by_proposal
Add to active_for class method and to active_resources controller method the new scope by_proposal.
 - Published proposal: display all actions.
 - Draft proposal: only display actions for draft proposals.
2019-02-10 00:18:50 +01:00
Alessandro Cuoghi
2e9973cd4a Add new texts
- Changed texts
- Fixed Spec
2019-02-04 16:20:44 +01:00
taitus
487c485fe0 Add new section on sidebar menu for recommended proposals
- Display recommended_proposals on new section as goals with toogle.
- Divide recommended actions into actions done and actions pending to clarify the information to the user as summary_recomended_actions.
2019-02-04 11:48:47 +01:00
taitus
45afbc0b10 New summary for recommended actions section on progress page
- Divide recommended actions into actions done and actions pending.
- Display recomended actions as goals (diplay four by defalut) without toggle but with link to new recommended actions page.
- Display description over short_description
2019-02-04 11:39:04 +01:00
decabeza
4ea1f7732b Updates i18n on specs 2018-10-08 11:26:53 +02:00
decabeza
b7c3a918e3 Updates js class name and id name 2018-10-05 18:18:42 +02:00
Juan Salvador Pérez García
42d448248c Routes have been refactored
Dashboard routes have been refactored. Now instead of having resources
for dashboard and routes inside a dashboard namespace the proposal
routes contain a dashboar singleton containing everything related to it.
2018-09-17 15:44:45 +02:00
Juan Salvador Pérez García
5b5095b37b Bugfixing and several enhancements
* Added missing specs
* Removed models that were refactored previously
* Added simplecov when executing specs locally
* Fixed bug in poll model validation that was causing an 500 error.
2018-08-01 13:26:30 +02:00
Juan Salvador Pérez García
6cc1ddb9af Fixes #231
Implements a poster feature for the proposals dashboard
2018-07-31 12:50:25 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
e5f9cf6710 Fixed #239
Proposals dashboard refactored to dashboard.
Added missing specs for the dashboard.
2018-07-24 15:52:43 +02:00
Juan Salvador Pérez García
3b37b4b09d Fixes #238
Applies new card design for polls in proposals dashboard.
Fixes warnings during tests.
Adds tests for new card design for polls in proposals dashboard.
2018-07-23 10:31:50 +02:00
Juan Salvador Pérez García
4b8cc85c49 Fixes #234
View questions now is View results and redirects to results
in public view.

Fixed flaky spec that was making the tests fail.

Added missing specs for polls feature as well as poll model.
2018-07-19 17:15:05 +02:00
Juan Salvador Pérez García
6bb9b1be8a Fixed failing specs
Fixed failing specs after redesign of polls in dashboard
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
084e9855e4 Fixed some failing specs 2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
2be107f4da Specs
Added specs and fixed some issues found after executing them
2018-07-17 17:57:30 +02:00