Adopt compact shared workspace feedback

This commit is contained in:
2026-08-04 08:21:50 +02:00
parent 9b5d83d65a
commit ee19343697
2 changed files with 7 additions and 3 deletions
+3
View File
@@ -25,6 +25,9 @@ assurance profiles.
Challenge and annulment append reasoned events and erase nothing. Challenge and annulment append reasoned events and erase nothing.
- Missing permission or electorate membership identifies the required action, - Missing permission or electorate membership identifies the required action,
responsible actor, and destination. responsible actor, and destination.
- Electorate matching and new-ballot defaults use the canonical authenticated
principal account ID, falling back to the shell user's account ID when the
richer principal context has not loaded yet.
- Optional Committee, Decision, Encryption, Forms, Trust, Policy, Reporting, - Optional Committee, Decision, Encryption, Forms, Trust, Policy, Reporting,
and Workflow integrations remain behind declared contracts. and Workflow integrations remain behind declared contracts.
+4 -3
View File
@@ -52,6 +52,7 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
const canCast = hasScope(auth, "voting:ballot:cast"); const canCast = hasScope(auth, "voting:ballot:cast");
const canCertify = hasScope(auth, "voting:ballot:certify"); const canCertify = hasScope(auth, "voting:ballot:certify");
const canAdmin = hasScope(auth, "voting:ballot:admin"); const canAdmin = hasScope(auth, "voting:ballot:admin");
const currentAccountId = auth.principal?.account_id || auth.user.account_id;
const loadList = useCallback(async (signal?: AbortSignal, preferredId?: string) => { const loadList = useCallback(async (signal?: AbortSignal, preferredId?: string) => {
setLoading(true); setLoading(true);
@@ -94,8 +95,8 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
}, [selectedId, settings]); }, [selectedId, settings]);
const eligible = useMemo(() => Boolean( const eligible = useMemo(() => Boolean(
selected?.electorate.some((item) => item.subject_id === auth.account.id) selected?.electorate.some((item) => item.subject_id === currentAccountId)
), [auth.account.id, selected]); ), [currentAccountId, selected]);
async function run(action: "open" | "close" | "certify") { async function run(action: "open" | "close" | "certify") {
if (!selected) return; if (!selected) return;
@@ -240,7 +241,7 @@ export default function VotingPage({ settings, auth }: PlatformRouteContext) {
open open
settings={settings} settings={settings}
ballot={editing === "new" ? null : editing} ballot={editing === "new" ? null : editing}
currentAccountId={auth.account.id} currentAccountId={currentAccountId}
onClose={() => setEditing(null)} onClose={() => setEditing(null)}
onSaved={(ballot) => { onSaved={(ballot) => {
setEditing(null); setEditing(null);