Base solution for your next web application

Activities of "lschelvan"

Hi, we have an issue with GetSettingValueForUserAsync not returning an updated value. It appears to be returning a cached value.

We are using the below line to change/ set a new setting value:

await SettingManager.ChangeSettingForUserAsync(AbpSession.ToUserIdentifier(), AppSettings.WMS.InventoryStockViewSettings.InventoryLotGroupBy, ((bool)input.InventoryLotGroupBy).ToString());

Then we are using the below to get the updated value from DB:

userSettings.InventoryLotGroupBy = await SettingManager.GetSettingValueForUserAsync<bool>(AppSettings.WMS.InventoryStockViewSettings.InventoryLotGroupBy, AbpSession.ToUserIdentifier());

The API endpoint for getting Updated values is returning old values to the client side most of the time (the values have been updated as expected in DB). It works fine after I hard reload the page/Frontend.

Note: Everything works fine on local, the issue is occurring only on live (Azure app service).

Is the [RequiresFeature] attribute no longer supported? I am using version 11.4

If it's not supported, does anyone have some code for a custom attribute and checker? (If not, I can write my own).

Thanks.

Any update?

Is there any update on this?

I am wondering if anybody out there is able to generate Master-Detail entities. If you can, could you zip up your AspNetZeroRadTool/FileTemplates folder and share it?

I started a project more than 2 weeks ago and have been unable to proceed due to this issue. (I want to be able to use Power Tools to scaffold all my master-detail views, so that I don't have to write that code from scratch).

I am wondering if anybody out there is able to generate Master-Detail entities. If you can, could you zip up your AspNetZeroRadTool/FileTemplates folder and share it?

I started a project 2 weeks ago and have been unable to proceed due to this issue.

Here is one example.

I am also trying to use this child entity for Master-Detail, but I am unable to generate Master-Detail entities. (See https://support.aspnetzero.com/QA/Questions/11379/Power-Tools-Master---Detail-problems )

I am using Power Tools 3.2.4 but had the same problems with 3.2.3. I have reinstalled Power Tools several times. I am very frustrated because Power Tools was the main reason I purchased the AspNetZero license, but so far I have been unable to make progress on this project.

{ "IsRegenerate": true, "MenuPosition": "main", "RelativeNamespace": "Items", "EntityName": "ItemSubcategory", "EntityNamePlural": "ItemSubcategories", "TableName": "ItemSubcategories", "PrimaryKeyType": "long", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": false, "UpdateDatabase": false, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "IsNonModalCRUDPage": true, "IsMasterDetailPage": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Subcategory", "Type": "string", "MaxLength": 50, "MinLength": 0, "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": "WMSPlatform.Items", "ForeignEntityName": "ItemCategory", "IdType": "long", "IsNullable": false, "PropertyName": "ItemCategoryId", "DisplayPropertyName": "Category", "DuplicationNumber": 0, "RelationType": "single", "ViewType": "LookupTable", "IsGeneratedByMasterPage": true },], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }

When trying to regenerate an entity that has navigation properties:

