Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "fawad29"

  • What is your product version? 10 Latest

  • What is your product type (Angular or MVC)? ASP.net Core and Angular

  • What is product framework type (.net framework or .net core)? .NET5

  • What is ABP Framework version? The one that comes up with ASP.NET and Angular v10.

I am having issue with installing a third party library angular-formio and formio. I installed this library using the following command

npm install --save angular-formio formio

Next, I added the following imports in my app.module.ts

import { Formio, FormioModule, FormioAppConfig } from 'angular-formio';
import { FormioGrid } from 'angular-formio/grid';

I add FormioModule and FormioAppConfig in the import and FormioResources in the provider sections of NgModule

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent,
    DataComponent
  ],
  imports: [
    BrowserModule,
    CommonModule,
    FormioModule,
    FormioGrid,
    RouterModule.forRoot([
      {
        path: '',
        component: HomeComponent
      },
      {
        path: 'data',
        component: DataComponent
      },
      {
        path: 'forms',
        loadChildren: './forms/forms.module#FormsModule'
      },
      {
        path: 'auth',
        loadChildren: './auth/auth.module#AuthModule'
      },
      {
        path: 'event',
        loadChildren: './event/event.module#EventModule'
      },
      {
        path: 'manager',
        loadChildren: './form/form.module#FormModule'
      }
    ], {useHash: true})
  ],
  providers: [
    PrismService,
    FormioAuthService,
    FormioResources,
    {provide: FormioAppConfig, useValue: AppConfig},
    {provide: FormioAuthConfig, useValue: {
      login: {
        form: 'user/login'
      },
      register: {
        form: 'user/register'
      }
    }}
  ],
  bootstrap: [AppComponent]
})

In my component file test.component.ts, I have the following

@Component({
    templateUrl: './test.component.html',
    animations: [appModuleAnimation()]
    
})

export class TestComponent extends AppComponentBase implements OnInit {

    constructor(
        injector: Injector,
        private _testService: TestServiceProxy
    ) {
        super(injector);
    }
ngOnInit(): void {
 }
}

In test.component.html, I have the following:

<formio [form]="{components: [
            {
              type: 'textfield',
              label: 'FirstName',
              key: 'firstName',
              input: true
            },
            {
              type: 'textfield',
              label: 'LastName',
              key: 'lastName',
              input: true
            },
            {
              type: 'email',
              label: 'Email',
              key: 'email',
              input: true
            },
            {
              type: 'button',
              action: 'submit',
              label: 'Submit',
              theme: 'primary'
            }
          ]}" [submission]="{
            data: {
              firstName: 'Joe',
              lastName: 'Smith',
              email: '[email protected]'
            }
          }"></formio>

My package.json is given below.

