If I specify the order in routes and not patching it againg getting that error as above image
const newHomeRouteShowConfig: Partial<ABP.Route> = { invisible: false, requiredPolicy: 'Admin', order: 0 };
const newHomeRouteHideConfig: Partial<ABP.Route> = { invisible: true, requiredPolicy: 'Admin', order: 0 };
this.routes.patch('Entities', newHomeRouteShowConfig); this.routes.patch('Banks', newHomeRouteShowConfig); this.routes.patch('Suppliers', newHomeRouteShowConfig); this.routes.patch('Program', newHomeRouteHideConfig);
this patch code is added to app.component.ts
If I specify the order 0 while pattch the menu is arrangeing the order of excuting the code
but in mozilla it showing different order in other browsers it showing differnt order.
1)app-routing.module.ts
const routes: Routes = [ { path: 'anchor-admin-dashboard', component: ApplicationLayoutComponent, loadChildren: () => import('./dashboard1/dashboard1.module').then((m) => m.Dashboard1Module), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: '::Menu:Dashboard', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order:1, } as ABP.Route, }, }, { path: 'suppliers', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-supplier/manage-supplier.module').then((m) => m.ManageSupplierModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Suppliers', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order: 2, } as ABP.Route, }, }, { path: 'banks', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-bank/manage-bank.module').then((m) => m.ManageBankModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Banks', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order: 3, } as ABP.Route, }, }, { path: 'entities', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-entity/manage-entity.module').then((m) => m.ManageEntityModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Entities', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin', order:4, } as ABP.Route, }, }, { path: 'program', component: ApplicationLayoutComponent, loadChildren: () => import('./manage-program/manage-program.module').then(m => m.ManageProgramModule), canActivate: [AuthGuard, PermissionGuard], data: { routes: { name: 'Program', iconClass: 'fa fa-line-chart', requiredPolicy: 'Admin' } as ABP.Route, } }
@NgModule({ imports: [RouterModule.forRoot(routes)], exports: [RouterModule], })
]
2)component code & app.component.ts
const newHomeRouteShowConfig: Partial<ABP.Route> = { invisible: false, requiredPolicy: 'Admin', order: 0 };
const newHomeRouteHideConfig: Partial<ABP.Route> = {
invisible: true,
requiredPolicy: 'Admin',
order: 0
};
if ((currentmodule === null) || (currentmodule === false)) {
this.routes.patch('Suppliers', newHomeRouteShowConfig);
this.routes.patch('Entities', newHomeRouteShowConfig);
this.routes.patch('Banks', newHomeRouteShowConfig);
this.routes.patch('Program', newHomeRouteHideConfig);
} else {
this.routes.patch('Suppliers', newHomeRouteHideConfig);
this.routes.patch('Entities', newHomeRouteHideConfig);
this.routes.patch('Banks', newHomeRouteHideConfig);
this.routes.patch('Program', newHomeRouteShowConfig);
}
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
Nav Menu Items not showing properly in Mozila firefox. I configured routes using routemodule to show/hide the routes based on some conditions,
so as per the documetaion using patch route we acheived that. if I specify order propery in routing and not patch I am getting below error and If I specify order as 0 it's working fine in chrom, edge
const newHomeRouteShowConfig: Partial<ABP.Route> = { invisible: false, requiredPolicy: 'Admin', order: 0 };
const newHomeRouteHideConfig: Partial<ABP.Route> = {
invisible: true,
requiredPolicy: 'Admin',
order: 0
};
this.routes.patch('Entities', newHomeRouteShowConfig);
this.routes.patch('Banks', newHomeRouteShowConfig);
this.routes.patch('Suppliers', newHomeRouteShowConfig);
this.routes.patch('Program', newHomeRouteHideConfig);
but not working as expected in firefox.
I am upgarding my angular App from ABP 2.7.0 to ABP 3.0.4. Some how i manged to build the Anguar app with below package.json
{ "name": "MyApp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "build:prod": "ng build --configuration production", "test": "jest", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "jest": { "preset": "jest-preset-angular", "setupFilesAfterEnv": [ "<rootDir>/setupJest.ts" ], "testPathIgnorePatterns": [ "<rootDir>/node_modules/", "<rootDir>/dist/", "<rootDir>/src/test.ts" ] }, "dependencies": { "@angular/animations": "^10.0.11", "@angular/cdk": "^10.1.3", "@angular/common": "~10.0.1", "@angular/compiler": "~10.0.1", "@angular/core": "~10.0.1", "@angular/forms": "~10.0.1", "@angular/material": "^10.1.3", "@angular/platform-browser": "~10.0.1", "@angular/platform-browser-dynamic": "~10.0.1", "@angular/router": "~10.0.1", "@volo/abp.ng.account": "~3.0.4", "@volo/abp.ng.audit-logging": "~3.0.4", "@volo/abp.ng.identity": "~3.0.4", "@volo/abp.ng.identity-server": "~3.0.4", "@volo/abp.ng.language-management": "~3.0.4", "@volo/abp.ng.saas": "~3.0.4", "@volo/abp.ng.text-template-management": "~3.0.4", "@volo/abp.ng.theme.lepton": "~3.0.4", "jest": "^26.0.1", "jest-preset-angular": "^8.2.1", "rxjs": "~6.5.4", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1000.0", "@angular-devkit/build-ng-packagr": "~0.1000.0", "@angular/cli": "~10.0.0", "@angular/compiler-cli": "~10.0.1", "@angular/language-service": "~10.0.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", "ng-packagr": "^10.0.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.5" } }
now facing below issues
ERROR in src/app/account/account.component.ts:5:3 - error TS2305: Module '"../../../node_modules/@abp/ng.core/abp-ng.core"' has no exported member 'getAbpRoutes'.
5 getAbpRoutes, ~~~~~~~~~~~~ src/app/app.module.ts:5:47 - error TS2307: Cannot find module '@abp/ng.setting-management.config' or its corresponding type declarations.
5 import { SettingManagementConfigModule } from '@abp/ng.setting-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:10:40 - error TS2307: Cannot find module '@ngxs/logger-plugin' or its corresponding type declarations.
10 import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin'; ~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:12:37 - error TS2307: Cannot find module '@volo/abp.ng.account.config' or its corresponding type declarations.
12 import { AccountConfigModule } from '@volo/abp.ng.account.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:13:42 - error TS2307: Cannot find module '@volo/abp.ng.audit-logging.config' or its corresponding type declarations.
13 import { AuditLoggingConfigModule } from '@volo/abp.ng.audit-logging.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:14:44 - error TS2307: Cannot find module '@volo/abp.ng.identity-server.config' or its corresponding type declarations.
14 import { IdentityServerConfigModule } from '@volo/abp.ng.identity-server.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:15:38 - error TS2307: Cannot find module '@volo/abp.ng.identity.config' or its corresponding type declarations.
15 import { IdentityConfigModule } from '@volo/abp.ng.identity.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:16:48 - error TS2307: Cannot find module '@volo/abp.ng.language-management.config' or its corresponding type declarations.
16 import { LanguageManagementConfigModule } from '@volo/abp.ng.language-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:17:34 - error TS2307: Cannot find module '@volo/abp.ng.saas.config' or its corresponding type declarations.
17 import { SaasConfigModule } from '@volo/abp.ng.saas.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~ src/app/app.module.ts:18:52 - error TS2307: Cannot find module '@volo/abp.ng.text-template-management.config' or its corresponding type declarations.
18 import { TextTemplateManagementConfigModule } from '@volo/abp.ng.text-template-management.config'; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
Arguments: C:\Program Files\nodejs\node.exe C:\Users\P7109954\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js
PATH: C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS
Yarn version: 1.22.4
Node version: 12.16.0
Platform: win32 x64
Trace: Error: https://registry.yarnpkg.com/date-fns/-/date-fns-2.15.0.tgz: ESOCKETTIMEDOUT at ClientRequest.<anonymous> (C:\Users\xyz\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:141375:19) at Object.onceWrapper (events.js:427:28) at ClientRequest.emit (events.js:321:20) at TLSSocket.emitRequestTimeout (_http_client.js:714:9) at Object.onceWrapper (events.js:427:28) at TLSSocket.emit (events.js:321:20) at TLSSocket.Socket._onTimeout (net.js:478:8) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
npm manifest: { "name": "MyApp", "version": "0.0.0", "scripts": { "ng": "ng", "start": "ng serve --open", "build": "ng build", "build:prod": "ng build --configuration production", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "~10.0.1", "@angular/common": "~10.0.1", "@angular/compiler": "~10.0.1", "@angular/core": "~10.0.1", "@angular/forms": "~10.0.1", "@angular/platform-browser": "~10.0.1", "@angular/platform-browser-dynamic": "~10.0.1", "@angular/router": "~10.0.1", "@volo/abp.ng.account": "~3.0.4", "@volo/abp.ng.audit-logging": "~3.0.4", "@volo/abp.ng.identity": "~3.0.4", "@volo/abp.ng.identity-server": "~3.0.4", "@volo/abp.ng.language-management": "~3.0.4", "@volo/abp.ng.saas": "~3.0.4", "@volo/abp.ng.text-template-management": "~3.0.4", "@volo/abp.ng.theme.lepton": "~3.0.4", "rxjs": "~6.5.4", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, "devDependencies": { "@angular-devkit/build-angular": "~0.1000.0", "@angular-devkit/build-ng-packagr": "~0.1000.0", "@angular/cli": "~10.0.0", "@angular/compiler-cli": "~10.0.1", "@angular/language-service": "~10.0.1", "@types/jasmine": "~3.5.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.11.1", "codelyzer": "^5.1.2", "jasmine-core": "~3.5.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", "ng-packagr": "^10.0.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "tslint": "~6.1.0", "typescript": "~3.9.5" } }
yarn manifest: No manifest
Lockfile: No lockfile
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
How does ABP framework store the CreationTime or LastModificationTime for any entity ? Is it in UTC format or should it be handle separately and How?
I am using Postgrsql and wanted have all my Datetime fields should be in UTC format. Please suggest solution.
Yes. Issue seems fixed after saas module update.
Any update on this.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/indexmultitenant
https://support.abp.io/QA/Questions/228/ABP-Identity-server
No response on #228 so closed and created new support ticket
IdentityServerApiResources didnt work and it thorws the unauthentication exception on module service for multi tenant environment solo and seperate DB(havining sepearet tenant DB)
Its is working for Admin role but not for others
2020-07-11 19:53:14.820 +05:30 [DBG] Setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample 2020-07-11 19:53:14.820 +05:30 [DBG] Finished setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample 2020-07-11 19:53:14.820 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:anchor,n:ProfileManagement.Sample 2020-07-11 19:53:14.821 +05:30 [DBG] Found in the cache: pn:R,pk:anchor,n:ProfileManagement.Sample 2020-07-11 19:53:14.821 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Litmus_App,n:ProfileManagement.Sample 2020-07-11 19:53:14.822 +05:30 [DBG] Found in the cache: pn:C,pk:Litmus_App,n:ProfileManagement.Sample 2020-07-11 19:53:14.822 +05:30 [INF] Authorization failed. 2020-07-11 19:53:16.836 +05:30 [WRN] ---------- RemoteServiceErrorInfo ---------- 2020-07-11 19:53:16.840 +05:30 [WRN] { "code": null, "message": "Authorization failed! Given policy has not granted.", "details": null, "validationErrors": null } 2020-07-11 19:53:16.841 +05:30 [WRN] Authorization failed! Given policy has not granted. Volo.Abp.Authorization.AbpAuthorizationException: Authorization failed! Given policy has not granted. at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy) at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context) at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation) at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed) at lambda_method(Closure , Object )
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
How to change default profile icon, link text and css, how to redirect to login page on user logout. (without component replacement)
2020-07-11 19:53:14.820 +05:30 [DBG] Setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.820 +05:30 [DBG] Finished setting the cache item: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.820 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.821 +05:30 [DBG] Found in the cache: pn:R,pk:anchor,n:ProfileManagement.Sample
2020-07-11 19:53:14.821 +05:30 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Litmus_App,n:ProfileManagement.Sample
2020-07-11 19:53:14.822 +05:30 [DBG] Found in the cache: pn:C,pk:Litmus_App,n:ProfileManagement.Sample
2020-07-11 19:53:14.822 +05:30 [INF] Authorization failed.
2020-07-11 19:53:16.836 +05:30 [WRN] ---------- RemoteServiceErrorInfo ----------
2020-07-11 19:53:16.840 +05:30 [WRN] {
"code": null,
"message": "Authorization failed! Given policy has not granted.",
"details": null,
"validationErrors": null
}
2020-07-11 19:53:16.841 +05:30 [WRN] Authorization failed! Given policy has not granted.
Volo.Abp.Authorization.AbpAuthorizationException: Authorization failed! Given policy has not granted.
at Microsoft.AspNetCore.Authorization.AbpAuthorizationServiceExtensions.CheckAsync(IAuthorizationService authorizationService, AuthorizationPolicy policy)
at Volo.Abp.Authorization.MethodInvocationAuthorizationService.CheckAsync(MethodInvocationAuthorizationContext context)
at Volo.Abp.Authorization.AuthorizationInterceptor.AuthorizeAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at lambda_method(Closure , Object )