Skip to content

Commit

Permalink
resolve conversations from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Feb 23, 2024
1 parent 3b8f448 commit ef1c144
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ group :development, :test do
end

group :development do
gem 'bullet', '~> 7.1', '>= 7.1.6'
gem 'bullet'
gem 'listen', '~> 3.0.5'
gem 'rb-readline'
# Spring speeds up development by keeping your application
Expand All @@ -71,6 +71,7 @@ group :test do
gem 'capybara'
gem 'selenium-webdriver'
gem 'simplecov'
# Use fixed version of webdrivers to avoid compatibility issues with chrome and chromedriver
gem 'webdrivers', '~> 5.3', '>= 5.3.1'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ DEPENDENCIES
bleib (= 0.0.8)
bootsnap
brakeman
bullet (~> 7.1, >= 7.1.6)
bullet
byebug
capybara
carrierwave
Expand Down
11 changes: 11 additions & 0 deletions app/controllers/people_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

class PeopleController < CrudController
include ExportController

# self.permitted_attrs = %i[birthdate location
# marital_status updated_by name nationality nationality2 title
# competence_notes company_id email department_id shortname]

# self.nested_models = %i[advanced_trainings activities projects
# educations language_skills person_roles
# people_skills categories]

# self.permitted_relationships = %i[person_roles people_skills]

def show
if format_odt?
export
Expand Down
6 changes: 6 additions & 0 deletions app/controllers/skills_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ class SkillsController < CrudController

self.permitted_attrs = %i[title radar portfolio default_set category_id]

def index
super
require 'pry'
binding.pry
end

def create
super(:location => skills_path,
render_on_failure: 'skills/form_update',
Expand Down
3 changes: 1 addition & 2 deletions app/javascript/controllers/dropdown_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import { Controller } from "@hotwired/stimulus"

// Connects to data-controller="dropdown-links"
export default class extends Controller {
connect() {
}
connect() {}

handleChange(event) {
window.location.href = event.target.dataset.value + event.target.value;
Expand Down
2 changes: 1 addition & 1 deletion app/views/people/_search.html.haml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
= form_with do |f|
%section{"data-controller"=>"dropdown"}
= f.collection_select :person_id, Person.all.sort_by(&:name), :id, :name, {:selected => person.id} , {class: "form-select w-100", "data-action": "change->dropdown#handleChange", "data-value": "/people/"}
= f.collection_select :person_id, Person.all.sort_by(&:name), :id, :name, {:selected => person&.id} , {class: "form-select w-100", "data-action": "change->dropdown#handleChange", "data-value": "/people/"}

0 comments on commit ef1c144

Please sign in to comment.