Skip to content
Permalink
Browse files
Merge pull request #43 from markvanveen/develop
Add new permission for income statement
  • Loading branch information
markvanveen committed Oct 11, 2017
2 parents 5c9919e + 180955a commit 5aedaa8ebff7cb3a064d8fc0acef6b4b43bae605
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
@@ -124,7 +124,11 @@ export const AccountingRoutes: Routes = [
},

{path: 'trialBalance', component: TrailBalanceComponent, data: {hasPermission: {id: 'accounting_ledgers', accessLevel: 'READ'}}},
{path: 'incomeStatement', component: IncomeStatementComponent, data: {hasPermission: {id: 'accounting_ledgers', accessLevel: 'READ'}}},
{
path: 'incomeStatement',
component: IncomeStatementComponent,
data: {hasPermission: {id: 'accounting_income_statement', accessLevel: 'READ'}}
},
{
path: 'transactiontypes',
component: TransactionTypeListComponent,
@@ -43,7 +43,7 @@ <h3 md-line translate>Cheque clearing</h3>
<h3 md-line translate>Trial balance</h3>
<p md-line translate>View trial balance</p>
</a>
<a md-list-item [routerLink]="['./incomeStatement']">
<a md-list-item [routerLink]="['./incomeStatement']" *hasPermission="{ id: 'accounting_income_statement', accessLevel: 'READ'}">
<md-icon md-list-avatar>timeline</md-icon>
<h3 md-line translate>Income statement</h3>
<p md-line translate>View income statement</p>
@@ -19,4 +19,5 @@ export class AccountingPermittableGroupIds {
public static readonly JOURNAL_MANAGEMENT = 'accounting__v1__journal';
public static readonly LEDGER_MANAGEMENT = 'accounting__v1__ledger';
public static readonly TRANSACTION_TYPES = 'accounting__v1__tx_types';
public static readonly THOTH_INCOME_STMT = 'accounting__v1__income_stmt';
}
@@ -20,7 +20,7 @@
export type PermissionId = 'identity_self' | 'identity_identities' | 'identity_roles' |
'office_self' | 'office_offices' | 'office_employees' |
'customer_customers' | 'customer_tasks' | 'catalog_catalogs' | 'customer_identifications' | 'customer_portrait' |
'accounting_accounts' | 'accounting_ledgers' | 'accounting_journals' | 'accounting_tx_types' |
'accounting_accounts' | 'accounting_ledgers' | 'accounting_journals' | 'accounting_tx_types' | 'accounting_income_statement' |
'portfolio_product_operations' | 'portfolio_loss_provision' | 'portfolio_products' | 'portfolio_cases' |
'deposit_definitions' | 'deposit_instances' |
'teller_management' | 'teller_operations' |
@@ -68,6 +68,10 @@ export class PermittableGroupIdMapper {
this._permittableGroupMap[AccountingPermittableGroupIds.JOURNAL_MANAGEMENT] = {id: 'accounting_journals', label: 'Journal'};
this._permittableGroupMap[AccountingPermittableGroupIds.LEDGER_MANAGEMENT] = {id: 'accounting_ledgers', label: 'Ledger'};
this._permittableGroupMap[AccountingPermittableGroupIds.TRANSACTION_TYPES] = {id: 'accounting_tx_types', label: 'Transaction types'};
this._permittableGroupMap[AccountingPermittableGroupIds.THOTH_INCOME_STMT] = {
id: 'accounting_income_statement',
label: 'Income statement'
};

this._permittableGroupMap[PortfolioPermittableGroupIds.PRODUCT_OPERATIONS_MANAGEMENT] = {
id: 'portfolio_product_operations',

0 comments on commit 5aedaa8

Please sign in to comment.