The HF server can't reach the PTT-internal SMP gateway, but the user's PTT-wifi
browser can (gateway sends CORS *). signer_lookup.py builds a client-side fetch
(PO -> SAP PR -> approver + receiving-committee chairman); streamlit-javascript
runs it and returns the names; fetch_signer_name picks by role, with a manual
text-box fallback when off-network. Uses the read-only no-reply token (SMP_TOKEN
Space secret), injected into client JS — Entra-gated.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Gate the whole app behind Streamlit native OIDC sign-in (auth_gate.py),
reusing the existing Azure App Registration. Auth config lives in a
gitignored .streamlit/secrets.toml locally, and is built at container
start from HF Space secrets by entrypoint.sh.
- Retheme to a black + burnt-orange ember palette across the login pass,
hero, stepper, cards, inputs and buttons (+ config.toml).
- requirements: streamlit>=1.42, add Authlib.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Circle (54px, 50% radius, 3px ring) to squircle (44px, 14px radius,
2px ring, softer shadow). All three badges use the step-1 violet
gradient (#7C5CFF -> #A78BFA).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Gate the Step 3 download box on has_generated (file exists AND current inputs
still match the generated snapshot) instead of just generated_file. Editing any
earlier field now flips has_generated False, so the stale download box disappears
- consistent with how the step indicator already regresses.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Auto-scroll to download box after generating a document
- Set one-shot session flag on successful generation, before st.rerun()
- Add #download-anchor in the Step 3 box (scroll-margin-top for badge clearance)
- Render a height-0 components.html iframe whose script smooth-scrolls
window.parent to the anchor, then clear the flag so it fires only once
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Step 3 in its own box; unify badge & header with Steps 1-2
- page_title: "Auto Form Generator" -> "PTT AUTO FORM"
- page_icon: evergreen tree -> document page (matches the app's function)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Reduce sizes: badge 0.78->0.66rem (tighter padding), AUTO FORM 2.75->2.2rem,
subtitle 1.05->0.92rem
- Left-align the PTT badge (was centered) to match the title
- Zero the subtitle's default <p> bottom margin so the body content is truly
vertically centred (was sitting bottom-heavy)
- Re-tune stub/body padding so badge (stub) and title+subtitle (body) stay
centred around the fixed 56px perforation
- Sync note.md (badge now left-aligned)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restyle hero as a ticket: transparent notch holes, bold perforation, balanced layout
- Edge notches are now TRUE transparent holes (CSS mask, intersected) so the
page background shows through them exactly -- no colour-matching seam
- Bold, evenly-spaced dashed perforation via repeating-linear-gradient
(22px dashes, 16px gaps, 4px thick)
- Centered "PTT DOCUMENTS GENERATOR" pill in the stub; AUTO FORM title and
subtitle left-aligned; all hero content vertically balanced
- Sync note.md theme description
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add flat cream accent palette with purple text/icons
Layer a minimalist flat single-tone cream accent (#EFD2A0) onto the
Indigo Dusk purple base: hero card, primary/download/PO-search buttons,
and active step circle + progress bar. No gradients, no glow auras
(removed golden box-shadows, the active-step pulse glow, and the hero
decorative blobs/dot pattern).
Cream-surface text and icons are purple (#4A3D78). A scoped rule
re-asserts purple on cream-button labels so they beat the global
stMarkdownContainer light-text rule (which had left the PO-search
check_circle icon and the generate-button text white). Swap the
multicolor sparkle emoji on the generate button for a monochrome
:material/auto_awesome: glyph that takes the purple. Update note.md
theme line.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Switch to Indigo Dusk dark theme (purple/lavender)
Recolor the full inline-CSS palette and config.toml from Soft Linen
(cream/coral light) to a deep indigo-purple dark theme: panel-purple
cards, lavender accent, near-white-lavender text, mint success, warm
receipt-sand highlights. Hero readability fixes (uppercase title,
boosted .hero subtitle specificity), transparent-track scrollbar, and
no scrollbar-gutter all preserved. Update note.md theme line.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Restyle to Soft Linen minimalist light theme; fix scrollbar white bars
- Full dark->light recolor (Forest Night -> Soft Linen): warm cream
background, clean white cards, muted-coral accent, warm-charcoal text,
sage "done" step. Softened shadows + stepper animation for a calmer feel.
- Remove scrollbar-gutter reservation that left a white bar on the
non-scrolling edge; use a transparent track + slim coral thumb instead.
- Keep hero text light on the coral hero (the dark recolor had darkened it
to near-invisible); make the hero title uppercase.
- Update .streamlit/config.toml base theme and note.md theme line.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hero: drop marketing stat boxes (5 / <30s / Free to use) and the promo
tagline, use a functional Thai subtitle, and shorten the badge to
'Auto Form'. Remove the data-source bar, the manual Excel upload button,
and the inline uploader so the UI no longer announces the data origin;
PO data still loads live (load_live_data) with sample fallback. Sync
note.md to match.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Read live data directly from OneDrive anonymous link (no upload/dataset)