Skip to content

Commit

Permalink
Feature/625 readd language selection (#630)
Browse files Browse the repository at this point in the history
* Bring back language level svgs

* implement correct language level indicators and add tooltip for language cert if needed

* fix padding of language display

* Create working form fields to edit languages in person edit view

* Add language selection squares, but they do nothing yet

* Add hidden _destroy field to person language form

* make selection of languages possible by creating a stimulus controller that handles the visibility

* Make person role helper dynamic to use it for every dynamic form, rename partials, remove the language selection and make creation & deletion of languages possible

* remove now unused stimulus controller

* Make form automatically add mandatory languages unless they already exist, make mandatory langues undeletable

* Refactor code in view and validate language level in controller

* make form submit disabled fields

* Remove unnecessary helper method and dublicate line in form that is not wanted anymore

* Remove unnecessary helper method

* Add classes to form for testing and expand people feature specs to now also test language selection

* Fix update controller method, write test to test all functions of said controller method

* Make edit view wider on small screens

* Resolve rubocop offense

* restyle languages on show view of people

* Make form disable already selected languages

* add a bit of styling to language display

* Make fields deactivate when new fields are added and reactivated when they are deleted

* Make language level selection and certificate input appear on the same height add new method to sort languages

* Remove unused css classes

* Refactor sort_languages method and use it in view

* Add - as default option to language selection and sort languages in edit view

* Make default option not deactivate

* Fix deactivating of languages that are already selected when form fails

* Make view not display certificate if it is blank

* Write test that tests if already selected languages are disabled in other dropdowns

* Restly show and edit view of person a bit

* Rewrite test that tests disabling of languages

* bring back css class that shouldnt have been deleted

* Fix competence feature specs by formatting fixtures correctly and normalizing in tests

* Fix cv_spec spec

* Fix rubocop offenses

* Move logic from controller to concerns

* Remove unnecessary concern

* Outsource language skills levels to a helper method

* Correct rubocop offense

* Remove default option from language select and make it choose first undisabled option when creating a new language

* Adjust code comment to match what is actually done in lang selection js controller
  • Loading branch information
RandomTannenbaum committed Apr 12, 2024
1 parent 43721aa commit 9bd8aa0
Show file tree
Hide file tree
Showing 26 changed files with 416 additions and 38 deletions.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/a1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/a2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/b1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/b2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/c1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/language-levels/c2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions app/assets/images/language-levels/icon_certificate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9bd8aa0

Please sign in to comment.