Skip to content
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

PBI Transaction History #77

Merged
merged 7 commits into from
May 17, 2024
Merged

PBI Transaction History #77

merged 7 commits into from
May 17, 2024

Conversation

catherineeangel
Copy link
Contributor

In this PR, I have applied the transaction history feature for the app. I have applied this so that user can continue pending transaction that has not expired.

Copy link
Contributor

@JohannesSetiawan JohannesSetiawan left a comment

Choose a reason for hiding this comment

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

Good implementation, but there's some issue detected on SonarCloud. Might want to fix that first

Copy link
Member

@emiriko emiriko left a comment

Choose a reason for hiding this comment

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

I really like your code, but I think there is a slight room for improvement. Thank you for your effort!

{formatRupiah(price)}
</td>
<td className="p-2 border-2 border-emerald-500">
{dayjs(expiry_time).format('ddd, D MMM YY HH:mm')}
Copy link
Member

Choose a reason for hiding this comment

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

I think there are plenty of time in our projects that we use dayjs and format it to a certain format. I think it's better to make utils function for better code readability.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok thanks for suggesting this, I have rafactored the code and make it more modular.

Comment on lines 30 to 31
if (transactionErrorStatuses.includes(status ?? ''))
return <PaymentError status={status ?? ''} />
Copy link
Member

Choose a reason for hiding this comment

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

In here, is there really a case where status is null? If there are, I think you could define status as a type of possible values to reduce confusion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right. Thanks for pointing that outl.

Copy link
Member

@emiriko emiriko left a comment

Choose a reason for hiding this comment

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

All good! Good job.

@catherineeangel catherineeangel merged commit 646cdf1 into staging May 17, 2024
3 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