Integrate governed address contact resolution

This commit is contained in:
2026-08-02 07:24:29 +02:00
parent 7b0c9cfdde
commit 8099e34c6c
9 changed files with 774 additions and 12 deletions
@@ -930,6 +930,55 @@ function EntryEditorDialog({
<FormField label="Effective until">
<input type="datetime-local" value={state.effectiveUntil} onChange={(event) => onChange({ ...state, effectiveUntil: event.target.value })} />
</FormField>
{isAddressProviderEntry(state) ? (
<>
<FormField label="Address purpose" help="Selects matching contact points such as official, work, or private.">
<input
value={String(state.configuration.address_purpose ?? "")}
onChange={(event) => onChange({
...state,
configuration: { ...state.configuration, address_purpose: event.target.value }
})}
placeholder="Any purpose"
/>
</FormField>
<FormField label="Address fallback">
<select
value={String(state.configuration.fallback_rule ?? "primary")}
onChange={(event) => onChange({
...state,
configuration: { ...state.configuration, fallback_rule: event.target.value }
})}
>
<option value="none">No fallback</option>
<option value="primary">Primary contact point</option>
<option value="any">First available contact point</option>
</select>
</FormField>
<FormField label="Locale">
<input
value={String(state.configuration.locale ?? "")}
onChange={(event) => onChange({
...state,
configuration: { ...state.configuration, locale: event.target.value }
})}
placeholder="For example de-DE"
/>
</FormField>
<FormField label="Postal format">
<select
value={String(state.configuration.postal_format ?? "domestic")}
onChange={(event) => onChange({
...state,
configuration: { ...state.configuration, postal_format: event.target.value }
})}
>
<option value="domestic">Domestic</option>
<option value="international">International</option>
</select>
</FormField>
</>
) : null}
</div>
<fieldset className="dist-lists-channel-fieldset">
<legend>Requested channels</legend>
@@ -1155,6 +1204,11 @@ function directKind(mode: DirectSourceMode): EntryKind {
return mode;
}
function isAddressProviderEntry(state: EntryEditorState): boolean {
return state.sourceMode === "provider"
&& Boolean(state.providerOption?.kind.startsWith("address_"));
}
function directModeForKind(kind: EntryKind): SourceMode {
if (kind === "raw_email") return "email";
if (kind === "raw_postal_address") return "postal";