Ask Flex Auth list, not read, for each overview row (INFD-WP-0004-T03)
The overview now requests the new list action and its rows carry only the memo id, version, question, live approval status and the person's own responses without notes. Opening a memo still asks read; every act asks its own action. The fixture Flex Auth package admits list under a re-derived pin. Not deployable until flex-auth answers INFD-IN-0008. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 359683@bnt-lap001 Assistant-Session: eebdc939-7a9b-4e50-9d39-c8437e8a14ec
This commit is contained in:
parent
180370ed44
commit
98c8de078e
10 changed files with 85 additions and 33 deletions
|
|
@ -143,20 +143,20 @@ OVERVIEW_REASONS = {
|
|||
|
||||
def _overview_row(row):
|
||||
link = "/review?memo_id=" + quote(row.memo_id, safe="")
|
||||
if row.memo is None:
|
||||
if row.question is None:
|
||||
reason = OVERVIEW_REASONS.get(row.reason, "The permission check could not complete. Reload later.")
|
||||
return (f'<div class="record"><strong>{text(row.memo_id)}</strong>'
|
||||
f'<p class="muted">{text(reason)}</p></div>')
|
||||
facts = [f'Memo {text(row.memo_id)} · version {row.memo.version}']
|
||||
facts = [f'Memo {text(row.memo_id)} · version {row.version}']
|
||||
if row.engine_status:
|
||||
facts.append(f'Approval status: {text(row.engine_status)}')
|
||||
elif row.reason:
|
||||
facts.append(text(OVERVIEW_REASONS.get(row.reason, "Approval status is unavailable.")))
|
||||
if row.intent and row.intent.get("approved_at"):
|
||||
facts.append(f'Entry recorded {text(row.intent["approved_at"])}')
|
||||
history = ''.join(f'<li>{text(d.verb.value.capitalize())} · version {d.memo_version} · {text(d.at)}'
|
||||
+ (f' · {text(s["state"])}' if s else '') + '</li>' for d, s in row.history)
|
||||
return (f'<div class="record"><a href="{link}"><strong>{text(row.memo.question)}</strong></a>'
|
||||
if row.approved_at:
|
||||
facts.append(f'Entry recorded {text(row.approved_at)}')
|
||||
history = ''.join(f'<li>{text(h["verb"].capitalize())} · version {h["memo_version"]} · {text(h["at"])}'
|
||||
+ (f' · {text(h["state"])}' if h["state"] else '') + '</li>' for h in row.history)
|
||||
return (f'<div class="record"><a href="{link}"><strong>{text(row.question)}</strong></a>'
|
||||
f'<p class="muted">{" · ".join(facts)}</p>'
|
||||
+ (f'<details><summary>Your responses</summary><ul>{history}</ul></details>' if history else '')
|
||||
+ '</div>')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue