fix: fix gifts listing not being shown (#1744)

This commit is contained in:
Régis Freyd
2018-08-26 16:23:31 -04:00
committed by GitHub
parent fcca3707be
commit d9857b943a
2 changed files with 9 additions and 2 deletions
@@ -23,6 +23,12 @@ class GiftsController extends Controller
$gifts = $contact->gifts()->get();
foreach ($gifts as $gift) {
$value = $gift->value;
if ($gift->value == '') {
$value = 0;
}
$data = [
'contact_hash' => $contact->hashID(),
'id' => $gift->id,
@@ -30,8 +36,8 @@ class GiftsController extends Controller
'recipient_name' => $gift->recipient_name,
'comment' => $gift->comment,
'url' => $gift->url,
'value' => MoneyHelper::format($gift->value),
'does_value_exist' => (bool) $gift->value,
'value' => MoneyHelper::format($value),
'does_value_exist' => (bool) $value,
'is_an_idea' => $gift->is_an_idea,
'has_been_offered' => $gift->has_been_offered,
'has_been_received' => $gift->has_been_received,