Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[angular] Polish entity modules and update component #13318

Merged
merged 1 commit into from
Dec 17, 2020

Conversation

kaidohallik
Copy link
Contributor

In #12549 was changed entity module and entity update component.
In current draft PR #12971 entity module will be modified and entity update component changes are deleted.

For v7 beta release I propose to polish entity module and entity update component part with this PR. This PR follows suggestions from Angular module documentation: https://angular.io/guide/module-types
According to this documentation:

  • EntityRoutingModule belongs to Routing module category
  • EntityModule belongs to Routed module category

For #12971 my suggestion is to split detail and update components into 2 different ones, Component + RoutedComponent:

  • Component contains entity data related html and has @Input() entity: IEntity;, for this component is created separate module ComponentModule which belongs to category Widget and where Component is declared
  • in RoutedComponent html has header and footer and main part is Component from Widget module where attribute entity has value read from route data
  • RoutedComponent is declared in EntityModule
  • ComponentModule is imported in EntityModule, so Component is accesible in RoutedComponent
  • if this entity is needed to embed somewhere then in that module is also ComponentModule imported and Component is available for using

ping @mshima


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to follow angular documentation.
So let's merge it.

@mshima mshima merged commit a6a0f94 into jhipster:main Dec 17, 2020
@kaidohallik kaidohallik deleted the polish-angular-entity-module branch December 18, 2020 04:03
@pascalgrimaud
Copy link
Member

@kaidohallik : all JDL Microservices builds failed, since this PR. Can you have a look plz ?

✔ Browser application bundle generation complete.
Error parsing bundle asset "/home/runner/app/store/build/resources/main/static/main.94031a886a154d8f1331.js": no such file
Error parsing bundle asset "/home/runner/app/store/build/resources/main/static/polyfills.05398e7516e78ad5c016.js": no such file
Error parsing bundle asset "/home/runner/app/store/build/resources/main/static/runtime.0e49e2b53282f40c8925.js": no such file

No bundles were parsed. Analyzer will show only original module sizes from stats file.


Error: src/main/webapp/app/entities/crm/shipment/shipment.module.ts:8:10 - error TS2305: Module '"./route/shipment-routing.module"' has no exported member 'ShipmentRoutingModule'.
Webpack Bundle Analyzer saved report to /home/runner/app/store/build/resources/main/stats.html

8 import { ShipmentRoutingModule } from './route/shipment-routing.module';
           ~~~~~~~~~~~~~~~~~~~~~
src/main/webapp/app/entities/crm/invoice/invoice.module.ts:8:10 - error TS2305: Module '"./route/invoice-routing.module"' has no exported member 'InvoiceRoutingModule'.

8 import { InvoiceRoutingModule } from './route/invoice-routing.module';
           ~~~~~~~~~~~~~~~~~~~~
src/main/webapp/app/entities/crm/customer/customer.module.ts:8:10 - error TS2305: Module '"./route/customer-routing.module"' has no exported member 'CustomerRoutingModule'.

8 import { CustomerRoutingModule } from './route/customer-routing.module';
           ~~~~~~~~~~~~~~~~~~~~~
src/main/webapp/app/entities/crm/product-order/product-order.module.ts:8:10 - error TS2305: Module '"./route/product-order-routing.module"' has no exported member 'ProductOrderRoutingModule'.

8 import { ProductOrderRoutingModule } from './route/product-order-routing.module';
           ~~~~~~~~~~~~~~~~~~~~~~~~~
src/main/webapp/app/entities/crm/product/product.module.ts:8:10 - error TS2305: Module '"./route/product-routing.module"' has no exported member 'ProductRoutingModule'.

8 import { ProductRoutingModule } from './route/product-routing.module';
           ~~~~~~~~~~~~~~~~~~~~
src/main/webapp/app/entities/crm/order-item/order-item.module.ts:8:10 - error TS2305: Module '"./route/order-item-routing.module"' has no exported member 'OrderItemRoutingModule'.

8 import { OrderItemRoutingModule } from './route/order-item-routing.module';
           ~~~~~~~~~~~~~~~~~~~~~~

@kaidohallik
Copy link
Contributor Author

I'm looking at that.

@kaidohallik
Copy link
Contributor Author

Created #13322 for fix

@pascalgrimaud pascalgrimaud added this to the 7.0.0-beta.0 milestone Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants