Skip to content

Add registration system to meetings#6662

Merged
tramuntanal merged 68 commits intodevelopfrom
add_registration_system
Nov 11, 2020
Merged

Add registration system to meetings#6662
tramuntanal merged 68 commits intodevelopfrom
add_registration_system

Conversation

@anaghavl
Copy link
Copy Markdown
Contributor

@anaghavl anaghavl commented Oct 12, 2020

🎩 What? Why?

This PR adds a meetings component option to enable the external registration system. External registration have an extra field to add the URL of external registration.

Registration type is an option to be selected - on this platform, registration disabled and on different platform(only if the component setting is set to true)
Screenshot 2020-10-12 at 11 36 03 PM

Drop down options
Screenshot 2020-10-12 at 11 43 02 PM

On choosing registration disabled the user doesn't have to enter anything.

On choosing on this platform

  1. The public view can enter available slots and registration terms
    Screenshot 2020-10-12 at 11 36 51 PM

  2. The admin view can enter available slots
    Screenshot 2020-10-12 at 11 38 23 PM

On choosing on different platform (Assuming the component setting is enabled)
Both admin and public view and enter external registration link. There is also a display of the disclaimer.
Public side
Screenshot 2020-10-12 at 11 40 15 PM

Admin side
Screenshot 2020-10-12 at 11 40 41 PM

Registration button getting disabled
Screenshot 2020-10-21 at 1 35 17 AM

📌 Related Issues

Link your PR to an issue

Testing

Describe the best way to test or validate your PR.

📋 Checklist

🚨 Please review the guidelines for contributing to this repository.

  • Add component config to allow external registrations
  • Add registrations_url and registration_type field to the meetings table
  • Add fields to the meetings form
  • Set "registrations disabled" by default and update all official meetings to set the value to "on_this_platform"
  • Only show the option on different platform if component setting to enable external registrations is set to true
  • Only show available slots and registration terms in public side if on this platform option is selected
  • Only show available slots in admin side if on this platform option is selected
  • Only show registration url in public side and admin side if on different platform option is selected
  • Add system specs ensuring fields are hidden
  • Registration action button gets disabled when you registration disabled option is selected
    PR deployed on https://decidim-staging-pr-204.herokuapp.com/admin/participatory_processes/qui-aperiam/components/2/manage/meetings/new.

♥️ Thank you!

@anaghavl anaghavl requested a review from mrcasals October 12, 2020 18:59
@carolromero
Copy link
Copy Markdown
Member

Hi @anaghavl, I've checked this, thanks for the clarification about the conditional fields. Awesome work! 🚀

mrcasals
mrcasals previously approved these changes Oct 26, 2020
Copy link
Copy Markdown
Contributor

@mrcasals mrcasals left a comment

Choose a reason for hiding this comment

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

Looks good to me! There are some conflicts though, can you check them out?

@tramuntanal
Copy link
Copy Markdown
Contributor

Hi @anaghavl we're ready for review, can you resolve conflicts please?

@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Nov 4, 2020

@tramuntanal I've fixed the conflicts! 😄

@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Nov 5, 2020

@tramuntanal @decidim/core can you review this, please? 😄

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Good job @anaghavl !
Can you check the small detail I've commented please?

attribute :registration_terms, String

TYPE_OF_MEETING = %w(in_person online).freeze
REGISTRATION_TYPE = %w(registration_disabled on_this_platform on_different_platform).freeze
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why re define the same constant in the model here? Can't we remove this constant?

end

def registration_type_select
REGISTRATION_TYPE.map do |type|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
REGISTRATION_TYPE.map do |type|
Decidim::Meetings::Meeting::REGISTRATION_TYPE.map do |type|

@tramuntanal tramuntanal self-assigned this Nov 10, 2020
@orlera
Copy link
Copy Markdown
Contributor

orlera commented Nov 10, 2020

@tramuntanal now using REGISTRATION_TYPE and TYPE_OF_MEETING from the model. Applied the same change to the admin area form since it was doing the same. (21f0730)

Also, noticed that the "Registration terms" field was rendered as a map. Changed it to behave like the other translatable fields in the form.
BEFORE
image
AFTER
image

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Good job @orlera !

@tramuntanal tramuntanal merged commit f425f34 into develop Nov 11, 2020
@tramuntanal tramuntanal deleted the add_registration_system branch November 11, 2020 07:54
@tramuntanal tramuntanal changed the title Add registration system Add registration system to meetings Nov 11, 2020
edgarlatorre pushed a commit that referenced this pull request Nov 11, 2020
* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* WIP added registration options to meetings form

* fixing specs and merging branch

* Fix en.yml file

* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* Address feedback

* Fix i18n

* Remove config option

* fix failing specs

* test: select the type of meeting before filling in location

* remove extra stuff from conflicts

* fix example length lint error

* Resolving comments

* removing duplicate code

