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;
|
||||||
|
|
||||||
@ -323,7 +326,7 @@ abstract class TransactionShow extends Base
|
|||||||
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 = '',
|
||||||
@ -381,6 +384,7 @@ 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;
|
||||||
@ -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)) {
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
||||||
|
@ -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