Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GROUP: Angebote zu Sektion hinzufügen #926

Open
amaierhofer opened this issue Sep 6, 2024 · 0 comments
Open

GROUP: Angebote zu Sektion hinzufügen #926

amaierhofer opened this issue Sep 6, 2024 · 0 comments

Comments

@amaierhofer
Copy link
Contributor

amaierhofer commented Sep 6, 2024

Die verschiedenen Angebote der Sektionen sollen zentral vom Dachverband verwaltet und pro Sektion vom Sektionsverantwortlichen konfiguriert werden.

Migration und Models

  • neue tabelle section_offerings (title globalized, timestamps), create_translation_table! (analog CostCenter)
  • create_join_table :groups, :section_offerings, (unique index [:group_id, :section_offering_id])
  • SectionOffering (habtm :sections, type: 'Group::Sektion', foreign_key: :group_id, dependent: restrict_with_error)
  • Group::Sektion (habtm :section_offerings, foreign_key: :group_id)

Verwalten der Sektionsangebote

  • basic crud analog termination_reason (ohne delete customization, sollte die :dependent option handeln)
  • unter Einstellungen nur für :admin permission
  • prüfen ob die translation okay ist sonst CapitalizedDependentErrors inkludieren

Konfigurieren von Sektionsangeboten auf Gruppe (nur für Sektionen)

  • editieren via bestehendem edit formular und standard als input_field (multi select)
  • anzeigen via standard format_attr auf der sektions seite

Integration von Angeboten ins Groups JSON Api

  • offerings mit translations im base scope preloaden (keine n+1 queries)
  • integration als array of strings
attribute :offerings, :array_of_strings do
    @object.section_offerings.map(&:title)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants