홈 화면 month api 수정
This commit is contained in:
@@ -44,6 +44,7 @@ export const BoxContainer2 = () => {
|
||||
let previousMonthAmount = rs.sales.previousMonthAmount;
|
||||
if(currentMonthAmount && previousMonthAmount){
|
||||
let increase = (currentMonthAmount - previousMonthAmount) / previousMonthAmount * 100;
|
||||
increase = Math.round(increase * 100) / 100;
|
||||
setSalesIncrease(increase);
|
||||
}
|
||||
|
||||
@@ -51,6 +52,7 @@ export const BoxContainer2 = () => {
|
||||
let previousMonthSettlementAmount = rs.settlement.previousMonthSettlementAmount;
|
||||
if(currentMonthSettlementAmount && previousMonthSettlementAmount){
|
||||
let increase = (currentMonthSettlementAmount - previousMonthSettlementAmount) / previousMonthSettlementAmount * 100;
|
||||
increase = Math.round(increase * 100) / 100;
|
||||
setSettlementIncrease(increase);
|
||||
}
|
||||
});
|
||||
@@ -72,7 +74,7 @@ export const BoxContainer2 = () => {
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
// callMonth();
|
||||
callMonth();
|
||||
callOverview();
|
||||
}, []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user