* remove trailing white space

* Changing migration file

* Remove component setting to allow external registration

* adding functionality to the registration button

* Add join meeting button for external registration for users

* Join meeting button fix

* fix failing specs

* fix the default error on form

* remove unwanted stuff

* Fix locale fail

* fix specs

* Merging develop and resolving conflicts

* Fix specs and lints

* refactor: use constants from model

* fix: only show default locale for registration terms in meeting form

Co-authored-by: Marc Riera Casals <mrc2407@gmail.com>
Co-authored-by: David Morcillo <david.morcillo@gmail.com>
Co-authored-by: Andrea Orler <andrea@codegram.com>
microstudi pushed a commit to Platoniq/decidim that referenced this pull request Jan 12, 2021
* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* WIP added registration options to meetings form

* fixing specs and merging branch

* Fix en.yml file

* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* Address feedback

* Fix i18n

* Remove config option

* fix failing specs

* test: select the type of meeting before filling in location

* remove extra stuff from conflicts

* fix example length lint error

* Resolving comments

* removing duplicate code

* remove trailing white space

* Changing migration file

* Remove component setting to allow external registration

* adding functionality to the registration button

* Add join meeting button for external registration for users

* Join meeting button fix

* fix failing specs

* fix the default error on form

* remove unwanted stuff

* Fix locale fail

* fix specs

* Merging develop and resolving conflicts

* Fix specs and lints

* refactor: use constants from model

* fix: only show default locale for registration terms in meeting form

