refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s

This commit is contained in:
Kroonk
2026-05-22 16:19:55 +02:00
parent 38cc4c09ca
commit a213a1dba0
2215 changed files with 242567 additions and 6015 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Contacts;
use App\Helpers\DateHelper;
use App\Models\Contact\Contact;
use App\Http\Controllers\Controller;
class TasksController extends Controller
{
/**
* Get all the tasks of this contact.
*/
public function index(Contact $contact)
{
$tasks = collect([]);
foreach ($contact->tasks as $task) {
$data = [
'id' => $task->id,
'title' => $task->title,
'description' => $task->description,
'completed' => $task->completed,
'completed_at' => ($task->completed_at) ? DateHelper::getShortDate($task->completed_at) : null,
'edit' => false,
];
$tasks->push($data);
}
return $tasks;
}
}