feat(protocol): shareable public booking link bar in Room Bookings
Task #655: staff need a one-click way to copy and share the public (no-login) room-booking link with guests. - Add a link bar at the top of the "حجوزات القاعات" (Room Bookings) section showing the absolute public URL, with a "نسخ الرابط" copy button that gives toast + a temporary "تم النسخ" confirmation state. - URL is built from window.location.origin + BASE_URL (trailing slash stripped) + "/protocol/request", so it works on root and subpath deploys and when pasted into a browser/WhatsApp. - Clipboard uses navigator.clipboard with a textarea+execCommand fallback; fallback now checks execCommand's return and reports failure (destructive toast) instead of falsely showing success. Textarea is removed in a finally block. Copied-state timer stored in a ref and cleared on repeat clicks to avoid a reset race. - URL text forced dir="ltr" inside the RTL layout; new i18n keys (shareLinkTitle, copyLink, linkCopied, linkCopyFailed) added under protocol.bookings in both ar.json and en.json. Verified: tsc typecheck passes; /protocol serves 200; module transforms cleanly via Vite; architect review issues (fallback false-success, timer race) fixed.
This commit is contained in:
@@ -1594,7 +1594,11 @@
|
||||
"startsAt": "From",
|
||||
"endsAt": "To",
|
||||
"viewList": "List",
|
||||
"viewCalendar": "Calendar"
|
||||
"viewCalendar": "Calendar",
|
||||
"shareLinkTitle": "Public booking link (share with guests)",
|
||||
"copyLink": "Copy link",
|
||||
"linkCopied": "Link copied",
|
||||
"linkCopyFailed": "Could not copy the link"
|
||||
},
|
||||
"external": {
|
||||
"new": "New meeting",
|
||||
|
||||
Reference in New Issue
Block a user