Skip to content

Commit

Permalink
fix(MyEvent): use public id for public link
Browse files Browse the repository at this point in the history
  • Loading branch information
joseglego committed Sep 27, 2024
1 parent 5991742 commit d80b96d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/api/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import type { TypedDocumentNode as DocumentNode } from "@graphql-typed-document-
const documents = {
"query FetchExampleEvents($input: PaginatedInputEventsSearchInput!) {\n searchEvents(input: $input) {\n data {\n id\n description\n community {\n id\n name\n }\n tags {\n id\n name\n description\n }\n }\n }\n}":
types.FetchExampleEventsDocument,
"query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}":
"query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n publicId\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}":
types.MyEventDocument,
"query myEvents($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n address\n previewImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n ticketTemplate {\n description\n id\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}":
types.MyEventsDocument,
Expand Down Expand Up @@ -59,8 +59,8 @@ export function graphql(
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(
source: "query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}",
): (typeof documents)["query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}"];
source: "query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n publicId\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}",
): (typeof documents)["query myEvent($input: PaginatedInputEventsSearchInput!, $userTicketSearchInput: EventsTicketsSearchInput) {\n searchEvents(input: $input) {\n data {\n id\n name\n description\n startDateTime\n endDateTime\n address\n publicShareURL\n previewImage {\n url\n }\n bannerImage {\n url\n }\n mobileBannerImage {\n url\n }\n community {\n id\n name\n }\n status\n usersTickets(input: $userTicketSearchInput) {\n id\n approvalStatus\n paymentStatus\n redemptionStatus\n createdAt\n publicId\n ticketTemplate {\n id\n name\n description\n }\n }\n }\n pagination {\n currentPage\n pageSize\n totalPages\n totalRecords\n }\n }\n}"];
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
Expand Down
5 changes: 5 additions & 0 deletions app/api/gql/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,7 @@ export type MyEventQuery = {
paymentStatus?: PurchaseOrderPaymentStatusEnum | null;
redemptionStatus: TicketRedemptionStatus;
createdAt: string;
publicId: string;
ticketTemplate: {
id: string;
name: string;
Expand Down Expand Up @@ -1938,6 +1939,10 @@ export const MyEventDocument = {
kind: "Field",
name: { kind: "Name", value: "createdAt" },
},
{
kind: "Field",
name: { kind: "Name", value: "publicId" },
},
{
kind: "Field",
name: { kind: "Name", value: "ticketTemplate" },
Expand Down
2 changes: 1 addition & 1 deletion app/components/MyEvent/MyEvent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const Ticket = ({
}) => {
const [showQR, setShowQR] = useState(false);
const publicUrl = event?.publicShareURL
? urls.public.ticket(ticket.id, event.publicShareURL)
? urls.public.ticket(ticket.publicId as string, event.publicShareURL)
: undefined;

return (
Expand Down
2 changes: 2 additions & 0 deletions app/components/MyEvent/graphql/myEvent.generated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export type MyEventQuery = {
paymentStatus?: Types.PurchaseOrderPaymentStatusEnum | null;
redemptionStatus: Types.TicketRedemptionStatus;
createdAt: any;
publicId: string;
ticketTemplate: {
__typename?: "Ticket";
id: string;
Expand Down Expand Up @@ -94,6 +95,7 @@ export const MyEventDocument = gql`
paymentStatus
redemptionStatus
createdAt
publicId
ticketTemplate {
id
name
Expand Down
1 change: 1 addition & 0 deletions app/components/MyEvent/graphql/myEvent.gql
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ query myEvent(
paymentStatus
redemptionStatus
createdAt
publicId
ticketTemplate {
id
name
Expand Down

0 comments on commit d80b96d

Please sign in to comment.