-
-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Tree Reporting Card (#1099)
* feat: implement tree reporting card statistic hook * feat: implement tree reporting card component * feat: import and add Tree reporting card component to home page * refactor: refactor ReportingCard.hook.js to fetch tree statistic * refactor: refactor tree reporting card to use refactored useLoadData from ReportingCard.hook.js * refactor: delete unused ReportingCardTree.hook.js * feat: add getRawTrees API function for Query tree api * feat: implement DashStatTotalTrees component * feat: add DashStatTotalTrees component to Home page * feat: delete getRawTree api from previous commit * feat: delete DashStat for trees component implement previously * feat: remove DashStat for tree in Home page from previous commit * feat: delete unused Icon in DashStat.container.js
- Loading branch information
1 parent
fcaad98
commit 9a14685
Showing
3 changed files
with
62 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import ReportingCard from './ReportingCard'; | ||
import Icon from '@material-ui/icons/Eco'; | ||
import useLoadData from './ReportingCard.hook'; | ||
|
||
export default function ReportingCard9(props) { | ||
const { startDate, endDate, disableSeeMore, rows } = props; | ||
|
||
const data = useLoadData( | ||
startDate, | ||
endDate, | ||
'trees', | ||
'trees', | ||
undefined, | ||
rows, | ||
'tree' | ||
); | ||
|
||
return ( | ||
<ReportingCard | ||
text={{ | ||
title: 'Trees', | ||
text1: 'Total', | ||
}} | ||
icon={Icon} | ||
color="#76bb23" | ||
data={data} | ||
disableSeeMore={disableSeeMore} | ||
/> | ||
); | ||
} |