Display the recorder of each Transaction
This commit is contained in:
parent
26f581b449
commit
c2ea455750
|
@ -66,6 +66,7 @@ class TransactionSerializer(serializers.ModelSerializer):
|
|||
'User Flagged',
|
||||
], allow_null=True, required=False)
|
||||
number_of_membership_months = serializers.IntegerField(max_value=36, min_value=-36)
|
||||
recorder = serializers.SerializerMethodField()
|
||||
|
||||
class Meta:
|
||||
model = models.Transaction
|
||||
|
@ -99,6 +100,12 @@ class TransactionSerializer(serializers.ModelSerializer):
|
|||
member = models.Member.objects.get(id=obj.member_id)
|
||||
return member.preferred_name + ' ' + member.last_name
|
||||
|
||||
def get_recorder(self, obj):
|
||||
if obj.recorder:
|
||||
return obj.recorder.username
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
# member viewing other members
|
||||
# hide info for non-vetted members so someone sitting
|
||||
|
|
|
@ -374,6 +374,10 @@ class TransactionTable extends React.Component {
|
|||
<Table.Cell>Memo:</Table.Cell>
|
||||
<Table.Cell>{transaction.memo}</Table.Cell>
|
||||
</Table.Row>
|
||||
<Table.Row>
|
||||
<Table.Cell>Recorder:</Table.Cell>
|
||||
<Table.Cell>{transaction.recorder || 'System'}</Table.Cell>
|
||||
</Table.Row>
|
||||
|
||||
{!!transaction.report_type && <Table.Row>
|
||||
<Table.Cell>Report Type:</Table.Cell>
|
||||
|
|
Loading…
Reference in New Issue
Block a user