Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm Page & Main Access Flow #223

Open
mahid797 opened this issue Feb 23, 2025 · 0 comments
Open

Confirm Page & Main Access Flow #223

mahid797 opened this issue Feb 23, 2025 · 0 comments
Assignees
Labels
Frontend Frontend Related Issue ⚡Important High-impact issue that needs to be resolved before the next release Refactor Code Improvement
Milestone

Comments

@mahid797
Copy link
Collaborator

Goal

Implement a two‐step UI flow using page.tsx (the disclaimers/confirm button screen) and AccessPage.tsx (the main logic). The workflow must handle dynamic JSON visitor fields, a possible password, and direct‐access scenarios.

Detailed Guidelines

  1. page.tsx:

    • Render disclaimers, branding, a “Confirm” button.
    • Clicking confirm either toggles local state or navigates to a sub‐route.
    • This ensures a dedicated disclaimers step.
  2. AccessPage.tsx:

    • Calls useDocumentAccess(linkId) to get link details:
      • visitorFields (JSON),
      • passwordProtected,
      • nameRequired, emailRequired (though these are columns, the server might also reflect them in the JSON).
    • If the link is invalid/expired → show <AccessError />.
    • If the link is truly public (no required fields, no password) → do Direct‐access → get signedUrl → show <FileDisplay />.
    • Otherwise, show <VisitorInfoModal /> to collect data.
  3. No References to old numeric flows (userDetailsOption):

    • Entire flow is data‐driven: if visitorFields has 0 fields and passwordProtected is false, skip to file display.

Tasks

  1. page.tsx: disclaimers, “Confirm” button → local state toggle or route to AccessPage.
  2. AccessPage.tsx:
    • Integrate useDocumentAccess hook.
    • Show <AccessError> if invalid.
    • Direct‐access if no fields/password.
    • Else show <VisitorInfoModal>.
  3. Validate everything works with the new JSON approach and name/email columns.
  4. Ensure synergy with layout for consistent branding or help links.
@mahid797 mahid797 added Frontend Frontend Related Issue New Feature New feature to be implemented Refactor Code Improvement ⚡Important High-impact issue that needs to be resolved before the next release labels Feb 23, 2025
@mahid797 mahid797 added this to the v0.1 milestone Feb 23, 2025
@mahid797 mahid797 removed the New Feature New feature to be implemented label Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Frontend Related Issue ⚡Important High-impact issue that needs to be resolved before the next release Refactor Code Improvement
Projects
None yet
Development

No branches or pull requests

2 participants