Membership Fee 6 - UI Components & LiveViews closes #280 #304
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
high priority
invalid
L
low priority
M
medium priority
needs refinement
optional
question
S
UX research
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: local-it/mitgliederverwaltung#304
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/280_membership_fee_ui"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description of the implemented changes
The changes were:
What has been changed?
Definition of Done
Code Quality
Accessibility
Testing
Additional Notes
- 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- Match {:ok, cycles, notifications} tuple correctly - Handle case when no cycles are generated ({:ok, [], []}) - Prevents CaseClauseError when regeneration produces no new cyclesMembership Fee 6 - UI Components & LiveViewsto Membership Fee 6 - UI Components & LiveViews closes #280Overall nice, but a few things still do not fully work
@ -0,0 +314,4 @@<label class="label"><span class="label-text">{gettext("Date")}</span></label><inputIf I select a date I get an error and the modal closes and the member overview is shown
@ -0,0 +35,4 @@class="max-w-xl"for={@form}id="membership-fee-type-form"phx-change="validate"I think because of the on-change event the amount validation gets triggered already typin the first number and the warning dialog appears directly.
Ideas:
@ -0,0 +46,4 @@required/><div class="form-control">Interval is neccessary to create a fee type, but it is not marked as required. So when I leave it out there is no error message but my fee type is not created.
@ -0,0 +55,4 @@disabled={!is_nil(@membership_fee_type)}name="membership_fee_type[interval]"id="membership-fee-type-form_interval"phx-change="validate"The form has alreday phx-change validate, I think it is redundant here
@ -0,0 +66,4 @@</:col><:col :let={mft} label={gettext("Members")}><span class="badge badge-ghost">{get_member_count(mft)}</span>We use get_member_count(mft) in different places which calls always Ash.count. Maybe it is performancewise better to call it once and during initial load (%{fee_type_id => count}) and keep it in assigns?
@ -0,0 +70,4 @@</:col><:action :let={mft}><.link navigate={~p"/membership_fee_types/#{mft.id}/edit"} class="btn btn-ghost btn-xs">Axe Core gives me here the following error:
@ -0,0 +76,4 @@</:action><:action :let={mft}><buttonJust a minor thing: maybe we can add a tooltip here why its disabled
@ -0,0 +107,4 @@@impl truedef handle_event("delete", %{"id" => id}, socket) dofee_type = Ash.get!(MembershipFeeType, id)Seems to better to always add the domain as in the next line for Ash.destroy
@ -1425,0 +1754,4 @@#: lib/mv_web/live/member_live/show/membership_fees_component.ex#, elixir-autogen, elixir-format, fuzzymsgid "Delete All Cycles"msgstr "Zyklus löschen"Alle Zyklen löschen
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.