show work amount for homie on Dashboard
This commit is contained in:
@@ -4,8 +4,8 @@ import './Cash.css';
|
||||
import axios from 'axios';
|
||||
import { MAKE_MONEY_MOVE } from '../RouteNames';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { formatMoney } from '../common/formatting';
|
||||
import InputModal from "../common/InputModal";
|
||||
import { formatMoney, formatTime } from '../common/formatting';
|
||||
import YesNoModal from "../common/YesNoModal";
|
||||
import { errorToast } from "../common/errorHelpers";
|
||||
import M from 'materialize-css';
|
||||
|
||||
@@ -16,7 +16,7 @@ const Cash = (props) => {
|
||||
useEffect( () => {
|
||||
const getCashForHomies = async () => {
|
||||
try {
|
||||
const cash = await axios.get(`/api/homies/cash`);
|
||||
const cash = await axios.get(`/api/homies/info`);
|
||||
setHomiesCash(cash.data);
|
||||
} catch (e) {
|
||||
console.log("Error fetching", e);
|
||||
@@ -45,6 +45,9 @@ const Cash = (props) => {
|
||||
<td className="cash-cell-left">
|
||||
<a href={`/homie/${homieLine.homie.id}/flow`}>{ homieLine.homie.name }</a>
|
||||
</td>
|
||||
<td className="cash-cell-left">
|
||||
{ formatTime(homieLine.work) }
|
||||
</td>
|
||||
<td className="cash-cell-right">
|
||||
{ formatMoney(homieLine.amount) }
|
||||
</td>
|
||||
@@ -71,6 +74,9 @@ const Cash = (props) => {
|
||||
<th>
|
||||
Homie
|
||||
</th>
|
||||
<th>
|
||||
Work
|
||||
</th>
|
||||
<th>
|
||||
Cash
|
||||
</th>
|
||||
|
||||
Reference in New Issue
Block a user