-
-
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
added expense detail page #16
base: master
Are you sure you want to change the base?
Conversation
marvelalexius
commented
May 26, 2024
- added a href wrapper in expense card
- installed new badge component from shadcn
- added a href wrapper in expense card - installed new badge component from shadcn
<h3 className="text-lg font-medium"> | ||
{new Intl.NumberFormat("id-ID", { | ||
style: "currency", | ||
currency: "IDR", |
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 currency won't always be IDR
though
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.
Hmm, what should I use then? Should I use original_currency or do we have an env for deciding which currency to show?
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.
You should show both original currency and IDR currency though. The original transaction won't always be in IDR, but people who see this site mostly will come from Indonesia. So there's that.
</h3> | ||
</div> | ||
{/* TODO: use whatever we use for detail links. Eg: tx code, unique id, uuid, etc. */} | ||
<a href={`/expenses/123`}> |
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.
hmm, kenapa ga langsung pake transaction_code
? atau dto nya belum final ya?
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.
that's the question, masih unclear posisinya, but I think I'll change it to transaction_code
langsung
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.
Yeah I'd also prefer this to be a /expenses/${expense.transaction_code}
{new Intl.NumberFormat("id-ID", { | ||
style: "currency", | ||
currency: "IDR", | ||
}).format(expense.idr_amount.toNumber())} |
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.
kenapa ga di buat utility fungsi sendiri ya? jadi kalo misal ada yang perlu disesuaikan tinggal di satu tempat
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.
You're right, will do it later