Co-authored-by: Marc Riera Casals <mrc2407@gmail.com>
Co-authored-by: David Morcillo <david.morcillo@gmail.com>
Co-authored-by: Andrea Orler <andrea@codegram.com>
# Conflicts:
#	decidim-forms/app/views/decidim/forms/admin/questionnaires/edit.html.erb
#	decidim-meetings/app/presenters/decidim/meetings/meeting_presenter.rb
microstudi added a commit to Platoniq/decidim that referenced this pull request Jan 12, 2021
* Add online meetings (decidim#6572)

* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* Address feedback

* Fix i18n

* Remove config option

* test: select the type of meeting before filling in location

* Move URL details to cell

* Fix form

* Fix icon

* Fix edit form

Co-authored-by: Marc Riera Casals <mrc2407@gmail.com>
Co-authored-by: David Morcillo <david.morcillo@gmail.com>
# Conflicts:
#	decidim-meetings/app/commands/decidim/meetings/create_meeting.rb

* Add registration system (decidim#6662)

* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* WIP added registration options to meetings form

* fixing specs and merging branch

* Fix en.yml file

* Add config to allow online meetings

* Add online_meeting_url fields to DB

* Add fields to forms and commands

* Use `data-` attributes instead of specific field names

* Remove unused locales

* Fix JS

* Fix locale

* Fix forms specs

* Fix specs

* Hide meeting type and online url fields if online meetings are not allowed

* Show online meeting URL

* Ensure fields are hidden

* Fix meeting form

* Fix tests

* Add `type_of`meeting` column to meetings

It stores whether the meeting is in-person or online

* Filter meetings by type

* Add missing i18n string

* Validate URLs

* Address feedback

* Fix i18n

* Remove config option

* fix failing specs

* test: select the type of meeting before filling in location

* remove extra stuff from conflicts

* fix example length lint error

* Resolving comments

* removing duplicate code

* remove trailing white space

* Changing migration file

* Remove component setting to allow external registration

* adding functionality to the registration button

* Add join meeting button for external registration for users

* Join meeting button fix

* fix failing specs

* fix the default error on form

* remove unwanted stuff

* Fix locale fail

* fix specs

* Merging develop and resolving conflicts

* Fix specs and lints

* refactor: use constants from model

* fix: only show default locale for registration terms in meeting form

Co-authored-by: Marc Riera Casals <mrc2407@gmail.com>
Co-authored-by: David Morcillo <david.morcillo@gmail.com>
Co-authored-by: Andrea Orler <andrea@codegram.com>
# Conflicts:
#	decidim-forms/app/views/decidim/forms/admin/questionnaires/edit.html.erb
#	decidim-meetings/app/presenters/decidim/meetings/meeting_presenter.rb

* feat: automatically enalble registrations when meeting on this platform (decidim#6874)

* Allow creation of hybrid meetings (decidim#6891)

* Add Hybrid meeting events

* Normalize translations

* Run Linters

* Fixing I18n Key error

* Fixing Failing test

* Running linters

* Running linters

* Add Geocoder setup for hybrid meetings

* Fix issue with filter defaults
# Conflicts:
#	decidim-meetings/app/models/decidim/meetings/meeting.rb
#	decidim-meetings/app/services/decidim/meetings/meeting_search.rb

* Feature/15596 embed jitsi meeting (#65)

* Stub embedded jitsi videoconference

* Add embedded jitsi videoconference component

* Improve toolbar items control

* Remove iframe when videoconference over

* Use user role for videoconference

* Don't show videoconference if visitors not allowed

* Fix erb

* Fix rubocop offenses

* Add button to start meeting

* Log meetings attendance

* Remove whitespace

* Add videoconference setttings templates and docs

* Display "Embedded videoconference" in meeting card

* Set jitsi domain and api_url in config

* Fix offenses

* Log attendance

* Make rubocop happy

* Show attendance logs in admin

* Add missing value in secrets template

* Remove whitespace

* Normalize locale

* Don't require custom jitsi variables

* Add spec for permissions

* Make embedded videoconference an additional option for meetings

* Refactor permissions for embedded_videoconference as boolean

* Update commands and form

* Fix initializer defining empty videoconferences hash

* Update meetings form

* Improve meeting public page

* Rename js component for videoconference

* Improve class comment for attendance log command

* Simplify cell

* Improve index for logs

* Simplify videoconference cell

* Add spec for videoconference cell

* Fix rubocop offenses

* Change parent class for VideoconferenceAttendanceLogsController

* Fix rubocop offenses

* Normalize locales

* Fix missing and unused locale errors

* Add spec for create videoconference attendance log command

* Add spec for create videoconference attendance logs command

* Update meeting form spec

* Update meeting model spec

* Add spec for videoconference attendance log model

* Update spec for admin manage meetings

* Lint js

* Add spec for viewing attendance logs

* Normalize locale

* Add system spec for videoconference

* Add consent message to videoconference explanation

* Add missing translations

* Fix create meeting spec

* Fix update meeting command spec

* Prevent authenticity token error

* Fix toggle for embed videoconference checkbox

* Fix embed checkbox toggle

* Add seeds for embedded videoconference meetings

* Fix variable name

Co-authored-by: Vera Rojman <vrojman@protonmail.com>
# Conflicts:
#	decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb
#	decidim-meetings/config/locales/en.yml
#	decidim-meetings/lib/decidim/meetings/component.rb
#	decidim-meetings/spec/models/meeting_spec.rb
#	docs/services/videoconferences.md

* Add a config flag to disable the registration code (decidim#6698)

* Ref. DIFE-148
- add registration_code_enabled as an admin flag on meetings settings page
- remove registration code from email and notification
- do not display registration code on the interface after joining to a meeting

* Ref. DIFE-148
- hide "Validate registration code" from Admin - Components - Meeting section

* Ref. DIFE-148
- fix rspec error

* Ref. DIFE-148
- fix bad reference

* Ref. DIFE-148
- fix tests for join_meeting_spec.rb

* Ref. DIFE-148
- fix tests for meeting_registrations_spec.rb

* Ref. DIFE-148
- fix tests for registration_mailer_spec.rb

* Ref. DIFE-148
- fix tests for admin_manages_meetings_spec.rb

* Ref. DIFE-148
- fix tests for validate_registration_code_spec.rb

* Ref. DIFE-148
- fix linter errors

* Add functionality to enable/disable registration code.

* Add unit tests and fix the old ones.

* Add PR number to Change Log

* Updating the i18n tasks

* Fixing i18n specs

* Running linters on Changelog.md

* run linters

* Fixing Linking issues

* Remove changes done in CHANGELOG.md

* Ref. DIFE-148
- add registration_code_enabled as an admin flag on meetings settings page
- remove registration code from email and notification
- do not display registration code on the interface after joining to a meeting

* Ref. DIFE-148
- hide "Validate registration code" from Admin - Components - Meeting section

* Ref. DIFE-148
- fix bad reference

* Ref. DIFE-148
- fix tests for join_meeting_spec.rb

* Ref. DIFE-148
- fix tests for meeting_registrations_spec.rb

* Ref. DIFE-148
- fix tests for registration_mailer_spec.rb

* Ref. DIFE-148
- fix tests for admin_manages_meetings_spec.rb

* Ref. DIFE-148
- fix tests for validate_registration_code_spec.rb

* Add functionality to enable/disable registration code.

* Add PR number to Change Log

* Running linters on Changelog.md

* run linters

* Fixing Linking issues

* Remove changes done in CHANGELOG.md

* Remove changes done in CHANGELOG.md

* Set flag's default value to TRUE and remove duplicate entries

* Fix tests after changing the default value of flag

Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: Cristian Georgescu <georgescu.cristi@gmail.com>

* fix merge error

* fix merge errors

* fix more merge errors

Co-authored-by: anagha vl <44900292+anaghavl@users.noreply.github.com>
Co-authored-by: Andrea Orler <orlera@users.noreply.github.com>
Co-authored-by: Alexandru Emil Lupu <contact@alecslupu.ro>
Co-authored-by: roxanaopr <66411127+roxanaopr@users.noreply.github.com>
Co-authored-by: Cristian Georgescu <georgescu.cristi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants