...
 
Commits (11)
......@@ -129,7 +129,7 @@ class ClientsController < ApplicationController
params.require(:client).permit(
:gender_request, :age_request, :other_request, :birth_year, :salutation,
:nationality, :entry_date, :permit, :goals, :education, :interests, :acceptance,
:comments, :additional_comments, :involved_authority_id, :competent_authority,
:comments, :additional_comments, :involved_authority_id, :competent_authority, :other_authorities,
:actual_activities, :cost_unit, language_skills_attributes, relatives_attributes,
contact_attributes, availability_attributes
)
......
......@@ -44,6 +44,8 @@ nav.navbar.section-navigation
th= t_attr(:involved_authority, Client)
th.truncate-th
span= sort_link @q, :competent_authority, t_attr(:competent_authority, Client)
th.truncate-th
span= sort_link @q, :other_authorities, t_attr(:other_authorities, Client)
th.truncate-th
span= sort_link @q, :created_at, t_attr(:created_at, Client)
- if policy(Client).show_comments?
......@@ -76,6 +78,7 @@ nav.navbar.section-navigation
- if policy(Client).superadmin_privileges?
td= link_to client.involved_authority.full_name, profile_url_path(client.involved_authority) if client.involved_authority
td= client.competent_authority
td= client.other_authorities
td.no-wrap= l(client.created_at.to_date)
- if policy(Client).show_comments?
= td_truncate_content_modal(client.comments, 'Bemerkungen')
......
......@@ -31,6 +31,7 @@ tr id=dom_id(client)
- if policy(Client).superadmin_privileges?
td= link_to client.involved_authority.full_name, profile_url_path(client.involved_authority) if client.involved_authority
td= client.competent_authority
td= client.other_authorities
td.no-wrap= l(client.created_at.to_date)
- if policy(Client).show_comments?
= td_truncate_content_modal(client.comments, 'Bemerkungen')
......@@ -66,9 +66,6 @@ fieldset
= f.input :age_request, collection: Client::AGE_REQUESTS, default: :age_no_matter
= f.input :other_request
fieldset
legend Verfügbarkeit?
= render 'availability/form', f: f
.col-xs-12.col-md-6
fieldset
legend Interne Kriterien
......@@ -78,6 +75,16 @@ fieldset
= f.association :involved_authority, collection: @social_workers
= f.input :competent_authority
= f.input :other_authorities
.row
.col-xs-12.col-md-6
fieldset
legend Verfügbarkeit?
= render 'availability/form', f: f
.row
.col-xs-12.col-md-6
fieldset
legend= t_attr(:cost_unit)
= f.input :cost_unit, collection: Client.cost_unit_collection, include_blank: true, label_html: { class: 'sr-only' }
......
......@@ -27,6 +27,8 @@ h1 Klient/innen
th= sort_link @q, :involved_authority_profile_contact_full_name, t_attr(:involved_authority)
th.truncate-th
span= sort_link @q, :competent_authority, t_attr(:competent_authority, Client)
th.truncate-th
span= sort_link @q, :other_authorities, t_attr(:other_authorities, Client)
th.truncate-th
span= sort_link @q, :created_at, t_attr(:created_at, Client)
- if policy(Client).show_comments?
......
......@@ -59,6 +59,10 @@ h1.m-b-20= @client.contact.full_name
td= t_attr(:competent_authority)
td= @client.competent_authority
tr
td= t_attr(:other_authorities)
td= @client.other_authorities
tr
td Kostenträger
td
......
......@@ -50,6 +50,8 @@ table.table.table-striped
th= t_attr(:volunteers)
th= sort_link @q, :group_offer_category_category_name, t_attr(:group_offer_category)
th= sort_link @q, :offer_type, t_attr(:external, GroupOffer)
th= sort_link @q, :created_at
th= sort_link @q, :period_end
tbody
- @group_offers.each do |offer|
......@@ -97,6 +99,8 @@ table.table.table-striped
br
td= link_to offer.group_offer_category.category_name, url_for(q: search_parameters.merge(group_offer_category_id_eq: offer.group_offer_category.id))
td= t_attr(offer.external? ? :external : :internal, GroupOffer)
td= offer.created_at
td= offer.period_end
= bootstrap_paginate(@group_offers)
......
......@@ -24,7 +24,9 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet|
t_attr(:duration),
t_attr(:offer_state),
'Verantwortliche/r',
t_attr(:volunteers)
t_attr(:volunteers),
t_attr(:created_at),
t_attr(:period_end)
]
sheet.add_row header_row, style: col_header
......@@ -46,6 +48,7 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet|
type = t("offer_type.#{offer.offer_type}") if offer.offer_type?
state = t("offer_state.#{offer.offer_state}") if offer.offer_state?
creator = offer.creator if offer.creator
period_end = offer.period_end.to_date if offer.period_end
volunteers = offer.volunteers.map do |volunteer|
role_key = offer.responsible?(volunteer) ? 'responsible' : 'member'
"#{volunteer} (#{I18n.t("activerecord.attributes.group_assignment.#{role_key}")}) #{volunteer.contact.primary_email}"
......@@ -64,7 +67,9 @@ wb.add_worksheet(name: t('group_offers', count: 2)) do |sheet|
durations,
state,
creator,
volunteers.join("\r")
volunteers.join("\r"),
offer.created_at.to_date,
period_end
], types: :string, style: col_body
end
end
......@@ -26,6 +26,8 @@
th= t_attr(:comments)
th= sort_link @q, :external
th= sort_link @q, :created_at, t_attr(:created_at)
th= sort_link @q, :accepted_at, t_attr(:accepted_at)
th= sort_link @q, :resigned_at, t_attr(:resigned_at)
tbody
= render volunteers
......
......@@ -52,3 +52,5 @@ tr id=(dom_id(volunteer))
= td_truncate_content_modal(volunteer.comments, 'Bemerkungen')
td = volunteer.external? ? t_attr(:external, Volunteer) : t_attr(:internal, Volunteer)
td = l(volunteer.created_at.to_date)
td = l(volunteer.accepted_at.to_date)
td = l(volunteer.resigned_at.to_date) if volunteer.resigned_at
\ No newline at end of file
......@@ -28,8 +28,11 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
t_attr(:created_at),
t_attr(:updated_at),
t_attr(:assignment_count),
t_attr(:group_assignment_count),
t_attr(:waive_alternative),
t_attr(:intro_course)
t_attr(:intro_course),
t_attr(:accepted_at),
t_attr(:resigned_at)
]
......@@ -42,6 +45,8 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
cell_styles[6] = postal_code
@volunteers.each do |volunteer|
contact = volunteer.contact
resigned_at = volunteer.resigned_at.to_date if volunteer.resigned_at
sheet.add_row [
volunteer.id,
t("salutation.#{volunteer.salutation}"),
......@@ -61,8 +66,11 @@ wb.add_worksheet(name: 'Freiwillige') do |sheet|
l(volunteer.created_at.localtime),
l(volunteer.updated_at.localtime),
volunteer.assignments.count,
volunteer.group_assignments.count,
volunteer.waive,
volunteer.intro_course
volunteer.intro_course,
volunteer.accepted_at.to_date,
resigned_at
], types: cell_types, style: cell_styles
end
end
......@@ -333,6 +333,7 @@ de:
cost_unit: Kostenträger
city: Stadt
competent_authority: Anmeldende Stelle
other_authorities: Weitere involvierte Stellen
date_of_year: Geburtsjahr
education: Beruf oder Ausbildung im Herkunftsland
entry_date: Einreisedatum
......@@ -504,6 +505,7 @@ de:
additional_nationality: Zusätzliche Nationalität
additional_phone_numbers: Zusätzliche Telefonnummern
assignment_count: Anzahl begleitungen
group_assignment_count: Anzahl Gruppenangebote
availability: Verfügbarkeit
created_at: Anmeldedatum
external: Extern
......
class AddOtherAuthoritiesToClients < ActiveRecord::Migration[5.1]
def change
add_column :clients, :other_authorities, :text
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20190314100216) do
ActiveRecord::Schema.define(version: 20190703153811) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -114,7 +114,7 @@ ActiveRecord::Schema.define(version: 20190314100216) do
t.text "agreement_text", default: "Freiwillige beachten folgende Grundsätze während ihres Einsatzes in der AOZ:\n* Verhaltenskodex für Freiwillige\n* Rechte und Pflichten für Freiwillige\n* AOZ Leitlinien Praktische Integrationsarbeit\n\nAllenfalls auch\n* Verpflichtungserklärung zum Schutz der unbegleiteten minderjährigen Asylsuchenden (MNA)\n* Niederschwellige Gratis-Deutschkurse: Informationen für freiwillige Kursleitende\n"
t.string "pdf_file_name"
t.string "pdf_content_type"
t.integer "pdf_file_size"
t.bigint "pdf_file_size"
t.datetime "pdf_updated_at"
t.bigint "submitted_by_id"
t.bigint "reactivated_by_id"
......@@ -217,6 +217,7 @@ ActiveRecord::Schema.define(version: 20190314100216) do
t.text "additional_comments"
t.bigint "reactivated_by_id"
t.datetime "reactivated_at"
t.text "other_authorities"
t.index ["acceptance"], name: "index_clients_on_acceptance"
t.index ["accepted_at"], name: "index_clients_on_accepted_at"
t.index ["birth_year"], name: "index_clients_on_birth_year"
......@@ -383,7 +384,7 @@ ActiveRecord::Schema.define(version: 20190314100216) do
t.text "agreement_text", default: "Freiwillige beachten folgende Grundsätze während ihres Einsatzes in der AOZ:\n* Verhaltenskodex für Freiwillige\n* Rechte und Pflichten für Freiwillige\n* AOZ Leitlinien Praktische Integrationsarbeit\n\nAllenfalls auch\n* Verpflichtungserklärung zum Schutz der unbegleiteten minderjährigen Asylsuchenden (MNA)\n* Niederschwellige Gratis-Deutschkurse: Informationen für freiwillige Kursleitende\n"
t.string "pdf_file_name"
t.string "pdf_content_type"
t.integer "pdf_file_size"
t.bigint "pdf_file_size"
t.datetime "pdf_updated_at"
t.bigint "submitted_by_id"
t.bigint "reactivated_by_id"
......@@ -553,7 +554,7 @@ ActiveRecord::Schema.define(version: 20190314100216) do
t.datetime "updated_at", null: false
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.bigint "avatar_file_size"
t.datetime "avatar_updated_at"
t.datetime "deleted_at"
t.boolean "flexible", default: false
......@@ -771,7 +772,7 @@ ActiveRecord::Schema.define(version: 20190314100216) do
t.datetime "deleted_at"
t.string "avatar_file_name"
t.string "avatar_content_type"
t.integer "avatar_file_size"
t.bigint "avatar_file_size"
t.datetime "avatar_updated_at"
t.bigint "user_id"
t.string "rejection_type"
......
......@@ -3,7 +3,7 @@ require 'selenium/webdriver'
Capybara.register_driver :chrome_headless do |app|
chrome_options = {
chromeOptions: { args: %w[headless disable-gpu no-sandbox window-size=1600x2000] }
chromeOptions: { args: %w[headless disable-gpu no-sandbox window-size=1600x2000], w3c: false }
}
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(chrome_options)
Capybara::Selenium::Driver.new(app, browser: :chrome, desired_capabilities: capabilities)
......
......@@ -23,7 +23,9 @@ class GroupOffersXlsxExportTest < ActionDispatch::IntegrationTest
'Dauer',
'FW-Nachfrage',
'Verantwortliche/r',
'Freiwillige'
'Freiwillige',
'Erstellt am',
'Angebotsenddatum'
)
assert_xls_cols_equal(wb, 2, 1, GroupOffer.first.title)
end
......
......@@ -33,8 +33,11 @@ class VolunteersXlsxExportTest < ActionDispatch::IntegrationTest
'Anmeldedatum',
'Aktualisiert am',
'Anzahl begleitungen',
'Anzahl Gruppenangebote',
'Spesenverzicht',
'Einführungskurs besucht'
'Einführungskurs besucht',
'Akzeptiert am',
'Beendet am'
)
end
......
......@@ -49,6 +49,7 @@ class ClientsTest < ApplicationSystemTestCase
select('Angemeldet', from: 'Prozess')
fill_in 'Bemerkungen', with: 'asdfasdf'
fill_in 'Anmeldende Stelle', with: 'asdfasdf'
fill_in 'Weitere involvierte Stellen', with: 'asdfasdf'
select @social_worker.full_name, from: 'Fallführende Stelle'
select('Gemeinde', from: 'Kostenträger')
page.check('client_evening')
......