Display audit logs

This commit is contained in:
James Cole
2022-10-02 14:37:50 +02:00
parent 06cd75ba74
commit ca8a65af60
21 changed files with 360 additions and 100 deletions

View File

@@ -75,13 +75,13 @@ class ConvertToDeposit implements ActionInterface
if (TransactionType::WITHDRAWAL === $type) {
Log::debug('Going to transform a withdrawal to a deposit.');
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
event(new TriggeredAuditLog($this->action->rule, $object, 'change_transaction_type', TransactionType::WITHDRAWAL, TransactionType::DEPOSIT));
event(new TriggeredAuditLog($this->action->rule, $object, 'update_transaction_type', TransactionType::WITHDRAWAL, TransactionType::DEPOSIT));
return $this->convertWithdrawalArray($journal);
}
if (TransactionType::TRANSFER === $type) {
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
event(new TriggeredAuditLog($this->action->rule, $object, 'change_transaction_type', TransactionType::TRANSFER, TransactionType::DEPOSIT));
event(new TriggeredAuditLog($this->action->rule, $object, 'update_transaction_type', TransactionType::TRANSFER, TransactionType::DEPOSIT));
Log::debug('Going to transform a transfer to a deposit.');
return $this->convertTransferArray($journal);