Commit 43998e99 authored by Jakub Motycka's avatar Jakub Motycka
Browse files

Merge branch 'feat/new-client-options' into 'develop'

feat: new client options

See merge request !1099
parents 28701ccd cac0bad7
Pipeline #108663 passed with stage
in 12 minutes and 29 seconds
......@@ -7,11 +7,11 @@ class Client < ApplicationRecord
include AcceptanceAttributes
enum acceptance: { accepted: 0, rejected: 1, resigned: 2 }
enum cost_unit: { city: 0, municipality: 1, canton: 2, refugee_housing: 3, resettlement: 4, canton_mna: 5 }
enum cost_unit: { city: 0, municipality: 1, canton: 2, refugee_housing: 3, canton_mna: 5, canton_dz: 6 }
GENDER_REQUESTS = [:no_matter, :man, :woman].freeze
AGE_REQUESTS = [:age_no_matter, :age_young, :age_middle, :age_old].freeze
PERMITS = [:N, :B, :'B-FL', :'F-FL', :'F-A', :C, :CH, 'Unbekannt'].freeze
PERMITS = [:N, :B, :'B-FL', :'B-Resettlement', :'F-FL', :'F-A', :C, :CH, 'Unbekannt'].freeze
SALUTATIONS = (Volunteer::SALUTATIONS + [:family]).freeze
SALUTATION_GENDER_MAP = Volunteer::SALUTATION_GENDER_MAP.merge(family: :family).freeze
AVAILABILITY = [:flexible, :morning, :afternoon, :evening, :workday, :weekend].freeze
......
......@@ -106,11 +106,11 @@ de:
woman: Frau
cost_unit: &id-client-cost-units
city: Stadt
canton: Kanton
canton: Kanton Tandemprogramm
canton_mna: Kanton (MNA)
canton_dz: Kanton (DZ)
municipality: Gemeinde
refugee_housing: Flüchtlingswohnen
resettlement: Resettlement
refugee_housing: Kanton Flüchtlingswohnen
group_offer_cost_unit: &id-group-offer-cost-units
city: Stadt
canton_flw: Kanton (FLW)
......
class RemoveResettlementFromCostUnits < ActiveRecord::Migration[6.0]
def self.up
# replace resettlement by nil
Client.where(cost_unit: 4).update_all(cost_unit: nil)
end
def self.down
end
end
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_07_29_082735) do
ActiveRecord::Schema.define(version: 2021_07_30_061820) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......
Supports Markdown
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