mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Working on the calendar
This commit is contained in:
parent
ff034b08c0
commit
e0bcd698ac
@ -50,6 +50,24 @@ class EntityPresenter extends Presenter
|
||||
return "<span style=\"font-size:13px\" class=\"label label-{$class}\">{$label}</span>";
|
||||
}
|
||||
|
||||
public function statusColor()
|
||||
{
|
||||
$class = $this->entity->statusClass();
|
||||
|
||||
switch ($class) {
|
||||
case 'success':
|
||||
return '#5cb85c';
|
||||
case 'warning':
|
||||
return '#f0ad4e';
|
||||
case 'primary':
|
||||
return '#337ab7';
|
||||
case 'info':
|
||||
return '#5bc0de';
|
||||
default:
|
||||
return '#777';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -331,8 +331,13 @@ class InvoicePresenter extends EntityPresenter
|
||||
$entityType = $invoice->getEntityType();
|
||||
|
||||
$data->title = trans("texts.{$entityType}") . ' ' . $invoice->invoice_number . ' | ' . $this->amount() . ' | ' . $this->client();
|
||||
$data->start = $invoice->invoice_date;
|
||||
$data->start = $invoice->due_date ?: $invoice->invoice_date;
|
||||
|
||||
if ($subColors) {
|
||||
$data->borderColor = $data->backgroundColor = $invoice->present()->statusColor();
|
||||
} else {
|
||||
$data->borderColor = $data->backgroundColor = $invoice->isQuote() ? '#984ea3' : '#377eb8';
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@ -52,9 +52,14 @@ class PaymentPresenter extends EntityPresenter
|
||||
$payment = $this->entity;
|
||||
$invoice = $payment->invoice;
|
||||
|
||||
$data->title = trans('texts.payment') . ' ' . $invoice->invoice_number . ' | ' . $this->amount() . ' | ' . $this->client();
|
||||
$data->title = trans('texts.payment') . ' ' . $invoice->invoice_number . ' | ' . $this->completedAmount() . ' | ' . $this->client();
|
||||
$data->start = $payment->payment_date;
|
||||
|
||||
if ($subColors) {
|
||||
$data->borderColor = $data->backgroundColor = Utils::brewerColor($payment->payment_status_id);
|
||||
} else {
|
||||
$data->borderColor = $data->backgroundColor = '#4daf4a';
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
@ -24,11 +24,13 @@
|
||||
|
||||
|
||||
@section('top-right')
|
||||
<select class="form-control" style="width: 220px" id="entityTypeFilter" multiple="true">
|
||||
<div id="entityTypeFilterWrapper" style="display:none">
|
||||
<select class="form-control" style="width: 220px;" id="entityTypeFilter" multiple="true">
|
||||
@foreach ([ENTITY_INVOICE, ENTITY_QUOTE, ENTITY_PAYMENT, ENTITY_TASK, ENTITY_EXPENSE] as $value)
|
||||
<option value="{{ $value }}">{{ trans("texts.{$value}") }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@ -62,6 +64,7 @@
|
||||
localStorage.setItem('last:calendar_filter', filter);
|
||||
}
|
||||
}).maximizeSelect2Height();
|
||||
$('#entityTypeFilterWrapper').show();
|
||||
|
||||
$('#calendar').fullCalendar({
|
||||
locale: '{{ App::getLocale() }}',
|
||||
|
Loading…
x
Reference in New Issue
Block a user