route prefix fixed #1v0ueh7
This commit is contained in:
@ -34,6 +34,9 @@ abstract class TransactionShow extends Base
|
||||
|
||||
public $date_format;
|
||||
|
||||
/** @var string */
|
||||
public $routePrefix;
|
||||
|
||||
/** @var bool */
|
||||
public $hideButtonAddNew;
|
||||
|
||||
@ -362,6 +365,7 @@ abstract class TransactionShow extends Base
|
||||
$this->date_format = $this->getCompanyDateFormat();
|
||||
$this->textRecurringType = $this->getTextRecurringType($type, $textRecurringType);
|
||||
$this->hideRecurringMessage = $hideRecurringMessage;
|
||||
$this->routePrefix = $this->getRoutePrefix($type);
|
||||
|
||||
// Navbar Hide
|
||||
$this->hideButtonAddNew = $hideButtonAddNew;
|
||||
@ -1297,4 +1301,12 @@ abstract class TransactionShow extends Base
|
||||
|
||||
return 'general.revenues';
|
||||
}
|
||||
|
||||
protected function getRoutePrefix($type) {
|
||||
if ($prefix = config('type.' . $type . '.route.prefix', false)){
|
||||
return 'revenues';
|
||||
}
|
||||
|
||||
return $prefix;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user