1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

Display contact in activity dashboard and client activity

This commit is contained in:
Christopher Di Carlo 2019-05-09 07:07:15 -04:00
parent 14c140c520
commit b854115389
4 changed files with 5 additions and 5 deletions

View File

@ -121,6 +121,7 @@ class Activity extends Eloquent
$user = $this->user;
$invoice = $this->invoice;
$contactId = $this->contact_id;
$contact = $this->contact;
$payment = $this->payment;
$credit = $this->credit;
$expense = $this->expense;
@ -133,7 +134,7 @@ class Activity extends Eloquent
'user' => $isSystem ? '<i>' . trans('texts.system') . '</i>' : e($user->getDisplayName()),
'invoice' => $invoice ? link_to($invoice->getRoute(), $invoice->getDisplayName()) : null,
'quote' => $invoice ? link_to($invoice->getRoute(), $invoice->getDisplayName()) : null,
'contact' => $contactId ? link_to($client->getRoute(), $client->getDisplayName()) : e($user->getDisplayName()),
'contact' => $contactId ? link_to($client->getRoute(), $contact->getDisplayName()) : e($user->getDisplayName()),
'payment' => $payment ? e($payment->transaction_reference) : null,
'payment_amount' => $payment ? $account->formatMoney($payment->amount, $payment) : null,
'adjustment' => $this->adjustment ? $account->formatMoney($this->adjustment, $this) : null,

View File

@ -44,7 +44,7 @@ class ActivityDatatable extends EntityDatatable
'user' => $model->is_system ? '<i>' . trans('texts.system') . '</i>' : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email),
'invoice' => $model->invoice ? link_to('/invoices/' . $model->invoice_public_id, $model->is_recurring ? trans('texts.recurring_invoice') : $model->invoice)->toHtml() : null,
'quote' => $model->invoice ? link_to('/quotes/' . $model->invoice_public_id, $model->invoice)->toHtml() : null,
'contact' => $model->contact_id ? link_to('/clients/' . $model->client_public_id, Utils::getClientDisplayName($model))->toHtml() : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email),
'contact' => $model->contact_id ? link_to('/clients/' . $model->client_public_id, Utils::getPersonDisplayName($model->first_name, $model->last_name, $model->email))->toHtml() : Utils::getPersonDisplayName($model->user_first_name, $model->user_last_name, $model->user_email),
'payment' => $model->payment ? e($model->payment) : '',
'credit' => $model->payment_amount ? Utils::formatMoney($model->credit, $model->currency_id, $model->country_id) : '',
'payment_amount' => $model->payment_amount ? Utils::formatMoney($model->payment_amount, $model->currency_id, $model->country_id) : null,

View File

@ -79,7 +79,6 @@ class ActivityRepository
->leftJoin('expenses', 'expenses.id', '=', 'activities.expense_id')
->leftJoin('tickets', 'tickets.id', '=', 'activities.ticket_id')
->where('clients.id', '=', $clientId)
->where('contacts.is_primary', '=', 1)
->whereNull('contacts.deleted_at')
->select(
DB::raw('COALESCE(clients.currency_id, accounts.currency_id) currency_id'),

View File

@ -756,7 +756,7 @@ $LANG = array(
'activity_3' => ':user deleted client :client',
'activity_4' => ':user created invoice :invoice',
'activity_5' => ':user updated invoice :invoice',
'activity_6' => ':user emailed invoice :invoice to :contact',
'activity_6' => ':user emailed invoice :invoice for :client to :contact',
'activity_7' => ':contact viewed invoice :invoice',
'activity_8' => ':user archived invoice :invoice',
'activity_9' => ':user deleted invoice :invoice',
@ -770,7 +770,7 @@ $LANG = array(
'activity_17' => ':user deleted :credit credit',
'activity_18' => ':user created quote :quote',
'activity_19' => ':user updated quote :quote',
'activity_20' => ':user emailed quote :quote to :contact',
'activity_20' => ':user emailed quote :quote for :client to :contact',
'activity_21' => ':contact viewed quote :quote',
'activity_22' => ':user archived quote :quote',
'activity_23' => ':user deleted quote :quote',