Allow to hide the "paid" section in a document's timeline.

This commit is contained in:
Pavel Mironchik 2021-01-05 09:01:15 +06:00
parent 3b92bd8447
commit 9643de8b5d
3 changed files with 11 additions and 6 deletions

View File

@ -169,6 +169,9 @@ abstract class DocumentShow extends Component
/** @var bool */
public $hideTimelineSent;
/** @var bool */
public $hideTimelinePaid;
/** @var bool */
public $hideButtonSent;
@ -357,7 +360,7 @@ abstract class DocumentShow extends Component
bool $hideButtonGroupDivider1 = false, bool $hideButtonGroupDivider2 = false, bool $hideButtonGroupDivider3 = false,
bool $hideButtonMoreActions = false, bool $hideButtonAddNew = false, bool $hideButtonEdit = false, bool $hideButtonDuplicate = false, bool $hideButtonPrint = false, bool $hideButtonPdf = false, bool $hideButtonCancel = false, bool $hideButtonCustomize = false, bool $hideButtonDelete = false,
bool $hideHeader = false,bool $hideRecurringMessage = false, bool $hideStatusMessage = false, bool $hideTimeline = false, bool $hideFooter = false, bool $hideFooterHistories = false, bool $hideFooterTransactions = false,
array $hideTimelineStatuses = [], bool $hideTimelineSent = false, bool $hideButtonSent = false, bool $hideButtonReceived = false, bool $hideButtonEmail = false, bool $hideButtonShare = false, bool $hideButtonPaid = false,
array $hideTimelineStatuses = [], bool $hideTimelineSent = false, bool $hideTimelinePaid = false, bool $hideButtonSent = false, bool $hideButtonReceived = false, bool $hideButtonEmail = false, bool $hideButtonShare = false, bool $hideButtonPaid = false,
string $textHeaderContact = '', string $textHeaderAmount = '', string $textHeaderDueAt = '',
string $classHeaderStatus = '', string $classHeaderContact = '', string $classHeaderAmount = '', string $classHeaderDueAt = '',
bool $hideHeaderStatus = false, bool $hideHeaderContact = false, bool $hideHeaderAmount = false, bool $hideHeaderDueAt = false,
@ -447,6 +450,7 @@ abstract class DocumentShow extends Component
$this->hideTimelineCreate = $hideTimelineCreate;
$this->hideTimelineSent = $hideTimelineSent;
$this->hideTimelinePaid = $hideTimelinePaid;
$this->hideButtonSent = $hideButtonSent;
$this->hideButtonReceived = $hideButtonReceived;
$this->hideButtonEmail = $hideButtonEmail;

View File

@ -67,6 +67,7 @@
hide-button-share="{{ $hideButtonShare }}"
signed-url="{{ $signedUrl }}"
hide-timeline-sent="{{ $hideTimelineSent }}"
hide-timeline-paid="{{ $hideTimelinePaid }}"
text-timeline-get-paid-title="{{ $textTimelineGetPaidTitle }}"
text-timeline-get-paid-status-await="{{ $textTimelineGetPaidStatusAwait }}"
text-timeline-get-paid-status-partially-paid="{{ $textTimelineGetPaidStatusPartiallyPaid }}"

View File

@ -106,11 +106,11 @@
<small>{{ trans('invoices.messages.status.send.sent', ['date' => Date::parse($document->sent_at)->format($date_format)]) }}</small>
@stack('timeline_sent_body_message_end')
@endif
@if (!($document->status != 'sent' && $document->status != 'partial' && $document->status != 'viewed'))
<div class="mt-3">
@endif
@stack('timeline_sent_body_button_email_start')
@if (!$hideButtonEmail)
@if($document->contact_email)
@ -134,7 +134,7 @@
@endif
@endif
@stack('timeline_sent_body_button_share_end')
</div>
@stack('timeline_sent_body_end')
@ -144,7 +144,7 @@
@stack('timeline_sent_end')
@stack('timeline_get_paid_start')
@if (!$hideTimelineSent)
@if (!$hideTimelinePaid)
<div class="timeline-block">
<span class="timeline-step badge-success">
<i class="far fa-money-bill-alt"></i>
@ -206,4 +206,4 @@
</div>
</div>
@stack('timeline_get_paid_end')
@endif
@endif