Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/TEDx-SJEC/website into feat…
Browse files Browse the repository at this point in the history
…/santhsim
  • Loading branch information
SANTHSIM22 committed Oct 4, 2024
2 parents 125d78c + 5b9bc75 commit dd4edf8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
21 changes: 11 additions & 10 deletions src/app/actions/invalidate-coupon.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"use server"
"use server";

import prisma from "@/server/db"
import prisma from "@/server/db";

export async function invalidateCouponCode(couponCode:string){
export async function invalidateCouponCode(couponCode: string) {
if (!couponCode) return;
const resp = await prisma.referral.update({
where:{
code:couponCode
where: {
code: couponCode,
},
data:{
isUsed:true
}
})
}
data: {
isUsed: true,
},
});
}
6 changes: 6 additions & 0 deletions src/components/payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ export function Payment() {
alert("Payment failed");
}
},
// change to dynamic
notes: {
customerName: "John Doe",
customerEmail: "[email protected]",
customerContact: "9999999999",
},
prefill: {
name: "John Doe",
email: "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/components/searchable-infinite-scroll-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function SearchableInfiniteScrollTable() {
<TableCell>{item.usn}</TableCell>
<TableCell>{item.razorpayPaymentId}</TableCell>
<TableCell>{item.contactNumber}</TableCell>
<TableCell>${item.amount.toFixed(2)}</TableCell>
<TableCell>{item.amount.toFixed(2)}</TableCell>
</TableRow>
))}
</TableBody>
Expand Down
3 changes: 1 addition & 2 deletions src/lib/send-registration-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ export async function sendRegistrationEmail({
await resend.emails.send({
from: '"Tedx SJEC" <[email protected]>',
to: email,
subject: "Tedx SJEC - Email Verification",
subject: "Event Registration Successful - TEDx SJEC",
react: TedxRegistrationEmail({ name, registrationLink }),
text: `Hello ${name},\n\nThank you for registering for Tedx 2024.\n\nPlease click on the link below to complete your registration.\n\n${registrationLink}\n\nThank you!\n\nTedx SJEC Team`,
});
} catch (error) {
console.log(error);
Expand Down

0 comments on commit dd4edf8

Please sign in to comment.