Skip to content

Feat: contact-us - #52

Merged
khanzadimahdi merged 2 commits into
mainfrom
feat/contact-us
Aug 4, 2026
Merged

Feat: contact-us#52
khanzadimahdi merged 2 commits into
mainfrom
feat/contact-us

Conversation

@khanzadimahdi

Copy link
Copy Markdown
Member

The frontend for contact-us: a public page where a visitor can send a message without an account, and a dashboard section for reading and triaging what arrives.

Pairs with backend PR Tarhche/backend#72 — this branch calls POST /api/contact-us and the four /api/dashboard/contact-us endpoints that PR adds. Merge the backend first, or the page will 404 against the API.

What's here

Public/{lang}/contact-us. Subject and body are required, plus at least one of email or phone so there's a way to reply. Field errors come back translated from the API.

Dashboard/dashboard/contact-us: a table with a read/unread toggle, a detail view, and delete. Each action is gated on its own contactus.* permission, so a role can be given read-only access to the inbox.

Footer — a "contact us" link joins it. The footer is regrouped while I was there: site links cluster together and the tagline sits on the opposite edge. It relies on the document's dir to flip the row, so there's no per-language positioning.

Supportingsrc/dal/public/contact.ts and src/dal/private/contact.ts, a contactus block in app-permissions.ts, two entries in app-paths.ts, a sidebar item, and the contactUs.* strings in en.json/fa.json.

Notes for review

  • The sidebar entry and both app-paths entries are the only edits to files this feature doesn't own — those, plus the two dictionaries, are where it can conflict with the sibling PRs.
  • Verified with tsc --noEmit and next build on this branch alone; both /{lang}/contact-us and /dashboard/contact-us appear in the route manifest. The repo has jest configured but no test files, so there's no suite to run.
  • prettier --check reports four files on this branch — all of them already unformatted on main, untouched here. Their fixes are in a separate chore PR.

Relationship to the other PRs

Split out of one working branch alongside notes and block users. All three are cut from main and mergeable in any order; the overlap is app-paths.ts, app-permissions.ts, layout-sidebar.tsx and the two dictionaries, and every conflict there is additive on both sides.

🤖 Generated with Claude Code

khanzadimahdi and others added 2 commits August 2, 2026 13:19
A public page where a visitor can send a message without an account, and
a dashboard section for reading and triaging what arrives.

- /{lang}/contact-us with the form; subject and body are required, and at
  least one of email or phone so there is a way to reply
- /dashboard/contact-us lists messages with a read/unread toggle, a detail
  view, and delete, each gated on its contactus.* permission
- A "contact us" link joins the footer, which is regrouped so the site
  links sit together and the tagline sits on the opposite edge
- Public and private DAL modules for the endpoints, and en/fa strings

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@khanzadimahdi
khanzadimahdi marked this pull request as ready for review August 4, 2026 12:07
@khanzadimahdi
khanzadimahdi merged commit 6a385a0 into main Aug 4, 2026
4 checks passed
@khanzadimahdi
khanzadimahdi deleted the feat/contact-us branch August 4, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant