Skip to content

feat: add TransferTicketModal component for ticket transfers - #72

Merged
igorihimbazwe merged 2 commits into
dev2from
fx-act
Jul 16, 2026
Merged

feat: add TransferTicketModal component for ticket transfers#72
igorihimbazwe merged 2 commits into
dev2from
fx-act

Conversation

@igorihimbazwe

Copy link
Copy Markdown
Member
  • Implemented TransferTicketModal for transferring tickets to contacts.
  • Integrated contact search functionality using useGetAcceptedContactsQuery.
  • Added error handling and success notifications with toast messages.
  • Created a new ImageCarousel component for displaying images in a carousel format.
  • Enhanced VoteModal with ImageCarousel and SocialLinksRow for better candidate presentation.
  • Introduced ShareQrDialog for sharing QR codes with copy and download options.
  • Added SocialLinksRow component to display social media links in a user-friendly manner.
  • Updated API helpers to include transferActionPurchase function for ticket transfers.
  • Extended action types to include SocialLinks and SubActionMetadata for better metadata handling.
  • Implemented utility function parseMetadata for normalizing sub-action metadata.

- Implemented TransferTicketModal for transferring tickets to contacts.
- Integrated contact search functionality using useGetAcceptedContactsQuery.
- Added error handling and success notifications with toast messages.
- Created a new ImageCarousel component for displaying images in a carousel format.
- Enhanced VoteModal with ImageCarousel and SocialLinksRow for better candidate presentation.
- Introduced ShareQrDialog for sharing QR codes with copy and download options.
- Added SocialLinksRow component to display social media links in a user-friendly manner.
- Updated API helpers to include transferActionPurchase function for ticket transfers.
- Extended action types to include SocialLinks and SubActionMetadata for better metadata handling.
- Implemented utility function parseMetadata for normalizing sub-action metadata.
Copilot AI review requested due to automatic review settings July 16, 2026 12:21
@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for qiew-code-dev2 ready!

Name Link
🔨 Latest commit 9a143b0
🔍 Latest deploy log https://app.netlify.com/projects/qiew-code-dev2/deploys/6a58ceb5327fd30008c490f7
😎 Deploy Preview https://deploy-preview-72--qiew-code-dev2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for qc-dev2 ready!

Name Link
🔨 Latest commit 9a143b0
🔍 Latest deploy log https://app.netlify.com/projects/qc-dev2/deploys/6a58ceb56064ad000901bb15
😎 Deploy Preview https://deploy-preview-72--qc-dev2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds ticket-transfer UX and expands action/sub-action presentation (vote candidates, sub-action detail pages) with richer media (image carousels/lightbox), shareable QR dialogs, and normalized sub-action metadata handling for legacy rows.

Changes:

  • Added TransferTicketModal and an API helper to transfer purchased tickets to accepted contacts.
  • Introduced reusable UI components: ImageCarousel, ImageLightbox, ShareQrDialog, and SocialLinksRow.
  • Extended sub-action typing/metadata handling (images, socialLinks) and added parseMetadata to normalize legacy/double-encoded metadata.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
utils/subActionMetadata.ts Adds parseMetadata to normalize legacy JSON/string metadata before use.
types/action.types.ts Extends sub-action types to include socialLinks metadata and images.
INTEGRATION_AUDIT.md Adds an integration audit tracking frontend/backend gaps.
helpers/api.ts Adds transferActionPurchase helper for ticket transfers.
components/ui/social-links.tsx New UI row for Instagram/X links used across candidate/sub-action UIs.
components/ui/share-qr-dialog.tsx New dialog for sharing QR/link with copy/share/download actions.
components/ui/image-lightbox.tsx New fullscreen viewer for photo galleries with keyboard/swipe navigation.
components/ui/image-carousel.tsx New carousel component + collectImages helper for cover/gallery images.
components/ActionPage/TransferTicketModal.tsx New modal to search contacts and transfer a ticket purchase.
components/ActionPage/ActionWizardModal.tsx Enhances sub-action creation/editing with gallery images + social links + edit mode.
components/action-modals/VoteModal.tsx Enhances candidate presentation with carousel + social links.
components/action-modals/types.ts Extends modal sub-action typing for images and socialLinks.
app/welcome/[userId]/action/[actionId]/page.tsx Adds carousel/social links/QR share for vote candidates and sub-actions.
app/action/[userId]/subactions/[subactionId]/page.tsx Adds carousel/lightbox/share UX and normalizes metadata rendering.
app/action/[userId]/page.tsx Adds transfer UI entry points and action preview affordances.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +68 to +72
<a
key={entry.key}
href={entry.href}
target="_blank"
rel="noopener noreferrer nofollow"
Comment on lines +22 to +43
const go = useCallback(
(direction: 1 | -1) => {
onIndexChange((index + direction + images.length) % images.length);
},
[index, images.length, onIndexChange]
);

useEffect(() => {
const onKey = (e: KeyboardEvent) => {
if (e.key === 'Escape') onClose();
if (e.key === 'ArrowRight') go(1);
if (e.key === 'ArrowLeft') go(-1);
};
window.addEventListener('keydown', onKey);
// Freeze the page behind the overlay
const previousOverflow = document.body.style.overflow;
document.body.style.overflow = 'hidden';
return () => {
window.removeEventListener('keydown', onKey);
document.body.style.overflow = previousOverflow;
};
}, [go, onClose]);
Comment on lines +860 to +869
const addGalleryFiles = useCallback((files: File[]) => {
setGalleryFiles((prev) => [...prev, ...files].slice(0, MAX_GALLERY_IMAGES));
files.forEach((file) => {
const reader = new FileReader();
reader.onloadend = () => {
setGalleryPreviews((prev) => [...prev, reader.result as string]);
};
reader.readAsDataURL(file);
});
}, []);
Comment on lines +47 to +49
const { data, isLoading, error } = useGetAcceptedContactsQuery(token as string, {
skip: !token || !open,
});
@igorihimbazwe
igorihimbazwe merged commit dca52a3 into dev2 Jul 16, 2026
13 checks passed
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.

3 participants