-
Notifications
You must be signed in to change notification settings - Fork 14
feat(5957): redesign cost pages #5998
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
Conversation
|
||
useEffect(() => { | ||
if (data) { | ||
onDataLoaded(data); |
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.
passing isLoading
to onLoadingDone
after data is present, at this point, isLoading
will likely already be false - this can be possibly redundant
loaderProps={{ color: 'pink', type: 'bars' }} | ||
/> | ||
<div className="relative"> | ||
<CostSummary data={costData!} selectedDate={selectedDate} viewMode={viewMode} /> |
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.
CostSummary Is rendered before data check (rendering chart) If costData
is undefined
or loading failure, it could crash because to !
<CostSummary data={costData!} selectedDate={selectedDate} viewMode={viewMode} /> | ||
<Button onClick={async () => {}} className="absolute right-0 top-[10px]"> | ||
Download PDF | ||
</Button> |
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.
no this button do nothing
import LoadingBox from '@/components/generic/LoadingBox'; | ||
import MonthlyCostSummary from '@/components/private-cloud/monthly-cost/MonthlyCostSummary'; | ||
import { useEffect } from 'react'; | ||
import MonthlyCostChart from '@/components/private-cloud/monthly-cost/MonthyCostChart'; |
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.
typo in file name MonthyCostChart
Cost to date at{' '} | ||
<strong className="text-gray-800"> | ||
{} | ||
{currentMonth} {currentMonthDay} |
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.
what is this empty object for?
@@ -0,0 +1,128 @@ | |||
import { monthNames } from '@/constants/common'; | |||
import { MonthlyCost, QuarterlyCost, TimeView, YearlyCost } from '@/types/private-cloud'; | |||
import { getDaysBetweenDates, extractDateRanges, formatCurrency, getQuarterValue, cn } from '@/utils/js'; |
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.
cn
import is not used
|
No description provided.