**Here is the console output from Power Tools ** (generated ItemCategories as Master-Detail)....(I've redacted the calls to prettier, etc.)

-> ItemCategoriesAppService.cs is being generated. -> IItemCategoriesAppService.cs is being generated. -> ItemCategoryConsts.cs is being generated. -> CreateOrEditItemCategoryDto.cs is being generated. -> ItemCategoryDto.cs is being generated. -> GetAllItemCategoriesForExcelInput.cs is being generated. -> GetAllForLookupTableInput.cs is being generated. -> GetAllItemCategoriesInput.cs is being generated. -> GetItemCategoryForViewDto.cs is being generated. -> GetItemCategoryForEditOutput.cs is being generated. -> ItemCategory.cs is being generated. -> ItemCategoriesExcelExporter.cs is being generated. -> IItemCategoriesExcelExporter.cs is being generated. -> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> WMSPlatformDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified.

Starting to create child table items for Items.ItemSubcategory.json -> ItemSubcategoriesAppService.cs is being generated. -> IItemSubcategoriesAppService.cs is being generated. -> ItemSubcategoryConsts.cs is being generated. -> CreateOrEditItemSubcategoryDto.cs is being generated. -> ItemSubcategoryDto.cs is being generated. -> GetAllItemSubcategoriesForExcelInput.cs is being generated. -> GetAllForLookupTableInput.cs is being generated. -> GetAllItemSubcategoriesInput.cs is being generated. -> GetItemSubcategoryForViewDto.cs is being generated. -> GetItemSubcategoryForEditOutput.cs is being generated. -> ItemSubcategoryItemCategoryLookupTableDto.cs is being generated. -> ItemSubcategory.cs is being generated. -> ItemSubcategoriesExcelExporter.cs is being generated. -> IItemSubcategoriesExcelExporter.cs is being generated. -> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> WMSPlatformDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified. -> itemSubcategories.component.ts is being generated. -> itemSubcategories.component.html is being generated. -> create-or-edit-itemSubcategory.component.html is being generated. -> create-or-edit-itemSubcategory.component.ts is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.ts is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.html is being generated. -> itemSubcategory-itemCategory-lookup-table-modal.component.less is being generated. -> itemSubcategory.module.ts is being generated. -> itemSubcategory-routing.module.ts is being generated. -> view-itemSubcategory.component.html is being generated. -> view-itemSubcategory.component.ts is being generated. -> main-routing.module.ts is being modified. -> app-navigation.service.ts is being modified. -> service-proxy.module.ts is being modified. -> WMSPlatform.xml is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 2.43s. -> AppPermissions.cs is being modified. -> AppAuthorizationProvider.cs is being modified. -> WMSPlatformDbContext.cs is being modified. -> CustomDtoMapper.cs is being modified. -> masterDetailChild_ItemCategory_itemSubcategories.component.ts is being generated. -> masterDetailChild_ItemCategory_itemSubcategories.component.html is being generated. -> masterDetailChild_ItemCategory_itemSubcategory.module.ts is being generated. -> service-proxy.module.ts is being modified. -> masterDetailChild_ItemCategory_itemSubcategories.component.ts is being modified. -> WMSPlatform.xml is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 2.73s.

Child table items for Items.ItemSubcategory.json were created!

-> itemCategories.component.ts is being generated. -> itemCategories.component.html is being generated. -> create-or-edit-itemCategory-modal.component.html is being generated. -> create-or-edit-itemCategory-modal.component.ts is being generated. -> itemCategory.module.ts is being generated. -> itemCategory-routing.module.ts is being generated. -> view-itemCategory-modal.component.html is being generated. -> view-itemCategory-modal.component.ts is being generated. -> main-routing.module.ts is being modified. -> app-navigation.service.ts is being modified. -> service-proxy.module.ts is being modified. -> WMSPlatform.xml is being modified. -> ItemSubcategoriesAppService.cs is being modified. -> GetAllItemSubcategoriesInput.cs is being modified. -> GetAllItemSubcategoriesForExcelInput.cs is being modified. -> Formatting generated client side files. yarn run v1.22.19 XXX Done in 3.08s.

Code generation is complete. Press ENTER to exit...

Angular compilation generates these errors: (There are many more errors that follow)

` ./src/app/main/items/itemSubcategories/masterDetailChild_ItemCategory_itemSubcategory.module.ts:11:0-160 - Error: Module not found: Error: Can't resolve './masterDetailChild_ItemCategory_create-or-edit-itemSubcategory.component' in 'D:\XXX\angular\src\app\main\items\itemSubcategories'

./src/app/main/items/itemSubcategories/masterDetailChild_ItemCategory_itemSubcategory.module.ts:12:0-142 - Error: Module not found: Error: Can't resolve './masterDetailChild_ItemCategory_view-itemSubcategory.component' in 'D:\XXX\angular\src\app\main\items\itemSubcategories'

Error: src/app/main/items/itemCategories/itemCategory.module.ts:17:9 - error NG6002: 'MasterDetailChild_ItemCategory_ItemSubcategoryModule' does not appear to be an NgModule class.

17 MasterDetailChild_ItemCategory_ItemSubcategoryModule, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ `

Power Tools did not generate the files indicated (masterDetailChild_ItemCategory_create-or-edit-itemSubcategory.component and masterDetailChild_ItemCategory_view-itemSubcategory.component).

**Items.ItemCategory.json: ** { "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "Items", "EntityName": "ItemCategory", "EntityNamePlural": "ItemCategories", "TableName": "ItemCategories", "PrimaryKeyType": "long", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": false, "UpdateDatabase": false, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "IsNonModalCRUDPage": false, "IsMasterDetailPage": true, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Category", "Type": "string", "MaxLength": 50, "MinLength": 0, "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": [], "NavigationPropertyOneToManyTables": [ { "EntityJson": "Items.ItemSubcategory.json", "ForeignPropertyName": "ItemCategoryId", "IsNullable": "False", "DisplayPropertyName": "Category", "ViewType": "LookupTable" }, ], "EnumDefinitions": [], "DbContext": null }

Items.ItemSubcategory.json { "IsRegenerate": false, "MenuPosition": "main", "RelativeNamespace": "Items", "EntityName": "ItemSubcategory", "EntityNamePlural": "ItemSubcategories", "TableName": "ItemSubcategories", "PrimaryKeyType": "long", "BaseClass": "Entity", "EntityHistory": false, "AutoMigration": false, "UpdateDatabase": false, "CreateUserInterface": true, "CreateViewOnly": true, "CreateExcelExport": true, "IsNonModalCRUDPage": true, "IsMasterDetailPage": false, "PagePermission": { "Host": true, "Tenant": true }, "Properties": [ { "Name": "Subcategory", "Type": "string", "MaxLength": 50, "MinLength": 0, "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": "WMSPlatform.Items", "ForeignEntityName": "ItemCategory", "IdType": "long", "IsNullable": false, "PropertyName": "ItemCategoryId", "DisplayPropertyName": "Category", "DuplicationNumber": 0, "RelationType": "single", "ViewType": "LookupTable", "IsGeneratedByMasterPage": true },], "NavigationPropertyOneToManyTables": [], "EnumDefinitions": [], "DbContext": null }

Also, I cannot use the Power Tools "Regenerate Entity" function with any entity that has navigation properties, because of runtime errors during generation, but that's a separate issue.

I generated the entity again as a normal CRUD (not Master-Detail) so that I can continue to work on this project, but I really need to set these entities up as Master-Detail (and I have quite a few other entities that are master-detail or 1:many).

Any update on this?

I just downloaded a new ASPNetZero solution (core+Angular).. I tried to use the newest Power Tools (in VS2022) to generate a Master-Detail relationship with 2 very simple entities:

I would like to be able to create a view for each Category, where the Subcategories for that Category are listed (and there is also a link to create a new Subcategory for the currently selected Category).

I can't compile the Angular project (I get the same errors about missing 'view' and 'create or edit' components).

Will there be a new version of Power Tools soon (with Master-Detail working for Angular)?

Showing 21 to 30 of 30 entries