Commit graph

139 commits

Author SHA1 Message Date
97c9ef670b
fix: remove type="number" from amount input, use text input like postal_code
- Follow same pattern as postal_code field in member form
- Ash validates Decimal format automatically
- Text input allows better control and validation feedback
2025-12-18 15:08:37 +01:00
10fe866de6
feat: add phx-debounce to amount input for real-time validation
- Debounce validation to 300ms for better UX
- Ash will automatically validate Decimal format
- Provides immediate feedback on invalid input
2025-12-18 15:08:37 +01:00
acfbd8f62b
fix: remove unused validate_amount_format function
- Function was removed but definition remained
- Ash handles Decimal validation automatically
2025-12-18 15:08:37 +01:00
0ab6a75377
refactor: remove manual amount validation, use Ash default validation
- Remove validate_amount_format function - Ash handles Decimal validation automatically
- Remove oninput and pattern attributes - not needed with Ash validation
- Simplify validate handler - let AshPhoenix.Form.validate do its job
- Follows Ash best practices for form validation
2025-12-18 15:08:37 +01:00
004bf67f54
fix: add missing validate_amount_format function
- Function was referenced but not defined
- Cleans invalid characters from amount input
- Provides better UX by sanitizing input
2025-12-18 15:08:37 +01:00
e7fa3be74c
feat: add server-side amount validation in membership fee type form
- Validate amount format on input change
- Clean invalid characters from amount input
- Provides immediate feedback on invalid input
2025-12-18 15:08:36 +01:00
03aacefb6e
fix: improve amount validation, layout, and remove duplicate button
- Add oninput validation for amount field to catch invalid input immediately
- Fix Current Cycle layout with whitespace-nowrap and wider width
- Remove duplicate Regenerate Missing Cycles button (same functionality)
- Add tooltip to Regenerate Cycles button explaining functionality
2025-12-18 15:08:36 +01:00
b7a49eabe4
fix: handle empty cycles result in regenerate_cycles event
- Match {:ok, cycles, notifications} tuple correctly
- Handle case when no cycles are generated ({:ok, [], []})
- Prevents CaseClauseError when regeneration produces no new cycles
2025-12-18 15:08:36 +01:00
803d9a0a94
fix: normalize checkbox value and improve UI layout
- Normalize checkbox 'on' value to boolean true in settings
- Change Payment Data layout to flex-nowrap for horizontal display
- Replace membership fee type dropdown with display-only view
- Fix tests to use correct button selectors and switch to membership fees tab
2025-12-18 15:08:35 +01:00
3f723a3c3a
feat: add cycle management features to membership fees component
- Add regenerate cycles functionality
- Add delete cycle with confirmation
- Add edit cycle amount modal
- Add regenerate missing cycles button
- Complete cycle management UI implementation
2025-12-18 15:08:35 +01:00
29b39b2793
fix: handle form errors correctly in membership fee settings
- Fix Protocol.UndefinedError when iterating over form errors
- Handle both tuple and list error formats
- Prevents crash when saving settings with validation errors
2025-12-18 15:08:34 +01:00
8899e1986a
feat: add pattern validation for amount input field
- Add pattern="[0-9]+(\.[0-9]{1,2})?" to prevent invalid input
- Browser now validates number format before submission
- Improves UX by catching errors earlier
2025-12-18 15:08:34 +01:00
e0702240d3
feat: add membership fee type name to payment data section
- Display type name alongside amount, interval, and cycle statuses
- Improves clarity by showing which membership fee type is assigned
2025-12-18 15:08:34 +01:00
4c66628802
fix: extract form values directly from form fields to preserve them
- Change get_existing_form_values to read from form[:field].value
- This ensures current form state is preserved when only interval changes
- Fixes issue where name and amount were cleared on interval selection
2025-12-18 15:08:33 +01:00
aece03c9c2
feat: show both last and current cycle status in payment data
- Add current cycle status calculation and display
- Show both Last Cycle and Current Cycle status badges
- Replace single Status field with two separate fields
2025-12-18 15:08:33 +01:00
8ed9adeea0
fix: preserve form values when only interval field changes
- Merge existing form values with new params to prevent field loss
- Add get_existing_form_values helper to extract current form state
- Fixes issue where name and amount were cleared when selecting interval
2025-12-18 15:08:33 +01:00
5460ebdd5a
feat: add payment data section with membership fee type info
- Add Payment Data section showing membership fee amount, interval, and last cycle status
- Use real membership fee type data instead of mockup
- Calculate last cycle status from loaded cycles
2025-12-18 15:08:32 +01:00
bc989422e2
refactor: reduce function nesting depth to fix Credo warnings
Extract nested conditionals into separate helper functions:
- check_amount_change/2 and related helpers in MembershipFeeTypeLive.Form
- check_interval_change/2 and related helpers in MemberLive.Form

This reduces nesting depth from 3 to 2, improving code readability.
2025-12-18 15:08:32 +01:00
810a54c11f
feat: add membership fee types admin interface
- Add list view showing name, amount, interval, member count
- Add create/edit forms for membership fee types
- Gray out interval field on edit (immutable)
- Show warning on amount change with impact information
- Prevent deletion if type is in use
2025-12-18 15:08:31 +01:00
35cafd6e6a
feat: add membership fee type dropdown to member form
- Add membership fee type selection in member create/edit form
- Show warning if different interval selected
- Filter available types to same interval only
2025-12-18 15:08:31 +01:00
920cae656e
feat: add membership fees section to member detail view
- Add membership fees section with cycle table
- Display cycles with interval, amount, status, and actions
- Add membership fee type dropdown (same interval only)
- Add status change actions (mark as paid/suspended/unpaid)
- Add cycle regeneration (manual and missing cycles)
- Add cycle amount editing
- Add cycle deletion with confirmation
2025-12-18 15:08:31 +01:00
99dc17bf4d
feat: add membership fee status column to member list
- Add status column showing last completed or current cycle status
- Add toggle to switch between last/current cycle view
- Add color coding (green/red/gray) for paid/unpaid/suspended
- Add filters for unpaid cycles in last/current cycle
- Efficiently load cycles to avoid N+1 queries
2025-12-18 15:08:31 +01:00
78b5335456 refactor: migrate MembershipFeeSettingsLive to AshPhoenix.Form 2025-12-18 11:54:23 +01:00
283f824f4d fix: improve accessibility - WCAG 2 AA contrast and select label 2025-12-18 11:54:23 +01:00
630b51ac34 refactor: replace ContributionSettingsLive mockup with MembershipFeeSettingsLive in navigation 2025-12-18 11:54:23 +01:00
e135a6cdbf feat: implement full CRUD for membership fee types with settings UI
- Add interval immutability and deletion prevention validations
- Add settings validation for default_membership_fee_type_id
- Create MembershipFeeSettingsLive for admin UI with form handling
- Add comprehensive test coverage (unit, integration, settings)
2025-12-18 11:54:23 +01:00
62d04add8e fix: standardize 'Custom Field' capitalization in i18n
Change 'Save Custom field' to 'Save Custom Field' and
'Save Custom field value' to 'Save Custom Field Value' for consistency.
Update gettext files accordingly.
2025-12-16 14:54:43 +01:00
be6ea56860 fix: improve mailto BCC encoding
Use URI.encode_www_form() instead of URI.encode() for mailto query parameters.
This is the safer choice for query parameter encoding.

Add comment about mailto URL length limits that vary by email client.
2025-12-16 14:51:42 +01:00
fb91f748c2 perf: optimize member index selection calculations
Calculate selected_count, any_selected? and mailto_bcc once in assigns
instead of recalculating Enum.any? and Enum.count multiple times in template.
This improves render performance and makes the template code more readable.
2025-12-16 14:50:52 +01:00
dd4048669c fix: update clubname on save
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-16 14:35:00 +01:00
e0712d47bc chore: change payment filter text 2025-12-16 14:35:00 +01:00
4e86351e1c feat: disable email buttons instead hide them 2025-12-16 14:35:00 +01:00
8bfa5b7d1d chore: remove immutable from custom fields 2025-12-16 14:35:00 +01:00
9dba4d1019
fix: credo warnings
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-11 14:21:40 +01:00
b1f6d29ca1
Merge remote-tracking branch 'origin/main' into feature/220_ui_issues_2
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-11 01:49:12 +01:00
1675d66b67
translate field names for visibility dropdown
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-11 00:51:26 +01:00
1b06f885bf Merge branch 'main' into feature/223_member_checkbox
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-08 11:43:54 +01:00
8512be0282 feat: reuse form_section in settings
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-04 12:32:24 +01:00
94de429529 style: translate fieldtypes and payment as button 2025-12-03 22:18:18 +01:00
5ae4450444
Merge branch 'main' into feature/209_hide_field_dropdown
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-03 18:58:40 +01:00
cf6a108049 refactor: DRY - use Mv.Constants.custom_field_prefix() instead of string literals
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-03 18:47:27 +01:00
fabfe64468 refactor: rename custom_fields/member_fields to extract_*_field_keys for clarity 2025-12-03 18:44:17 +01:00
6cf955b024 fix: get_from_cookie now correctly handles list return from get_req_header 2025-12-03 18:37:51 +01:00
217ed632fa fix: preserve paid_filter in URL when toggling field visibility 2025-12-03 18:36:13 +01:00
3b038d451d fix: use all_custom_fields in prepare_dynamic_cols
Allows users to enable globally hidden custom fields in the table view
2025-12-03 18:20:32 +01:00
690083bdf0 refactor: fix Credo warnings in field visibility modules
Use Enum.map_join and reduce nesting in format_custom_field_label
2025-12-03 18:10:13 +01:00
4bbba65038 fix: remove duplicate member_fields_visible assignment in mount/3
Removes dead code and fixes initialization to use FieldVisibility module
2025-12-03 18:09:08 +01:00
75e1fc8a3a fix: use all_custom_fields in handle_info(:field_toggled)
Fixes bug where globally hidden custom fields could not be enabled via dropdown
2025-12-03 18:07:37 +01:00
8ce89a7227 formatting
All checks were successful
continuous-integration/drone/push Build is passing
2025-12-03 17:44:01 +01:00
f5b67de870
Merge branch 'main' into feature/209_hide_field_dropdown
Some checks failed
continuous-integration/drone/push Build is failing
2025-12-03 17:38:50 +01:00