set struture

main
Philipp Rothmann 2022-12-21 10:40:40 +01:00
parent 135b14c868
commit c95271682d
7 changed files with 21 additions and 31 deletions

View File

@ -1,12 +1,11 @@
# encoding: utf-8
# TODO: rename class to specific name and change all references
class Group::Root < ::Group
class Group::Circle < ::Group
self.layer = true
# TODO: define actual child group types
children Group::Root
children Group::Circle, Group::HelpCircle
### ROLES

View File

@ -0,0 +1,6 @@
# encoding: utf-8
# TODO: rename class to specific name and change all references
class Group::HelpCircle < ::Group
self.layer = true
end

View File

@ -8,7 +8,7 @@ module Lit::Group
# self.used_attributes += [:website, :bank_account, :description]
# self.superior_attributes = [:bank_account]
root_types Group::Root
root_types Group::Circle
end
end

View File

@ -4,16 +4,18 @@ de:
### GROUPS
group/root:
one: Hauptgruppe
other: Hauptgruppen
group/circle:
one: Kreis
other: Kreise
group/help_circle:
one: Hilfkreis
other: Hilfskreise
### ROLES
group/root/leader:
group/circle/leader:
one: Leitung
description: Leitungspersonen verwalten die Applikation.
group/root/member:
group/circle/member:
one: Mitglied
description: Mitglieder sind alle anderen.

View File

@ -14,4 +14,4 @@ application:
# not the customers.
# Initially, a password reset token may be mailed from the application
# to this address to set a password.
root_email: hitobito-lit@puzzle.ch
root_email: root@local-it.org

View File

@ -14,26 +14,9 @@ class LitPersonSeeder < PersonSeeder
end
puzzlers = [
'Andreas Maierhofer',
'Carlo Beltrame',
'Mathis Hofer',
'Matthias Viehweger',
'Nils Rauch',
'Olivier Brian',
'Pascal Simon',
'Pascal Zumkehr',
'Roland Studer',
'Tobias Hinderling',
'Severin Raez'
]
devs = {
'Customer Name' => 'customer@email.com'
'Philipp Rothmann' => 'p.rothmann@local-it.org'
}
puzzlers.each do |puz|
devs[puz] = "#{puz.split.last.downcase}@puzzle.ch"
end
seeder = LitPersonSeeder.new
@ -41,5 +24,5 @@ seeder.seed_all_roles
root = Group.root
devs.each do |name, email|
seeder.seed_developer(name, email, root, Group::Root::Leader)
seeder.seed_developer(name, email, root, Group::Circle::Leader)
end

View File

@ -1,3 +1,3 @@
# encoding: utf-8
Group::Root.seed_once(:parent_id, name: 'Hauptgruppe')
Group::Circle.seed_once(:parent_id, name: 'Koordinationskreis')