mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Invoice task status badges
This commit is contained in:
parent
c5c75f3574
commit
d689124871
@ -162,6 +162,18 @@ class Task extends BaseModel
|
||||
return $this->belongsTo(TaskStatus::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function stringStatus()
|
||||
{
|
||||
if($this->invoice_id)
|
||||
return '<h5><span class="badge badge-success">'.ctrans('texts.invoiced').'</span></h5>';
|
||||
|
||||
if($this->status)
|
||||
return '<h5><span class="badge badge-primary">' . $this->status?->name ?? '';
|
||||
|
||||
return '';
|
||||
|
||||
}
|
||||
|
||||
public function invoice()
|
||||
{
|
||||
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||
|
@ -47,7 +47,7 @@
|
||||
{{ $task->project?->name }}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
||||
{{ $task->status?->name }}
|
||||
{!! $task->stringStatus() !!}
|
||||
</td>
|
||||
<td class="px-6 py-4 whitespace-nowrap text-sm leading-5 text-gray-500">
|
||||
{{ \Carbon\CarbonInterval::seconds($task->calcDuration())->cascade()->forHumans() }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user