Transaction show contact show and contact pages styling..
This commit is contained in:
parent
4a18e50f88
commit
fd1f6b4821
@ -94,6 +94,9 @@ abstract class TransactionShow extends Base
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $routeButtonPrint;
|
public $routeButtonPrint;
|
||||||
|
|
||||||
|
/** @var string */
|
||||||
|
public $routeContactShow;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public $signedUrl;
|
public $signedUrl;
|
||||||
|
|
||||||
@ -319,17 +322,17 @@ abstract class TransactionShow extends Base
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
$type, $transaction, $transactionTemplate = '', $logo = '', array $payment_methods = [],
|
$type, $transaction, $transactionTemplate = '', $logo = '', array $payment_methods = [],
|
||||||
bool $hideButtonAddNew = false, bool $hideButtonMoreActions = false, bool $hideButtonEdit = false, bool $hideButtonDuplicate = false, bool $hideButtonPrint = false, bool $hideButtonShare = false,
|
bool $hideButtonAddNew = false, bool $hideButtonMoreActions = false, bool $hideButtonEdit = false, bool $hideButtonDuplicate = false, bool $hideButtonPrint = false, bool $hideButtonShare = false,
|
||||||
bool $hideButtonEmail = false, bool $hideButtonPdf = false, bool $hideButtonDelete = false, bool $checkButtonReconciled = true,
|
bool $hideButtonEmail = false, bool $hideButtonPdf = false, bool $hideButtonDelete = false, bool $checkButtonReconciled = true,
|
||||||
bool $hideButtonGroupDivider1 = false, bool $hideButtonGroupDivider2 = false, bool $hideButtonGroupDivider3 = false,
|
bool $hideButtonGroupDivider1 = false, bool $hideButtonGroupDivider2 = false, bool $hideButtonGroupDivider3 = false,
|
||||||
string $permissionCreate = '', string $permissionUpdate = '', string $permissionDelete = '',
|
string $permissionCreate = '', string $permissionUpdate = '', string $permissionDelete = '',
|
||||||
string $routeButtonAddNew = '', string $routeButtonEdit = '', string $routeButtonDuplicate = '', string $routeButtonPrint = '', string $signedUrl = '',
|
string $routeButtonAddNew = '', string $routeButtonEdit = '', string $routeButtonDuplicate = '', string $routeButtonPrint = '', string $signedUrl = '',
|
||||||
string $routeButtonEmail = '', string $routeButtonPdf = '', string $routeButtonDelete = '',
|
string $routeButtonEmail = '', string $routeButtonPdf = '', string $routeButtonDelete = '', string $routeContactShow = '',
|
||||||
string $textDeleteModal = '',
|
string $textDeleteModal = '',
|
||||||
bool $hideHeader = false, bool $hideHeaderAccount = false, bool $hideHeaderCategory = false, bool $hideHeaderContact = false, bool $hideHeaderAmount = false, bool $hideHeaderPaidAt = false,
|
bool $hideHeader = false, bool $hideHeaderAccount = false, bool $hideHeaderCategory = false, bool $hideHeaderContact = false, bool $hideHeaderAmount = false, bool $hideHeaderPaidAt = false,
|
||||||
string $textHeaderAccount = '', string $textHeaderCategory = '', string $textHeaderContact = '', string $textHeaderAmount = '', string $textHeaderPaidAt = '',
|
string $textHeaderAccount = '', string $textHeaderCategory = '', string $textHeaderContact = '', string $textHeaderAmount = '', string $textHeaderPaidAt = '',
|
||||||
string $classHeaderAccount = '', string $classHeaderCategory = '', string $classHeaderContact = '', string $classHeaderAmount = '', string $classHeaderPaidAt = '',
|
string $classHeaderAccount = '', string $classHeaderCategory = '', string $classHeaderContact = '', string $classHeaderAmount = '', string $classHeaderPaidAt = '',
|
||||||
|
|
||||||
bool $hideCompany = false, bool $hideCompanyLogo = false, bool $hideCompanyDetails = false, bool $hideCompanyName = false, bool $hideCompanyAddress = false,
|
bool $hideCompany = false, bool $hideCompanyLogo = false, bool $hideCompanyDetails = false, bool $hideCompanyName = false, bool $hideCompanyAddress = false,
|
||||||
bool $hideCompanyTaxNumber = false, bool $hideCompanyPhone = false, bool $hideCompanyEmail = false,
|
bool $hideCompanyTaxNumber = false, bool $hideCompanyPhone = false, bool $hideCompanyEmail = false,
|
||||||
bool $hideContentTitle = false,bool $hidePaidAt = false, bool $hideAccount = false, bool $hideCategory = false, bool $hidePaymentMethods = false, bool $hideReference = false, bool $hideDescription = false,
|
bool $hideContentTitle = false,bool $hidePaidAt = false, bool $hideAccount = false, bool $hideCategory = false, bool $hidePaymentMethods = false, bool $hideReference = false, bool $hideDescription = false,
|
||||||
bool $hideAmount = false,
|
bool $hideAmount = false,
|
||||||
@ -342,7 +345,7 @@ abstract class TransactionShow extends Base
|
|||||||
string $routeDocumentShow = '',
|
string $routeDocumentShow = '',
|
||||||
|
|
||||||
bool $hideAttachment = false, $attachment = [],
|
bool $hideAttachment = false, $attachment = [],
|
||||||
bool $hideFooter = false, bool $hideFooterHistories = false, $histories = [],
|
bool $hideFooter = false, bool $hideFooterHistories = false, $histories = [],
|
||||||
string $textHistories = '', string $classFooterHistories = ''
|
string $textHistories = '', string $classFooterHistories = ''
|
||||||
) {
|
) {
|
||||||
$this->type = $type;
|
$this->type = $type;
|
||||||
@ -381,11 +384,12 @@ abstract class TransactionShow extends Base
|
|||||||
$this->routeButtonEmail = $this->getRouteButtonEmail($type, $routeButtonEmail);
|
$this->routeButtonEmail = $this->getRouteButtonEmail($type, $routeButtonEmail);
|
||||||
$this->routeButtonPdf = $this->getRouteButtonPdf($type, $routeButtonPdf);
|
$this->routeButtonPdf = $this->getRouteButtonPdf($type, $routeButtonPdf);
|
||||||
$this->routeButtonDelete = $this->getRouteButtonDelete($type, $routeButtonDelete);
|
$this->routeButtonDelete = $this->getRouteButtonDelete($type, $routeButtonDelete);
|
||||||
|
$this->routeContactShow = $this->getRouteContactShow($type, $routeContactShow);
|
||||||
|
|
||||||
// Navbar Text
|
// Navbar Text
|
||||||
$this->textDeleteModal = $textDeleteModal;
|
$this->textDeleteModal = $textDeleteModal;
|
||||||
|
|
||||||
// Header Hide
|
// Header Hide
|
||||||
$this->hideHeader = $hideHeader;
|
$this->hideHeader = $hideHeader;
|
||||||
|
|
||||||
$this->hideHeaderAccount = $hideHeaderAccount;
|
$this->hideHeaderAccount = $hideHeaderAccount;
|
||||||
@ -483,7 +487,7 @@ abstract class TransactionShow extends Base
|
|||||||
$this->hideFooter = $hideFooter;
|
$this->hideFooter = $hideFooter;
|
||||||
$this->hideFooterHistories = $hideFooterHistories;
|
$this->hideFooterHistories = $hideFooterHistories;
|
||||||
|
|
||||||
// Histories
|
// Histories
|
||||||
$this->histories = $this->getHistories($histories);
|
$this->histories = $this->getHistories($histories);
|
||||||
$this->textHistories = $this->getTextHistories($type, $textHistories);
|
$this->textHistories = $this->getTextHistories($type, $textHistories);
|
||||||
$this->classFooterHistories = $this->getClassFooterHistories($type, $classFooterHistories);
|
$this->classFooterHistories = $this->getClassFooterHistories($type, $classFooterHistories);
|
||||||
@ -713,6 +717,36 @@ abstract class TransactionShow extends Base
|
|||||||
return 'revenues.destroy';
|
return 'revenues.destroy';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getRouteContactShow($type, $routeContactShow)
|
||||||
|
{
|
||||||
|
if (!empty($routeContactShow)) {
|
||||||
|
return $routeContactShow;
|
||||||
|
}
|
||||||
|
|
||||||
|
//example route parameter.
|
||||||
|
$parameter = 1;
|
||||||
|
|
||||||
|
$route = Str::plural(config('type.' . $type . '.contact_type'), 2) . '.show';
|
||||||
|
|
||||||
|
try {
|
||||||
|
route($route, $config_parameters);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
try {
|
||||||
|
$route = Str::plural($type, 2) . '.' . $config_key;
|
||||||
|
|
||||||
|
route($route, $config_parameters);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$route = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!empty($route)) {
|
||||||
|
return $route;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'customers.show';
|
||||||
|
}
|
||||||
|
|
||||||
protected function getPermissionCreate($type, $permissionCreate)
|
protected function getPermissionCreate($type, $permissionCreate)
|
||||||
{
|
{
|
||||||
if (!empty($permissionCreate)) {
|
if (!empty($permissionCreate)) {
|
||||||
@ -1242,4 +1276,4 @@ abstract class TransactionShow extends Base
|
|||||||
|
|
||||||
return 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
|
return 'col-sm-6 col-md-6 col-lg-6 col-xl-6';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,10 @@
|
|||||||
|
|
||||||
<strong>
|
<strong>
|
||||||
<span class="float-left long-texts mwpx-300 transaction-head-text">
|
<span class="float-left long-texts mwpx-300 transaction-head-text">
|
||||||
{{ $transaction->contact->name }}
|
<a href="{{ route($routeContactShow, $transaction->contact->id) }}">
|
||||||
|
{{ $transaction->contact->name }}
|
||||||
|
</a>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
</strong>
|
</strong>
|
||||||
<br><br>
|
<br><br>
|
||||||
@ -78,4 +81,4 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@stack('header_paid_at_end')
|
@stack('header_paid_at_end')
|
||||||
</div>
|
</div>
|
||||||
|
@ -245,7 +245,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach($transactions as $item)
|
@foreach($transactions as $item)
|
||||||
<tr class="row align-items-center border-top-1 tr-py">
|
<tr class="row align-items-center border-top-1 tr-py">
|
||||||
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
|
<td class="col-xs-6 col-sm-2"><a href="{{ route('payments.show', $item->id) }}">@date($item->paid_at)</a></td>
|
||||||
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||||
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
|
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
|
||||||
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
|
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
@stack('revenue_button_end')
|
@stack('revenue_button_end')
|
||||||
|
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
|
|
||||||
@stack('delete_button_start')
|
@stack('delete_button_start')
|
||||||
@can('delete-sales-customers')
|
@can('delete-sales-customers')
|
||||||
{!! Form::deleteLink($customer, 'customers.destroy') !!}
|
{!! Form::deleteLink($customer, 'customers.destroy') !!}
|
||||||
@ -254,7 +254,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach($transactions as $item)
|
@foreach($transactions as $item)
|
||||||
<tr class="row align-items-center border-top-1 tr-py">
|
<tr class="row align-items-center border-top-1 tr-py">
|
||||||
<td class="col-xs-6 col-sm-2">@date($item->paid_at)</td>
|
<td class="col-xs-6 col-sm-2"><a href="{{ route('revenues.show', $item->id) }}">@date($item->paid_at)</a></td>
|
||||||
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
<td class="col-xs-6 col-sm-2 text-right">@money($item->amount, $item->currency_code, true)</td>
|
||||||
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
|
<td class="col-sm-4 d-none d-sm-block">{{ $item->category->name }}</td>
|
||||||
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
|
<td class="col-sm-4 d-none d-sm-block">{{ $item->account->name }}</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user