Open notwatermango opened 1 year ago
will do research later
src\server\api\routers\ticket.ts
callTicketCustomer: protectedProcedure .input( z.object({ ticketId: z.string(), }) ) .mutation(async ({ input: { ticketId }, ctx }) => { await ctx.prisma.ticket.update({ where: { id: ticketId, }, data: { status: 4, // call customer }, }); // TODO: notify customer maybe here }),
src\pages\merchant\queue.tsx
const handleCallCustomer = async (ticketId: string) => { await callCustomer.mutateAsync({ ticketId, }); // TODO: notify customer maybe here await refetch(); };
will use onesignal SDK
can't get it to work 💀 postpone for later
will do research later
src\server\api\routers\ticket.ts
src\pages\merchant\queue.tsx