Add guided Payments operator workspace
Module Package Release / publish-packages (push) Successful in 14s

This commit is contained in:
2026-08-19 13:17:13 +02:00
parent 630a7d39f7
commit a2dcd8f2dd
16 changed files with 1268 additions and 5 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
"""GovOPlaN Payments module."""
__version__ = "0.1.19"
__version__ = "0.1.20"
+73 -3
View File
@@ -10,15 +10,20 @@ from govoplan_core.core.modules import (
CapabilityDocumentation,
DocumentationLink,
DocumentationTopic,
FrontendModule,
FrontendRoute,
MigrationSpec,
ModuleContext,
ModuleInterfaceProvider,
ModuleManifest,
NavItem,
PermissionDefinition,
ProductAreaContribution,
RoleTemplate,
)
from govoplan_core.core.payments import CAPABILITY_PAYMENT_REQUESTS
from govoplan_core.core.provider_governance import declared_module_architecture
from govoplan_core.core.views import ViewSurface
from govoplan_core.db.base import Base
from govoplan_payments.backend.db import models as payment_models
from govoplan_payments.backend.service import SqlPaymentRequestProvider
@@ -26,7 +31,7 @@ from govoplan_payments.backend.service import SqlPaymentRequestProvider
MODULE_ID = "payments"
MODULE_NAME = "Payments"
MODULE_VERSION = "0.1.19"
MODULE_VERSION = "0.1.20"
READ_SCOPE = "payments:payment:read"
WRITE_SCOPE = "payments:payment:write"
RECONCILE_SCOPE = "payments:payment:reconcile"
@@ -122,6 +127,68 @@ manifest = ModuleManifest(
permissions=(READ_SCOPE,),
),
),
nav_items=(
NavItem(
path="/payments",
label="Payments",
icon="landmark",
required_any=(READ_SCOPE,),
order=73,
surface_id="payments.navigation",
),
),
frontend=FrontendModule(
module_id=MODULE_ID,
package_name="@govoplan/payments-webui",
routes=(
FrontendRoute(
path="/payments",
component="PaymentsPage",
required_any=(READ_SCOPE,),
order=73,
surface_id="payments.workspace",
),
),
nav_items=(
NavItem(
path="/payments",
label="Payments",
icon="landmark",
required_any=(READ_SCOPE,),
order=73,
surface_id="payments.navigation",
),
),
product_areas=(
ProductAreaContribution(
id="services-cases",
module_id=MODULE_ID,
label="i18n:govoplan-core.product_area.services_cases",
icon="landmark",
description="i18n:govoplan-core.product_area.services_cases_description",
surface_ids=("payments.navigation", "payments.workspace"),
order=20,
),
),
view_surfaces=(
ViewSurface(
id="payments.request.create",
module_id=MODULE_ID,
kind="section",
label="Create payment request",
parent_id="payments.workspace",
order=30,
),
ViewSurface(
id="payments.reconciliation.manual",
module_id=MODULE_ID,
kind="section",
label="Record manual payment",
parent_id="payments.workspace",
order=40,
),
),
),
provides_interfaces=(
ModuleInterfaceProvider(name=CAPABILITY_PAYMENT_REQUESTS, version="1.0.0"),
),
@@ -167,7 +234,8 @@ manifest = ModuleManifest(
body=(
"Payments owns the tenant-bound payment ID, human payment reference, requested amount and currency, lifecycle events, and reconciliation evidence. "
"A Case, Workflow, or other procedure calls the payments.requests capability with its own source reference and a replay key; it keeps the returned payment ID instead of writing Payments tables. "
"The first supported receipt path is manual reconciliation of a full payment. The operator must record the exact amount and currency, external transaction reference, received time, and a same-tenant EvidenceReference carrying a version or checksum. A mismatch, duplicate settlement under another key, cross-tenant evidence, partial amount, or timezone-free timestamp fails closed. "
"The Payments workspace lists requested and paid obligations with source, due or settled times, and reconciliation evidence. A writer creates a request through the guided dialog; a reconciler uses the separate consequential dialog, which fixes the amount and currency and requires an external transaction reference plus a same-tenant versioned or checksum-bound EvidenceReference. Reload preserves loaded data and marks it stale when refresh fails. Missing create or reconciliation authority remains visible with the required permission and responsible administrator. "
"The first supported receipt path is manual reconciliation of a full payment. A mismatch, duplicate settlement under another key, cross-tenant evidence, partial amount, or timezone-free timestamp fails closed. "
"Successful requests and reconciliations append payment events and API actions add audit evidence when Audit is installed. There is no silent correction: reversal, refund, partial payment, online checkout, provider callbacks, Ledger posting, and XRechnung remain explicit future flows."
),
layer="configured",
@@ -183,6 +251,8 @@ manifest = ModuleManifest(
metadata={
"help_contexts": [
"payments.request",
"payments.workspace",
"payments.request.create",
"payments.reconciliation.manual",
"payments.state.requested",
"payments.state.paid",
@@ -206,7 +276,7 @@ manifest = ModuleManifest(
test_ref="tests/test_payments.py",
known_limits=(
"Only full manual payment reconciliation is implemented; partial payments, refunds, reversals, and corrections need explicit governed flows.",
"No online payment provider, callback, ledger posting, XRechnung, applicant payment page, or dedicated operator WebUI is included yet.",
"No online payment provider, callback, ledger posting, XRechnung, or applicant payment page is included yet; the operator workspace covers fixed requests and full manual reconciliation only.",
),
supported_authority_modes=("native_authoritative",),
owned_concepts=(