mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Merge pull request #7478 from turbo124/v5-develop
Change output of activities for react app
This commit is contained in:
commit
a25a90d3d1
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -50,6 +50,7 @@ jobs:
|
||||
cp -r dist/react/* ../public/react
|
||||
cd ..
|
||||
rm -rf ui
|
||||
php artisan ninja:react
|
||||
|
||||
- name: Prepare JS/CSS assets
|
||||
run: |
|
||||
|
@ -97,18 +97,21 @@ class ActivityController extends BaseController
|
||||
|
||||
$data = $activities->cursor()->map(function ($activity) use($system){
|
||||
|
||||
return ctrans('texts.activity_'.$activity->activity_type_id,[
|
||||
'client' => $activity->client ? $activity->client->present()->name() : $system,
|
||||
'contact' => $activity->contact ? $activity->contact->first_name . " " .$activity->contact->last_name : $system,
|
||||
'quote' => $activity->quote ? $activity->quote->number : $system,
|
||||
'user' => $activity->user ? $activity->user->present()->name() : $system,
|
||||
'expense' => $activity->expense ? $activity->expense->number : $system,
|
||||
'invoice' => $activity->invoice ? $activity->invoice->number : $system,
|
||||
'recurring_invoice' => $activity->recurring_invoice ? $activity->recurring_invoice->number : $system,
|
||||
'payment' => $activity->payment ? $activity->payment->number : $system,
|
||||
'credit' => $activity->credit ? $activity->credit->number : $system,
|
||||
'task' => $activity->task ? $activity->task->number : $system,
|
||||
]);
|
||||
$arr=
|
||||
[
|
||||
'client' => $activity->client ? $activity->client : '',
|
||||
'contact' => $activity->contact ? $activity->contact : '',
|
||||
'quote' => $activity->quote ? $activity->quote : '',
|
||||
'user' => $activity->user ? $activity->user : '',
|
||||
'expense' => $activity->expense ? $activity->expense : '',
|
||||
'invoice' => $activity->invoice ? $activity->invoice : '',
|
||||
'recurring_invoice' => $activity->recurring_invoice ? $activity->recurring_invoice : '',
|
||||
'payment' => $activity->payment ? $activity->payment : '',
|
||||
'credit' => $activity->credit ? $activity->credit : '',
|
||||
'task' => $activity->task ? $activity->task : '',
|
||||
];
|
||||
|
||||
return array_merge($arr, $activity->toArray());
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user