refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
33
app/ExportResources/Contact/Call.php
Normal file
33
app/ExportResources/Contact/Call.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\ExportResources\Contact;
|
||||
|
||||
use App\ExportResources\ExportResource;
|
||||
|
||||
class Call extends ExportResource
|
||||
{
|
||||
protected $columns = [
|
||||
'uuid',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
|
||||
protected $properties = [
|
||||
'called_at',
|
||||
'content',
|
||||
'contact_called',
|
||||
];
|
||||
|
||||
public function data(): ?array
|
||||
{
|
||||
return [
|
||||
'properties' => [
|
||||
$this->mergeWhen($this->emotions->count() > 0, [
|
||||
'emotions' => $this->emotions->map(function ($emotion) {
|
||||
return $emotion->name;
|
||||
})->toArray(),
|
||||
]),
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user