docs: Update domain Public API documentation
This commit is contained in:
parent
4fe30d9546
commit
9c2cff6307
8 changed files with 36 additions and 7 deletions
|
|
@ -1,6 +1,15 @@
|
|||
defmodule Mv.Accounts do
|
||||
@moduledoc """
|
||||
AshAuthentication specific domain to handle Authentication for users.
|
||||
|
||||
## Resources
|
||||
- `User` - User accounts with authentication methods (password, OIDC)
|
||||
- `Token` - Session tokens for authentication
|
||||
|
||||
## Public API
|
||||
The domain exposes these main actions:
|
||||
- User CRUD: `create_user/1`, `list_users/0`, `update_user/2`, `destroy_user/1`
|
||||
- Authentication: `create_register_with_rauthy/1`, `read_sign_in_with_rauthy/1`
|
||||
"""
|
||||
use Ash.Domain,
|
||||
extensions: [AshAdmin.Domain, AshPhoenix]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
defmodule Mv.Accounts.Token do
|
||||
@moduledoc """
|
||||
AshAuthentication specific ressource
|
||||
AshAuthentication Token Resource for session management.
|
||||
|
||||
This resource is used by AshAuthentication to manage authentication tokens
|
||||
for user sessions. Tokens are automatically created and managed by the
|
||||
authentication system.
|
||||
"""
|
||||
use Ash.Resource,
|
||||
data_layer: AshPostgres.DataLayer,
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ defmodule Mv.Membership do
|
|||
The domain exposes these main actions:
|
||||
- Member CRUD: `create_member/1`, `list_members/0`, `update_member/2`, `destroy_member/1`
|
||||
- Custom field value management: `create_custom_field_value/1`, `list_custom_field_values/0`, etc.
|
||||
- Custom field management: `create_custom_field/1`, `list_custom_fields/0`, etc.
|
||||
- Settings management: `get_settings/0`, `update_settings/2`
|
||||
- Custom field management: `create_custom_field/1`, `list_custom_fields/0`, `list_required_custom_fields/0`, etc.
|
||||
- Settings management: `get_settings/0`, `update_settings/2`, `update_member_field_visibility/2`, `update_single_member_field_visibility/3`
|
||||
|
||||
## Admin Interface
|
||||
The domain is configured with AshAdmin for management UI.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ defmodule Mv.MembershipFees do
|
|||
- MembershipFeeType CRUD: `create_membership_fee_type/1`, `list_membership_fee_types/0`, `update_membership_fee_type/2`, `destroy_membership_fee_type/1`
|
||||
- MembershipFeeCycle CRUD: `create_membership_fee_cycle/1`, `list_membership_fee_cycles/0`, `update_membership_fee_cycle/2`, `destroy_membership_fee_cycle/1`
|
||||
|
||||
Note: LiveViews may use direct Ash calls instead of these domain functions for performance or flexibility.
|
||||
|
||||
## Overview
|
||||
This domain handles the complete membership fee lifecycle including:
|
||||
- Fee type definitions (monthly, quarterly, half-yearly, yearly)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ defmodule Mv.Authorization do
|
|||
|
||||
## Public API
|
||||
The domain exposes these main actions:
|
||||
- Role CRUD: `create_role/1`, `list_roles/0`, `update_role/2`, `destroy_role/1`
|
||||
- Role CRUD: `create_role/1`, `list_roles/0`, `get_role/1`, `update_role/2`, `destroy_role/1`
|
||||
|
||||
## Admin Interface
|
||||
The domain is configured with AshAdmin for management UI.
|
||||
|
|
|
|||
|
|
@ -303,7 +303,9 @@ defmodule Mv.Membership.Import.MemberCSV do
|
|||
|
||||
{inserted, failed, errors, _collected_error_count, truncated?} =
|
||||
Enum.reduce(chunk_rows_with_lines, {0, 0, [], 0, false}, fn {line_number, row_map},
|
||||
{acc_inserted, acc_failed, acc_errors, acc_error_count, acc_truncated?} ->
|
||||
{acc_inserted, acc_failed,
|
||||
acc_errors, acc_error_count,
|
||||
acc_truncated?} ->
|
||||
current_error_count = existing_error_count + acc_error_count
|
||||
|
||||
case process_row(row_map, line_number, custom_field_lookup) do
|
||||
|
|
@ -325,7 +327,13 @@ defmodule Mv.Membership.Import.MemberCSV do
|
|||
end
|
||||
end)
|
||||
|
||||
{:ok, %{inserted: inserted, failed: failed, errors: Enum.reverse(errors), errors_truncated?: truncated?}}
|
||||
{:ok,
|
||||
%{
|
||||
inserted: inserted,
|
||||
failed: failed,
|
||||
errors: Enum.reverse(errors),
|
||||
errors_truncated?: truncated?
|
||||
}}
|
||||
end
|
||||
|
||||
@doc """
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
defmodule MvWeb.PageController do
|
||||
@moduledoc """
|
||||
Controller for rendering the homepage.
|
||||
|
||||
This controller handles the root route and renders the application's
|
||||
homepage view.
|
||||
"""
|
||||
use MvWeb, :controller
|
||||
|
||||
def home(conn, _params) do
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ defmodule MvWeb.MemberLive.Form do
|
|||
## Form Sections
|
||||
- Personal Data: Name, address, contact information, membership dates, notes
|
||||
- Custom Fields: Dynamic fields in uniform grid layout (displayed sorted by name)
|
||||
- Payment Data: Mockup section (not editable)
|
||||
- Membership Fee: Selection of membership fee type with interval validation
|
||||
|
||||
## Events
|
||||
- `validate` - Real-time form validation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue