[FEATURE]: Membership Fee 6 - UI Components & LiveViews #280

Open
opened 2025-12-11 15:51:53 +01:00 by moritz · 0 comments
Owner

Goal: Implement all UI components for membership fee management.

Scope:

  • Member List View:

    • Add "Membership Fee Status" column
    • Show last completed cycle status (default)
    • Toggle to show current cycle status
    • Color coding (green/red/gray)
    • Filters: "Unpaid in last cycle", "Unpaid in current cycle"
  • Member Detail View:

    • Add "Membership Fees" section
    • Cycle table with columns: Cycle, Interval, Amount, Status, Actions
    • Membership fee type dropdown (same interval only)
    • Warning if different interval selected
    • Status change actions (mark as paid/suspended/unpaid)
    • Checkboxes for bulk marking (low priority, can be future issue)
  • Membership Fee Types Admin:

    • List view: Name, Amount, Interval, Member count
    • Create/Edit forms
    • Interval field grayed out (not editable)
    • Warning on amount change (show impact)
    • Cannot delete if in use
  • Settings Page:

    • Membership fees section
    • Dropdown for default membership fee type
    • Checkbox for "Include joining cycle"
    • Explanatory text with examples
    • Validation on save

Files to Create/Modify:

  • lib/mv_web/live/membership_fee_type_live/index.ex - List view
  • lib/mv_web/live/membership_fee_type_live/form.ex - Create/Edit form
  • lib/mv_web/live/member_live/index.ex - Add status column
  • lib/mv_web/live/member_live/show.ex - Add membership fees section
  • lib/mv_web/live/member_live/form.ex - Add membership fee type dropdown
  • lib/mv_web/live/settings_live.ex - Add membership fees section
  • Update router with new routes

Tests to Write:

  • LiveView Tests for Member List:

    • Status column displays correctly
    • Default shows last completed cycle
    • Toggle switches to current cycle
    • Color coding applied correctly
    • Filters work correctly
    • No N+1 queries (efficient loading)
  • LiveView Tests for Member Detail:

    • Cycles table displays all cycles
    • Table columns show correct data
    • Membership fee type dropdown shows only same-interval types
    • Warning displayed if different interval selected
    • Status change actions work
    • Actions only shown with permission
  • LiveView Tests for Membership Fee Types:

    • List displays all types with correct data
    • Create form works
    • Edit form works (interval grayed out)
    • Amount change warning displays
    • Cannot delete if in use
    • Only admin can access
  • LiveView Tests for Settings:

    • Settings form displays correctly
    • Default type dropdown works
    • Include joining cycle checkbox works
    • Validation errors display
    • Settings save correctly
    • Only admin can access
  • Integration Tests:

    • End-to-end: Create type → Assign to member → View cycles → Change status
    • End-to-end: Change member type → Cycles regenerate
    • End-to-end: Update settings → New members get default type

Acceptance Criteria:

  • All UI components functional
  • All permissions enforced in UI
  • All validations display correctly
  • No N+1 query issues
  • User experience matches design specifications
**Goal:** Implement all UI components for membership fee management. **Scope:** - **Member List View:** - Add "Membership Fee Status" column - Show last completed cycle status (default) - Toggle to show current cycle status - Color coding (green/red/gray) - Filters: "Unpaid in last cycle", "Unpaid in current cycle" - **Member Detail View:** - Add "Membership Fees" section - Cycle table with columns: Cycle, Interval, Amount, Status, Actions - Membership fee type dropdown (same interval only) - Warning if different interval selected - Status change actions (mark as paid/suspended/unpaid) - Checkboxes for bulk marking (low priority, can be future issue) - **Membership Fee Types Admin:** - List view: Name, Amount, Interval, Member count - Create/Edit forms - Interval field grayed out (not editable) - Warning on amount change (show impact) - Cannot delete if in use - **Settings Page:** - Membership fees section - Dropdown for default membership fee type - Checkbox for "Include joining cycle" - Explanatory text with examples - Validation on save **Files to Create/Modify:** - `lib/mv_web/live/membership_fee_type_live/index.ex` - List view - `lib/mv_web/live/membership_fee_type_live/form.ex` - Create/Edit form - `lib/mv_web/live/member_live/index.ex` - Add status column - `lib/mv_web/live/member_live/show.ex` - Add membership fees section - `lib/mv_web/live/member_live/form.ex` - Add membership fee type dropdown - `lib/mv_web/live/settings_live.ex` - Add membership fees section - Update router with new routes **Tests to Write:** - **LiveView Tests for Member List:** - Status column displays correctly - Default shows last completed cycle - Toggle switches to current cycle - Color coding applied correctly - Filters work correctly - No N+1 queries (efficient loading) - **LiveView Tests for Member Detail:** - Cycles table displays all cycles - Table columns show correct data - Membership fee type dropdown shows only same-interval types - Warning displayed if different interval selected - Status change actions work - Actions only shown with permission - **LiveView Tests for Membership Fee Types:** - List displays all types with correct data - Create form works - Edit form works (interval grayed out) - Amount change warning displays - Cannot delete if in use - Only admin can access - **LiveView Tests for Settings:** - Settings form displays correctly - Default type dropdown works - Include joining cycle checkbox works - Validation errors display - Settings save correctly - Only admin can access - **Integration Tests:** - End-to-end: Create type → Assign to member → View cycles → Change status - End-to-end: Change member type → Cycles regenerate - End-to-end: Update settings → New members get default type **Acceptance Criteria:** - All UI components functional - All permissions enforced in UI - All validations display correctly - No N+1 query issues - User experience matches design specifications
moritz added this to the Membership Fees milestone 2025-12-11 15:51:53 +01:00
moritz added the
medium priority
L
labels 2025-12-11 15:51:53 +01:00
moritz self-assigned this 2025-12-11 15:51:53 +01:00
moritz added this to the Sprint 10: 11.12-08.01 project 2025-12-11 15:51:54 +01:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: local-it/mitgliederverwaltung#280
No description provided.