route prefix fixed #1v0ueh7

This commit is contained in:
Sevan Nerse
2021-11-25 14:13:14 +03:00
parent 916d2a15e3
commit a83c8eee3c
4 changed files with 26 additions and 2 deletions

View File

@ -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;
}
}