Base solution for your next web application

Activities of "BarcodesGroup"

I am still unable to create any Master-Detail entities, no matter how I configure it. PowerTools works fine, but the angular compilation fails due to missing components and many other errors.

If I change it to a 'standard' entity type and regenerate, then it works fine.

Is there any way to make Master-Detail (1:many) work?

I'm getting many Angular compilation errors after creating a Master-Details entity.

I first created a simple CRUD entity named Customer, migrated the database, rebuilt Angular UI, etc.... This entity is working fine (it just has a few String properties).

Next, I created a Master/Details entity named "SalesRegion". The intention is that each SalesRegion will have multiple customers assigned to it (1-Many).

Here's how I configured SalesRegion:

After performing the migration, nswag/refresh, etc... I now get many npm errors. The first critical errors:

Looking at the console log from Power Tools, I don't see any references to those components listed in the first 2 errors. So that's the first problem I need to solve.

I am wondering if I'm doing something wrong in the Power Tools setup for this type of entity, or if there are some other issues with Master-Details?

I manually edited the .components.ts file and added the "this."

The project builds and runs.

Can I make this fix in a Power Tools template file, so the problem doesn't happen again?

I have a fresh new installation of AspNetZero (Angular).

I was able to use Power Tools to generate two basic entities (UOMs and Categories).

I am now trying to generate a new entity (Items) which has a few string properties, and two navigation properties (FK to the UOMs and Categories tables).

npm generates compiler errors as follows:

Here are the json files for all 3 entities:

<< Items.UOM.json >>
{
  "IsRegenerate": true,
  "MenuPosition": "main",
  "RelativeNamespace": "Items",
  "EntityName": "UOM",
  "EntityNamePlural": "UOMs",
  "TableName": "UOMs",
  "PrimaryKeyType": "int",
  "BaseClass": "Entity",
  "EntityHistory": false,
  "AutoMigration": true,
  "UpdateDatabase": true,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": true,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": true,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "Unit",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 3,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    },
    {
      "Name": "Description",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 3,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    },
    {
      "Name": "Abbreviation",
      "Type": "string",
      "MaxLength": 5,
      "MinLength": 2,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    }
  ],
  "NavigationProperties": [
    {
      "Namespace": "WMSDemo.Items",
      "ForeignEntityName": "UOMSet",
      "IdType": "int",
      "IsNullable": false,
      "PropertyName": "UOMSetId",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown",
      "DisplayPropertyNameInfos": {
        "MergeFormat": null,
        "DisplayPropertyNames": []
      }
    }
  ],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}

<< Items.Category.json >>

{
  "IsRegenerate": true,
  "MenuPosition": "main",
  "RelativeNamespace": "Items",
  "EntityName": "ItemCategory",
  "EntityNamePlural": "ItemCategories",
  "TableName": "ItemCategories",
  "PrimaryKeyType": "int",
  "BaseClass": "CreationAuditedEntity",
  "EntityHistory": true,
  "AutoMigration": true,
  "UpdateDatabase": true,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": true,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": true,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "Category",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 3,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    }
  ],
  "NavigationProperties": [],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}



<< Items.Item.json >>

{
  "IsRegenerate": false,
  "MenuPosition": "main",
  "RelativeNamespace": "Items",
  "EntityName": "Item",
  "EntityNamePlural": "Items",
  "TableName": "Items",
  "PrimaryKeyType": "int",
  "BaseClass": "FullAuditedEntity",
  "EntityHistory": true,
  "AutoMigration": true,
  "UpdateDatabase": true,
  "CreateUserInterface": true,
  "CreateViewOnly": true,
  "CreateExcelExport": true,
  "IsNonModalCRUDPage": true,
  "IsMasterDetailPage": false,
  "PagePermission": {
    "Host": true,
    "Tenant": true
  },
  "Properties": [
    {
      "Name": "SKU",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 1,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    },
    {
      "Name": "Name",
      "Type": "string",
      "MaxLength": 50,
      "MinLength": 3,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": true,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    },
    {
      "Name": "Description",
      "Type": "string",
      "MaxLength": 500,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": false,
        "MinimumValue": 0.0,
        "MaximumValue": 0.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": true,
        "List": false,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    },
    {
      "Name": "BasePrice",
      "Type": "decimal",
      "MaxLength": 0,
      "MinLength": 0,
      "Range": {
        "IsRangeSet": true,
        "MinimumValue": 0.0,
        "MaximumValue": 999999.0
      },
      "Required": false,
      "Nullable": false,
      "Regex": "",
      "UserInterface": {
        "AdvancedFilter": false,
        "List": true,
        "CreateOrUpdate": true
      },
      "ViewType": null,
      "AdditionalData": {}
    }
  ],
  "NavigationProperties": [
    {
      "Namespace": "WMSDemo.Items",
      "ForeignEntityName": "ItemCategory",
      "IdType": "int",
      "IsNullable": false,
      "PropertyName": "ItemCategoryId",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "LookupTable",
      "DisplayPropertyNameInfos": {
        "MergeFormat": "{0}",
        "DisplayPropertyNames": [
          "Category"
        ]
      }
    },
    {
      "Namespace": "WMSDemo.Items",
      "ForeignEntityName": "UOM",
      "IdType": "int",
      "IsNullable": false,
      "PropertyName": "UOMId",
      "DuplicationNumber": 0,
      "RelationType": "single",
      "ViewType": "Dropdown",
      "DisplayPropertyNameInfos": {
        "MergeFormat": "{0}",
        "DisplayPropertyNames": [
          "Unit"
        ]
      }
    }
  ],
  "NavigationPropertyOneToManyTables": [],
  "EnumDefinitions": [],
  "DbContext": null
}

Showing 1 to 4 of 4 entries