import { InjectionToken } from '@angular/core' ; export interface IAppConfig { [ k ] : any ; } export let AppConfig = new InjectionToken < IAppConfig > ( 'app.config' ) ; export interface Module { id : string ; url : string ; name : string ; optional : boolean ; } let modules = [ { "id" : "expenditure-viz" , "url" : "vydaje" , "name" : "Výdaje" , "optional" : true } , { "id" : "income-viz" , "url" : "prijmy" , "name" : "Příjmy" , "optional" : true } , { "id" : "invoice-list" , "url" : "faktury" , "name" : "Faktury" , "optional" : true } , { "id" : "notice-board" , "url" : "uredni-deska" , "name" : "Úřední deska" , "optional" : true } , { "id" : "contract-list" , "url" : "registr-smluv" , "name" : "Registr smluv" , "optional" : true } , { "id" : "data-sources" , "url" : "data" , "name" : "Data" , "optional" : true } , ] ; export const AppConfigData = { docsUrl : "https://cityvizor.cz/landing" , modules : modules , acl : { routes : [ { route : "/admin/:cat" , allowRoles : [ "admin" ] } , { route : "/admin" , allowRoles : [ "admin" ] } , { route : "/ucet" , allowRoles : [ "admin" , "user" ] } , { route : "/:url/admin/:cat" , allowRoles : [ "admin" ] , allowCheck : ( user , params ) => user . managedProfiles . indexOf ( params . profile ) !== - 1 } , { route : "/:url/admin" , allowRoles : [ "admin" ] , allowCheck : ( user , params ) => user . managedProfiles . indexOf ( params . profile ) !== - 1 } ] , default : { allow : true } } } ;