Commit d4e1950e authored by Kaspar Vollenweider's avatar Kaspar Vollenweider

Merge branch 'fix/small_fixes_mr_number_two' into 'develop'

Fix/small fixes mr number two

See merge request !940
parents e55d7727 4ba52268
Pipeline #40138 passed with stage
in 37 minutes and 14 seconds
......@@ -35,7 +35,7 @@ class ReminderMailingsController < ApplicationController
else
redirect_to new_email_template_path,
notice: 'Sie müssen eine aktive E-Mailvorlage haben,
bevor Sie eine Beendigungs E-Mail erstellen können.'
bevor Sie eine Abschlussevaluations E-Mail erstellen können.'
end
authorize @reminder_mailing
end
......
......@@ -52,13 +52,13 @@ hr
td= @assignment.hours.last&.hours || 0.0
- else
h2.m-t-20 Beendigung Abschliessen
h2.m-t-20 Abschlussevaluation Abschliessen
= simple_form_for(@assignment, url: update_terminated_at_assignment_path, method: :put) do |f|
.row
.col-xs-12.col-md-6
fieldset
legend Rückmeldungen zur Beendigung des Einsatzes
legend Rückmeldungen zur Abschlussevaluation des Einsatzes
= f.input :term_feedback_activities
= f.input :term_feedback_success
= f.input :term_feedback_problems
......
......@@ -51,15 +51,38 @@ wb.add_worksheet(name: 'Veranstaltung') do |sheet|
sheet.add_row(['Teilnehmerliste'], types: :string, style: col_header)
sheet.add_row(['Teilnehmeranzahl', @event.volunteers.count], types: [:string, :integer], style: [col_header, standard_format])
2.times { sheet.add_row }
sheet.add_row(['Name', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang'], types: :string, style: col_header)
row_options = {
types: [
:string, # 00
:string, # 01
:string, # 02
:string, # 03
:string, # 04
:string, # 05
:integer, # 06
],
style: [
standard_format, # 00
standard_format, # 01
standard_format, # 02
date_format, # 03
standard_format, # 04
standard_format, # 05
standard_format, # 06
]
}
sheet.add_row(['Vorname', 'Nachname', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang'], types: :string, style: col_header)
@event.volunteers.map do |volunteer|
[
volunteer.contact&.full_name,
volunteer.contact&.first_name,
volunteer.contact&.last_name,
volunteer.contact&.primary_email,
volunteer.accepted_at.present? ? l(volunteer.accepted_at.to_date) : nil,
volunteer.contact&.full_address,
volunteer.contact&.primary_phone,
volunteer.birth_year&.year,
volunteer.birth_year&.year
]
end.each { |row| sheet.add_row row, row_options }
end
......@@ -44,10 +44,10 @@ de:
term_remaining_hours: Restliche Stunden
reminder_mailings:
kinds: &id-kinds-enum-values
trial_period: Probezeit
trial_period: Probezeit-Feedback
half_year_process_email: 'Halbjahres Prozess'
half_year_process_overdue: 'Halbjahres Erinnerung'
termination: Beendigung
termination: Abschlussevaluation
acceptance: &id-client-acceptance
accepted: Angemeldet
rejected: Abgelehnt
......@@ -735,7 +735,7 @@ de:
assignment: Begleitung
signup: Anmeldung
trial: Probezeit
termination: Beendigung
termination: Abschlussevaluation
half_year_process_email: 'Halbjahres Prozess'
half_year_process_overdue: 'Halbjahres Erinnerung'
index:
......
......@@ -27,9 +27,10 @@ class EventsXlsxExportTest < ActionDispatch::IntegrationTest
assert_xls_cols_equal(wb, 6, 0, 'Datum', I18n.l(@event.date))
assert_xls_cols_equal(wb, 7, 0, 'Beschreibung', @event.description)
assert_xls_cols_equal(wb, 12, 0, 'Teilnehmeranzahl', @event.volunteers.count)
assert_xls_cols_equal(wb, 15, 0, 'Name', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang')
assert_xls_cols_equal(wb, 15, 0, 'Vorname', 'Nachname', 'Mailadresse', 'Beginn als FW', 'Adresse', 'Telefon', 'Jahrgang')
assert_xls_cols_equal(wb, 16, 0,
@event_volunteer.volunteer.full_name,
@event_volunteer.volunteer.contact.first_name,
@event_volunteer.volunteer.contact.last_name,
@event_volunteer.volunteer.contact.primary_email,
I18n.l(@event_volunteer.volunteer.accepted_at.to_date),
@event_volunteer.volunteer.contact.full_address,
......
......@@ -112,7 +112,7 @@ class ReminderMailingsTest < ApplicationSystemTestCase
first('input[type="submit"]').click
assert page.has_text? 'Erinnerungs-Mailing wurde erfolgreich erstellt.'
assert page.has_text? 'Art Beendigung'
assert page.has_text? 'Art Abschlussevaluation'
assert page.has_text? 'Status Nicht versandt'
assert page.has_text?(@volunteer_assignment.reminder_mailing_volunteers.first.process_template[:subject])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment