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.vue — previewBulkContributionEmail, readContributionEmail, sendPaymentEmails
PaidStatusDialog.vue — markPaid, 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.
Parent
#1096
docs/adr/frontend/ADR-001-domain-feature-architecture.mdsays, at line 70:and at line 54:
The three bulk dialogs under
services/frontend/src/components/common/modals/bulk/allimport the generated client directly:
paymentEmail/PaymentEmailWizard.vue—previewBulkContributionEmail,readContributionEmail,sendPaymentEmailsPaidStatusDialog.vue—markPaid,markUnpaidMembershipStatusDialog.vuesrc/utils/contributionEmail.tsis the matching half of the same problem: ~230 lines ofcontribution domain rules —
seedSendTo,summarise,paymentDateProblem— in a genericutility folder, which
docs/adr/frontend/ADR-006-component-and-composable-standards.mdlists under DO NOT: "Hide domain behavior in generic utility folders."
src/domains/already holdsboards,cohortsandesports. There is nodomains/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/apiimport for thecontribution endpoints, exposed through
index.ts.utils/contributionEmail.tsand into the domain.utils/bulkRow.ts,utils/bulkDisposition.tsandutils/bulkRejection.tsare shared bycohorts too, so they stay put — decide per file rather than moving the folder wholesale.
Watch out
utils/bulkRejection.tsis shared by Mark paid, Mark unpaid, both membership dialogs andthe cohort-target move.
BulkDialogScaffold.vueis shared by four dialogs. Both have e2ecoverage —
user-manager-bulk-membership,cohort-target-bulk-moveandmanagement-lists— which is the suite to run when this lands.