-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CS169L SP24: Iter 2-4 Changes #314
Conversation
Align frontend for PD CRUD to be similar to the schools page
187227079/features/pd backend
187384622/new email model - PR4 - Now add multi-personal-email feature
Professional Development Feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of good stuff here, some minor fixes needed.
<%= teacher.primary_email %> | ||
<% if teacher.personal_emails.present? %> | ||
<% teacher.personal_emails.each do |email| %> | ||
<br><%= email %> | ||
<% end %> | ||
<% end %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for now, but maybe this should be a helper which returns the right html
<div class='form-group row'> | ||
<div class='col-12'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix this in the future
@@ -19,6 +20,9 @@ | |||
resources :schools | |||
resources :pages, param: :url_slug | |||
resources :email_templates, except: [:show] | |||
resources :professional_developments do | |||
resources :pd_registrations, except: [:show] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Verify the set needed. I don't think we need #index or #new, #edit routes. Do we even need #update or just create/delete
@@ -163,6 +168,24 @@ def self.education_level_options | |||
Teacher.education_levels.map { |sym, val| [sym.to_s.titlecase, val] } | |||
end | |||
|
|||
def self.language_options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: this is not really necessary.
validates :email, uniqueness: true | ||
validates :personal_email, uniqueness: true, if: -> { personal_email.present? } | ||
validate :ensure_unique_personal_email, if: -> { email_changed? || personal_email_changed? } | ||
WORLD_LANGUAGES = [ "Afrikaans", "Albanian", "Arabic", "Armenian", "Basque", "Bengali", "Bulgarian", "Catalan", "Cambodian", "Chinese (Mandarin)", "Croatian", "Czech", "Danish", "Dutch", "English", "Estonian", "Fiji", "Finnish", "French", "Georgian", "German", "Greek", "Gujarati", "Hebrew", "Hindi", "Hungarian", "Icelandic", "Indonesian", "Irish", "Italian", "Japanese", "Javanese", "Korean", "Latin", "Latvian", "Lithuanian", "Macedonian", "Malay", "Malayalam", "Maltese", "Maori", "Marathi", "Mongolian", "Nepali", "Norwegian", "Persian", "Polish", "Portuguese", "Punjabi", "Quechua", "Romanian", "Russian", "Samoan", "Serbian", "Slovak", "Slovenian", "Spanish", "Swahili", "Swedish ", "Tamil", "Tatar", "Telugu", "Thai", "Tibetan", "Tonga", "Turkish", "Ukrainian", "Urdu", "Uzbek", "Vietnamese", "Welsh", "Xhosa" ].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we can put this somewhere else.
|
…er-Tracker into 187460464/bugfix/tooltip * '187460464/bugfix/tooltip' of github.com:cs169/BJC-Teacher-Tracker: Update app/models/teacher.rb Update db/seed_data.rb Little cleanup CS169L work
This PR incorporates many changes
Pivotal Tracker Link
What this PR does:
This pull request addresses a bug related to tooltip persistence upon clicking checkboxes. Previously, tooltips remained visible even after clicking a checkbox. The solution involves triggering a redraw of the table with
$tables.draw()
upon a checkbox change. Additionally, during each table redraw, all tooltips are first disposed of and then reinitialized. This ensures that tooltips only appear when needed and do not persist inappropriately.Include screenshots, videos, etc.
Before:
After:
Who authored this PR?
@perryzjc
@realmichaeltao
How should this PR be tested?
Yes
Since this change primarily affects frontend functionality, traditional backend testing frameworks like Cucumber or RSpec are not applicable here.
Check tooltip behavior when multiple checkboxes are interacted with in quick succession.
Are there any complications to deploying this?
No
Checklist:
michael/12345-add-new-feature
Any branch name will do as long as the story ID is there. You can usegit checkout -b [new-branch-name]
)