diff --git a/app/serializers/api/v1/employee_serializer.rb b/app/serializers/api/v1/employee_serializer.rb index 8139e2eae..7bd0bbf33 100644 --- a/app/serializers/api/v1/employee_serializer.rb +++ b/app/serializers/api/v1/employee_serializer.rb @@ -8,7 +8,24 @@ module Api module V1 class EmployeeSerializer < ApiSerializer - attributes :shortname, :firstname, :lastname, :email, :marital_status, :nationalities, :graduation + attributes :shortname, + :firstname, + :lastname, + :email, + :marital_status, + :nationalities, + :graduation, + :city, + :birthday, + :nationalities + + attribute :full_name do |employee| + employee.to_s + end + + attribute :is_employed do |_employee| + !e.current_employment.nil? + end attribute :department_shortname do |employee| employee.department&.shortname diff --git a/doc/development/01_setup.md b/doc/development/01_setup.md index 218047554..b54269c89 100644 --- a/doc/development/01_setup.md +++ b/doc/development/01_setup.md @@ -46,6 +46,8 @@ PuzzleTime aus dem Git Repository klonen, dazu muss Git installiert sein: ### Setup + + Ruby Gem Dependencies installieren (alle folgenden Befehle im PuzzleTime Verzeichnis ausführen): bundle @@ -62,6 +64,9 @@ Starten des Entwicklungsservers: rails server +***Wichtig*** Um die Standard-DB zu verwenden, muss beim Starten des Servers die folgende ENV-Variable gesetzt werden: `AUTH_DB_ACTIVE=true` + + oder gleich aller wichtigen Prozesse: gem install foreman @@ -74,10 +79,10 @@ oder gleich aller wichtigen Prozesse: | Name | Benutzername | Rolle | Passwort | | --- | --- | --- | --- | -| Mark Waber | mw | manager | a | -| Andreas Rava | ar | manager | a | -| Pascal Zumkehr | pz | user | a | -| Daniel Illi | di | user | a | +| Mark Waber | MW | manager | a | +| Andreas Rava | AR | manager | a | +| Pascal Zumkehr | PW | user | a | +| Daniel Illi | DI | user | a | Weitere Employees können in `db/seeds/development/employees.rb` hinzugefügt werden.