{
  "name": "abp-zero-template",
  "version": "10.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "ng": "ng",
    "publish": "gulp build && ng build --prod",
    "start": "gulp buildDev && ng serve --host 0.0.0.0 --port 4203",
    "hmr": "gulp buildDev && ng serve --host 0.0.0.0 --port 4203 --hmr",
    "test": "gulp buildDev && ng test",
    "pree2e": "webdriver-manager update --standalone false --gecko false",
    "e2e": "gulp buildDev && protractor",
    "create-dynamic-bundles": "gulp buildDev",
    "nswag": "cd nswag/ && refresh.bat"
  },
  "private": false,
  "dependencies": {
    "@angular/animations": "^10.0.2",
    "@angular/cdk": "^10.0.1",
    "@angular/common": "^10.0.2",
    "@angular/compiler": "^10.0.2",
    "@angular/core": "^10.0.2",
    "@angular/elements": "^11.0.3",
    "@angular/forms": "^10.0.2",
    "@angular/platform-browser": "^10.0.2",
    "@angular/platform-browser-dynamic": "^10.0.2",
    "@angular/platform-server": "^10.0.2",
    "@angular/router": "^10.0.2",
    "@fullcalendar/core": "^5.1.0",
    "@microsoft/signalr": "^3.1.3",
    "@swimlane/ngx-charts": "^16.0.0",
    "abp-ng2-module": "^6.2.0",
    "abp-web-resources": "^5.3.0",
    "adal-angular": "^1.0.17",
    "angular-formio": "^4.11.1",
    "angular-gridster2": "^10.0.1",
    "angular-oauth2-oidc": "^10.0.2",
    "angular2-counto": "^1.2.5",
    "angular2-text-mask": "^9.0.0",
    "animate.css": "^4.1.0",
    "chart.js": "^2.9.3",
    "cookieconsent": "^3.1.1",
    "core-js": "^3.6.4",
    "famfamfam-flags": "^1.0.0",
    "formiojs": "^4.12.1",
    "js-cookie": "^2.2.1",
    "just-compare": "^1.3.0",
    "localforage": "^1.7.3",
    "lodash-es": "^4.17.15",
    "luxon": "^1.25.0",
    "msal": "^1.2.2",
    "ng2-file-upload": "^1.4.0",
    "ngx-bootstrap": "^5.6.1",
    "ngx-captcha": "^8.0.1",
    "ngx-image-cropper": "^3.1.4",
    "ngx-perfect-scrollbar": "^9.0.0",
    "ngx-spinner": "^9.0.1",
    "object-path": "^0.11.4",
    "primeicons": "^4.0.0",
    "primeng": "^9.1.2",
    "push.js": "^1.0.12",
    "quill": "^1.3.7",
    "rtl-detect": "^1.0.2",
    "rxjs": "^6.5.4",
    "simple-line-icons": "^2.4.1",
    "sweetalert2": "^9.10.7",
    "text-mask-addons": "^3.8.0",
    "tslib": "^2.0.0",
    "webdriver-manager": "^12.1.7",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1000.0",
    "@angular/cli": "^10.0.0",
    "@angular/compiler-cli": "^10.0.2",
    "@angularclass/hmr": "^2.1.3",
    "@angularclass/hmr-loader": "^3.0.4",
    "@types/jasmine": "~3.5.10",
    "@types/jasminewd2": "^2.0.8",
    "@types/lodash-es": "^4.17.0",
    "@types/node": "^14.0.14",
    "codelyzer": "^6.0.0",
    "globby": "^11.0.1",
    "gulp": "^4.0.1",
    "gulp-clean-css": "^4.3.0",
    "gulp-concat": "^2.6.1",
    "gulp-less": "^4.0.1",
    "gulp-postcss": "^8.0.0",
    "gulp-uglify": "^3.0.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~5.0.0",
    "karma": "~5.1.0",
    "karma-chrome-launcher": "~3.1.0",
    "karma-cli": "~2.0.0",
    "karma-coverage-istanbul-reporter": "~3.0.2",
    "karma-jasmine": "~3.3.0",
    "karma-jasmine-html-reporter": "^1.5.0",
    "merge-stream": "^2.0.0",
    "nswag": "^13.7.4",
    "postcss-url": "^9.0.0",
    "prettier": "2.1.2",
    "protractor": "~7.0.0",
    "ts-node": "~8.10.2",
    "tslint": "~6.1.0",
    "tslint-config-prettier": "^1.18.0",
    "typescript": "3.9.6"
  }
}

I receive the following error

ERROR in src/app/admin/mycomponent/test.component.html:103:21 - error NG8001: 'formio' is not a known element:
1. If 'formio' is an Angular component, then verify that it is part of this module.
2. To allow any element add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.

103                     <formio [form]="{components: [
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
104             {
    ~~~~~~~~~~~~~
...
133             }
    ~~~~~~~~~~~~~
134           }"></formio>
    ~~~~~~~~~~~~~~~~~~~~~~

I have compared it with the following demo as well but to no avail. Demo works fine on its on but it is not working on ASPNET Zero angular project. I have spent two days on it but unable to fix it.

I have tried adding it in root.module.ts instead of app.module.ts but to no avail.

The same issue is happening with KendoGrid import, see below. There must be some easy steps for using third party components.

    ERROR in src/app/admin/roles/roles.component.html:103:21 - error NG8001: 'kendo-grid' is not a known element:
    1. If 'kendo-grid' is an Angular component, then verify that it is part of this module.
    2. If 'kendo-grid' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

    103                     <kendo-grid [data]="gridData" [height]="410">

Can you help?

Thanks

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version? 9.1.0
  • What is your product type (Angular or MVC)? MVC Jquery
  • What is product framework type (.net framework or .net core)? .net core

If issue related with ABP Framework

  • What is ABP Framework version?nThe one that comes with v9.1.0

It is taking long time for pages to load even if we load it the second time. The resources are being cached on browser but even then it takes long time. I have emailed a word document detailing the issue, please have a look. We are concerned that we have built our application and it is very slow.

Question

I am aware that the framework uses in-memory database to run tests. My issue is that we keep some configuration data for each tenant in tenant's database. Now in order to create test, we need to manually create that configuration data in the code for each tenant and then create tests and run them. This is very manual process. Is there a way, where we continue to use in-memory database in tests but can retrieve the configuration data from the actual database?

