-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Claiming of Redeemed Vouchers #24
base: main
Are you sure you want to change the base?
Conversation
@@ -14,18 +23,69 @@ const relativeRedeemed = computed(() => { | |||
timestamp: formatRelative(v.timestamp, now), | |||
})) | |||
}) | |||
|
|||
function claimVoucher(redemptionId: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant one on the component and one on the page file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe one is claimAdminVoucher and the other is claimVoucher
@@ -11,6 +11,7 @@ import { deadlineRouter } from './deadline/deadline.router' | |||
import { eventRouter } from './event/event.router' | |||
import { quizRouter } from './quiz/quiz.router' | |||
import { voucherRouter } from './voucher/voucher.router' | |||
import { redeemRouter } from './redemption/redemption.router' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can merge with voucher router?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there a need to merge with voucher router?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Belongs under voucher domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redemption cannot exist without voucher
}, | ||
), | ||
|
||
adminClaim: protectedProcedure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why need admin claim?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to allow admin to essentially claim on the admin end for the vouchers where as the normal claim is for the users to claim on their end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case then it is probably better to combine into single claim function and assertInstitutionRole to see if user is admin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the user must also be able to mark it as complete on their end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is for users to be able to claim their redeemed voucher right?
Say I redeem a LIHO voucher. I will need to go to an admin to get the voucher code. Then the admin will mark the voucher as claimed right?
What is the use case for members claiming their own voucher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have seen how Shopee system can also work where the user is able to claim on their end at the same time on the shopee administrator end, they are also able to mark the voucher as claimed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t think it applies since we have one claimed field only
Co-authored-by: Qin Guan <[email protected]>
Co-authored-by: Qin Guan <[email protected]>
Co-authored-by: Qin Guan <[email protected]>
Co-authored-by: Qin Guan <[email protected]>
No description provided.