Display protocoin amounts, improve transaction validation

This commit is contained in:
2022-08-22 21:33:38 +00:00
parent 81c9bd9c9b
commit 1c225da510
4 changed files with 52 additions and 14 deletions

View File

@@ -539,6 +539,11 @@ export function AdminMemberInfo(props) {
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Protocoin:</Table.Cell>
<Table.Cell>&thinsp;{member.protocoin.toFixed(2)}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Application Date:</Table.Cell>
<Table.Cell>{member.application_date}</Table.Cell>

View File

@@ -48,6 +48,10 @@ function MemberInfo(props) {
{member.status || 'Unknown'}
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Protocoin:</Table.Cell>
<Table.Cell>&thinsp;{member.protocoin.toFixed(2)}</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>Expiry:</Table.Cell>
<Table.Cell>{member.expire_date ? moment(member.expire_date).format('ll') : 'Unknown'}</Table.Cell>
@@ -126,7 +130,7 @@ function MemberInfo(props) {
<Link to={'/transactions/'+x.id}>{moment(x.date).format('ll')}</Link>
</Table.Cell>
<Table.Cell>{x.account_type}</Table.Cell>
<Table.Cell>${x.amount}</Table.Cell>
<Table.Cell>{x.protocoin !== '0.00' ? '' + x.protocoin : '$' + x.amount}</Table.Cell>
</Table.Row>
)
:

View File

@@ -159,7 +159,6 @@ export function TransactionEditor(props) {
{...makeProps('memo')}
/>
</Form.Group>
</div>
);
};
@@ -304,7 +303,7 @@ export function TransactionList(props) {
x.member_name
}
</Table.Cell>}
<Table.Cell>${x.amount}</Table.Cell>
<Table.Cell style={{ minWidth: '8rem' }}>{x.protocoin !== '0.00' ? '₱ ' + x.protocoin : '$' + x.amount}</Table.Cell>
<Table.Cell>{x.account_type}</Table.Cell>
{!noCategory && <Table.Cell>{x.category}</Table.Cell>}
<Table.Cell>{x.memo || x.report_memo}</Table.Cell>
@@ -361,8 +360,12 @@ class TransactionTable extends React.Component {
</Table.Row>
<Table.Row>
<Table.Cell>Amount:</Table.Cell>
<Table.Cell>${transaction.amount}</Table.Cell>
<Table.Cell>${transaction.amount}</Table.Cell>
</Table.Row>
{transaction.protocoin !== '0.00' && <Table.Row>
<Table.Cell>Protocoin:</Table.Cell>
<Table.Cell>{transaction.protocoin}</Table.Cell>
</Table.Row>}
<Table.Row>
<Table.Cell>Category:</Table.Cell>
<Table.Cell>{transaction.category}</Table.Cell>