Skip to content

The bulk dialogs reach past the domain boundary into the generated client #946

Description

@ExtraToast

Parent

#1096

docs/adr/frontend/ADR-001-domain-feature-architecture.md says, at line 70:

pages/** and components/** may not import @/services/api.

and at line 54:

New feature work goes to domains/<domain> first.

The three bulk dialogs under services/frontend/src/components/common/modals/bulk/ all
import the generated client directly:

  • paymentEmail/PaymentEmailWizard.vuepreviewBulkContributionEmail, readContributionEmail, sendPaymentEmails
  • PaidStatusDialog.vuemarkPaid, markUnpaid
  • MembershipStatusDialog.vue

src/utils/contributionEmail.ts is the matching half of the same problem: ~230 lines of
contribution domain rules — seedSendTo, summarise, paymentDateProblem — in a generic
utility folder, which docs/adr/frontend/ADR-006-component-and-composable-standards.md
lists under DO NOT: "Hide domain behavior in generic utility folders."

src/domains/ already holds boards, cohorts and esports. There is no
domains/contribution.

Why this is one issue and not three

Raised out of the review of #936, where the wizard was found to break the rule. Moving
only the wizard was considered and rejected: it would leave modals/bulk/ half-migrated,
with two dialogs of identical shape sitting on either side of the boundary and no way to
tell from the folder which convention applies. Consistently wrong is easier to fix later
than inconsistently right.

Shape

  • domains/contribution/ with an adapter owning every @/services/api import for the
    contribution endpoints, exposed through index.ts.
  • The contribution rules out of utils/contributionEmail.ts and into the domain.
  • All three dialogs moved behind it.
  • utils/bulkRow.ts, utils/bulkDisposition.ts and utils/bulkRejection.ts are shared by
    cohorts too, so they stay put — decide per file rather than moving the folder wholesale.

Watch out

utils/bulkRejection.ts is shared by Mark paid, Mark unpaid, both membership dialogs and
the cohort-target move. BulkDialogScaffold.vue is shared by four dialogs. Both have e2e
coverage — user-manager-bulk-membership, cohort-target-bulk-move and management-lists
— which is the suite to run when this lands.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions