serenity-is / Serenity

Business Apps Made Simple with Asp.Net Core MVC / TypeScript
https://serenity.is
MIT License
2.57k stars 796 forks source link

Link of new entity generated with sergen does't work #6739

Closed elenaaralla closed 1 year ago

elenaaralla commented 1 year ago

Before submitting the bug report, please read and check the following items

What happened?

I added Tenat table and generated code with sergen; after build and run, when click on Tenat link nothing happens no errors in console;

I've done suggested step as in this tutorial: https://serenity.is/docs/tutorials/multi_tenancy/multi_tenancy

What did you expect to happen?

I expect to view tenants

How to reproduce?

Simply: create a new project add tenant table and generate code for Tenant table as explained in this tutorial: https://serenity.is/docs/tutorials/multi_tenancy/multi_tenancy

What Serenity Nuget Versions are you seeing the problem on? (separated by comma)

6.6.3

Relevant log output

No response

Serene template version

6.6.3

Sergen version

Serenity Code Generator 6.6.3.0

Code editor

Visual Studio 2022

Operating System

Windows 10 Pro

Node.js version

v16.13.2

TypeScript version

4.7.4

Database type and version

SQLServer 13

On which device do you see the problem?

Desktop

On which operating system do you see the problem?

Windows

On which browsers do you see the problem?

No response

On what version of the browsers do you see the problem?

No response

Additional information

No response

VictorTomaili commented 1 year ago

https://github.com/orgs/serenity-is/discussions/6738#discussioncomment-5465290

elenaaralla commented 1 year ago

https://github.com/orgs/serenity-is/discussions/6738#discussioncomment-5465290

Hi, I have checked sergen version and sergen.json, as suggested; it is all OK; see details belows; I've attached test solution, too.

** Visual Studio 2022 Developer PowerShell v17.3.5
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS D:\WORKING\SereneTest2903\SereneTest2903.Web> dotnet sergen
**Serenity Code Generator 6.6.3.0**

PS D:\WORKING\SereneTest2903\SereneTest2903.Web> dotnet tool update sergen
Lo strumento 'sergen’ è aggiornato (file manifesto D:\WORKING\SereneTest2903\SereneTest2903.Web\.config\dotnet-tools.json versione '6.6.3').
PS D:\WORKING\SereneTest2903\SereneTest2903.Web> dotnet sergen
**Serenity Code Generator 6.6.3.0**

this is the content of sergen.json

{
  "Extends": "defaults@6.6.0",
  "RootNamespace": "SereneTest2903",
  "UpgradeInfo": {
    "InitialType": "Community",
    "InitialVersion": "6.6.3.0"
  }
}

what I have done:

1) I’ve created the progect 2) added tenant table with migration 3) in developer powershell launched dotnet sergen g on newly created table; see the script below:

PS D:\WORKING\SereneTest2903\SereneTest2903.Web> dotnet sergen g
──Table Code Generation ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Enter a Module name for table dbo.Tenants (Default): Administration

Enter a class Identifier for table dbo.Tenants (Tenants): Tenant

Enter a Permission Key for table dbo.Tenants (Administration:General): Administration:Tenants
PS D:\WORKING\SereneTest2903\SereneTest2903.Web>

No error during creation No error during rebuild

The result is the one already described (see attached emage)

I have attached sample project with the issue.

I hope this is I hope it helps to understand where the problem is,

Thank you, Elena

Schermata 2023-03-29 alle 15 06 14 SereneTest2903.zip

VictorTomaili commented 1 year ago

Please continue in discussion, this seems not a bug. Your TenantPage.ts file has some differences. Delete it and re-create it again.