Product Details Product version is 8.0.0. ABP Framework is the one which came with version 8.0.0. ASP.NET Core MVC & jQuery Project

Thanks

Question

I have a permission checking code in application service and I would like to move it to the domain service as it is being used by more than one application services. In the current method, I get the permissions from the database and has implemented a cache so that the next time application does not get the permissions from the database. My question is that you recommend implementing cache in application service so if I move this method to the domain service then I will lose the functionality of cache. I can see following three options, can you help?

  1. I create a method in the domain service that simply calls this existing application service method (this way cache is already implemented in the application service), all application services call this new domain service function.
  2. Implement the method in the domain service and implement cache in the domain service (I don't know if it can be done in ABP architecture).
  3. Implment the method in the domain service with cache (this is NOT ideal).

If I declare a class as static what will be the scope of it, will it be application wide or tenant wide. I would like to store validation error messages in a database table, each tenant will have their own set of validation error messages. I was thinking of loading error messages for each tenant and keep them in cache in a static class so that I dont' have to inject it all the time as the error message will not change and keep the resources as low as possible. However, each tenant can have their own set of error messages so I was wondering about the scope of static class. As you know in c#, a static class exists only once so their only one copy of data so I was wondering how my proposed design will work. Or if you have an alternative way of handling it in ANZ, then please suggest.

Question

I would like to create menu from the items stored in the database, instead of hardwiring them in AppNavigationProvider.cs. Do you have a sample example for this purpose? What should be the database look like for this purpose and in what format menus should be returned to abp.nav.menus.MainMenu?

I am using ANZ v8 MVC Core and Jquery.

I am using ANZ version 8, when I run the default application, it shows menus on the left. If I am on Dasbhoard page and I click on Demo UI Components menu, it launches the page via URL App/DemoUIComponents. I would like to pass a parameter when this link is clicked so that URL beomes App/DemoUIComponents/1234. The parameter value will not be known until Dashboard page launches. Similalry when I am on Demo UI component page and I click on Dashboard menu then I would like to pass an id parameter to Dashboard page as well.

I can pass id parameter via javascript if I have a button on a page and I click on it using the following link. Can I

$('#EditButton').click(function () {
`location.href = '@Html.Raw(@Url.Action("EditView", new {id = Model.id }))'`
 });

Can I trap a client side event for menu click as well?

How can this be procedure be implemented, I do not want to use session because sessions are not unique to each browser tab?

Question

Hi,

We need to implement group level permissions. The current permissions that we have on ANZ are role based and user based. In our multi tenant application, we would like to have permissions setup as explained below.

Roles - E.g Local Administrator is tennat wide Groups - For example, each tenant can have multiple Groups GroupA, GroupB and son on. Users - Each Users belongs to a role and a group.

Permissions

Local Administrator role is allowed to view MenuA and MenuB. Group A is allowed to view MenuA but not MenuB. Group B is allowed to view MenuB but not MenuA.

UserA belongs to Local Administrator role and Group A, if User A logs in then we would like User A to see Group A menu only even though his/her role has access to both Menu items but his Group is not allowed to access MenuB. This way we don't have to assign permissions for each user, we can assign UserA to Group A and all permissions should be set up like that. Also, we do not want to create multipl role variations such as Local Administratar A, Local Administrator B.

UserB belongs to Local Administrator role and Group B, if User B logs in then we would like User B to see Group B menu only even though his/her role has access to both Menu items but his Group is not allowed to access MenuA.

What is the best way to implement above? Do we need to create new tables/views to handle permissions for Groups, if yes, is there any guidance on how to implement it?

Product Details Product version is 8.0.0. ABP Framework is the one which came with version 8.0.0. ASP.NET Core MVC & jQuery Project

Hi,

I am following the link displayed below for implementing entity history.

https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Features-Mvc-Core-Entity-History

I have an entity class which has some properties. When I update this entity, audit logs does not show old (previous) value, it only shows the new i.e. updated values. For example, if my entity has a property called Name and I update its value from UserA to UserB, the audit log does not show UserA as old Values.

Entity is shown below

EntityFrameworkCoreModule is shown below

EntityHistoryHelper code is shown below:

Can you please help?

Thanks

We have an entity which inherits from IMustHaveTenant. We want to assign tenant id from the session using AbpSession.GetTenantId() when a tenant user creates this entity, can you please confirm the best place to assign tenant id? Should this be done in the Create function of the EntityAppService?

Showing 11 to 20 of 22 entries