Skip to content

Add UI to edit a dynamic QR code's destination #3

Open

Description

@CompleteDotTech

Dynamic QR codes keep the same short URL so their destination can change after printing. Today the only way to change it is the API:

PATCH /api/qr-codes/:id   { "contentPayload": { "url": "https://new.example" }, "name": "...", "designConfig": {...} }

The React UI (SelectedRecord in src/client/App.tsx) shows the record's short URL, encoded payload and stats, but it has no edit form. The main benefit of a dynamic code isn't available from the UI.

Proposed:

  • An "Edit" action on the selected record that loads the current contentPayload (and optionally name/design) into the existing payload fields.
  • Submit via PATCH /api/qr-codes/:id (send x-admin-token when configured), then refresh the record and the preview.
  • Show the audit history from GET /api/qr-codes/:id (auditEvents) so users can see earlier destinations. As of PR Fix audit snapshots, landing feedback forms, PDF/EPS errors, gradient on eyes #1, audit entries are immutable snapshots.
  • Make it clear that for dynamic codes the printed QR does not change; for static codes, editing changes the encoded payload, so the code has to be reprinted.

Found during an article review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions